Skip to content

Commit

Permalink
60FPS: Fix death timer increment in BATTLE mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tangtang95 authored and julianxhokaxhiu committed Apr 16, 2022
1 parent 3863b56 commit f3299d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ff7.h
Original file line number Diff line number Diff line change
Expand Up @@ -2753,6 +2753,7 @@ struct ff7_externals
uint32_t battle_menu_update_call;
int *battle_menu_animation_idx;
uint32_t set_battle_speed_4385CC;
uint32_t battle_set_actor_timer_data_4339C2;
uint32_t battle_handle_player_mark_5B9C8E;
uint32_t battle_handle_status_effect_anim_5BA7C0;
uint32_t battle_update_targeting_info_6E6291;
Expand Down
1 change: 1 addition & 0 deletions src/ff7/animations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,7 @@ void ff7_battle_animations_hook_init()
{
// Fix battle speed and menu for 60 FPS only
patch_divide_code<int>(ff7_externals.set_battle_speed_4385CC + 0x2E, battle_frame_multiplier / 2);
patch_divide_code<int>(ff7_externals.battle_set_actor_timer_data_4339C2 + 0x89, battle_frame_multiplier / 2);
replace_call_function(ff7_externals.battle_menu_update_call, ff7_update_battle_menu);
replace_call_function(ff7_externals.display_battle_menu_6D797C + 0x1BB, ff7_display_cait_sith_slots_handler);
replace_call_function(ff7_externals.display_battle_menu_6D797C + 0x1C2, ff7_display_tifa_slots_handler);
Expand Down
1 change: 1 addition & 0 deletions src/ff7_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ void ff7_find_externals(struct ff7_game_obj* game_object)
ff7_externals.g_do_render_menu = (int*)get_absolute_value(ff7_externals.battle_set_do_render_menu, 0x7);
ff7_externals.battle_menu_animation_idx = (int*)get_absolute_value(ff7_externals.battle_menu_update_6CE8B3, 0x144);
ff7_externals.set_battle_speed_4385CC = get_relative_call(ff7_externals.battle_sub_437DB0, 0x17C);
ff7_externals.battle_set_actor_timer_data_4339C2 = get_relative_call(ff7_externals.battle_sub_437DB0, 0x1C7);
uint32_t battle_sub_4297B9 = get_relative_call(ff7_externals.battle_sub_42D992, 0x59);
uint32_t battle_sub_42952E = get_relative_call(battle_sub_4297B9, 0x10);
uint32_t battle_sub_42F3E8 = get_relative_call(battle_sub_42952E, 0xCD);
Expand Down

0 comments on commit f3299d1

Please sign in to comment.