Change keybinds to be more convenient

Also, remove asan compile flag for web build
scene_man
En Yi 2023-08-20 11:47:51 +08:00
parent 3df97bce95
commit 5cbacf8516
3 changed files with 10 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
.cache/
build/
web/
compile_commands.json
.gdb_history

View File

@ -24,6 +24,7 @@ set(GAME_LIBS
add_subdirectory(scenes)
add_executable(${PROJECT_NAME}
main.c
)
@ -36,7 +37,6 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
${GAME_LIBS}
)
add_executable(scene_test
scene_test.c
)
@ -46,15 +46,17 @@ target_include_directories(scene_test
${CMAKE_CURRENT_LIST_DIR}
)
if (NOT EMSCRIPTEN)
target_compile_options(scene_test PRIVATE -fsanitize=address -gdwarf-4)
target_link_options(scene_test PRIVATE -fsanitize=address -gdwarf-4)
endif ()
target_link_libraries(scene_test
${GAME_LIBS}
)
if (NOT EMSCRIPTEN)
add_executable(EntManager_test
entManager_test.c
)

View File

@ -885,7 +885,7 @@ void init_sandbox_scene(LevelScene_t* scene)
}
draw_pos.y += SELECTION_TILE_SIZE + 2;
DrawText("R to reset the map, O/P to cycle the selection,\nM to toggle metal crates. T to toggle crate spawn behaviour", 0, draw_pos.y, 14, BLACK);
DrawText("R to reset the map, Q/E to cycle the selection,\nF to toggle metal crates. T to toggle crate spawn behaviour", 0, draw_pos.y, 14, BLACK);
EndTextureMode();
@ -934,11 +934,11 @@ void init_sandbox_scene(LevelScene_t* scene)
sc_map_put_64(&scene->scene.action_map, KEY_D, ACTION_RIGHT);
sc_map_put_64(&scene->scene.action_map, KEY_SPACE, ACTION_JUMP);
sc_map_put_64(&scene->scene.action_map, KEY_O, ACTION_PREV_SPAWN);
sc_map_put_64(&scene->scene.action_map, KEY_P, ACTION_NEXT_SPAWN);
sc_map_put_64(&scene->scene.action_map, KEY_M, ACTION_METAL_TOGGLE);
sc_map_put_64(&scene->scene.action_map, KEY_Q, ACTION_PREV_SPAWN);
sc_map_put_64(&scene->scene.action_map, KEY_E, ACTION_NEXT_SPAWN);
sc_map_put_64(&scene->scene.action_map, KEY_F, ACTION_METAL_TOGGLE);
sc_map_put_64(&scene->scene.action_map, KEY_T, ACTION_CRATE_ACTIVATION);
sc_map_put_64(&scene->scene.action_map, KEY_Q, ACTION_EXIT);
sc_map_put_64(&scene->scene.action_map, KEY_L, ACTION_EXIT);
sc_map_put_64(&scene->scene.action_map, KEY_R, ACTION_RESTART);
}