diff options
author | Victor Gamper <victor@erika-imac.fritz.box> | 2020-01-26 11:04:36 +0100 |
---|---|---|
committer | Victor Gamper <victor@erika-imac.fritz.box> | 2020-01-26 11:04:36 +0100 |
commit | 06a678629c99293a642af7d3aa39c20ea28e3d4d (patch) | |
tree | cb5af475b962a501df818d250b19262ee0944e4e /catch.h | |
download | c-catch-06a678629c99293a642af7d3aa39c20ea28e3d4d.tar.gz c-catch-06a678629c99293a642af7d3aa39c20ea28e3d4d.zip |
Added a string renderer
Diffstat (limited to 'catch.h')
-rw-r--r-- | catch.h | 51 |
1 files changed, 51 insertions, 0 deletions
@@ -0,0 +1,51 @@ +/* + * catch.h + * + * Created on: 25.01.2020 + * Author: victor + */ +#include <SDL/SDL.h> +#include <stdbool.h> +#include <unistd.h> +#include <string.h> + +#include "chargebar.h" +#include "cat_bmp.h" + +#define SCREEN_WIDTH 640 +#define SCREEN_HEIGHT 480 + +#define FLOOR_HEIGHT 50 + +#define CHARGEBAR_POS_X 10 +#define CHARGEBAR_POS_Y 10 + +#define MAXIMUM_JUMP_FORCE 5 + +#define BIRD_COUNT 3 +#define BIRD_TYPE_NONE 0 +#define BIRD_TYPE_BIRD 1 + +#define STATE_MAIN_MENU 1 +#define STATE_GAME 2 +#define STATE_GAME_OVER 3 + +// cat and bird structures +struct Cat { + int x; + float y; + float downwardForce; + bool jumping; +}; + +struct Bird { + int x, y; + unsigned char type; +}; + +// function predefines +extern void gameRoutine(); + +// BitmapFontRenderer.c +extern void Font_Init(); +extern void Font_DrawString(SDL_Surface* surface, int x, int y, char* string); |