Merge branch 'main' into ui
commit
8fd411bc84
2
debug
2
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
|
||||
|
|
2
release
2
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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue