forked from nakidai/csnake
1
0
Fork 0

Remove some warnings

Nakidai 2023-11-25 00:11:34 +03:00
parent 970fb66db8
commit 9c54a483bd
3 changed files with 11 additions and 2 deletions

View File

@ -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__ */

View File

@ -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
}

View File

@ -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);