diff options
| author | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-01-16 19:38:33 +0100 |
|---|---|---|
| committer | Thomas Guillermo Albers Raviola <thomas@thomaslabs.org> | 2026-01-16 19:38:33 +0100 |
| commit | a90db3b7b6e87e24c789b5db222f1cef92809bde (patch) | |
| tree | 2096abcb1ac1ea970a51e598257186bc4e030b22 /progress/src/gameprogress.c | |
Initial commit
Diffstat (limited to 'progress/src/gameprogress.c')
| -rw-r--r-- | progress/src/gameprogress.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/progress/src/gameprogress.c b/progress/src/gameprogress.c new file mode 100644 index 0000000..2fe614a --- /dev/null +++ b/progress/src/gameprogress.c @@ -0,0 +1,24 @@ +#include "main.h" + +void loadGame(GameState *gameState) +{ + FILE *fp; + fp = fopen ("duel.map", "r"); + int x; + int y; + int w; + int h; + fscanf(fp,"%d", &gameState->maxE); + for(int i = 0; i < gameState->maxE; i++) + { + fscanf(fp,"%d", &x); + fscanf(fp,"%d", &y); + fscanf(fp,"%d", &w); + fscanf(fp,"%d", &h); + gameState->entidades[i].x = x; + gameState->entidades[i].y = y; + gameState->entidades[i].w = w; + gameState->entidades[i].h = h; + printf("%d\n", gameState->entidades[i].x); + } +} |
