Lorenzooone 2019-07-14 22:52:28 +02:00 committed by jeffman
parent fe1d17d42b
commit 0af415e175
3 changed files with 74 additions and 0 deletions

View File

@ -74,6 +74,7 @@ English names:
0x30023D4: current ATM balance 0x30023D4: current ATM balance
0x3002500: buttons being pressed 0x3002500: buttons being pressed
0x3002504: shadow of 0x3002500? delayed by one frame maybe? 0x3002504: shadow of 0x3002500? delayed by one frame maybe?
0x3004F08: printing flag
0x30051EC: tile offset (usually 0x100) 0x30051EC: tile offset (usually 0x100)
0x30051F0: flag? gets set to 1 when you change rooms, goes back to 0 the first time you open a text window 0x30051F0: flag? gets set to 1 when you change rooms, goes back to 0 the first time you open a text window
0x3005224: menu sub-state 0x3005224: menu sub-state

View File

@ -726,6 +726,19 @@ b 0x080C959A
bl eeb1a_player_name //Call the new routine bl eeb1a_player_name //Call the new routine
b 0x80EEB7A //Do the rest of the original routine b 0x80EEB7A //Do the rest of the original routine
//---------------------------------------------------------
// End of battle hacks
//---------------------------------------------------------
.org 0x80cb936
bl cb936_battle_won //Removes the game's ability to read the script instantly out of a won battle
.org 0x80a1f8c
bl a1f8c_set_script_reading //Change the game's ability to read the script instantly a bit
.org 0x80b7702
bl b7702_check_script_reading //Change the newly set value slowly and make it 0 when it's safe
//--------------------------------------------------------- //---------------------------------------------------------
// Teleport window hacks // Teleport window hacks
//--------------------------------------------------------- //---------------------------------------------------------
@ -855,8 +868,10 @@ m2_enemy_attributes:
.definelabel m2_food ,0x3001F30 .definelabel m2_food ,0x3001F30
.definelabel m2_rockin ,0x3001F3A .definelabel m2_rockin ,0x3001F3A
.definelabel m2_player1 ,0x3001F50 .definelabel m2_player1 ,0x3001F50
.definelabel m2_script_readability ,0x3004F08
.definelabel m2_active_window_pc ,0x3005264 .definelabel m2_active_window_pc ,0x3005264
.definelabel m2_soundeffect ,0x8001720 .definelabel m2_soundeffect ,0x8001720
.definelabel m2_enable_script ,0x80A1F6C
.definelabel m2_sub_a334c ,0x80A334C .definelabel m2_sub_a334c ,0x80A334C
.definelabel m2_sub_a3384 ,0x80A3384 .definelabel m2_sub_a3384 ,0x80A3384
.definelabel m2_psitargetwindow ,0x80B8AE0 .definelabel m2_psitargetwindow ,0x80B8AE0

View File

@ -995,4 +995,62 @@ mov r0,#0
@@next: //Do the rest of the routine @@next: //Do the rest of the routine
pop {pc} pop {pc}
.pool
//==============================================================================
//These three hacks remove the game's ability to read the script instantly out of a won battle
cb936_battle_won: //Called at the end of a battle if it is won
push {lr}
ldr r0,=m2_script_readability //Remove the ability to instantly read the script
mov r1,#8
strb r1,[r0,#0]
ldr r0,=#0x3000A6C //Clobbered code
mov r1,#0
pop {pc}
.pool
//==============================================================================
b7702_check_script_reading: //Makes the game wait six extra frames before being able to read the script out of battle
push {lr}
ldr r0,=m2_script_readability
ldrb r1,[r0,#0]
cmp r1,#2 //If the value is > 2, then lower it
ble @@next
sub r1,r1,#1
strb r1,[r0,#0]
b @@end
@@next:
cmp r1,#2 //If the value is 2, change it to 0 and allow reading the script
bne @@end
mov r1,#0
strb r1,[r0,#0]
@@end:
mov r7,r10 //Clobbered code
mov r6,r9
pop {pc}
.pool
//==============================================================================
a1f8c_set_script_reading: //Changes the way the game sets the ability to read the script
push {lr}
ldrb r1,[r0,#0]
cmp r1,#8 //If this particular flag is set, then don't do a thing. Allows to make it so the game waits before reading the script.
beq @@next
mov r1,#0
strb r1,[r0,#0]
b @@end
@@next:
mov r1,#0
@@end:
pop {pc}
.pool .pool