From a90db3b7b6e87e24c789b5db222f1cef92809bde Mon Sep 17 00:00:00 2001 From: Thomas Guillermo Albers Raviola Date: Fri, 16 Jan 2026 19:38:33 +0100 Subject: Initial commit --- original/main.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 original/main.h (limited to 'original/main.h') diff --git a/original/main.h b/original/main.h new file mode 100644 index 0000000..6074a1a --- /dev/null +++ b/original/main.h @@ -0,0 +1,50 @@ +#ifndef MAIN_H_INCLUDED +#define MAIN_H_INCLUDED +#include +#include +#include +#define NUM_CAJAS 10 +#define GRAVEDAD 1 +#define CUADRO 0 + +typedef struct +{ + int x, y ,w, h; + +} Suelo; + +typedef struct +{ + int x, y, w, h; + int dy, dx; + int facing_left, walking; +} Man; + +typedef struct +{ + int x, y, w, h; +} Camara; + +typedef struct +{ + Man man; + Camara camara[3]; + Suelo suelo[NUM_CAJAS]; + SDL_Texture *player; + SDL_Texture *ladrillo; + SDL_Renderer *renderer; + int scrollx; + int scrolly; + int salto; + int i; +} GameState; + +int processEvents(SDL_Window *window, GameState *gameState); + +void doRender(SDL_Renderer *renderer, GameState *gameState); + +void loadScreen(GameState *gameState, SDL_Renderer *renderer); + +void collisionDetect(GameState *game); + +#endif // MAIN_H_INCLUDED -- cgit v1.2.3