Skip to content

Commit

Permalink
removed too much
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Nov 7, 2023
1 parent 82d01be commit bcee928
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game_api/level_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,10 @@ using LoadScreenFun = void(StateMemory*, size_t, size_t);
LoadScreenFun* g_load_screen_trampoline{nullptr};
void load_screen(StateMemory* state, size_t param_2, size_t param_3)
{
if (pre_event(ON::PRE_LOAD_SCREEN))
if (pre_load_screen())
return;
g_load_screen_trampoline(state, param_2, param_3);
post_event(ON::POST_LOAD_SCREEN);
post_load_screen();
}

using UnloadLayerFun = void(Layer*);
Expand Down Expand Up @@ -2368,8 +2368,8 @@ void do_load_screen()
{
static auto load_screen_fun = (LoadScreenFun*)get_address("load_screen_func");
const auto state = State::get().ptr();
if (pre_event(ON::PRE_LOAD_SCREEN))
if (pre_load_screen())
return;
load_screen_fun(state, 0, 0);
post_event(ON::POST_LOAD_SCREEN);
post_load_screen();
}
1 change: 1 addition & 0 deletions src/game_api/script/events.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ bool pre_init_layer(LAYER layer);
bool pre_unload_level();
bool pre_unload_layer(LAYER layer);

void post_load_screen();
void post_init_layer(LAYER layer);
void post_unload_layer(LAYER layer);
void post_room_generation();
Expand Down

0 comments on commit bcee928

Please sign in to comment.