aboutsummaryrefslogtreecommitdiff
path: root/original/main.h
diff options
context:
space:
mode:
authorThomas Guillermo Albers Raviola <thomas@thomaslabs.org>2026-01-16 19:38:33 +0100
committerThomas Guillermo Albers Raviola <thomas@thomaslabs.org>2026-01-16 19:38:33 +0100
commita90db3b7b6e87e24c789b5db222f1cef92809bde (patch)
tree2096abcb1ac1ea970a51e598257186bc4e030b22 /original/main.h
Initial commit
Diffstat (limited to 'original/main.h')
-rw-r--r--original/main.h50
1 files changed, 50 insertions, 0 deletions
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 <SDL2/SDL.h>
+#include <stdio.h>
+#include <SDL2/SDL_image.h>
+#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