mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
version checks for event script commands and move in related asm
This commit is contained in:
parent
94188ee0f7
commit
bcd833e758
@ -1,3 +1,75 @@
|
|||||||
|
; Event scripting commands.
|
||||||
|
|
||||||
|
|
||||||
|
Function96c56: ; 96c56
|
||||||
|
push af
|
||||||
|
ld a, 1
|
||||||
|
ld [ScriptMode], a
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
; 96c5e
|
||||||
|
|
||||||
|
|
||||||
|
ScriptEvents: ; 96c5e
|
||||||
|
call StartScript
|
||||||
|
.loop
|
||||||
|
ld a, [ScriptMode]
|
||||||
|
ld hl, .modes
|
||||||
|
rst JumpTable
|
||||||
|
call CheckScript
|
||||||
|
jr nz, .loop
|
||||||
|
ret
|
||||||
|
; 96c6e
|
||||||
|
|
||||||
|
.modes ; 96c6e
|
||||||
|
dw EndScript
|
||||||
|
dw RunScriptCommand
|
||||||
|
dw WaitScriptMovement
|
||||||
|
dw WaitScript
|
||||||
|
|
||||||
|
EndScript: ; 96c76
|
||||||
|
call StopScript
|
||||||
|
ret
|
||||||
|
; 96c7a
|
||||||
|
|
||||||
|
WaitScript: ; 96c7a
|
||||||
|
call StopScript
|
||||||
|
|
||||||
|
ld hl, ScriptDelay
|
||||||
|
dec [hl]
|
||||||
|
ret nz
|
||||||
|
|
||||||
|
callba Function58b9
|
||||||
|
|
||||||
|
ld a, SCRIPT_READ
|
||||||
|
ld [ScriptMode], a
|
||||||
|
call StartScript
|
||||||
|
ret
|
||||||
|
; 96c91
|
||||||
|
|
||||||
|
WaitScriptMovement: ; 96c91
|
||||||
|
call StopScript
|
||||||
|
|
||||||
|
ld hl, VramState
|
||||||
|
bit 7, [hl]
|
||||||
|
ret nz
|
||||||
|
|
||||||
|
callba Function58b9
|
||||||
|
|
||||||
|
ld a, SCRIPT_READ
|
||||||
|
ld [ScriptMode], a
|
||||||
|
call StartScript
|
||||||
|
ret
|
||||||
|
; 96ca9
|
||||||
|
|
||||||
|
RunScriptCommand: ; 96ca9
|
||||||
|
call GetScriptByte
|
||||||
|
ld hl, ScriptCommandTable
|
||||||
|
rst JumpTable
|
||||||
|
ret
|
||||||
|
; 96cb1
|
||||||
|
|
||||||
|
|
||||||
ScriptCommandTable: ; 0x96cb1
|
ScriptCommandTable: ; 0x96cb1
|
||||||
dw Script_2call
|
dw Script_2call
|
||||||
dw Script_3call
|
dw Script_3call
|
||||||
@ -81,7 +153,9 @@ ScriptCommandTable: ; 0x96cb1
|
|||||||
dw Script_loadmenudata
|
dw Script_loadmenudata
|
||||||
dw Script_writebackup
|
dw Script_writebackup
|
||||||
dw Script_jumptextfaceplayer
|
dw Script_jumptextfaceplayer
|
||||||
|
IF _CRYSTAL
|
||||||
dw Script_3jumptext
|
dw Script_3jumptext
|
||||||
|
ENDC
|
||||||
dw Script_jumptext
|
dw Script_jumptext
|
||||||
dw Script_closetext
|
dw Script_closetext
|
||||||
dw Script_keeptextopen
|
dw Script_keeptextopen
|
||||||
@ -279,6 +353,9 @@ JumpTextScript: ; 0x96e7a
|
|||||||
end
|
end
|
||||||
; 0x96e81
|
; 0x96e81
|
||||||
|
|
||||||
|
|
||||||
|
IF _CRYSTAL
|
||||||
|
|
||||||
Script_3jumptext: ; 0x96e81
|
Script_3jumptext: ; 0x96e81
|
||||||
; script command 0x52
|
; script command 0x52
|
||||||
; parameters:
|
; parameters:
|
||||||
@ -295,6 +372,9 @@ Script_3jumptext: ; 0x96e81
|
|||||||
jp ScriptJump
|
jp ScriptJump
|
||||||
; 0x96e9b
|
; 0x96e9b
|
||||||
|
|
||||||
|
ENDC
|
||||||
|
|
||||||
|
|
||||||
Script_2writetext: ; 0x96e9b
|
Script_2writetext: ; 0x96e9b
|
||||||
; script command 0x4c
|
; script command 0x4c
|
||||||
; parameters:
|
; parameters:
|
||||||
@ -2018,7 +2098,7 @@ Script_checkver: ; 0x976a6
|
|||||||
; 0x976ad
|
; 0x976ad
|
||||||
|
|
||||||
Version: ; 976ad
|
Version: ; 976ad
|
||||||
db 0 ; VERSION
|
db VERSION
|
||||||
; 976ae
|
; 976ae
|
||||||
|
|
||||||
Script_pokenamemem: ; 0x976ae
|
Script_pokenamemem: ; 0x976ae
|
||||||
@ -3117,7 +3197,7 @@ DisplayCredits:
|
|||||||
call Function261b
|
call Function261b
|
||||||
call StopScript
|
call StopScript
|
||||||
ret
|
ret
|
||||||
; 0x97c05
|
; 0x97c051
|
||||||
|
|
||||||
Script_wait: ; 0x97c05
|
Script_wait: ; 0x97c05
|
||||||
; script command 0xa8
|
; script command 0xa8
|
||||||
@ -3146,3 +3226,13 @@ Script_unknown0xa9: ; 0x97c15
|
|||||||
ret
|
ret
|
||||||
; 0x97c20
|
; 0x97c20
|
||||||
|
|
||||||
|
|
||||||
|
Function97c20: ; 97c20
|
||||||
|
ld a, [.byte]
|
||||||
|
ld [ScriptVar], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.byte
|
||||||
|
db 0
|
||||||
|
; 97c28
|
||||||
|
|
||||||
|
78
main.asm
78
main.asm
@ -86686,87 +86686,9 @@ UnknownScript_0x96c4f: ; 96c4f
|
|||||||
; 96c56
|
; 96c56
|
||||||
|
|
||||||
|
|
||||||
Function96c56: ; 96c56
|
|
||||||
push af
|
|
||||||
ld a, 1
|
|
||||||
ld [ScriptMode], a
|
|
||||||
pop af
|
|
||||||
ret
|
|
||||||
; 96c5e
|
|
||||||
|
|
||||||
|
|
||||||
ScriptEvents: ; 96c5e
|
|
||||||
call StartScript
|
|
||||||
.loop
|
|
||||||
ld a, [ScriptMode]
|
|
||||||
ld hl, .modes
|
|
||||||
rst JumpTable
|
|
||||||
call CheckScript
|
|
||||||
jr nz, .loop
|
|
||||||
ret
|
|
||||||
; 96c6e
|
|
||||||
|
|
||||||
.modes ; 96c6e
|
|
||||||
dw EndScript
|
|
||||||
dw RunScriptCommand
|
|
||||||
dw WaitScriptMovement
|
|
||||||
dw WaitScript
|
|
||||||
|
|
||||||
EndScript: ; 96c76
|
|
||||||
call StopScript
|
|
||||||
ret
|
|
||||||
; 96c7a
|
|
||||||
|
|
||||||
WaitScript: ; 96c7a
|
|
||||||
call StopScript
|
|
||||||
|
|
||||||
ld hl, ScriptDelay
|
|
||||||
dec [hl]
|
|
||||||
ret nz
|
|
||||||
|
|
||||||
callba Function58b9
|
|
||||||
|
|
||||||
ld a, SCRIPT_READ
|
|
||||||
ld [ScriptMode], a
|
|
||||||
call StartScript
|
|
||||||
ret
|
|
||||||
; 96c91
|
|
||||||
|
|
||||||
WaitScriptMovement: ; 96c91
|
|
||||||
call StopScript
|
|
||||||
|
|
||||||
ld hl, VramState
|
|
||||||
bit 7, [hl]
|
|
||||||
ret nz
|
|
||||||
|
|
||||||
callba Function58b9
|
|
||||||
|
|
||||||
ld a, SCRIPT_READ
|
|
||||||
ld [ScriptMode], a
|
|
||||||
call StartScript
|
|
||||||
ret
|
|
||||||
; 96ca9
|
|
||||||
|
|
||||||
RunScriptCommand: ; 96ca9
|
|
||||||
call GetScriptByte
|
|
||||||
ld hl, ScriptCommandTable
|
|
||||||
rst JumpTable
|
|
||||||
ret
|
|
||||||
; 96cb1
|
|
||||||
|
|
||||||
|
|
||||||
INCLUDE "engine/scripting.asm"
|
INCLUDE "engine/scripting.asm"
|
||||||
|
|
||||||
|
|
||||||
Function97c20: ; 97c20
|
|
||||||
ld a, [.byte]
|
|
||||||
ld [ScriptVar], a
|
|
||||||
ret
|
|
||||||
|
|
||||||
.byte
|
|
||||||
db 0
|
|
||||||
; 97c28
|
|
||||||
|
|
||||||
Function97c28: ; 97c28
|
Function97c28: ; 97c28
|
||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user