Remove some warnings
parent
970fb66db8
commit
9c54a483bd
|
@ -9,6 +9,10 @@ typedef struct input_args_t
|
|||
bool *alive;
|
||||
} InputArgs;
|
||||
|
||||
#ifdef _WIN32
|
||||
void input(void *vargp);
|
||||
#else
|
||||
void *input(void *vargp);
|
||||
#endif
|
||||
|
||||
#endif /* __INPUT_H__ */
|
||||
|
|
|
@ -30,7 +30,11 @@ int getch(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
void input(void *vargp)
|
||||
#else
|
||||
void *input(void *vargp)
|
||||
#endif
|
||||
{
|
||||
int *out = ((InputArgs *)vargp)->out;
|
||||
bool *alive = ((InputArgs *)vargp)->alive;
|
||||
|
@ -39,5 +43,7 @@ void *input(void *vargp)
|
|||
{
|
||||
*out = getch();
|
||||
}
|
||||
#ifndef _WIN32
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -47,10 +47,9 @@ void resetCoordinates(void)
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
srand(time(NULL));
|
||||
srand((unsigned int)time(NULL));
|
||||
Player *player = playerCreate(DOWN, DEFX, DEFY, 0);
|
||||
Screen *screen = screenCreate(SIZE, SIZE, ' ');
|
||||
PlayerNode *node;
|
||||
int i;
|
||||
int head_x, head_y;
|
||||
Food food = generateFood(player);
|
||||
|
|
Loading…
Reference in New Issue