File fix-multiple-definitions.patch of Package luola

diff -Nur luola-1.3.2/src/pilot.c new/src/pilot.c
--- luola-1.3.2/src/pilot.c	2006-02-03 15:42:33.000000000 +0100
+++ new/src/pilot.c	2021-06-12 19:26:13.500350252 +0200
@@ -97,14 +97,14 @@
 }
 
 /* Deploy the parachute */
-static void deploy_parachute(struct Pilot *pilot) {
+static void deploy_parachute(Pilot *pilot) {
     pilot->parachuting = 1;
     pilot->walker.jumpmode = GLIDE;
     pilot->walker.physics.radius = PILOT_PAR_RADIUS;
 }
 
 /* Remove the parachute */
-static void undeploy_parachute(struct Pilot *pilot) {
+static void undeploy_parachute(Pilot *pilot) {
     pilot->parachuting = 0;
     pilot->walker.jumpmode = JUMP;
     pilot->walker.physics.radius = PILOT_STD_RADIUS;
@@ -138,7 +138,7 @@
 }
 
 /* Remove a pilot from the level */
-void remove_pilot(struct Pilot *pilot) {
+void remove_pilot(Pilot *pilot) {
     struct dllist *lst = dllist_find(pilot_list,pilot);
 
     pilot_detach_rope(pilot);
@@ -150,7 +150,7 @@
 }
 
 /* Kill a pilot */
-void kill_pilot(struct Pilot *pilot) {
+void kill_pilot(Pilot *pilot) {
     int p;
     for(p=0;p<4;p++)
         if(&players[p].pilot == pilot) break;
@@ -164,7 +164,7 @@
 }
 
 /* Make sweatdrops appear around pilot's head */
-static void make_sweatdrops(const struct Pilot *pilot) {
+static void make_sweatdrops(const Pilot *pilot) {
     struct Particle *sweatdrop;
     int r;
     for (r = 0; r < 6; r++) {
@@ -193,7 +193,7 @@
 void animate_pilots (void) {
     int p;
     for(p=0;p<4;p++) {
-        struct Pilot *pilot = &players[p].pilot;
+        Pilot *pilot = &players[p].pilot;
         if(players[p].state != ALIVE || players[p].ship)
             continue;
 
@@ -254,7 +254,7 @@
 }
 
 /* Draw the crosshair */
-static void draw_pilot_crosshair (const struct Pilot *pilot, const SDL_Rect *targ)
+static void draw_pilot_crosshair (const Pilot *pilot, const SDL_Rect *targ)
 {
     const int w = pilot->sprite[pilot->parachuting?2:0]->w;
     const int h = pilot->sprite[pilot->parachuting?2:0]->h;
@@ -273,7 +273,7 @@
     struct dllist *lst = pilot_list;
     
     while(lst) {
-        struct Pilot *pilot = lst->data;
+        Pilot *pilot = lst->data;
         unsigned char sn;
         SDL_Rect rect;
         int plr;
@@ -314,7 +314,7 @@
 }
 
 /* Shoot in the direction of attack_vector */
-static void pilot_shoot(struct Pilot *pilot) {
+static void pilot_shoot(Pilot *pilot) {
     double xoff,yoff;
     xoff = pilot->attack_vector.x * (pilot->walker.physics.radius+1);
     yoff = pilot->attack_vector.y * (pilot->walker.physics.radius+1);
@@ -327,7 +327,7 @@
 }
 
 /* Shoot ninjarope at the direction pointed by v */
-static void pilot_shoot_rope(struct Pilot *pilot, Vector v) {
+static void pilot_shoot_rope(Pilot *pilot, Vector v) {
     int r;
     v = multVector(v,24.0);
     pilot->rope = create_spring(&pilot->walker.physics,6.0,10);
@@ -342,7 +342,7 @@
 }
 
 /* Detach the ninjarope */
-void pilot_detach_rope(struct Pilot *pilot) {
+void pilot_detach_rope(Pilot *pilot) {
     if(pilot->rope) {
         free_spring(pilot->rope);
         pilot->rope = NULL;
@@ -351,7 +351,7 @@
 
 /* Interpret commands from game controller */
 void control_pilot (int plr) {
-    struct Pilot *pilot = &players[plr].pilot;
+    Pilot *pilot = &players[plr].pilot;
     pilot->lock = players[plr].controller.weapon2;
     /* Horizontal axis */
     if (players[plr].controller.axis[1] > 0) {
diff -Nur luola-1.3.2/src/pilot.h new/src/pilot.h
--- luola-1.3.2/src/pilot.h	2006-02-02 16:39:19.000000000 +0100
+++ new/src/pilot.h	2021-06-12 19:24:46.407700384 +0200
@@ -34,7 +34,7 @@
 
 #define PARACHUTE_FRAME 2
 
-struct Pilot {
+typedef struct {
     struct Walker walker;       /* inherits Walker */
     SDL_Surface *sprite[3];     /* Normal,Normal2, Parachute */
     Vector attack_vector;       /* Direction where gun is pointed to */
@@ -64,10 +64,10 @@
 void eject_pilot(int plr);
 
 /* Remove a pilot from the level */
-void remove_pilot(struct Pilot *pilot);
+void remove_pilot(Pilot *pilot);
 
 /* Kill a pilot */
-void kill_pilot(struct Pilot *pilot);
+void kill_pilot(Pilot *pilot);
 
 /* Animate all ejected pilots */
 extern void animate_pilots (void);
@@ -82,6 +82,6 @@
 extern int find_nearest_pilot(float x,float y,int myplr, double *dist);
 
 /* Detach rope */
-extern void pilot_detach_rope(struct Pilot *pilot);
+extern void pilot_detach_rope(Pilot *pilot);
 
 #endif
diff -Nur luola-1.3.2/src/player.h new/src/player.h
--- luola-1.3.2/src/player.h	2006-02-02 17:03:09.000000000 +0100
+++ new/src/player.h	2021-06-12 19:25:19.607948126 +0200
@@ -39,7 +39,7 @@
 
 typedef struct {
     struct Ship *ship;
-    struct Pilot pilot;
+    Pilot pilot;
     GameController controller;
     enum {INACTIVE=0,ALIVE,DEAD,BURIED} state;
     int recall_cooloff;
openSUSE Build Service is sponsored by