Skip to content

Commit

Permalink
FF7: Fix worldmap fx effects
Browse files Browse the repository at this point in the history
Fixes #465
  • Loading branch information
julianxhokaxhiu committed Jul 24, 2022
1 parent b3de992 commit 8e19e4f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Fixed a crash happening while loading a save game on Steam Spanish language
- Fixed minor issues happening while using the new lighting engine on OpenGL ( see https://github.com/julianxhokaxhiu/FFNx/issues/448 )
- Fixed Summon SFX effects volume to respect the master sfx volume ( see https://github.com/julianxhokaxhiu/FFNx/issues/453 )
- Fixed Worldmap missing FX effects ( see https://github.com/julianxhokaxhiu/FFNx/issues/465 )

# 1.12.0

Expand Down
2 changes: 2 additions & 0 deletions src/ff7.h
Original file line number Diff line number Diff line change
Expand Up @@ -2979,6 +2979,8 @@ struct ff7_externals
world_event_data** world_event_current_entity_ptr_E39AD8;
world_event_data** world_event_current_entity_ptr_E3A7CC;
int* is_wait_frames_zero_E39BC0;
uint32_t world_sub_75A1C6;
uint32_t world_sub_75A5D5;

uint32_t swirl_main_loop;
uint32_t swirl_loop_sub_4026D4;
Expand Down
2 changes: 2 additions & 0 deletions src/ff7_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,8 @@ void ff7_find_externals(struct ff7_game_obj* game_object)
ff7_externals.world_event_current_entity_ptr_E39AD8 = (world_event_data**)get_absolute_value((uint32_t)ff7_externals.world_update_model_movement_762E87, 0x5);
ff7_externals.world_event_current_entity_ptr_E3A7CC = (world_event_data**)get_absolute_value(ff7_externals.run_world_event_scripts_system_operations, 0x8E6);
ff7_externals.is_wait_frames_zero_E39BC0 = (int*)get_absolute_value(ff7_externals.run_world_event_scripts_system_operations, 0xD46);
ff7_externals.world_sub_75A1C6 = get_relative_call(ff7_externals.world_init_variables_74E1E9, 0x3A);
ff7_externals.world_sub_75A5D5 = get_relative_call(ff7_externals.world_sub_75A1C6, 0x61);

// Swirl externals
ff7_externals.swirl_main_loop = swirl_main_loop;
Expand Down
5 changes: 5 additions & 0 deletions src/ff7_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ void ff7_init_hooks(struct game_obj *_game_object)
if(ff7_footsteps)
replace_call_function(ff7_externals.world_update_player_74EA48 + 0xCDF, ff7_world_update_model_movement);

// #####################
// worldmap fx effects ( forest trail, ocean trail with highwind, etc. )
// #####################
patch_code_byte(ff7_externals.world_sub_75A5D5 + 0x1A3, 1);

// #####################
// battle toggle
// #####################
Expand Down

0 comments on commit 8e19e4f

Please sign in to comment.