40 lines
789 B
C
40 lines
789 B
C
#ifndef _IZI_ENGINE_H
|
|
#define _IZI_ENGINE_H
|
|
|
|
#define ENGINE_TICK 25
|
|
#define DIR_UP 1
|
|
|
|
#include <stdint.h>
|
|
#include <gint/display.h>
|
|
#include "animation.h"
|
|
|
|
struct player{
|
|
float y;
|
|
float yvelocity;
|
|
struct anim_data anim;
|
|
int idle;
|
|
int frame;
|
|
};
|
|
|
|
struct game{
|
|
struct player* player;
|
|
int time;
|
|
struct background* background;
|
|
struct stalactite* stalactites;
|
|
struct wind* wind;
|
|
int score;
|
|
};
|
|
|
|
struct background{
|
|
int x;
|
|
};
|
|
|
|
void e_draw_player(struct game const *game);
|
|
void e_jump(struct player *player);
|
|
void e_update_player(struct game *game);
|
|
void engine_tick(struct game *game, int dt);
|
|
void e_draw_background(struct background *background);
|
|
int e_is_dead(struct game const *game);
|
|
|
|
#endif /* _IZI_ENGINE_H */
|