Very strange...
Tested it again by using the macro in the structs definitions, i have already a segfault
Program received signal SIGINT, Interrupt.
[Switching to Thread 0xb7bebb30 (LWP 3070)]
rectCollision (x1=151566241, y1=176, w1=16, h1=16, x2=64, y2=368, w2=10, h2=8)
at retroinvaders.c:177
177 {
The problem seems to be the call to rectCollision in checking of bunker pieces, that pass an incorrect x1 to the function...
I put some debugging line in the code and the result was this
[Thread debugging using libthread_db enabled]
[New Thread 0xb7dbbb30 (LWP 3424)]
[New Thread 0xb783bb90 (LWP 3425)]
[New Thread 0xb701ab90 (LWP 3426)]
[New Thread 0xb6819b90 (LWP 3427)]
[Thread 0xb783bb90 (LWP 3425) exited]
[Thread 0xb6819b90 (LWP 3427) exited]
[Thread 0xb701ab90 (LWP 3426) exited]
[New Thread 0xb701ab90 (LWP 3428)]
x1 49 y1 144 w1 16 h116
x2 64 y2 368 w2 10 h28
x1 49 y1 144 w1 16 h116
x2 64 y2 368 w2 10 h28
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7dbbb30 (LWP 3424)]
0x0804ae1f in moveInvaders () at retroinvaders.c:1065
1065 printf("x1 %d y1 %d w1 %d h1%d\nx2 %d y2 %d w2 %d h2%d\n", Enemy[i].x, Enemy[i].y, Enemy[i].width, STD_H, Bunker[k].x, Bunker[k].y, BUNKER_TILE_W, BUNKER_TILE_H);
(gdb)
Is it right that the thread 0xb7dbbb30 (LWP 3424)] points to another memory address like this? 0x0804ae1f in moveInvaders () at retroinvaders.c:1065
I have really no idea about...