Add 'final/game.h'
This commit is contained in:
parent
5f6fb491c3
commit
a329062531
35
final/game.h
Normal file
35
final/game.h
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef _GAME_H_INCLUDE_
|
||||
#define _GAME_H_INCLUDE_
|
||||
|
||||
#define CACTUS_COUNT 5
|
||||
#include "world.h"
|
||||
|
||||
// Set of variables that expresses state of the game.
|
||||
|
||||
struct game {
|
||||
//xposition of the dino
|
||||
int dinox;
|
||||
//y position of the dino
|
||||
int dinoy;
|
||||
//jumps counters
|
||||
int jumps;
|
||||
//изменяет цвета динозавра
|
||||
int color;
|
||||
|
||||
int type[CACTUS_COUNT];
|
||||
int first_cactusx[CACTUS_COUNT];
|
||||
int cactusx[CACTUS_COUNT];
|
||||
//x and y positions of
|
||||
int cactusy[CACTUS_COUNT];
|
||||
int score;
|
||||
int level;
|
||||
char message[100];
|
||||
};
|
||||
|
||||
// Returns pointer to newly allocated state
|
||||
void* init_game();
|
||||
|
||||
// Changes world according to the game state (pressed key, screen size or other event)
|
||||
int game_event(struct event* event,void* game);
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user