make textures_dump_atlases work again and expose it as a utility function
This commit is contained in:
@ -23,6 +23,9 @@ void game_tick(void) {
|
||||
input_add_action(&ctx.input, "debug_toggle");
|
||||
input_bind_action_scancode(&ctx.input, "debug_toggle", SDL_SCANCODE_BACKSPACE);
|
||||
|
||||
input_add_action(&ctx.input, "debug_dump_atlases");
|
||||
input_bind_action_scancode(&ctx.input, "debug_dump_atlases", SDL_SCANCODE_HOME);
|
||||
|
||||
input_add_action(&ctx.input, "player_left");
|
||||
input_bind_action_scancode(&ctx.input, "player_left", SDL_SCANCODE_A);
|
||||
|
||||
@ -54,6 +57,10 @@ void game_tick(void) {
|
||||
ctx.debug = !ctx.debug;
|
||||
}
|
||||
|
||||
if (input_is_action_just_pressed(&ctx.input, "debug_dump_atlases")) {
|
||||
textures_dump_atlases();
|
||||
}
|
||||
|
||||
state->scene->tick(state);
|
||||
|
||||
/* there's a scene switch pending, we can do it now that the tick is done */
|
||||
|
@ -23,6 +23,9 @@ void game_tick(void) {
|
||||
input_add_action(&ctx.input, "debug_toggle");
|
||||
input_bind_action_scancode(&ctx.input, "debug_toggle", SDL_SCANCODE_BACKSPACE);
|
||||
|
||||
input_add_action(&ctx.input, "debug_dump_atlases");
|
||||
input_bind_action_scancode(&ctx.input, "debug_dump_atlases", SDL_SCANCODE_HOME);
|
||||
|
||||
input_add_action(&ctx.input, "player_left");
|
||||
input_bind_action_scancode(&ctx.input, "player_left", SDL_SCANCODE_A);
|
||||
|
||||
@ -54,6 +57,10 @@ void game_tick(void) {
|
||||
ctx.debug = !ctx.debug;
|
||||
}
|
||||
|
||||
if (input_is_action_just_pressed(&ctx.input, "debug_dump_atlases")) {
|
||||
textures_dump_atlases();
|
||||
}
|
||||
|
||||
state->scene->tick(state);
|
||||
|
||||
/* there's a scene switch pending, we can do it now that the tick is done */
|
||||
|
Reference in New Issue
Block a user