summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorE <shealyrd@email.uscupstate.edu>2020-12-15 17:22:15 -0600
committerE <shealyrd@email.uscupstate.edu>2020-12-15 17:22:15 -0600
commit6214fab5eef5a788f88b03fb86b9b6b929ebd662 (patch)
tree9d30babd06c62bd2c2eeec1f55e09ea31518f071 /src
parent45de771f8298595664346b95c812293b1f258ab8 (diff)
Updating comments + finishing after tutorial battle script
Diffstat (limited to 'src')
-rw-r--r--src/engine/bank03.asm95
-rw-r--r--src/engine/bank04.asm88
-rw-r--r--src/wram.asm4
3 files changed, 108 insertions, 79 deletions
diff --git a/src/engine/bank03.asm b/src/engine/bank03.asm
index 2f922a6..21977c8 100644
--- a/src/engine/bank03.asm
+++ b/src/engine/bank03.asm
@@ -1912,7 +1912,7 @@ ScriptCommand_StartBattle: ; cd01 (3:4d01)
ld a, [wcc19]
cp $ff
jr nz, .asm_cd26
- ld a, [wd695]
+ ld a, [wMultichoiceTextboxResult_ChooseDeckToDuelAgainst]
ld c, a
ld b, $0
ld hl, AaronDeckIDs
@@ -2716,18 +2716,18 @@ ScriptCommand_ShowMultichoiceTextbox_ChooseDeckToDuelAgainst: ; d24c (3:524c)
ld hl, .multichoice_menu_args
xor a
call ShowMultichoiceTextbox
- ld a, [wd695]
+ ld a, [wMultichoiceTextboxResult_ChooseDeckToDuelAgainst]
ld c, a
set_flag_value EVENT_FLAG_76
jp IncreaseScriptPointerBy1
.multichoice_menu_args ;d25e
- dw $0000 ;NPC title for textbox under menu
- tx Text03f9 ;text for textbox under menu
- dw MultichoiceTextbox_ConfigTable_ChooseDeckToDuelAgainst ;location of table configuration in bank 4
- db $03 ;the value to return when b is pressed
- dw $d695 ;ram location to return result into
- dw .text_entries ;location of table containing text entries
+ dw $0000 ; NPC title for textbox under menu
+ tx Text03f9 ; text for textbox under menu
+ dw MultichoiceTextbox_ConfigTable_ChooseDeckToDuelAgainst ; location of table configuration in bank 4
+ db $03 ; the value to return when b is pressed
+ dw wMultichoiceTextboxResult_ChooseDeckToDuelAgainst ; ram location to return result into
+ dw .text_entries ; location of table containing text entries
.text_entries ;d269
tx Text03f6
@@ -2745,12 +2745,12 @@ ScriptCommand_ShowMultichoiceTextbox_ChooseStarterDeck: ; d271 (3:5271)
; 0xd27b
.multichoice_menu_args ;d27b
- dw $0000 ;NPC title for textbox under menu
- tx Text03fd ;text for textbox under menu
- dw MultichoiceTextbox_ConfigTable_ChooseDeckStarterDeck ;location of table configuration in bank 4
- db $00 ;the value to return when b is pressed
- dw $d693 ;ram location to return result into
- dw .text_entries ;location of table containing text entries
+ dw $0000 ; NPC title for textbox under menu
+ tx Text03fd ; text for textbox under menu
+ dw MultichoiceTextbox_ConfigTable_ChooseDeckStarterDeck ; location of table configuration in bank 4
+ db $00 ; the value to return when b is pressed
+ dw $d693 ; ram location to return result into
+ dw .text_entries ; location of table containing text entries
.text_entries
tx Text03fa
@@ -2765,7 +2765,7 @@ ScriptCommand_ShowMultichoiceTextbox_ChooseStarterDeck: ; d271 (3:5271)
; dw location of table configuration in bank 4
; db the value to return when b is pressed
; dw ram location to return result into
-; dw location of table containing text entries (optional
+; dw location of table containing text entries (optional)
ShowMultichoiceTextbox: ; d28c (3:528c)
ld [wd416], a
@@ -2847,39 +2847,39 @@ ScriptCommand_ShowSamNormalMultichoice: ; d2f6 (3:52f6)
ld hl, .multichoice_menu_args
xor a
call ShowMultichoiceTextbox
- ld a, [wd694]
+ ld a, [wMultichoiceTextboxResult_Sam]
ld c, a
set_flag_value EVENT_FLAG_75
xor a
- ld [wd694], a
+ ld [wMultichoiceTextboxResult_Sam], a
jp IncreaseScriptPointerBy1
; 0xd30c
.multichoice_menu_args ;d30c
- tx SamNPCName ;NPC title for textbox under menu
- tx Text03fe ;text for textbox under menu
- dw SamNormalMultichoice_ConfigurationTable ;location of table configuration in bank 4
- db $03 ;the value to return when b is pressed
- dw $d694 ;ram location to return result into
- dw $0000 ;location of table containing text entries
+ tx SamNPCName ; NPC title for textbox under menu
+ tx Text03fe ; text for textbox under menu
+ dw SamNormalMultichoice_ConfigurationTable ; location of table configuration in bank 4
+ db $03 ; the value to return when b is pressed
+ dw wMultichoiceTextboxResult_Sam ; ram location to return result into
+ dw $0000 ; location of table containing text entries
ScriptCommand_ShowSamTutorialMultichoice: ; d317 (s)
ld hl, .multichoice_menu_args
- ld a, [wd694]
+ ld a, [wMultichoiceTextboxResult_Sam]
call ShowMultichoiceTextbox
- ld a, [wd694]
+ ld a, [wMultichoiceTextboxResult_Sam]
ld c, a
set_flag_value EVENT_FLAG_75
jp IncreaseScriptPointerBy1
.multichoice_menu_args ;d32b
- dw $0000 ;NPC title for textbox under menu
- dw $0000 ;text for textbox under menu
- dw SamTutorialMultichoice_ConfigurationTable ;location of table configuration in bank 4
- db $07 ;the value to return when b is pressed
- dw $d694 ;ram location to return result into
- dw $0000 ;location of table containing text entries
+ dw $0000 ; NPC title for textbox under menu
+ dw $0000 ; text for textbox under menu
+ dw SamTutorialMultichoice_ConfigurationTable ; location of table configuration in bank 4
+ db $07 ; the value to return when b is pressed
+ dw wMultichoiceTextboxResult_Sam ; ram location to return result into
+ dw $0000 ; location of table containing text entries
ScriptCommand_OpenDeckMachine: ; d336 (3:5336)
@@ -2978,6 +2978,7 @@ Func_d3d4: ; d3d4 (3:53d4)
INCROM $d3dd, $d3e0
+
Func_d3e0: ; d3e0 (3:53e0)
ld a, $1
ld [wd32e], a
@@ -3526,10 +3527,38 @@ AfterTutorialBattleScript: ; d834 (3:5834)
run_command ScriptCommand_CloseTextBox
run_command ScriptCommand_PrintTextString
tx Text05f2
+.ows_d85f
run_command ScriptCommand_ShowMultichoiceTextbox_ChooseStarterDeck
-; 0xd860
+ run_command ScriptCommand_CloseTextBox
+ run_command ScriptCommand_AskQuestionJump
+ tx Text05f3
+ dw .ows_d869
+ run_command ScriptCommand_Jump
+ dw .ows_d85f
+; 0xd869
+.ows_d869
+ run_command ScriptCommand_PrintTextString
+ tx Text05f4
+ run_command ScriptCommand_CloseTextBox
+ run_command ScriptCommand_PauseSong
+ run_command Func_d40f
+ run_command ScriptCommand_TryGiveMedalPCPacks
+ run_command Func_ccdc
+ tx Text05f5
+ run_command ScriptCommand_WaitForSongToFinish
+ run_command ScriptCommand_ResumeSong
+ run_command ScriptCommand_CloseTextBox
+ run_command ScriptCommand_SetFlagValue
+ db EVENT_FLAG_3E
+ db $03
+ run_command Func_d3d4
+ run_command ScriptCommand_PrintTextString
+ tx Text05f6
+ run_command Func_d396
+ db $00
+ run_command ScriptCommand_QuitScriptFully
+; 0xd880
- INCROM $d860, $d880
NPCMovement_d880: ; d880 (3:5880)
db EAST
diff --git a/src/engine/bank04.asm b/src/engine/bank04.asm
index da26e55..8e62188 100644
--- a/src/engine/bank04.asm
+++ b/src/engine/bank04.asm
@@ -1075,62 +1075,62 @@ OverworldScriptTable: ; 1217b (4:617b)
MultichoiceTextbox_ConfigTable_ChooseDeckToDuelAgainst: ;1224b
- db $04, $00 ; x, y to start drawing box
- db $10, $08 ; width, height of box
- db $06, $02 ; x, y coordinate to start printing next text
- tx Text03f6 ; text id to print next
- db $06, $04 ; x, y coordinate to start printing next text
- tx Text03f7 ; text id to print next
- db $06, $06 ; x, y coordinate to start printing next text
- tx Text03f8 ; text id to print next
- db $ff ; marker byte -- end text entries
- db $05, $02 ; cursor starting x, y
- db $02 ; number of tiles the cursor moves per toggle
- db $03 ; cursor max index
- db $0f ; curor image
+ db $04, $00 ; x, y to start drawing box
+ db $10, $08 ; width, height of box
+ db $06, $02 ; x, y coordinate to start printing next text
+ tx Text03f6 ; text id to print next
+ db $06, $04 ; x, y coordinate to start printing next text
+ tx Text03f7 ; text id to print next
+ db $06, $06 ; x, y coordinate to start printing next text
+ tx Text03f8 ; text id to print next
+ db $ff ; marker byte -- end text entries
+ db $05, $02 ; cursor starting x, y
+ db $02 ; number of tiles the cursor moves per toggle
+ db $03 ; cursor max index
+ db $0f ; curor image
db $00, $00, $00 ; marker bytes -- end of config table
MultichoiceTextbox_ConfigTable_ChooseDeckStarterDeck: ;12264
- db $04, $00 ; x, y to start drawing box
- db $10, $08 ; width, height of box
- db $06, $02 ; x, y coordinate to start printing next text
- tx Text03fa ; text id to print next
- db $06, $04 ; x, y coordinate to start printing next text
- tx Text03fb ; text id to print next
- db $06, $06 ; x, y coordinate to start printing next text
- tx Text03fc ; text id to print next
- db $ff ; marker byte -- end text entries
- db $05, $02 ; cursor starting x, y
- db $02 ; number of tiles the cursor moves per toggle
- db $03 ; cursor max index
- db $0f ; curor image
+ db $04, $00 ; x, y to start drawing box
+ db $10, $08 ; width, height of box
+ db $06, $02 ; x, y coordinate to start printing next text
+ tx Text03fa ; text id to print next
+ db $06, $04 ; x, y coordinate to start printing next text
+ tx Text03fb ; text id to print next
+ db $06, $06 ; x, y coordinate to start printing next text
+ tx Text03fc ; text id to print next
+ db $ff ; marker byte -- end text entries
+ db $05, $02 ; cursor starting x, y
+ db $02 ; number of tiles the cursor moves per toggle
+ db $03 ; cursor max index
+ db $0f ; curor image
db $00, $00, $00 ; marker bytes -- end of config table
SamNormalMultichoice_ConfigurationTable: ;1227d
- db $0A, $00 ; x, y to start drawing box
- db $0A, $0A ; width, height of box
- db $0C, $02 ; x, y coordinate to start printing next text
- tx Text03ff ; text id to print next
- db $ff ; marker byte -- end text entries
- db $0b, $02 ; cursor starting x, y
- db $02 ; number of tiles the cursor moves per toggle
- db $04 ; cursor max index
- db $0f ; curor image
+ db $0A, $00 ; x, y to start drawing box
+ db $0A, $0A ; width, height of box
+ db $0C, $02 ; x, y coordinate to start printing next text
+ tx Text03ff ; text id to print next
+ db $ff ; marker byte -- end text entries
+ db $0b, $02 ; cursor starting x, y
+ db $02 ; number of tiles the cursor moves per toggle
+ db $04 ; cursor max index
+ db $0f ; curor image
db $00, $00, $00 ; marker bytes -- end of config table
SamTutorialMultichoice_ConfigurationTable: ;1228e
- db $06, $00 ; x, y to start drawing box
- db $0E, $12 ; width, height of box
- db $08, $02 ; x coordinate to start printing text
- tx Text0400 ; text id to print next
- db $ff ; marker byte -- end text entries
- db $07, $02 ; cursor starting x, y
- db $02 ; number of tiles the cursor moves per toggle
- db $08 ; cursor max index
- db $0f ; curor image
+ db $06, $00 ; x, y to start drawing box
+ db $0E, $12 ; width, height of box
+ db $08, $02 ; x coordinate to start printing text
+ tx Text0400 ; text id to print next
+ db $ff ; marker byte -- end text entries
+ db $07, $02 ; cursor starting x, y
+ db $02 ; number of tiles the cursor moves per toggle
+ db $08 ; cursor max index
+ db $0f ; curor image
db $00, $00, $00 ; marker bytes -- end of config table
diff --git a/src/wram.asm b/src/wram.asm
index bb1f346..2d39fb7 100644
--- a/src/wram.asm
+++ b/src/wram.asm
@@ -2556,10 +2556,10 @@ wBoosterData_TypeChances:: ; d689
wd693:: ; d693
ds $1
-wd694:: ; d694
+wMultichoiceTextboxResult_Sam:: ; d694
ds $1
-wd695:: ; d695
+wMultichoiceTextboxResult_ChooseDeckToDuelAgainst:: ; d695
ds $1
wd696:: ; d696