From 0bdfba4d117da7ce70b7d52242ca2a2afd0e3c62 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 7 May 2023 17:54:14 +0200 Subject: [PATCH 1/3] added -DCMAKE_EXPORT_COMPILE_COMMANDS to debug and release build scripts --- debug | 2 +- release | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debug b/debug index 9b57e31..8c12ba3 100755 --- a/debug +++ b/debug @@ -1,3 +1,3 @@ #!/bin/sh -cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug && cmake --build build && lldb bin/sim-game -o r -b +cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 && cmake --build build && lldb bin/sim-game -o r -b diff --git a/release b/release index 56a6220..b3daa33 100755 --- a/release +++ b/release @@ -1,3 +1,3 @@ #!/bin/sh -cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build && bin/sim-game +cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=1 && cmake --build build && bin/sim-game From 8f7792c6734b7bd2317d41bdc242eb1b8ac1f856 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 7 May 2023 17:55:08 +0200 Subject: [PATCH 2/3] removed all references of ui module since this is now a separate branch/pr --- src/game.c | 3 --- src/player.c | 1 - 2 files changed, 4 deletions(-) diff --git a/src/game.c b/src/game.c index 6601076..c2feec3 100644 --- a/src/game.c +++ b/src/game.c @@ -1,7 +1,6 @@ #include "engine.h" #include "world.h" #include "player.h" -#include "ui.h" #include "corelib/input.h" #include "corelib/render.h" #include "corelib/assets.h" @@ -56,8 +55,6 @@ void on_scroll_zoom(float delta) { } void load_game() { - ui_style.button.button = ui_style.button.active = make_nineslice("button.png", 126, 0.01); - ui_style.text = make_text_style("ui_font.otf", (SDL_Color){255, 255, 255, 255}, 50, 0.02f); world_sheet = make_spritesheet("tileset.png", 189, 189); input_init(); diff --git a/src/player.c b/src/player.c index f90c3c2..6589109 100644 --- a/src/player.c +++ b/src/player.c @@ -1,6 +1,5 @@ #include "player.h" #include "layers.h" -#include "ui.h" #include "world.h" #include "input.h" #include "engine.h" From 9f9cc446fe91c9e4bc8d47f3ffc1fa8298b3d707 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 7 May 2023 17:55:22 +0200 Subject: [PATCH 3/3] switched testing player controller to wasd (from arrows) --- src/player.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/player.c b/src/player.c index 6589109..4fada2e 100644 --- a/src/player.c +++ b/src/player.c @@ -26,8 +26,8 @@ object_t* create_player() { player_instance->evt_update = &player_update; player_instance->sprite = make_sprite("player.png", 0, 0); - add_key_listener(SDL_SCANCODE_LEFT, SDL_SCANCODE_RIGHT, &player_axis_horizontal); - add_key_listener(SDL_SCANCODE_DOWN, SDL_SCANCODE_UP, &player_axis_vertical); + add_key_listener(SDL_SCANCODE_A, SDL_SCANCODE_D, &player_axis_horizontal); + add_key_listener(SDL_SCANCODE_S, SDL_SCANCODE_W, &player_axis_vertical); return player_instance; }