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 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..4fada2e 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" @@ -27,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; }