mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
fix secret sound playing incorrectly in Tihocan
This commit is contained in:
parent
afd07eb1b3
commit
8763e90ec7
5 changed files with 19 additions and 7 deletions
|
@ -32,6 +32,8 @@ Currently the following configuration options are supported:
|
|||
etc. (similar to TR2 style).
|
||||
- `fix_end_of_level_freeze`: fix game freeze when ending the level with the
|
||||
Action key held.
|
||||
- `fix_tihocan_secret_sound`: disable the secret sound incorrectly playing
|
||||
during using the golden key in Tomb of Tihocan.
|
||||
|
||||
## Decompilation progress
|
||||
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
"enable_red_healthbar": true,
|
||||
"enable_enemy_healthbar": true,
|
||||
"enable_look_while_running": true,
|
||||
"fix_end_of_level_freeze": true
|
||||
"fix_end_of_level_freeze": true,
|
||||
"fix_tihocan_secret_sound": true
|
||||
}
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
#include "data.h"
|
||||
#include "effects.h"
|
||||
#include "mod.h"
|
||||
|
||||
void __cdecl FxChainBlock(ITEM_INFO* item)
|
||||
{
|
||||
if (FlipTimer == 0) {
|
||||
SoundEffect(173, NULL, 0);
|
||||
}
|
||||
|
||||
FlipTimer++;
|
||||
if (FlipTimer == 55) {
|
||||
if (TR1MConfig.fix_tihocan_secret_sound) {
|
||||
SoundEffect(33, NULL, 0);
|
||||
FlipEffect = -1;
|
||||
} else {
|
||||
if (FlipTimer == 0) {
|
||||
SoundEffect(173, NULL, 0);
|
||||
}
|
||||
|
||||
FlipTimer++;
|
||||
if (FlipTimer == 55) {
|
||||
SoundEffect(33, NULL, 0);
|
||||
FlipEffect = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,8 @@ static int TR1MReadConfig()
|
|||
tr1m_json_get_boolean_value(json, "enable_look_while_running");
|
||||
TR1MConfig.fix_end_of_level_freeze =
|
||||
tr1m_json_get_boolean_value(json, "fix_end_of_level_freeze");
|
||||
TR1MConfig.fix_tihocan_secret_sound =
|
||||
tr1m_json_get_boolean_value(json, "fix_tihocan_secret_sound");
|
||||
|
||||
json_value_free(json);
|
||||
free(cfg_data);
|
||||
|
|
|
@ -20,6 +20,7 @@ struct {
|
|||
int enable_enemy_healthbar;
|
||||
int enable_look_while_running;
|
||||
int fix_end_of_level_freeze;
|
||||
int fix_tihocan_secret_sound;
|
||||
} TR1MConfig;
|
||||
|
||||
struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue