make textures_dump_atlases work again and expose it as a utility function

This commit is contained in:
2024-09-26 21:32:08 -03:00
parent 0e68ecbc88
commit f4b52b5450
6 changed files with 42 additions and 28 deletions

View File

@ -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 */

View File

@ -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 */