diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-03-15 21:57:44 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-03-15 21:57:44 +0100 |
commit | 1c0cb0d1cf8c9cb6a11aa404d8c31def1087a586 (patch) | |
tree | 68f58c14fd0e50bfa5fb650a76f22d3cd53c5169 | |
parent | 6a70bf52bc2ed5d28b7d08854fabfaee27be3e84 (diff) |
(UNCLEAN) partial merge of #37
-rw-r--r-- | .vscode/settings.json | 15 | ||||
-rw-r--r-- | src/GameLoop/shop.h | 4 | ||||
-rw-r--r-- | src/GameLoop/startingScreen.h | 8 | ||||
-rw-r--r-- | src/engine/draw_screen.c | 3 | ||||
-rw-r--r-- | src/engine/engine.c | 2 | ||||
-rw-r--r-- | src/engine/entity.c | 4 |
6 files changed, 13 insertions, 23 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json index 7f37ba0..d027762 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,18 +8,5 @@ } }, "cmake.configureOnOpen": false, - "files.eol": "\n", - "nrf-connect.topdir": "${nrf-connect.sdk:2.1.2}", - "nrf-connect.toolchain.path": "${nrf-connect.toolchain:2.1.2}", - "files.associations": { - "input.h": "c", - "draw_screen.h": "c", - "camera.h": "c", - "entity.h": "c", - "stdint.h": "c", - "player_controller.h": "c", - "sprite_controller.h": "c", - "types.h": "c", - "startingscreen.h": "c" - } + "files.eol": "\n" } diff --git a/src/GameLoop/shop.h b/src/GameLoop/shop.h index 35bb780..39db9fd 100644 --- a/src/GameLoop/shop.h +++ b/src/GameLoop/shop.h @@ -1,7 +1,8 @@ +#pragma once + #include "input.h" #include "engine/draw_screen.h" - #include <stdint.h> #include <stdbool.h> @@ -11,5 +12,4 @@ typedef enum { hh_e_STATE_END } hh_e_ShopStates; - bool hh_show_Shop(); diff --git a/src/GameLoop/startingScreen.h b/src/GameLoop/startingScreen.h index f51cc66..5b4f15a 100644 --- a/src/GameLoop/startingScreen.h +++ b/src/GameLoop/startingScreen.h @@ -1,13 +1,11 @@ #pragma once +#include "GameLoop/shop.h" #include <stdint.h> #include <stdbool.h> -typedef enum { - hh_e_STATE_SHOW, - hh_e_STATE_Input, - hh_e_STATE_END -} hh_e_screenStates; +// TODO: fix naming of enum consts +typedef hh_e_ShopStates hh_e_screenStates; bool hh_show_startingScreen(); diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index 205d4b6..43d3cd4 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -61,10 +61,11 @@ void hh_setup_screen(){ } void hh_setup_startingScreen(){ + return; int size = 300; // 40 x as tiles 30 y as tiles FILE* level = fopen("../test/bin/startingScreen.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ - fprintf(stderr, "Error: Failed to open file.\n"); + fprintf(stderr, "Error: Failed to open file. AAAA\n"); return; } fseek(level, (0* sizeof(int)) + sizeof(int), SEEK_SET); diff --git a/src/engine/engine.c b/src/engine/engine.c index 3280892..d852a99 100644 --- a/src/engine/engine.c +++ b/src/engine/engine.c @@ -1,5 +1,5 @@ #include "engine/draw_screen.h" -#include "engine/bullet.h"" +#include "engine/bullet.h" #include "engine/level.h" #include "engine/maths.h" #include "engine/sprite_controller.h" diff --git a/src/engine/entity.c b/src/engine/entity.c index 153e7e1..888539a 100644 --- a/src/engine/entity.c +++ b/src/engine/entity.c @@ -3,6 +3,10 @@ #include "engine/entity.h" #include "engine/maths.h" +#ifdef HH_TARGET_DESKTOP +#include <stdio.h> +#endif + /* PLAYER: (pos on X) ,___, |