#include #include #include #include #include #include #include "config.h" #include "Engine.h" #include "Catbug.h" #include "Timer.h" #include "Pickups.h" int playing = 1; int quit = 0; int fullscreen = 0; int points = 0; int threshold = 10; int maxHP = STARTING_HP; time_t ticker; Timer fps; SDL_Event event; SDL_Surface* screen = NULL; SDL_Surface* window = NULL; SDL_Surface* score = NULL; SDL_Surface* bg = NULL; SDL_Surface* hpwedge = NULL; TTF_Font* font = NULL; TTF_Font* font2 = NULL; Catbug* player; Pickup** stuff; int main(int argc, char* args[]) { if (!init(argc, args)) { printf("Init failed\n"); return 1; } printf("Init complete\n"); while (playing) { title(); resetGame(); while(!quit) { timeStart(&fps); renderBG(); drawCatbug(player); moveCatbug(player); managePickups(); updateScore(); drawHP(); interact(); frameAdvance(); checkHP(); } } cleanup(); return 0; }