Das Programmierspiel von der Gulasch-Programmier-Nacht 11

(Latest mirror + merged latest fork by qr4 on Lua 5.3)

Entropia info page https://entropia.de/GPN11:Programmierspiel (dead links)
Origin Gitlab
https://code.nerd2nerd.org/n2n/WeltraumProgrammierNacht

screen.h 523B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef SCREEN_H
  2. #define SCREEN_H
  3. #include "globals.h"
  4. #ifdef __SSE__
  5. #include <x86intrin.h>
  6. #endif
  7. typedef double v2d __attribute__ ((vector_size (16)));
  8. typedef union {
  9. v2d v;
  10. struct {
  11. double x;
  12. double y;
  13. };
  14. } vector_t;
  15. typedef struct {
  16. vector_t center;
  17. float safety_radius;
  18. } cluster_t;
  19. typedef struct wp_t waypoint_t;
  20. struct wp_t {
  21. vector_t point;
  22. waypoint_t* next;
  23. };
  24. void sdl_init();
  25. int main_loop();
  26. void draw_line(vector_t *p1, vector_t *p2);
  27. void draw_blob(cluster_t* p);
  28. #endif /*SCREEN_H*/