If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working at any time.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Arcana/ActionScript map
< Arcana
Jump to navigation
Jump to search
This is a sub-page of Arcana.
(Back to Main page)
ActionScripts: Arcana's custom scripting language
(Taken from the Readme for CataLatas' HAL ActionScript Extractor, a Python tool for interpreting HAL scripts)
"Action Script"? What the hey is that?
- HAL used a sort of scripting Virtual Machine to help in developing games quicker. With this system, each game object/entity runs a "main" script and possibly multiple sub-scripts, which I have come to personally call "tasks". It is a really versatile system, but it comes with some cost in CPU cycles, since scripts have to be interpreted (this seems especially apparent in Kirby's Adventure). It is believed that Satoru Iwata implemented this Virtual Machine.
What's with the name? Where did it come from?
- The name "action script" comes from Marcus Lindblom's localization files for Earthbound, where each NPC dialogue had a commented "info header" about the NPC, which included the used sprite, general map location, their "ActionScript", among other things. Earthbound hackers have noticed these "ActionScript" descriptions most of the time matched up with what they previously called "movement scripts", and so the name "action script" was adopted in favor of the old name.
In short, this is the majority of the game's code. The following was extracted and formatted using a modified version of the HAL ActionScript Extractor.
$00CEE4 - Loading save file
Code_Continue_Menu:
ASM_CALL Load_Save_file_Highlighting ; 00CEE4/077ECD00 // Load Save File Highlighting - Loads white and gray for [file1] [file2] [file3]. Returns 0 if no save files were detected.
JEQ Code_Hide_Continue_Files ; 00CEE8/0B3ECF
Loop_Title_Screen_Input:
WAIT #1 ; 00CEEB/0601
ASM_CALL Sub_Title_Screen_Input ; 00CEED/07B7CD00
MULTI_JMP #2 ; 00CEF1/1102
.word Code_Hide_Continue_Files ; 00CEF3/3ECF
.word Loop_Title_Screen_Input ; 00CEF5/EBCE
MOV REG,VAR0 ; 00CEF7/2400
ASM_CALL Sub_00CB99 ; 00CEF9/0799CB00
JNE Code_00CF25 ; 00CEFD/0C25CF
WAIT #1 ; 00CF00/0601
MOV REG,VAR0 ; 00CF02/2400
ASM_CALL Sub_00CC67 ; 00CF04/0767CC00
JEQ Code_00CF14 ; 00CF08/0B14CF
MOV REG,VAR0 ; 00CF0B/2400
ASM_CALL Sub_00CD13 ; 00CF0D/0713CD00
JMP Code_00CF25 ; 00CF11/1A25CF
Code_00CF14:
WAIT #1 ; 00CF14/0601
MOV REG,VAR1 ; 00CF16/2401
ASM_CALL Sub_00CC67 ; 00CF18/0767CC00
JEQ Code_Hide_Continue_Files ; 00CF1C/0B3ECF
MOV REG,VAR1 ; 00CF1F/2401
ASM_CALL Sub_00CD13 ; 00CF21/0713CD00
Code_00CF25:
WAIT #1 ; 00CF25/0601
MOV REG,VAR0 ; 00CF27/2400
ASM_CALL Sub_00CC67 ; 00CF29/0767CC00
JEQ Code_Hide_Continue_Files ; 00CF2D/0B3ECF
WAIT #1 ; 00CF30/0601
MOV REG,VAR0 ; 00CF32/2400
ASM_CALL Transfer_Save_File_Data ; 00CF34/07BECA00 // Stage Select transfer
WAIT #1 ; 00CF38/0601
MOV REG,#$0001 ; 00CF3A/1E0100
RTL ; 00CF3D/05
Code_Hide_Continue_Files:
WAIT #1 ; 00CF3E/0601
ASM_CALL Sub_Set_file123_to_Black ; 00CF40/079ECE00
MOV REG,#$0000 ; 00CF44/1E0000
RTL ; 00CF47/05
$00CFCF - Stage select stuff
Code_Stage_Select:
MOV REG,#$0002 ; 00CFCF/1E0200
ASM_CALL Sub_00CB99 ; 00CFD2/0799CB00
JNE Code_Stage_Select ; 00CFD6/0C02D0
WAIT #1 ; 00CFD9/0601
MOV REG,#$0002 ; 00CFDB/1E0200
ASM_CALL Sub_00CC67 ; 00CFDE/0767CC00
JEQ DATA8_00CFEF ; 00CFE2/0BEFCF
MOV REG,#$0002 ; 00CFE5/1E0200
ASM_CALL Sub_00CD13 ; 00CFE8/0713CD00
JMP Code_Stage_Select ; 00CFEC/1A02D0
DATA8_00CFEF:
WAIT #1 ; 00CFEF/0601
MOV REG,#$0005 ; 00CFF1/1E0500
ASM_CALL Sub_00CC67 ; 00CFF4/0767CC00
JEQ Code_Stage_Select ; 00CFF8/0B02D0
MOV REG,#$0005 ; 00CFFB/1E0500
ASM_CALL Sub_00CD13 ; 00CFFE/0713CD00
Code_Stage_Select:
WAIT #1 ; 00D002/0601
ASM_CALL Load_Stage_Select_data ; 00D004/071DD000 // Load Stage Select file
WAIT #1 ; 00D008/0601
MOV REG,#$0005 ; 00D00A/1E0500
ASM_CALL Transfer_Save_File_Data ; 00D00D/07BECA00 // Stage Select transfer
WAIT #1 ; 00D011/0601
MOV REG,#$0002 ; 00D013/1E0200
ASM_CALL Sub_00CD13 ; 00D016/0713CD00
WAIT #1 ; 00D01A/0601
END ; 00D01C/00
$00D0A9 - I don't know
Code_00D0A9:
ASM_CALL Zero_117x_vals ; 00D0A9/0750D000 // Zero $117x vals
MOV REG,#$0000 ; 00D0AD/1E0000
MOV VAR0,REG ; 00D0B0/2300
START_LOOP #6 ; 00D0B2/0106
WAIT #1 ; 00D0B4/0601
ASM_CALL Sub_00CD55_Slow_Ass_Function; 00D0B6/0755CD00
END_LOOP ; 00D0BA/02
MOV REG,#$0000 ; 00D0BB/1E0000
MOV VAR0,REG ; 00D0BE/2300
START_LOOP #3 ; 00D0C0/0103
WAIT #1 ; 00D0C2/0601
ASM_CALL Sub_00D063 ; 00D0C4/0763D000
END_LOOP ; 00D0C8/02
WAIT #1 ; 00D0C9/0601
ASM_CALL Zero_117x_vals ; 00D0CB/0750D000 // Zero $117x vals
RTL ; 00D0CF/05
$00D375 - Sound test
Event_Sound_test:
SET_ANIM #0 ; 00D375/3000
START_LOOP #16 ; 00D377/0110
ASM_CALL Fade ; 00D379/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 00D37D/07199C00 // Sound stuff
.byte $F0 ; 00D381/F0
WAIT #1 ; 00D382/0601
END_LOOP ; 00D384/02
ASM_CALL GetSet_Music_1b ; 00D385/073C9C00 // Get/Set Music
.byte 0 ; 00D389/00
ASM_CALL Display_Force_Blanking_far ; 00D38A/07778100 // Display Force Blanking
ASM_CALL Read_BGmode_1b ; 00D38E/07699D00 // Read Background mode
.byte 1 ; 00D392/01
ASM_CALL Display_brancher_6b ; 00D393/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $02 ; 00D397/02
.byte $00 ; 00D398/00
.word $5000 ; 00D399/0050
.word $0C00 ; 00D39B/000C
ASM_CALL MainScr_Remove_1b ; 00D39D/07B69D00 // Main Screen remove
.byte $1F ; 00D3A1/1F
ASM_CALL MainScr_Add_1b ; 00D3A2/07A89D00 // Main Screen add
.byte $04 ; 00D3A6/04
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 00D3A7/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long $00D495 ; 00D3AB/95D400
.byte $00 ; 00D3AE/00
.word 8 ; 00D3AF/0800
MOV.w Sound_Test_Num,#$0000 ; 00D3B1/169F110000
ASM_CALL Text_Init_3b_1b ; 00D3B6/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_Soundtest0 ; 00D3BA/8BD400
.byte 0 ; 00D3BD/00
ASM_CALL Text_Init_3b_1b ; 00D3BE/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_Soundtest1 ; 00D3C2/90D400
.byte 1 ; 00D3C5/01
ASM_CALL Do_Stuff_far ; 00D3C6/07A8A000 // Do Stuff
Text_Sound_test:
ASM_CALL Setup_Text_Parser_3b_1b ; 00D3CA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sound_test ; 00D3CE/82E308
.byte $00 ; 00D3D1/00
WAIT #1 ; 00D3D2/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 00D3D4/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Music_Number ; 00D3D8/9DE308
.byte $01 ; 00D3DB/01
WAIT #1 ; 00D3DC/0601
START_LOOP #16 ; 00D3DE/0110
ASM_CALL Unfade ; 00D3E0/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #1 ; 00D3E4/0601
END_LOOP ; 00D3E6/02
Loop_Sound_test:
WAIT #1 ; 00D3E7/0601
ASM_CALL Playing_sound_test ; 00D3E9/0716D400 // Playing sound test
ASM_CALL Check_for_Start_press ; 00D3ED/070FD400 // Check for Title screen start press
JEQ Loop_Sound_test ; 00D3F1/0BE7D3
Exit_Sound_test:
START_LOOP #16 ; 00D3F4/0110
ASM_CALL Fade ; 00D3F6/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 00D3FA/07199C00 // Sound stuff
.byte $F0 ; 00D3FE/F0
WAIT #1 ; 00D3FF/0601
END_LOOP ; 00D401/02
ASM_CALL GetSet_Music_1b ; 00D402/073C9C00 // Get/Set Music
.byte 0 ; 00D406/00
ASM_CALL Unknown_setup ; 00D407/07E59C00 // Unknown setup
ASM_CALL Bank_17_init ; 00D40B/07018017 // Game Start
$018321 - Event 00: Game Init
Event_Main_00_GAME_INIT:
ASM_CALL Decomp80_setup_3b ; 018321/07F99C00 // Decomp80 setup
.long Compressed_data_7 ; 018325/4F8A01
MOV.w Ptr_Animation_Loop2,#$A492 ; 018328/164F1092A4
MOV REG,Temp_Is_Continuing ; 01832D/1FCB18
JNE Init_more_things ; 018330/0CBD83
Init_Chapter_1:
MOV.w Story_Progress,#$0000 ; 018333/16FF180000
MOV.w $1901,#$0000 ; 018338/1601190000
MOV.w Game_State,#$0000 ; 01833D/16C1110000
MOV.w Comparison,#$FFFF ; 018342/167515FFFF
MOV.w Temp_EXP,#$0000 ; 018347/16A3130000
MOV.w Temp_GP,#$0000 ; 01834C/16A5130000
MOV.w Curr_GP,#$01F4 ; 018351/165915F401
MOV.w Pause_status,#$0000 ; 018356/1695100000
MOV.w ShowCompass,#$0001 ; 01835B/167B150100
MOV.w Compass_Subdirection,#$0000 ; 018360/167D150000
MOV.w Spell_ID,#$FFFF ; 018365/162711FFFF
Init_all_the_things_2:
ASM_CALL Zero_All_Stats_far ; 01836A/07F48001 // Zero All Stats
ASM_CALL Init_Condition_far ; 01836E/073F8101 // Zero Condition
ASM_CALL Init_Kill_Enemies_far ; 018372/07548101 // Init Kill Enemies
ASM_CALL Init_Battle_order_far ; 018376/07748101 // Init Battle Order
ASM_CALL Zero_LVLs_far ; 01837A/07C68101 // Zero LVLs
ASM_CALL Zero_party_currHP_far ; 01837E/07D78101 // Zero Party current HP
ASM_CALL Zero_party_currMP_far ; 018382/07E88101 // Zero Party current MP
ASM_CALL Zero_copy_currHP_far ; 018386/07F98101 // Zero copy of current HP
ASM_CALL Zero_copy_currMP_far ; 01838A/070A8201 // Zero copy of current MP
ASM_CALL Zero_party_maxHP_far ; 01838E/071B8201 // Zero party max HP
ASM_CALL Zero_party_maxMP_far ; 018392/072C8201 // Zero party max MP
ASM_CALL Del_Spirits_currHP_far ; 018396/073D8201 // Delete Spirits current HP
ASM_CALL Del_Spirits_currMP_far ; 01839A/07518201 // Delete Spirits current MP
ASM_CALL Zero_Equipped_items_far ; 01839E/07D38201 // Zero equipped items
ASM_CALL Zero_card_inventory_far ; 0183A2/07658201 // Zero card inventory
ASM_CALL Zero_item_inventory_far ; 0183A6/07748201 // Zero item inventory
ASM_CALL Zero_spell_lists_far ; 0183AA/07868201 // Zero spell lists
ASM_CALL Zero_Equip_inventory_far ; 0183AE/07A18201 // Zero equipment inventory
ASM_CALL Zero_stat_modifiers_far ; 0183B2/07B68201 // Zero stat modifiers
JSL Xfer_Window_Color ; 0183B6/04068A01
JMP DATA8_018561 ; 0183BA/1A6185
Init_more_things:
MOV.w $1901,#$0000 ; 0183BD/1601190000
MOV.w Game_State,#$0005 ; 0183C2/16C1110500
MOV.w Comparison,#$FFFF ; 0183C7/167515FFFF
MOV.w Temp_EXP,#$0000 ; 0183CC/16A3130000
MOV.w Temp_GP,#$0000 ; 0183D1/16A5130000
MOV.w Pause_status,#$0000 ; 0183D6/1695100000
MOV.w ShowCompass,#$0000 ; 0183DB/167B150000
MOV.w Compass_Subdirection,#$0000 ; 0183E0/167D150000
MOV.w Spell_ID,#$FFFF ; 0183E5/162711FFFF
Wipe_enemy_stats:
ASM_CALL Zero_enemy_stats_far ; 0183EA/07188101 // Zero enemy stats
ASM_CALL Erase_enemy_order_far ; 0183EE/07A68101 // Erase enemy Order
ASM_CALL Zero_enemy_equips_far ; 0183F2/07EE8201 // Zero enemy equipped items
JSL Xfer_Window_Color ; 0183F6/04068A01
ASM_CALL Zero_stat_modifiers_far ; 0183FA/07B68201 // Zero stat modifiers
JSL Sub_Setup_Field_Sprites1 ; 0183FE/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018402/04848901
ASM_CALL Decomp80_setup_3b ; 018406/07F99C00 // Decomp80 setup
.long RLE_Loc_0D833F ; 01840A/01800D
JSL Xfer_Window_Color ; 01840D/04068A01
JSL Sub_Do_stuff ; 018411/04B88901
JSR DATA8_018489 ; 018415/1B8984
ASM_CALL Get_Slot2_WeirdOffset ; 018418/07BAAB07 // Get Slot2 Weird Offset (returns 4, or party ID - 1)
Load_Spirit_Gfx:
MULTI_JSR #5 ; 01841C/1205
.word DATA8_01849B ; 01841E/9B84
.word DATA8_0184AD ; 018420/AD84
.word DATA8_0184BF ; 018422/BF84
.word DATA8_0184D1 ; 018424/D184
.word DATA8_0184E3 ; 018426/E384
ASM_CALL Get_Slot3_WeirdOffset ; 018428/07CBAB07 // Get Slot3 Weird Offset
Load_Guest1_Gfx:
MULTI_JSR #3 ; 01842C/1203
.word DATA8_0184F5 ; 01842E/F584
.word DATA8_018507 ; 018430/0785
.word DATA8_018519 ; 018432/1985
ASM_CALL Get_Slot4_WeirdOffset ; 018434/07DCAB07 // Get Slot4 Weird Offset
Load_Guest2_Gfx:
MULTI_JSR #3 ; 018438/1203
.word DATA8_01852B ; 01843A/2B85
.word DATA8_01853D ; 01843C/3D85
.word DATA8_01854F ; 01843E/4F85
ASM_CALL Load_Graphics__1b_12b ; 018440/07BC9C00 // Load Graphics
.byte 4 ; 018444/04
.word 19 ; 018445/1300
.word 0 ; 018447/0000
.word 0 ; 018449/0000
.word 0 ; 01844B/0000
.word 0 ; 01844D/0000
.word 0 ; 01844F/0000
ASM_CALL Load_Graphics__1b_12b ; 018451/07BC9C00 // Load Graphics
.byte 2 ; 018455/02
.word 1 ; 018456/0100
.word 0 ; 018458/0000
.word 0 ; 01845A/0000
.word 0 ; 01845C/0000
.word 65535 ; 01845E/FFFF
.word 0 ; 018460/0000
WAIT #10 ; 018462/060A
JSL Sub_Transfer_stuff ; 018464/04CD8901
JSL Something ; 018468/046D8901
TASK DATA8_0188F6 ; 01846C/08F688
WAIT #10 ; 01846F/060A
ON_TICK Get_Event ; 018471/09EE9518
MOV REG,Chapter_num ; 018475/1FCD18
MULTI_JMP #6 ; 018478/1106
.word Init_Chapter_1 ; 01847A/3383
.word Loop_Chapter_2 ; 01847C/1E86
.word Loop_Chapter_3 ; 01847E/C886
.word DATA8_018772 ; 018480/7287
.word DATA8_01881C ; 018482/1C88
.word DATA8_0188C8 ; 018484/C888
JMP Init_Chapter_1 ; 018486/1A3383
DATA8_018489:
ASM_CALL Load_Graphics__1b_12b ; 018489/07BC9C00 // Load Graphics
.byte 12 ; 01848D/0C
.word 4 ; 01848E/0400
.word 0 ; 018490/0000
.word 0 ; 018492/0000
.word 0 ; 018494/0000
.word 1 ; 018496/0100
.word 0 ; 018498/0000
RTS ; 01849A/1C
DATA8_01849B:
ASM_CALL Load_Graphics__1b_12b ; 01849B/07BC9C00 // Load Graphics
.byte 14 ; 01849F/0E
.word 5 ; 0184A0/0500
.word 0 ; 0184A2/0000
.word 0 ; 0184A4/0000
.word 0 ; 0184A6/0000
.word 1 ; 0184A8/0100
.word 0 ; 0184AA/0000
RTS ; 0184AC/1C
DATA8_0184AD:
ASM_CALL Load_Graphics__1b_12b ; 0184AD/07BC9C00 // Load Graphics
.byte 14 ; 0184B1/0E
.word 6 ; 0184B2/0600
.word 0 ; 0184B4/0000
.word 0 ; 0184B6/0000
.word 0 ; 0184B8/0000
.word 1 ; 0184BA/0100
.word 0 ; 0184BC/0000
RTS ; 0184BE/1C
DATA8_0184BF:
ASM_CALL Load_Graphics__1b_12b ; 0184BF/07BC9C00 // Load Graphics
.byte 14 ; 0184C3/0E
.word 7 ; 0184C4/0700
.word 0 ; 0184C6/0000
.word 0 ; 0184C8/0000
.word 0 ; 0184CA/0000
.word 1 ; 0184CC/0100
.word 0 ; 0184CE/0000
RTS ; 0184D0/1C
DATA8_0184D1:
ASM_CALL Load_Graphics__1b_12b ; 0184D1/07BC9C00 // Load Graphics
.byte 14 ; 0184D5/0E
.word 8 ; 0184D6/0800
.word 0 ; 0184D8/0000
.word 0 ; 0184DA/0000
.word 0 ; 0184DC/0000
.word 1 ; 0184DE/0100
.word 0 ; 0184E0/0000
RTS ; 0184E2/1C
DATA8_0184E3:
ASM_CALL Load_Graphics__1b_12b ; 0184E3/07BC9C00 // Load Graphics
.byte 14 ; 0184E7/0E
.word 13 ; 0184E8/0D00
.word 0 ; 0184EA/0000
.word 0 ; 0184EC/0000
.word 0 ; 0184EE/0000
.word 0 ; 0184F0/0000
.word 0 ; 0184F2/0000
RTS ; 0184F4/1C
DATA8_0184F5:
ASM_CALL Load_Graphics__1b_12b ; 0184F5/07BC9C00 // Load Graphics
.byte 16 ; 0184F9/10
.word 9 ; 0184FA/0900
.word 0 ; 0184FC/0000
.word 0 ; 0184FE/0000
.word 0 ; 018500/0000
.word 1 ; 018502/0100
.word 0 ; 018504/0000
RTS ; 018506/1C
DATA8_018507:
ASM_CALL Load_Graphics__1b_12b ; 018507/07BC9C00 // Load Graphics
.byte 16 ; 01850B/10
.word 10 ; 01850C/0A00
.word 0 ; 01850E/0000
.word 0 ; 018510/0000
.word 0 ; 018512/0000
.word 1 ; 018514/0100
.word 0 ; 018516/0000
RTS ; 018518/1C
DATA8_018519:
ASM_CALL Load_Graphics__1b_12b ; 018519/07BC9C00 // Load Graphics
.byte 16 ; 01851D/10
.word 14 ; 01851E/0E00
.word 0 ; 018520/0000
.word 0 ; 018522/0000
.word 0 ; 018524/0000
.word 0 ; 018526/0000
.word 0 ; 018528/0000
RTS ; 01852A/1C
DATA8_01852B:
ASM_CALL Load_Graphics__1b_12b ; 01852B/07BC9C00 // Load Graphics
.byte 18 ; 01852F/12
.word 11 ; 018530/0B00
.word 0 ; 018532/0000
.word 0 ; 018534/0000
.word 0 ; 018536/0000
.word 1 ; 018538/0100
.word 0 ; 01853A/0000
RTS ; 01853C/1C
DATA8_01853D:
ASM_CALL Load_Graphics__1b_12b ; 01853D/07BC9C00 // Load Graphics
.byte 18 ; 018541/12
.word 12 ; 018542/0C00
.word 0 ; 018544/0000
.word 0 ; 018546/0000
.word 0 ; 018548/0000
.word 1 ; 01854A/0100
.word 0 ; 01854C/0000
RTS ; 01854E/1C
DATA8_01854F:
ASM_CALL Load_Graphics__1b_12b ; 01854F/07BC9C00 // Load Graphics
.byte 18 ; 018553/12
.word 15 ; 018554/0F00
.word 0 ; 018556/0000
.word 0 ; 018558/0000
.word 0 ; 01855A/0000
.word 0 ; 01855C/0000
.word 0 ; 01855E/0000
RTS ; 018560/1C
DATA8_018561:
TASK DATA8_0188F6 ; 018561/08F688
MOV.w Game_State,#$0000 ; 018564/16C1110000
MOV.w Chapter_num,#$0001 ; 018569/16CD180100
JSL Sub_Setup_Field_Sprites1 ; 01856E/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018572/04848901
JSL Code_178F70 ; 018576/04708F17
Decomp_0D8001:
ASM_CALL Decomp80_setup_3b ; 01857A/07F99C00 // Decomp80 setup
.long RLE_Loc_0D833F ; 01857E/01800D
JSL Xfer_Window_Color ; 018581/04068A01
Clear_Map_Progress:
ASM_CALL Clear_map_progress ; 018585/0789A403 // Maps: Clear Map Progress
JSL Sub_Do_stuff ; 018589/04B88901
ASM_CALL Load_Graphics__1b_12b ; 01858D/07BC9C00 // Load Graphics
.byte 12 ; 018591/0C
.word 4 ; 018592/0400
.word 0 ; 018594/0000
.word 0 ; 018596/0000
.word 0 ; 018598/0000
.word 0 ; 01859A/0000
.word 0 ; 01859C/0000
ASM_CALL Load_Graphics__1b_12b ; 01859E/07BC9C00 // Load Graphics
.byte 14 ; 0185A2/0E
.word 5 ; 0185A3/0500
.word 0 ; 0185A5/0000
.word 0 ; 0185A7/0000
.word 0 ; 0185A9/0000
.word 0 ; 0185AB/0000
.word 0 ; 0185AD/0000
ASM_CALL Load_Graphics__1b_12b ; 0185AF/07BC9C00 // Load Graphics
.byte 16 ; 0185B3/10
.word 14 ; 0185B4/0E00
.word 0 ; 0185B6/0000
.word 0 ; 0185B8/0000
.word 0 ; 0185BA/0000
.word 0 ; 0185BC/0000
.word 0 ; 0185BE/0000
ASM_CALL Load_Graphics__1b_12b ; 0185C0/07BC9C00 // Load Graphics
.byte 18 ; 0185C4/12
.word 15 ; 0185C5/0F00
.word 0 ; 0185C7/0000
.word 0 ; 0185C9/0000
.word 0 ; 0185CB/0000
.word 0 ; 0185CD/0000
.word 0 ; 0185CF/0000
ASM_CALL Load_Graphics__1b_12b ; 0185D1/07BC9C00 // Load Graphics
.byte 4 ; 0185D5/04
.word 19 ; 0185D6/1300
.word 0 ; 0185D8/0000
.word 0 ; 0185DA/0000
.word 0 ; 0185DC/0000
.word 0 ; 0185DE/0000
.word 0 ; 0185E0/0000
ASM_CALL Zero_18DF_Decr_18E1 ; 0185E2/07018018 // Zero boss array, delete $18E1
ASM_CALL Treasure_Tracker_Clear ; 0185E6/07168418 // Clear the Treasure Tracker
MOV.w Curr_area,#$0000 ; 0185EA/1673150000
ASM_CALL Entering_Town ; 0185EF/0757B303 // Entering Town
ASM_CALL Town_loading ; 0185F3/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 0185F7/07FDB303 // More Town Loading
WAIT #10 ; 0185FB/060A
JSL Sub_Transfer_stuff ; 0185FD/04CD8901
JSL Something ; 018601/046D8901
WAIT #3 ; 018605/0603
WAIT #60 ; 018607/063C
ON_TICK Get_Event ; 018609/09EE9518
ASM_CALL Load_Graphics__1b_12b ; 01860D/07BC9C00 // Load Graphics
.byte 2 ; 018611/02
.word 1 ; 018612/0100
.word 0 ; 018614/0000
.word 0 ; 018616/0000
.word 0 ; 018618/0000
.word 0 ; 01861A/0000
.word 0 ; 01861C/0000
Loop_Chapter_2:
WAIT #1 ; 01861E/0601
ASM_CALL Is_Curr_Event_1b ; 018620/07258A01 // Is Current Event [x]?
.byte 4 ; 018624/04
JEQ Loop_Chapter_2 ; 018625/0B1E86
MOV REG,$1901 ; 018628/1F0119
JNE Loop_Chapter_2 ; 01862B/0C1E86
ONTICK NOP ; 01862E/10
Event_Start_Chapter2:
JSL Sub_Setup_Field_Sprites1 ; 01862F/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018633/04848901
JSL Sub_Disable_HDMA ; 018637/04F18901
ASM_CALL Clear_Event_1b ; 01863B/07DD9C00 // Battle related
.byte $02 ; 01863F/02
WAIT #1 ; 018640/0601
START_LOOP #4 ; 018642/0104
WAIT #10 ; 018644/060A
END_LOOP ; 018646/02
ASM_CALL Max_HP_MP ; 018647/07E0AA07 // Map HP/MP
MOV.w Game_State,#$0000 ; 01864B/16C1110000
MOV.w Chapter_num,#$0002 ; 018650/16CD180200
JSL Sub_Setup_Field_Sprites1 ; 018655/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018659/04848901
JSL Code_178F70 ; 01865D/04708F17
ASM_CALL Decomp80_setup_3b ; 018661/07F99C00 // Decomp80 setup
.long RLE_Loc_0D833F ; 018665/01800D
JSL Xfer_Window_Color ; 018668/04068A01
ASM_CALL Clear_map_progress ; 01866C/0789A403 // Maps: Clear Map Progress
JSL Sub_Do_stuff ; 018670/04B88901
JSL Sub_Battle_setup ; 018674/04648105
JSL Sub_Another_setup ; 018678/04888705
JSL Sub_More_setup ; 01867C/04AE8E05
JSL Sub_Another_setup_again ; 018680/046F9205
MOV.w ShowCompass,#$0001 ; 018684/167B150100
ASM_CALL Load_Graphics__1b_12b ; 018689/07BC9C00 // Load Graphics
.byte 4 ; 01868D/04
.word 19 ; 01868E/1300
.word 0 ; 018690/0000
.word 0 ; 018692/0000
.word 0 ; 018694/0000
.word 0 ; 018696/0000
.word 0 ; 018698/0000
ASM_CALL Zero_18DF_Decr_18E1 ; 01869A/07018018 // Zero boss array, delete $18E1
ASM_CALL Treasure_Tracker_Clear ; 01869E/07168418 // Clear the Treasure Tracker
MOV.w Curr_area,#$0001 ; 0186A2/1673150100
WAIT #10 ; 0186A7/060A
JSL Sub_Transfer_stuff ; 0186A9/04CD8901
JSL Something ; 0186AD/046D8901
WAIT #1 ; 0186B1/0601
ON_TICK Get_Event ; 0186B3/09EE9518
ASM_CALL Load_Graphics__1b_12b ; 0186B7/07BC9C00 // Load Graphics
.byte 2 ; 0186BB/02
.word 1 ; 0186BC/0100
.word 0 ; 0186BE/0000
.word 0 ; 0186C0/0000
.word 0 ; 0186C2/0000
.word 0 ; 0186C4/0000
.word 0 ; 0186C6/0000
Loop_Chapter_3:
WAIT #1 ; 0186C8/0601
ASM_CALL Is_Curr_Event_1b ; 0186CA/07258A01 // Is Current Event [x]?
.byte 9 ; 0186CE/09
JEQ Loop_Chapter_3 ; 0186CF/0BC886
MOV REG,$1901 ; 0186D2/1F0119
JNE Loop_Chapter_3 ; 0186D5/0CC886
ONTICK NOP ; 0186D8/10
Event_Start_Chapter3:
JSL Sub_Setup_Field_Sprites1 ; 0186D9/045A8901
JSL Sub_Setup_Field_Sprites2 ; 0186DD/04848901
JSL Sub_Disable_HDMA ; 0186E1/04F18901
ASM_CALL Clear_Event_1b ; 0186E5/07DD9C00 // Battle related
.byte $02 ; 0186E9/02
WAIT #1 ; 0186EA/0601
START_LOOP #4 ; 0186EC/0104
WAIT #10 ; 0186EE/060A
END_LOOP ; 0186F0/02
ASM_CALL Max_HP_MP ; 0186F1/07E0AA07 // Map HP/MP
MOV.w Game_State,#$0000 ; 0186F5/16C1110000
MOV.w Chapter_num,#$0003 ; 0186FA/16CD180300
JSL Sub_Setup_Field_Sprites1 ; 0186FF/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018703/04848901
JSL Code_178F70 ; 018707/04708F17
ASM_CALL Decomp80_setup_3b ; 01870B/07F99C00 // Decomp80 setup
.long RLE_Loc_0D833F ; 01870F/01800D
JSL Xfer_Window_Color ; 018712/04068A01
ASM_CALL Clear_map_progress ; 018716/0789A403 // Maps: Clear Map Progress
JSL Sub_Do_stuff ; 01871A/04B88901
JSL Sub_Battle_setup ; 01871E/04648105
JSL Sub_Another_setup ; 018722/04888705
JSL Sub_More_setup ; 018726/04AE8E05
JSL Sub_Another_setup_again ; 01872A/046F9205
MOV.w ShowCompass,#$0001 ; 01872E/167B150100
ASM_CALL Load_Graphics__1b_12b ; 018733/07BC9C00 // Load Graphics
.byte 4 ; 018737/04
.word 19 ; 018738/1300
.word 0 ; 01873A/0000
.word 0 ; 01873C/0000
.word 0 ; 01873E/0000
.word 0 ; 018740/0000
.word 0 ; 018742/0000
ASM_CALL Zero_18DF_Decr_18E1 ; 018744/07018018 // Zero boss array, delete $18E1
ASM_CALL Treasure_Tracker_Clear ; 018748/07168418 // Clear the Treasure Tracker
MOV.w Curr_area,#$0002 ; 01874C/1673150200
WAIT #10 ; 018751/060A
JSL Sub_Transfer_stuff ; 018753/04CD8901
JSL Something ; 018757/046D8901
WAIT #1 ; 01875B/0601
ON_TICK Get_Event ; 01875D/09EE9518
ASM_CALL Load_Graphics__1b_12b ; 018761/07BC9C00 // Load Graphics
.byte 2 ; 018765/02
.word 1 ; 018766/0100
.word 0 ; 018768/0000
.word 0 ; 01876A/0000
.word 0 ; 01876C/0000
.word 0 ; 01876E/0000
.word 0 ; 018770/0000
DATA8_018772:
WAIT #1 ; 018772/0601
ASM_CALL Is_Curr_Event_1b ; 018774/07258A01 // Is Current Event [x]?
.byte 13 ; 018778/0D
JEQ DATA8_018772 ; 018779/0B7287
MOV REG,$1901 ; 01877C/1F0119
JNE DATA8_018772 ; 01877F/0C7287
ONTICK NOP ; 018782/10
JSL Sub_Setup_Field_Sprites1 ; 018783/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018787/04848901
JSL Sub_Disable_HDMA ; 01878B/04F18901
ASM_CALL Clear_Event_1b ; 01878F/07DD9C00 // Battle related
.byte $02 ; 018793/02
WAIT #1 ; 018794/0601
START_LOOP #4 ; 018796/0104
WAIT #10 ; 018798/060A
END_LOOP ; 01879A/02
ASM_CALL Max_HP_MP ; 01879B/07E0AA07 // Map HP/MP
MOV.w Game_State,#$0000 ; 01879F/16C1110000
MOV.w Chapter_num,#$0004 ; 0187A4/16CD180400
JSL Sub_Setup_Field_Sprites1 ; 0187A9/045A8901
JSL Sub_Setup_Field_Sprites2 ; 0187AD/04848901
JSL Code_178F70 ; 0187B1/04708F17
ASM_CALL Decomp80_setup_3b ; 0187B5/07F99C00 // Decomp80 setup
.long RLE_Loc_0D833F ; 0187B9/01800D
JSL Xfer_Window_Color ; 0187BC/04068A01
ASM_CALL Clear_map_progress ; 0187C0/0789A403 // Maps: Clear Map Progress
JSL Sub_Do_stuff ; 0187C4/04B88901
JSL Sub_Battle_setup ; 0187C8/04648105
JSL Sub_Another_setup ; 0187CC/04888705
JSL Sub_More_setup ; 0187D0/04AE8E05
JSL Sub_Another_setup_again ; 0187D4/046F9205
MOV.w ShowCompass,#$0001 ; 0187D8/167B150100
ASM_CALL Load_Graphics__1b_12b ; 0187DD/07BC9C00 // Load Graphics
.byte 4 ; 0187E1/04
.word 19 ; 0187E2/1300
.word 0 ; 0187E4/0000
.word 0 ; 0187E6/0000
.word 0 ; 0187E8/0000
.word 0 ; 0187EA/0000
.word 0 ; 0187EC/0000
ASM_CALL Zero_18DF_Decr_18E1 ; 0187EE/07018018 // Zero boss array, delete $18E1
ASM_CALL Treasure_Tracker_Clear ; 0187F2/07168418 // Clear the Treasure Tracker
MOV.w Curr_area,#$0003 ; 0187F6/1673150300
WAIT #10 ; 0187FB/060A
JSL Sub_Transfer_stuff ; 0187FD/04CD8901
JSL Something ; 018801/046D8901
WAIT #1 ; 018805/0601
ON_TICK Get_Event ; 018807/09EE9518
ASM_CALL Load_Graphics__1b_12b ; 01880B/07BC9C00 // Load Graphics
.byte 2 ; 01880F/02
.word 1 ; 018810/0100
.word 0 ; 018812/0000
.word 0 ; 018814/0000
.word 0 ; 018816/0000
.word 0 ; 018818/0000
.word 0 ; 01881A/0000
DATA8_01881C:
WAIT #1 ; 01881C/0601
ASM_CALL Is_Curr_Event_1b ; 01881E/07258A01 // Is Current Event [x]?
.byte 23 ; 018822/17
JEQ DATA8_01881C ; 018823/0B1C88
MOV REG,$1901 ; 018826/1F0119
JNE DATA8_01881C ; 018829/0C1C88
ONTICK NOP ; 01882C/10
JSL Sub_Setup_Field_Sprites1 ; 01882D/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018831/04848901
JSL Sub_Disable_HDMA ; 018835/04F18901
ASM_CALL Clear_Event_1b ; 018839/07DD9C00 // Battle related
.byte $02 ; 01883D/02
WAIT #1 ; 01883E/0601
START_LOOP #4 ; 018840/0104
WAIT #10 ; 018842/060A
END_LOOP ; 018844/02
ASM_CALL Max_HP_MP ; 018845/07E0AA07 // Map HP/MP
MOV.w Game_State,#$0000 ; 018849/16C1110000
MOV.w Chapter_num,#$0005 ; 01884E/16CD180500
JSL Sub_Setup_Field_Sprites1 ; 018853/045A8901
JSL Sub_Setup_Field_Sprites2 ; 018857/04848901
JSL Code_178F70 ; 01885B/04708F17
ASM_CALL Decomp80_setup_3b ; 01885F/07F99C00 // Decomp80 setup
.long RLE_Loc_0D833F ; 018863/01800D
JSL Xfer_Window_Color ; 018866/04068A01
ASM_CALL Clear_map_progress ; 01886A/0789A403 // Maps: Clear Map Progress
JSL Sub_Do_stuff ; 01886E/04B88901
JSL Sub_Battle_setup ; 018872/04648105
JSL Sub_Another_setup ; 018876/04888705
JSL Sub_More_setup ; 01887A/04AE8E05
JSL Sub_Another_setup_again ; 01887E/046F9205
MOV.w ShowCompass,#$0001 ; 018882/167B150100
ASM_CALL Load_Graphics__1b_12b ; 018887/07BC9C00 // Load Graphics
.byte 4 ; 01888B/04
.word 19 ; 01888C/1300
.word 0 ; 01888E/0000
.word 0 ; 018890/0000
.word 0 ; 018892/0000
.word 0 ; 018894/0000
.word 0 ; 018896/0000
ASM_CALL Zero_18DF_Decr_18E1 ; 018898/07018018 // Zero boss array, delete $18E1
ASM_CALL Treasure_Tracker_Clear ; 01889C/07168418 // Clear the Treasure Tracker
MOV.w Curr_area,#$0004 ; 0188A0/1673150400
WAIT #10 ; 0188A5/060A
JSL Sub_Transfer_stuff ; 0188A7/04CD8901
JSL Something ; 0188AB/046D8901
WAIT #3 ; 0188AF/0603
WAIT #60 ; 0188B1/063C
ON_TICK Get_Event ; 0188B3/09EE9518
ASM_CALL Load_Graphics__1b_12b ; 0188B7/07BC9C00 // Load Graphics
.byte 2 ; 0188BB/02
.word 1 ; 0188BC/0100
.word 0 ; 0188BE/0000
.word 0 ; 0188C0/0000
.word 0 ; 0188C2/0000
.word 0 ; 0188C4/0000
.word 0 ; 0188C6/0000
DATA8_0188C8:
WAIT #1 ; 0188C8/0601
ASM_CALL Is_Curr_Event_1b ; 0188CA/07258A01 // Is Current Event [x]?
.byte 32 ; 0188CE/20
JEQ DATA8_0188C8 ; 0188CF/0BC888
MOV REG,$1901 ; 0188D2/1F0119
JNE DATA8_0188C8 ; 0188D5/0CC888
ONTICK NOP ; 0188D8/10
JSL Sub_Setup_Field_Sprites1 ; 0188D9/045A8901
JSL Sub_Setup_Field_Sprites2 ; 0188DD/04848901
JSL Sub_Disable_HDMA ; 0188E1/04F18901
ASM_CALL Clear_Event_1b ; 0188E5/07DD9C00 // Battle related
.byte $02 ; 0188E9/02
WAIT #1 ; 0188EA/0601
START_LOOP #4 ; 0188EC/0104
WAIT #10 ; 0188EE/060A
END_LOOP ; 0188F0/02
ASM_CALL Max_HP_MP ; 0188F1/07E0AA07 // Map HP/MP
HALT ; 0188F5/0A
DATA8_0188F6:
WAIT #1 ; 0188F6/0601
Game_over_check:
ASM_CALL Is_BattleState_Negative ; 0188F8/07388A01 // Is Battle State Negative?
JNE Game_over ; 0188FC/0C0289
JMP DATA8_0188F6 ; 0188FF/1AF688
Game_over:
ASM_CALL Setup_Text_Parser_3b_1b ; 018902/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_06_0C_0C ; 018906/018008
.byte $00 ; 018909/00
START_LOOP #6 ; 01890A/0106
ASM_CALL Fade ; 01890C/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #3 ; 018910/0603
END_LOOP ; 018912/02
ASM_CALL GetSet_Music_1b ; 018913/073C9C00 // Get/Set Music
.byte 55 ; 018917/37
WAIT #120 ; 018918/0678
DATA8_01891A:
WAIT #1 ; 01891A/0601
MOV REG,#$0000 ; 01891C/1E0000
ASM_CALL WasBtnPressedX_2b ; 01891F/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8080 ; 018923/8080
JEQ DATA8_01891A ; 018925/0B1A89
ASM_CALL Set_Mosaic_Size_1b ; 018928/079D9E00 // Set Mosaic Size
.byte $00 ; 01892C/00
ASM_CALL Mosaic_BGEnable_1b ; 01892D/07799E00 // Mosaic BG Enable
.byte $0F ; 018931/0F
START_LOOP #16 ; 018932/0110
ASM_CALL Fade ; 018934/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Incr_Mosaic_Size ; 018938/07B89E00 // Increase Mosaic Size
ASM_CALL Sound_stuff_1b ; 01893C/07199C00 // Sound stuff
.byte $F0 ; 018940/F0
WAIT #3 ; 018941/0603
END_LOOP ; 018943/02
ASM_CALL GetSet_Music_1b ; 018944/073C9C00 // Get/Set Music
.byte 0 ; 018948/00
ASM_CALL MainScr_Remove_1b ; 018949/07B69D00 // Main Screen remove
.byte $1F ; 01894D/1F
ONTICK NOP ; 01894E/10
ASM_CALL Unknown_setup ; 01894F/07E59C00 // Unknown setup
JSL Sub_Disable_HDMA ; 018953/04F18901
WAIT #1 ; 018957/0601
END ; 018959/00
Sub_Setup_Field_Sprites1:
ASM_CALL MainScr_Remove_1b ; 01895A/07B69D00 // Main Screen remove
.byte $1F ; 01895E/1F
ASM_CALL Display_Force_Blanking_far ; 01895F/07778100 // Display Force Blanking
ASM_CALL Mosaic_Clear_1b ; 018963/078A9E00 // Mosaic Clear
.byte $0F ; 018967/0F
ASM_CALL Zero_1893_and_E000_to_2131 ; 018968/0795E503 // $1893 = 0, $2131 color math = E000
RTL ; 01896C/05
Something:
MOV REG,#$0000 ; 01896D/1E0000
ASM_CALL Update_scn_far ; 018970/07238300 // Update screen (parameter?)
ASM_CALL MainScr_Add_1b ; 018974/07A89D00 // Main Screen add
.byte $17 ; 018978/17
ASM_CALL Color_stuff_2b ; 018979/0762E503 // Color stuff
.word $1F26 ; 01897D/261F
ASM_CALL Set_Display_far ; 01897F/078B8100 // Set Display
RTL ; 018983/05
Sub_Setup_Field_Sprites2:
ASM_CALL Read_BGmode_1b ; 018984/07699D00 // Read Background mode
.byte 1 ; 018988/01
ASM_CALL Display_brancher_6b ; 018989/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $00 ; 01898D/00
.byte $00 ; 01898E/00
.word $1000 ; 01898F/0010
.word $0000 ; 018991/0000
ASM_CALL Display_brancher_6b ; 018993/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 018997/01
.byte $01 ; 018998/01
.word $1000 ; 018999/0010
.word $0400 ; 01899B/0004
ASM_CALL Display_brancher_6b ; 01899D/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $02 ; 0189A1/02
.byte $00 ; 0189A2/00
.word $5000 ; 0189A3/0050
.word $0C00 ; 0189A5/000C
ASM_CALL Set_Sprite_mode_4b ; 0189A7/07939D00 // Set Sprite mode - [A] [X] [OBJ size]
.byte $00 ; 0189AB/00
.word $6000 ; 0189AC/0060
.byte $00 ; 0189AE/00
ASM_CALL Sub_009DEA_4b ; 0189AF/07EA9D00 // Some subroutine at 0189AF
.byte 0 ; 0189B3/00
.byte 0 ; 0189B4/00
.byte 0 ; 0189B5/00
.byte 0 ; 0189B6/00
RTL ; 0189B7/05
Sub_Do_stuff:
ASM_CALL Text_Init_3b_1b ; 0189B8/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A45 ; 0189BC/458A01
.byte 0 ; 0189BF/00
ASM_CALL Text_Init_3b_1b ; 0189C0/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A4A ; 0189C4/4A8A01
.byte 1 ; 0189C7/01
ASM_CALL Do_Stuff_far ; 0189C8/07A8A000 // Do Stuff
RTL ; 0189CC/05
Sub_Transfer_stuff:
ASM_CALL HDMA_xfer_6b ; 0189CD/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $02 ; 0189D1/02
.byte $42 ; 0189D2/42
.byte $11 ; 0189D3/11
.long DMA_189D3 ; 0189D4/B9B701
ASM_CALL HDMA_xfer_6b ; 0189D7/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $03 ; 0189DB/03
.byte $40 ; 0189DC/40
.byte $31 ; 0189DD/31
.long DMA_189DE ; 0189DE/C3B701
ASM_CALL HDMA_xfer_6b ; 0189E1/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $04 ; 0189E5/04
.byte $40 ; 0189E6/40
.byte $2C ; 0189E7/2C
.long DMA_189E8 ; 0189E8/CDB701
MOV.w $0048,#$D0D0 ; 0189EB/164800D0D0
RTL ; 0189F0/05
Sub_Disable_HDMA:
ASM_CALL Rem_HDMA_ch_1b ; 0189F1/071F9F00 // Remove HDMA channel
.byte $02 ; 0189F5/02
ASM_CALL Rem_HDMA_ch_1b ; 0189F6/071F9F00 // Remove HDMA channel
.byte $03 ; 0189FA/03
ASM_CALL Rem_HDMA_ch_1b ; 0189FB/071F9F00 // Remove HDMA channel
.byte $04 ; 0189FF/04
MOV.w $0048,#$0000 ; 018A00/1648000000
RTL ; 018A05/05
Xfer_Window_Color:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 018A06/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 018A0A/771500
.byte $03 ; 018A0D/03
.word 2 ; 018A0E/0200
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 018A10/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 018A14/771500
.byte $07 ; 018A17/07
.word 2 ; 018A18/0200
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 018A1A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 018A1E/771500
.byte $73 ; 018A21/73
.word 2 ; 018A22/0200
RTL ; 018A24/05
$018A68 - Event 01: Moving Around
Event_Main_01:
MOV REG,VAR0 ; 018A68/2400
ASM_CALL Cmp_2_values_2b ; 018A6A/0781B007 // Compare [A] with [val] - Returns 0 (eq), 1 (A>=val), 2 (A<val)
.word 65535 ; 018A6E/FFFF
JEQ Town_Walking_Up ; 018A70/0BD88A
Code_Town_Idle_Loop:
WAIT #1 ; 018A73/0601
ASM_CALL RNG_1b ; 018A75/07BDA000 // RNG = Random Number Generator
.byte 250 ; 018A79/FA
MOV REG,$1901 ; 018A7A/1F0119
JNE Code_Town_Idle_Loop ; 018A7D/0C738A
ASM_CALL Check_Game_State_2b ; 018A80/079FB007 // Check Game State - Returns 1 if [val] = $11C1, 0 otherwise
.word $0000 ; 018A84/0000
JEQ Code_Town_Idle_Loop ; 018A86/0B738A
ASM_CALL Sub_Dungeon_check_far ; 018A89/0720B207 // Sub: Dungeon Check - Returns 1 if in a dungeon, 0 if in a town
JNE Code_Town_Leaving_Shop ; 018A8D/0C5A8B
Code_Town_Movement:
MOV REG,#$0000 ; 018A90/1E0000
ASM_CALL WasBtnPressedX_2b ; 018A93/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0300 ; 018A97/0003
JNE Town_Walking_Side ; 018A99/0CB78A
MOV REG,#$0000 ; 018A9C/1E0000
ASM_CALL WasBtnPressedX_2b ; 018A9F/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 018AA3/8000
JNE Town_Walking_Menu ; 018AA5/0CC88A
MOV REG,#$0000 ; 018AA8/1E0000
ASM_CALL WasBtnPressedX_2b ; 018AAB/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0800 ; 018AAF/0008
JNE Town_Walking_Up ; 018AB1/0CD88A
JMP Code_Town_Idle_Loop ; 018AB4/1A738A
Town_Walking_Side:
MOV.w Game_State,#$0004 ; 018AB7/16C1110400
JSL Town_turning2 ; 018ABC/048BB803
MOV.w Game_State,#$0000 ; 018AC0/16C1110000
JMP Code_Town_Idle_Loop ; 018AC5/1A738A
Town_Walking_Menu:
MOV.w Game_State,#$0001 ; 018AC8/16C1110100
JSR Town_Opening_Menu ; 018ACD/1BB691
MOV.w Game_State,#$0000 ; 018AD0/16C1110000
JMP Code_Town_Idle_Loop ; 018AD5/1A738A
Town_Walking_Up:
MOV.w Game_State,#$0005 ; 018AD8/16C1110500
JSL Town_entering_something ; 018ADD/04BCB803
MOV.w Game_State,#$0000 ; 018AE1/16C1110000
JEQ Code_Town_Leaving_Shop ; 018AE6/0B5A8B
Code_Dungeon_Idle_Loop:
WAIT #1 ; 018AE9/0601
ASM_CALL RNG_1b ; 018AEB/07BDA000 // RNG = Random Number Generator
.byte 250 ; 018AEF/FA
MOV REG,$1901 ; 018AF0/1F0119
JNE Code_Dungeon_Idle_Loop ; 018AF3/0CE98A
ASM_CALL Check_Game_State_2b ; 018AF6/079FB007 // Check Game State - Returns 1 if [val] = $11C1, 0 otherwise
.word $0000 ; 018AFA/0000
JEQ Code_Dungeon_Idle_Loop ; 018AFC/0BE98A
ASM_CALL Sub_Dungeon_check_far ; 018AFF/0720B207 // Sub: Dungeon Check - Returns 1 if in a dungeon, 0 if in a town
JEQ Code_Town_Idle_Loop ; 018B03/0B738A
ASM_CALL Sub_Is_Active_Enemies ; 018B06/078F8C07
JNE Dungeon_Walking_Battle ; 018B0A/0C488B
MOV REG,#$0000 ; 018B0D/1E0000
ASM_CALL WasBtnPressedX_2b ; 018B10/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0F00 ; 018B14/000F
JNE Dungeon_Walking_Any ; 018B16/0C288B
MOV REG,#$0000 ; 018B19/1E0000
ASM_CALL WasBtnPressed_2b ; 018B1C/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 018B20/8000
JNE Dungeon_Walking_Menu ; 018B22/0C388B
JMP Code_Dungeon_Idle_Loop ; 018B25/1AE98A
Dungeon_Walking_Any:
MOV.w Game_State,#$0003 ; 018B28/16C1110300
JSR Loop_Draw_next_step ; 018B2D/1B858C
MOV.w Game_State,#$0000 ; 018B30/16C1110000
JMP Code_Dungeon_Idle_Loop ; 018B35/1AE98A
Dungeon_Walking_Menu:
MOV.w Game_State,#$0001 ; 018B38/16C1110100
JSR Town_Opening_Menu ; 018B3D/1BB691
MOV.w Game_State,#$0000 ; 018B40/16C1110000
JMP Code_Dungeon_Idle_Loop ; 018B45/1AE98A
Dungeon_Walking_Battle:
MOV.w Game_State,#$0002 ; 018B48/16C1110200
JSR Load_fight_music ; 018B4D/1B1A8E
MOV.w Game_State,#$0000 ; 018B50/16C1110000
WAIT #3 ; 018B55/0603
JMP Code_Dungeon_Idle_Loop ; 018B57/1AE98A
Code_Town_Leaving_Shop:
WAIT #1 ; 018B5A/0601
ASM_CALL Color_stuff_2b ; 018B5C/0762E503 // Color stuff
.word $1F36 ; 018B60/361F
START_LOOP #32 ; 018B62/0120
ASM_CALL Subtract_color_math_1b ; 018B64/079FE503 // Subtract color math designation
.byte $01 ; 018B68/01
WAIT #1 ; 018B69/0601
END_LOOP ; 018B6B/02
ASM_CALL Sub_Dungeon_check_far ; 018B6C/0720B207 // Sub: Dungeon Check - Returns 1 if in a dungeon, 0 if in a town
JNE Code_Dungeon_Idle_Loop ; 018B70/0CE98A
JMP Code_Town_Idle_Loop ; 018B73/1A738A
$018C85 - Sub: Dungeon walking
Loop_Draw_next_step:
WAIT #1 ; 018C85/0601
ASM_CALL RNG_1b ; 018C87/07BDA000 // RNG = Random Number Generator
.byte 250 ; 018C8B/FA
MOV REG,$1901 ; 018C8C/1F0119
JNE Loop_Draw_next_step ; 018C8F/0C858C
MOV REG,#$0000 ; 018C92/1E0000
ASM_CALL WasBtnPressedX_2b ; 018C95/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0800 ; 018C99/0008
JNE Move_up ; 018C9B/0CC38C
MOV REG,#$0000 ; 018C9E/1E0000
ASM_CALL WasBtnPressedX_2b ; 018CA1/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0100 ; 018CA5/0001
JNE Move_right ; 018CA7/0CC98C
MOV REG,#$0000 ; 018CAA/1E0000
ASM_CALL WasBtnPressedX_2b ; 018CAD/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0400 ; 018CB1/0004
JNE Move_down ; 018CB3/0CCF8C
MOV REG,#$0000 ; 018CB6/1E0000
ASM_CALL WasBtnPressedX_2b ; 018CB9/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0200 ; 018CBD/0002
JNE Move_left ; 018CBF/0CD58C
RTS ; 018CC2/1C
Move_up:
MOV REG,#$0000 ; 018CC3/1E0000
JMP Dungeon_movement ; 018CC6/1ADB8C
Move_right:
MOV REG,#$0001 ; 018CC9/1E0100
JMP Dungeon_movement ; 018CCC/1ADB8C
Move_down:
MOV REG,#$0002 ; 018CCF/1E0200
JMP Dungeon_movement ; 018CD2/1ADB8C
Move_left:
MOV REG,#$0003 ; 018CD5/1E0300
JMP Dungeon_movement ; 018CD8/1ADB8C
Dungeon_movement:
ASM_CALL Sub_038761 ; 018CDB/07618703
MULTI_JMP #3 ; 018CDF/1103
.word Dungeon_move_1 ; 018CE1/E78C
.word Dungeon_move_2 ; 018CE3/F68C
.word Dungeon_move_3 ; 018CE5/0E8D
Dungeon_move_1:
WAIT #1 ; 018CE7/0601
MOV REG,#$0000 ; 018CE9/1E0000
ASM_CALL WasBtnPressedX_2b ; 018CEC/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0C00 ; 018CF0/000C
JNE Dungeon_move_1 ; 018CF2/0CE78C
RTS ; 018CF5/1C
Dungeon_move_2:
WAIT #1 ; 018CF6/0601
ASM_CALL Spirit_regen ; 018CF8/078CA707 // Spirit regen
ASM_CALL Map_stuff_and_vblank ; 018CFC/073F8803 // Map stuff and vblank
ASM_CALL Treasure_Chest_Draw ; 018D00/07238418 // Treasure Chest Draw - Sets up a chest object to appear if the coordinates are right
Encounter_check:
ASM_CALL Check_map_tile_value ; 018D04/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
JNE Random_Encounter ; 018D08/0CAE8D
JMP Loop_Draw_next_step ; 018D0B/1A858C
Dungeon_move_3:
ASM_CALL The_69_check ; 018D0E/07EBAD03 // Event 69 check
JEQ DATA8_018D1E ; 018D12/0B1E8D
ASM_CALL Adjust_color_math_2b ; 018D15/077DE503 // Adjust color math
.word $0036 ; 018D19/3600
JMP Check_for_map_exit ; 018D1B/1A248D
DATA8_018D1E:
ASM_CALL Color_stuff_2b ; 018D1E/0762E503 // Color stuff
.word $0036 ; 018D22/3600
Check_for_map_exit:
ASM_CALL Check_for_exit_location ; 018D24/0781A503 // Maps: Check for exit location
MULTI_JMP #3 ; 018D28/1103
.word Exit_map ; 018D2A/308D
.word Darwin_theme ; 018D2C/5E8D
.word No_Darwin_theme ; 018D2E/778D
Exit_map:
MOV.w ShowCompass,#$0000 ; 018D30/167B150000
ASM_CALL DoStuffWithEvent69 ; 018D35/07E0AD03 // Do stuff with event 69
JSL Travel_subasm ; 018D39/045FD518
Long_ass_section:
JSL Setup_Draw_Field_Sprites ; 018D3D/04C2CD03
ASM_CALL Sub_03B351 ; 018D41/0751B303 // Stairs related
ASM_CALL Town_loading ; 018D45/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 018D49/07FDB303 // More Town Loading
Entering_town:
ASM_CALL GetSet_Music_1b ; 018D4D/073C9C00 // Get/Set Music
.byte 89 ; 018D51/59
WAIT #15 ; 018D52/060F
START_LOOP #16 ; 018D54/0110
ASM_CALL Unfade ; 018D56/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 018D5A/0603
END_LOOP ; 018D5C/02
RTS ; 018D5D/1C
Darwin_theme:
START_LOOP #32 ; 018D5E/0120
ASM_CALL Add_color_math_1b ; 018D60/07BBE503 // Add color math designation
.byte $01 ; 018D64/01
WAIT #1 ; 018D65/0601
END_LOOP ; 018D67/02
ASM_CALL Bank_03_Maps_and_Gfx ; 018D68/07018003 // Sub: Dungeon map stuff
ASM_CALL Map_stuff_and_vblank ; 018D6C/073F8803 // Map stuff and vblank
ASM_CALL Sub_03887A ; 018D70/077A8803 // Sub: Involved in uncompressing the dungeon graphics
JMP DATA8_018D96 ; 018D74/1A968D
No_Darwin_theme:
START_LOOP #32 ; 018D77/0120
ASM_CALL Add_color_math_1b ; 018D79/07BBE503 // Add color math designation
.byte $01 ; 018D7D/01
ASM_CALL Sound_stuff_1b ; 018D7E/07199C00 // Sound stuff
.byte $F8 ; 018D82/F8
WAIT #1 ; 018D83/0601
END_LOOP ; 018D85/02
ASM_CALL Bank_03_Maps_and_Gfx ; 018D86/07018003 // Sub: Dungeon map stuff
ASM_CALL Map_stuff_and_vblank ; 018D8A/073F8803 // Map stuff and vblank
ASM_CALL Sub_03887A ; 018D8E/077A8803 // Sub: Involved in uncompressing the dungeon graphics
Set_BGM:
ASM_CALL Sub_Default_BGM ; 018D92/0720A503 // Sub: Default Dungeon BGM
DATA8_018D96:
START_LOOP #32 ; 018D96/0120
ASM_CALL Subtract_color_math_1b ; 018D98/079FE503 // Subtract color math designation
.byte $01 ; 018D9C/01
WAIT #1 ; 018D9D/0601
END_LOOP ; 018D9F/02
MOV REG,#$0000 ; 018DA0/1E0000
ASM_CALL Sub_038761 ; 018DA3/07618703
WAIT #1 ; 018DA7/0601
ASM_CALL Map_stuff_and_vblank ; 018DA9/073F8803 // Map stuff and vblank
RTS ; 018DAD/1C
Random_Encounter:
ASM_CALL Adjust_color_math_2b ; 018DAE/077DE503 // Adjust color math
.word $0026 ; 018DB2/2600
START_LOOP #8 ; 018DB4/0108
ASM_CALL Add_color_math_1b ; 018DB6/07BBE503 // Add color math designation
.byte $04 ; 018DBA/04
WAIT #1 ; 018DBB/0601
END_LOOP ; 018DBD/02
START_LOOP #8 ; 018DBE/0108
ASM_CALL Subtract_color_math_1b ; 018DC0/079FE503 // Subtract color math designation
.byte $04 ; 018DC4/04
WAIT #1 ; 018DC5/0601
END_LOOP ; 018DC7/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 018DC8/0795E503 // $1893 = 0, $2131 color math = E000
MOV REG,Encounter_Type ; 018DCC/1F7915
MULTI_JMP #4 ; 018DCF/1104
.word Normal_Encounter ; 018DD1/088E
.word Normal_Encounter ; 018DD3/088E
.word Surprise_Attack ; 018DD5/D98D
.word Normal_Encounter ; 018DD7/088E
Surprise_Attack:
ASM_CALL RNG_1b ; 018DD9/07BDA000 // RNG = Random Number Generator
.byte 2 ; 018DDD/02
JEQ DATA8_018DF6 ; 018DDE/0BF68D
Back_Attack:
START_LOOP #2 ; 018DE1/0102
MOV REG,#$0003 ; 018DE3/1E0300
ASM_CALL Sub_038761 ; 018DE6/07618703
WAIT #1 ; 018DEA/0601
ASM_CALL Map_stuff_and_vblank ; 018DEC/073F8803 // Map stuff and vblank
WAIT #1 ; 018DF0/0601
END_LOOP ; 018DF2/02
JMP Normal_Encounter ; 018DF3/1A088E
DATA8_018DF6:
START_LOOP #2 ; 018DF6/0102
MOV REG,#$0001 ; 018DF8/1E0100
ASM_CALL Sub_038761 ; 018DFB/07618703
WAIT #1 ; 018DFF/0601
ASM_CALL Map_stuff_and_vblank ; 018E01/073F8803 // Map stuff and vblank
WAIT #1 ; 018E05/0601
END_LOOP ; 018E07/02
Normal_Encounter:
ASM_CALL Decomp_Battle1 ; 018E08/074B8118 // Battle: Some Decompression subroutine
START_LOOP #6 ; 018E0C/0106
ASM_CALL Load_Encounter_Gfx ; 018E0E/07E68118 // Battle: Load Encounter Graphics
WAIT #1 ; 018E12/0601
END_LOOP ; 018E14/02
Select_which_fight:
ASM_CALL Roll_encounter ; 018E15/07108218 // Roll RNG for Random Encounter
RTS ; 018E19/1C
Load_fight_music:
ASM_CALL Load_battle_BGM ; 018E1A/07E98107 // Load battle music
ASM_CALL Zero_stat_modifiers_far ; 018E1E/07B68201 // Zero stat modifiers
MOV VAR2,#$0000 ; 018E22/0F020000
WAIT #5 ; 018E26/0605
ASM_CALL Setup_Text_Parser_3b_1b ; 018E28/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_06_0C_0C ; 018E2C/018008
.byte $00 ; 018E2F/00
WAIT #1 ; 018E30/0601
ASM_CALL Transfer_Graphics_3b ; 018E32/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_Menu ; 018E36/2FB501
MOV.w ShowCompass,#$0000 ; 018E39/167B150000
WAIT #1 ; 018E3E/0601
ASM_CALL Clear_Event_1b ; 018E40/07DD9C00 // Battle related
.byte $04 ; 018E44/04
MOV REG,Text_Line_Speed ; 018E45/1F9710
MOV VAR3,REG ; 018E48/2303
MOV REG,Encounter_Type ; 018E4A/1F7915
MULTI_JMP #4 ; 018E4D/1104
.word DATA8_018E61 ; 018E4F/618E
.word DATA8_018E61 ; 018E51/618E
.word DATA8_018E57 ; 018E53/578E
.word DATA8_018E61 ; 018E55/618E
DATA8_018E57:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 018E57/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Red ; 018E5B/8C950D
.byte $02 ; 018E5E/02
.word 2 ; 018E5F/0200
DATA8_018E61:
ASM_CALL Battle_Start_Reaction ; 018E61/0745B607 // Battle: Start reaction
DATA8_018E65:
WAIT #1 ; 018E65/0601
ASM_CALL Wait_For_A_Press_1b ; 018E67/0703BA07 // Wait for A-press
.byte $00 ; 018E6B/00
JEQ DATA8_018E65 ; 018E6C/0B658E
ASM_CALL Get_Enemy_Names ; 018E6F/07F2B707 // Get enemy names
MOV VAR1,REG ; 018E73/2301
Text_EnemyNum1:
ASM_CALL Setup_Text_Parser_3b_1b ; 018E75/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy1_Num ; 018E79/1D8F08
.byte $00 ; 018E7C/00
JSR DATA8_018F00 ; 018E7D/1B008F
MOV REG,VAR1 ; 018E80/2401
JEQ DATA8_018F27 ; 018E82/0B278F
Text_EnemyNum2:
ASM_CALL Setup_Text_Parser_3b_1b ; 018E85/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy2_Num ; 018E89/358F08
.byte $00 ; 018E8C/00
JSR DATA8_018F00 ; 018E8D/1B008F
MOV REG,VAR1 ; 018E90/2401
JEQ DATA8_018F27 ; 018E92/0B278F
Text_EnemyNum3:
ASM_CALL Setup_Text_Parser_3b_1b ; 018E95/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy3_Num ; 018E99/448F08
.byte $00 ; 018E9C/00
JSR DATA8_018F00 ; 018E9D/1B008F
MOV REG,VAR1 ; 018EA0/2401
JEQ DATA8_018F27 ; 018EA2/0B278F
Text_EnemyNum4:
ASM_CALL Setup_Text_Parser_3b_1b ; 018EA5/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy4_Num ; 018EA9/538F08
.byte $00 ; 018EAC/00
JSR DATA8_018F08 ; 018EAD/1B088F
JSR DATA8_018F00 ; 018EB0/1B008F
MOV REG,VAR1 ; 018EB3/2401
JEQ DATA8_018F32 ; 018EB5/0B328F
WAIT VAR3 ; 018EB8/2503
ASM_CALL Setup_Text_Parser_3b_1b ; 018EBA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_0D ; 018EBE/0B8008
.byte $00 ; 018EC1/00
ASM_CALL Setup_Text_Parser_3b_1b ; 018EC2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy5_Num ; 018EC6/638F08
.byte $00 ; 018EC9/00
JSR DATA8_018F00 ; 018ECA/1B008F
MOV REG,VAR1 ; 018ECD/2401
JEQ DATA8_018F13 ; 018ECF/0B138F
Text_Enemy6_Num:
ASM_CALL Setup_Text_Parser_3b_1b ; 018ED2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy6_Num ; 018ED6/728F08
.byte $00 ; 018ED9/00
JSR DATA8_018F00 ; 018EDA/1B008F
MOV REG,VAR1 ; 018EDD/2401
JEQ DATA8_018F1D ; 018EDF/0B1D8F
ASM_CALL Setup_Text_Parser_3b_1b ; 018EE2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy7_Num ; 018EE6/818F08
.byte $00 ; 018EE9/00
JSR DATA8_018F00 ; 018EEA/1B008F
MOV REG,VAR1 ; 018EED/2401
JEQ DATA8_018F27 ; 018EEF/0B278F
ASM_CALL Setup_Text_Parser_3b_1b ; 018EF2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Enemy8_Num ; 018EF6/908F08
.byte $00 ; 018EF9/00
JSR DATA8_018F08 ; 018EFA/1B088F
JMP DATA8_018F32 ; 018EFD/1A328F
DATA8_018F00:
WAIT VAR3 ; 018F00/2503
ADD VAR1,ADD,#-1 ; 018F02/150102FFFF
RTS ; 018F07/1C
DATA8_018F08:
WAIT #1 ; 018F08/0601
ASM_CALL Wait_For_A_Press_1b ; 018F0A/0703BA07 // Wait for A-press
.byte $00 ; 018F0E/00
JEQ DATA8_018F08 ; 018F0F/0B088F
RTS ; 018F12/1C
DATA8_018F13:
WAIT VAR3 ; 018F13/2503
ASM_CALL Setup_Text_Parser_3b_1b ; 018F15/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_0D ; 018F19/0B8008
.byte $00 ; 018F1C/00
DATA8_018F1D:
WAIT VAR3 ; 018F1D/2503
ASM_CALL Setup_Text_Parser_3b_1b ; 018F1F/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_0D ; 018F23/0B8008
.byte $00 ; 018F26/00
DATA8_018F27:
ASM_CALL Setup_Text_Parser_3b_1b ; 018F27/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_7F ; 018F2B/098008
.byte $00 ; 018F2E/00
JSR DATA8_018F08 ; 018F2F/1B088F
DATA8_018F32:
ASM_CALL Sub_00C8EF ; 018F32/07EFC800 // ??? Clears spell results and does something with turn order
MOV VAR2,REG ; 018F36/2302
DATA8_018F38:
WAIT #1 ; 018F38/0601
ASM_CALL Sub_0782BF ; 018F3A/07BF8207
JEQ DATA8_018F47 ; 018F3E/0B478F
MOV.w Game_State,#$FFFF ; 018F41/16C111FFFF
HALT ; 018F46/0A
DATA8_018F47:
MOV REG,VAR2 ; 018F47/2402
ASM_CALL Condition_Check_2b ; 018F49/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 018F4D/0100
JNE Pause_Final_Fight ; 018F4F/0C758F
MOV REG,VAR2 ; 018F52/2402
ASM_CALL Condition_Check_2b ; 018F54/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0002 ; 018F58/0200
JNE Pause_Final_Fight ; 018F5A/0C758F
ASM_CALL Sub_Is_Active_Enemies ; 018F5D/078F8C07
JEQ DATA8_018F88 ; 018F61/0B888F
ASM_CALL Set_1575_from_2b ; 018F64/0739AF07 // Set $1575 from [val]
.word 2 ; 018F68/0200
DATA8_018F6A:
WAIT #1 ; 018F6A/0601
Selecting_Turn:
ASM_CALL Word_Is_Equals_1575_2b ; 018F6C/0724AF07 // Does [val] = $1575?
.word 65535 ; 018F70/FFFF
JEQ DATA8_018F6A ; 018F72/0B6A8F
Pause_Final_Fight:
ASM_CALL Is_FightingFinalBoss ; 018F75/07018007 // Is Fighting Final Boss? - Returns 1 if true
JEQ DATA8_018F7E ; 018F79/0B7E8F
WAIT #60 ; 018F7C/063C
DATA8_018F7E:
ASM_CALL Advance_turn_order ; 018F7E/075DCA00 // Advance turn order
JEQ DATA8_018F38 ; 018F82/0B388F
JMP DATA8_018F32 ; 018F85/1A328F
DATA8_018F88:
MOV REG,#$0000 ; 018F88/1E0000
ASM_CALL Condition_Check_2b ; 018F8B/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0400 ; 018F8F/0004
JNE DATA8_019004 ; 018F91/0C0490
MOV REG,#$0002 ; 018F94/1E0200
ASM_CALL Condition_Check_2b ; 018F97/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0400 ; 018F9B/0004
JNE DATA8_019004 ; 018F9D/0C0490
MOV REG,#$0003 ; 018FA0/1E0300
ASM_CALL Condition_Check_2b ; 018FA3/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0400 ; 018FA7/0004
JNE DATA8_019004 ; 018FA9/0C0490
ASM_CALL Is_FightingFinalBoss ; 018FAC/07018007 // Is Fighting Final Boss? - Returns 1 if true
JNE DATA8_01907E ; 018FB0/0C7E90
ASM_CALL GetSet_Music_1b ; 018FB3/073C9C00 // Get/Set Music
.byte 0 ; 018FB7/00
WAIT #1 ; 018FB8/0601
ASM_CALL Start_Boss_Fight ; 018FBA/07E88018 // Start boss fight
ASM_CALL GetSet_Music_1b ; 018FBE/073C9C00 // Get/Set Music
.byte 85 ; 018FC2/55
Text_BattleWon:
ASM_CALL Setup_Text_Parser_3b_1b ; 018FC3/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Battle_won ; 018FC7/0B8208
.byte $00 ; 018FCA/00
DATA8_018FCB:
WAIT #1 ; 018FCB/0601
ASM_CALL Wait_For_A_Press_1b ; 018FCD/0703BA07 // Wait for A-press
.byte $00 ; 018FD1/00
JEQ DATA8_018FCB ; 018FD2/0BCB8F
MOV VAR2,#$0000 ; 018FD5/0F020000
START_LOOP #4 ; 018FD9/0104
WAIT #1 ; 018FDB/0601
MOV REG,VAR2 ; 018FDD/2402
ASM_CALL Condition_Check_2b ; 018FDF/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 018FE3/0100
JNE DATA8_018FF7 ; 018FE5/0CF78F
MOV REG,VAR2 ; 018FE8/2402
ASM_CALL Condition_Check_2b ; 018FEA/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0002 ; 018FEE/0200
JNE DATA8_018FF7 ; 018FF0/0CF78F
ASM_CALL Sub_07B410 ; 018FF3/0710B407
DATA8_018FF7:
ADD VAR2,ADD,#1 ; 018FF7/1502020100
END_LOOP ; 018FFC/02
ASM_CALL Add_GP_to_total_won ; 018FFD/073CB407 // Add GP to total won
JMP DATA8_019016 ; 019001/1A1690
DATA8_019004:
ASM_CALL Setup_Text_Parser_3b_1b ; 019004/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Run_away ; 019008/9A8208
.byte $00 ; 01900B/00
DATA8_01900C:
WAIT #1 ; 01900C/0601
ASM_CALL Wait_For_A_Press_1b ; 01900E/0703BA07 // Wait for A-press
.byte $00 ; 019012/00
JEQ DATA8_01900C ; 019013/0B0C90
DATA8_019016:
MOV.w Temp_EXP,#$0000 ; 019016/16A3130000
MOV.w Temp_GP,#$0000 ; 01901B/16A5130000
MOV VAR2,#$0000 ; 019020/0F020000
START_LOOP #4 ; 019024/0104
WAIT #1 ; 019026/0601
JSR Post_battle_stuff ; 019028/1B7F90
ADD VAR2,ADD,#1 ; 01902B/1502020100
END_LOOP ; 019030/02
ASM_CALL Zero_Attribute_bits_far ; 019031/07098301 // Zero Attribute bits
ASM_CALL Sub_0781BB ; 019035/07BB8107 // Condition related
START_LOOP #16 ; 019039/0110
ASM_CALL Sound_stuff_1b ; 01903B/07199C00 // Sound stuff
.byte $F0 ; 01903F/F0
WAIT #1 ; 019040/0601
END_LOOP ; 019042/02
ASM_CALL GetSet_Music_1b ; 019043/073C9C00 // Get/Set Music
.byte 0 ; 019047/00
WAIT #1 ; 019048/0601
SET_ANIM #-1 ; 01904A/30FF
WAIT #1 ; 01904C/0601
ASM_CALL Is_RAM_value_neg_2b ; 01904E/077BA000 // Unknown
.word 6399 ; 019052/FF18
JNE DATA8_01907A ; 019054/0C7A90
MOV.w ShowCompass,#$0001 ; 019057/167B150100
ASM_CALL Load_Graphics__1b_12b ; 01905C/07BC9C00 // Load Graphics
.byte 4 ; 019060/04
.word 19 ; 019061/1300
.word 0 ; 019063/0000
.word 0 ; 019065/0000
.word 0 ; 019067/0000
.word 0 ; 019069/0000
.word 0 ; 01906B/0000
WAIT #2 ; 01906D/0602
ASM_CALL Transfer_Graphics_3b ; 01906F/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 019073/74B601
ASM_CALL Sub_038007 ; 019076/07078003
DATA8_01907A:
ASM_CALL Sub_Default_BGM ; 01907A/0720A503 // Sub: Default Dungeon BGM
DATA8_01907E:
RTS ; 01907E/1C
Post_battle_stuff:
MOV REG,VAR2 ; 01907F/2402
ASM_CALL Cmp_2_values_2b ; 019081/0781B007 // Compare [A] with [val] - Returns 0 (eq), 1 (A>=val), 2 (A<val)
.word 1 ; 019085/0100
JEQ DATA8_019129 ; 019087/0B2991
MOV REG,VAR2 ; 01908A/2402
ASM_CALL Condition_Check_2b ; 01908C/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 019090/0100
JNE DATA8_019129 ; 019092/0C2991
MOV REG,VAR2 ; 019095/2402
ASM_CALL Condition_Check_2b ; 019097/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0002 ; 01909B/0200
JNE DATA8_019129 ; 01909D/0C2991
ASM_CALL Load_Object_Var_2b ; 0190A0/07A1B407 // Load object var [0-3]
.word $0002 ; 0190A4/0200
ASM_CALL Get_PC_Name1_far ; 0190A6/07DCB407 // Get PC Name-1
ASM_CALL Sub_Levelup_check ; 0190AA/0734B207 // Sub: Levelup check
JEQ DATA8_019129 ; 0190AE/0B2991
LevelUp1:
ASM_CALL Sub_Increase_LV ; 0190B1/0756B207 // Sub: Increase LVL
ASM_CALL Sub_Get_EXP_to_next ; 0190B5/077AB207 // Sub: Get EXP to next LVL
ASM_CALL LevelUp2 ; 0190B9/0735B307 // Sub: Levelup-2
MOV REG,VAR2 ; 0190BD/2402
ASM_CALL Sub_Draw_Level ; 0190BF/07F08D07 // Sub: Draw Level
WAIT #10 ; 0190C3/060A
Text_LevelUp:
ASM_CALL Setup_Text_Parser_3b_1b ; 0190C5/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long LevelUp ; 0190C9/698D08
.byte $00 ; 0190CC/00
START_LOOP #7 ; 0190CD/0107
JSR Levelup_Pause_for_input ; 0190CF/1B9791
END_LOOP ; 0190D2/02
MOV REG,VAR2 ; 0190D3/2402
ASM_CALL Sub_078014 ; 0190D5/07148007 // Get Levelup spell - Seems to return 0 on success. Maybe for notifying if you learned a new spell?
JNE DATA8_019122 ; 0190D9/0C2291
DATA8_0190DC:
MOV REG,Text_Line_Speed ; 0190DC/1F9710
MOV VAR3,REG ; 0190DF/2303
MOV REG,$11BF ; 0190E1/1FBF11
MOV VAR1,REG ; 0190E4/2301
ASM_CALL Setup_Text_Parser_3b_1b ; 0190E6/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long LearnedSpell1 ; 0190EA/8E8E08
.byte $00 ; 0190ED/00
JSR DATA8_01918F ; 0190EE/1B8F91
MOV REG,VAR1 ; 0190F1/2401
JEQ DATA8_019114 ; 0190F3/0B1491
JSR Code_Wait_Battle_Text ; 0190F6/1BA291
ASM_CALL Setup_Text_Parser_3b_1b ; 0190F9/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long LearnedSpell2 ; 0190FD/AE8E08
.byte $00 ; 019100/00
JSR DATA8_01918F ; 019101/1B8F91
MOV REG,VAR1 ; 019104/2401
JEQ DATA8_019114 ; 019106/0B1491
JSR Code_Wait_Battle_Text ; 019109/1BA291
ASM_CALL Setup_Text_Parser_3b_1b ; 01910C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long LearnedSpell3 ; 019110/B98E08
.byte $00 ; 019113/00
DATA8_019114:
JSR Code_Wait_Battle_Text ; 019114/1BA291
ASM_CALL Setup_Text_Parser_3b_1b ; 019117/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long LearnedSpellEnd ; 01911B/C48E08
.byte $00 ; 01911E/00
JSR Levelup_Pause_for_input ; 01911F/1B9791
DATA8_019122:
MOV REG,VAR2 ; 019122/2402
JEQ DATA8_01912A ; 019124/0B2A91
WAIT #1 ; 019127/0601
DATA8_019129:
RTS ; 019129/1C
DATA8_01912A:
ADD VAR2,ADD,#1 ; 01912A/1502020100
MOV REG,VAR2 ; 01912F/2402
ASM_CALL LevelJoinStats ; 019131/0707B307 // Sub: Level join stats
MOV REG,VAR2 ; 019135/2402
ASM_CALL Get_Spell_List_2b ; 019137/07438007 // Get Spell List [char ID]
.word $0001 ; 01913B/0100
JNE DATA8_01914A ; 01913D/0C4A91
MOV REG,#$0001 ; 019140/1E0100
ASM_CALL Get_PC_Name1_far ; 019143/07DCB407 // Get PC Name-1
JSR DATA8_0190DC ; 019147/1BDC90
DATA8_01914A:
MOV REG,VAR2 ; 01914A/2402
ASM_CALL Get_Spell_List_2b ; 01914C/07438007 // Get Spell List [char ID]
.word $0002 ; 019150/0200
JNE DATA8_01915F ; 019152/0C5F91
MOV REG,#$0002 ; 019155/1E0200
ASM_CALL Get_PC_Name1_far ; 019158/07DCB407 // Get PC Name-1
JSR DATA8_0190DC ; 01915C/1BDC90
DATA8_01915F:
MOV REG,VAR2 ; 01915F/2402
ASM_CALL Get_Spell_List_2b ; 019161/07438007 // Get Spell List [char ID]
.word $0003 ; 019165/0300
JNE DATA8_019174 ; 019167/0C7491
MOV REG,#$0003 ; 01916A/1E0300
ASM_CALL Get_PC_Name1_far ; 01916D/07DCB407 // Get PC Name-1
JSR DATA8_0190DC ; 019171/1BDC90
DATA8_019174:
MOV REG,VAR2 ; 019174/2402
ASM_CALL Get_Spell_List_2b ; 019176/07438007 // Get Spell List [char ID]
.word $0004 ; 01917A/0400
JNE DATA8_019189 ; 01917C/0C8991
MOV REG,#$0004 ; 01917F/1E0400
ASM_CALL Get_PC_Name1_far ; 019182/07DCB407 // Get PC Name-1
JSR DATA8_0190DC ; 019186/1BDC90
DATA8_019189:
ADD VAR2,ADD,#-1 ; 019189/150202FFFF
RTS ; 01918E/1C
DATA8_01918F:
WAIT VAR3 ; 01918F/2503
ADD VAR1,ADD,#-1 ; 019191/150102FFFF
RTS ; 019196/1C
Levelup_Pause_for_input:
WAIT #1 ; 019197/0601
ASM_CALL Wait_For_A_Press_1b ; 019199/0703BA07 // Wait for A-press
.byte $00 ; 01919D/00
JEQ Levelup_Pause_for_input ; 01919E/0B9791
RTS ; 0191A1/1C
Code_Wait_Battle_Text:
WAIT #1 ; 0191A2/0601
ASM_CALL Some_1095_check_1b ; 0191A4/074FBA07 // Some pause status check
.byte $00 ; 0191A8/00
JEQ Code_Wait_Battle_Text ; 0191A9/0BA291
MOV REG,Text_Line_Speed ; 0191AC/1F9710
MOV VAR0,REG ; 0191AF/2300
WAIT VAR0 ; 0191B1/2500
WAIT #10 ; 0191B3/060A
RTS ; 0191B5/1C
Town_Opening_Menu:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0191B6/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Gray ; 0191BA/90950D
.byte $02 ; 0191BD/02
.word 2 ; 0191BE/0200
WAIT #1 ; 0191C0/0601
MOV VAR0,#$0000 ; 0191C2/0F000000
ASM_CALL Get_MenuCursorCoords ; 0191C6/0765AE07 // Get Menu cursor coords
Open_the_menu:
JSL Open_menu ; 0191CA/043B9201
WAIT #1 ; 0191CE/0601
ASM_CALL Transfer_Graphics_3b ; 0191D0/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_Menu ; 0191D4/2FB501
MOV.w ShowCompass,#$0000 ; 0191D7/167B150000
ASM_CALL GetSet_SFX_1b ; 0191DC/07449C00 // Get/Set Sound Effect
.byte 17 ; 0191E0/11
Menu_exit_check:
WAIT #1 ; 0191E1/0601
MOV REG,#$0000 ; 0191E3/1E0000
ASM_CALL WasBtnPressed_2b ; 0191E6/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 0191EA/0080
JEQ DATA8_019205 ; 0191EC/0B0592
ASM_CALL GetSet_SFX_1b ; 0191EF/07449C00 // Get/Set Sound Effect
.byte 6 ; 0191F3/06
SET_ANIM #-1 ; 0191F4/30FF
ASM_CALL Transfer_Graphics_3b ; 0191F6/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 0191FA/74B601
MOV.w ShowCompass,#$0001 ; 0191FD/167B150100
WAIT #1 ; 019202/0601
RTS ; 019204/1C
DATA8_019205:
ASM_CALL MoveMenuCursor_2b ; 019205/07AEAC07 // Move Menu Cursor
.word 0 ; 019209/0000
ASM_CALL Get_MenuCursorCoords ; 01920B/0765AE07 // Get Menu cursor coords
SET_ANIM #0 ; 01920F/3000
MOV REG,#$0000 ; 019211/1E0000
Dungeon_menu_options:
ASM_CALL WasBtnPressed_2b ; 019214/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 019218/8000
JEQ Menu_exit_check ; 01921A/0BE191
ASM_CALL GetSet_SFX_1b ; 01921D/07449C00 // Get/Set Sound Effect
.byte 17 ; 019221/11
MOV REG,VAR0 ; 019222/2400
MULTI_JMP #9 ; 019224/1109
.word Look ; 019226/6092
.word Call_menu ; 019228/EC9F
.word Map_menu ; 01922A/E59B
.word Magic_menu1 ; 01922C/3898
.word Status_screen1 ; 01922E/E79A
.word Color_menu ; 019230/3997
.word Equipment_menu ; 019232/779C
.word Inventory_menu ; 019234/DE92
.word Order ; 019236/309F
JMP Menu_exit_check ; 019238/1AE191
Open_menu:
ASM_CALL Sub_Dungeon_check_far ; 01923B/0720B207 // Sub: Dungeon Check - Returns 1 if in a dungeon, 0 if in a town
JNE Open_menu_Dungeon ; 01923F/0C4B92
Open_menu_Town:
ASM_CALL Setup_Text_Parser_3b_1b ; 019242/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Town_menu ; 019246/2B8108
.byte $00 ; 019249/00
RTL ; 01924A/05
Open_menu_Dungeon:
ASM_CALL Setup_Text_Parser_3b_1b ; 01924B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Dungeon_menu ; 01924F/9D8108
.byte $00 ; 019252/00
RTL ; 019253/05
Subscreen_Not_in_use:
MOV.w Subscreen_On,#$0000 ; 019254/16EB180000
RTS ; 019259/1C
Subscreen_In_use:
MOV.w Subscreen_On,#$0001 ; 01925A/16EB180100
RTS ; 01925F/1C
Look:
SET_ANIM #-1 ; 019260/30FF
ASM_CALL Sub_Dungeon_check_far ; 019262/0720B207 // Sub: Dungeon Check - Returns 1 if in a dungeon, 0 if in a town
JEQ DATA8_019272 ; 019266/0B7292
ASM_CALL Compare_floor_tile_2b ; 019269/0716A807 // Compare floor tile (returns true if [val] matches tile you're standing on)
.word 128 ; 01926D/8000
JNE DATA8_01927D ; 01926F/0C7D92
DATA8_019272:
ASM_CALL Setup_Text_Parser_3b_1b ; 019272/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Nothing_here ; 019276/BD8F08
.byte $00 ; 019279/00
JMP DATA8_01928A ; 01927A/1A8A92
DATA8_01927D:
ASM_CALL Treasure_Save_Value ; 01927D/0727A807 // Treasure: Save value
WAIT #30 ; 019281/061E
ASM_CALL Get_Treasure_Contents ; 019283/073DA807 // Get treasure contents
JNE Monster_in_a_box ; 019287/0CA592
DATA8_01928A:
WAIT #1 ; 01928A/0601
ASM_CALL Wait_For_A_Press_1b ; 01928C/0703BA07 // Wait for A-press
.byte $00 ; 019290/00
JEQ DATA8_01928A ; 019291/0B8A92
WAIT #10 ; 019294/060A
ASM_CALL Transfer_Graphics_3b ; 019296/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 01929A/74B601
WAIT #1 ; 01929D/0601
MOV.w ShowCompass,#$0001 ; 01929F/167B150100
RTS ; 0192A4/1C
Monster_in_a_box:
ASM_CALL Check_map_tile_value ; 0192A5/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
Battle_flash:
ASM_CALL Adjust_color_math_2b ; 0192A9/077DE503 // Adjust color math
.word $0026 ; 0192AD/2600
START_LOOP #8 ; 0192AF/0108
ASM_CALL Add_color_math_1b ; 0192B1/07BBE503 // Add color math designation
.byte $04 ; 0192B5/04
WAIT #1 ; 0192B6/0601
END_LOOP ; 0192B8/02
ASM_CALL Clear_Event_1b ; 0192B9/07DD9C00 // Battle related
.byte $06 ; 0192BD/06
START_LOOP #8 ; 0192BE/0108
ASM_CALL Subtract_color_math_1b ; 0192C0/079FE503 // Subtract color math designation
.byte $04 ; 0192C4/04
WAIT #1 ; 0192C5/0601
END_LOOP ; 0192C7/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 0192C8/0795E503 // $1893 = 0, $2131 color math = E000
ASM_CALL Decomp_Battle1 ; 0192CC/074B8118 // Battle: Some Decompression subroutine
START_LOOP #6 ; 0192D0/0106
ASM_CALL Load_Encounter_Gfx ; 0192D2/07E68118 // Battle: Load Encounter Graphics
WAIT #1 ; 0192D6/0601
END_LOOP ; 0192D8/02
ASM_CALL Roll_encounter ; 0192D9/07108218 // Roll RNG for Random Encounter
RTS ; 0192DD/1C
Inventory_menu:
JSR Subscreen_In_use ; 0192DE/1B5A92
MOV VAR1,#$0000 ; 0192E1/0F010000
MOV.w Page_Num,#$0000 ; 0192E5/16B9110000
ASM_CALL Show_Card_Menu ; 0192EA/07D29607 // Show Card Menu
ASM_CALL Text_Init_3b_1b ; 0192EE/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A4A ; 0192F2/4A8A01
.byte 1 ; 0192F5/01
ASM_CALL Do_Stuff_far ; 0192F6/07A8A000 // Do Stuff
ASM_CALL Setup_Text_Parser_3b_1b ; 0192FA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Card_menu_Inventory ; 0192FE/97CA08
.byte $01 ; 019301/01
ASM_CALL Color_stuff_2b ; 019302/0762E503 // Color stuff
.word $1F36 ; 019306/361F
ASM_CALL DoStuffWithEvent69 ; 019308/07E0AD03 // Do stuff with event 69
MOV.w $1187,#$0000 ; 01930C/1687110000
WAIT #1 ; 019311/0601
ASM_CALL MainScr_Remove_1b ; 019313/07B69D00 // Main Screen remove
.byte $02 ; 019317/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 019318/0795E503 // $1893 = 0, $2131 color math = E000
ASM_CALL Setup_Text_Parser_3b_1b ; 01931C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inventory_Menu ; 019320/C78E08
.byte $00 ; 019323/00
SET_XPOS #76 ; 019324/384C00
SET_YPOS #178 ; 019327/40B200
WAIT #1 ; 01932A/0601
SET_ANIM #0 ; 01932C/3000
DATA8_01932E:
WAIT #1 ; 01932E/0601
MOV REG,#$0000 ; 019330/1E0000
ASM_CALL WasBtnPressed_2b ; 019333/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0300 ; 019337/0003
JNE Cards_Or_Inventory ; 019339/0C7F93
MOV REG,#$0000 ; 01933C/1E0000
ASM_CALL WasBtnPressed_2b ; 01933F/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 019343/8000
JNE DATA8_0193BF ; 019345/0CBF93
MOV REG,#$0000 ; 019348/1E0000
ASM_CALL WasBtnPressed_2b ; 01934B/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 01934F/0080
JNE DATA8_019357 ; 019351/0C5793
JMP DATA8_01932E ; 019354/1A2E93
DATA8_019357:
ASM_CALL GetSet_SFX_1b ; 019357/07449C00 // Get/Set Sound Effect
.byte 6 ; 01935B/06
SET_ANIM #-1 ; 01935C/30FF
JSL Open_menu ; 01935E/043B9201
WAIT #1 ; 019362/0601
ASM_CALL Color_stuff_2b ; 019364/0762E503 // Color stuff
.word $1F36 ; 019368/361F
ASM_CALL Sub_03887A ; 01936A/077A8803 // Sub: Involved in uncompressing the dungeon graphics
ASM_CALL MainScr_Add_1b ; 01936E/07A89D00 // Main Screen add
.byte $02 ; 019372/02
JSR Subscreen_Not_in_use ; 019373/1B5492
WAIT #1 ; 019376/0601
ASM_CALL Zero_1893_and_E000_to_2131 ; 019378/0795E503 // $1893 = 0, $2131 color math = E000
JMP Menu_exit_check ; 01937C/1AE191
Cards_Or_Inventory:
ADD VAR1,ADD,#1 ; 01937F/1501020100
AND VAR1,AND,#$0001 ; 019384/1501000100
MOV REG,VAR1 ; 019389/2401
MULTI_JMP #2 ; 01938B/1102
.word DATA8_019391 ; 01938D/9193
.word DATA8_0193A8 ; 01938F/A893
DATA8_019391:
SET_XPOS #76 ; 019391/384C00
SET_YPOS #178 ; 019394/40B200
SET_ANIM #0 ; 019397/3000
ASM_CALL Show_Card_Menu ; 019399/07D29607 // Show Card Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 01939D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Card_menu_Inventory ; 0193A1/97CA08
.byte $01 ; 0193A4/01
JMP DATA8_01932E ; 0193A5/1A2E93
DATA8_0193A8:
SET_XPOS #132 ; 0193A8/388400
SET_YPOS #178 ; 0193AB/40B200
SET_ANIM #0 ; 0193AE/3000
ASM_CALL Sub_07A11B ; 0193B0/071BA107 // Related to using items in battle
ASM_CALL Setup_Text_Parser_3b_1b ; 0193B4/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Item_menu ; 0193B8/30CB08
.byte $01 ; 0193BB/01
JMP DATA8_01932E ; 0193BC/1A2E93
DATA8_0193BF:
ASM_CALL GetSet_SFX_1b ; 0193BF/07449C00 // Get/Set Sound Effect
.byte 17 ; 0193C3/11
MOV REG,VAR1 ; 0193C4/2401
MULTI_JMP #2 ; 0193C6/1102
.word DATA8_0193CC ; 0193C8/CC93
.word DATA8_01950C ; 0193CA/0C95
DATA8_0193CC:
MOV REG,#$0000 ; 0193CC/1E0000
ASM_CALL Sub_07A409_far ; 0193CF/0705A407
JNE DATA8_01932E ; 0193D3/0C2E93
MOV VAR2,#$0001 ; 0193D6/0F020100
MOV VAR3,#$0000 ; 0193DA/0F030000
ASM_CALL Show_Card_Menu ; 0193DE/07D29607 // Show Card Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 0193E2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Card_menu_Inventory ; 0193E6/97CA08
.byte $01 ; 0193E9/01
WAIT #1 ; 0193EA/0601
ASM_CALL Get_Current_Card_desc ; 0193EC/07399707 // Get current card description
WAIT #1 ; 0193F0/0601
SET_ANIM #4 ; 0193F2/3004
DATA8_0193F4:
WAIT #1 ; 0193F4/0601
ASM_CALL Sub_07A01E ; 0193F6/071EA007
JEQ DATA8_019403 ; 0193FA/0B0394
ASM_CALL Get_Current_Card_desc ; 0193FD/07399707 // Get current card description
WAIT #1 ; 019401/0601
DATA8_019403:
ASM_CALL Sub_07A506 ; 019403/0706A507
MOV REG,#$0000 ; 019407/1E0000
ASM_CALL WasBtnPressed_2b ; 01940A/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 01940E/8000
JNE DATA8_019422 ; 019410/0C2294
MOV REG,#$0000 ; 019413/1E0000
ASM_CALL WasBtnPressed_2b ; 019416/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 01941A/0080
JNE DATA8_0194EE ; 01941C/0CEE94
JMP DATA8_0193F4 ; 01941F/1AF493
DATA8_019422:
ASM_CALL GetSet_SFX_1b ; 019422/07449C00 // Get/Set Sound Effect
.byte 17 ; 019426/11
MOV REG,VAR3 ; 019427/2403
JEQ DATA8_0194C6 ; 019429/0BC694
MOV REG,VAR2 ; 01942C/2402
JEQ DATA8_019483 ; 01942E/0B8394
ASM_CALL Compare_an_offset_to_11B5_2b; 019431/07AAAF07 // Compare an [object var] to $11B5
.byte 2 ; 019435/02
.byte 1 ; 019436/01
JNE DATA8_01946A ; 019437/0C6A94
JMP DATA8_0194F8 ; 01943A/1AF894
L_01943D:
ASM_CALL Inventory_Delete_Card ; 01943D/07D39B07 // Inventory: Delete Card - returns 1 if a slot is cleared
JEQ DATA8_019452 ; 019441/0B5294
MOV REG,VAR2 ; 019444/2402
ASM_CALL Sub_07A409_far ; 019446/0705A407
JEQ DATA8_019452 ; 01944A/0B5294
ADD VAR2,ADD,#-1 ; 01944D/150202FFFF
DATA8_019452:
ASM_CALL Sub_079F16 ; 019452/07169F07
ASM_CALL Show_Card_Menu ; 019456/07D29607 // Show Card Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 01945A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Card_menu_Inventory ; 01945E/97CA08
.byte $01 ; 019461/01
WAIT #1 ; 019462/0601
ASM_CALL Get_Current_Card_desc ; 019464/07399707 // Get current card description
WAIT #1 ; 019468/0601
DATA8_01946A:
ASM_CALL Sub_079DCF ; 01946A/07CF9D07
ASM_CALL Show_Card_Menu ; 01946E/07D29607 // Show Card Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 019472/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Card_menu_Inventory ; 019476/97CA08
.byte $01 ; 019479/01
WAIT #1 ; 01947A/0601
ASM_CALL Get_Current_Card_desc ; 01947C/07399707 // Get current card description
JMP DATA8_0194F8 ; 019480/1AF894
DATA8_019483:
ASM_CALL Inventory_Delete_Card ; 019483/07D39B07 // Inventory: Delete Card - returns 1 if a slot is cleared
JNE DATA8_0194B3 ; 019487/0CB394
ASM_ShowCardMenu:
ASM_CALL Show_Card_Menu ; 01948A/07D29607 // Show Card Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 01948E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Card_menu_Inventory ; 019492/97CA08
.byte $01 ; 019495/01
DATA8_019496:
WAIT #1 ; 019496/0601
MOV REG,#$0000 ; 019498/1E0000
ASM_CALL WasBtnPressed_2b ; 01949B/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 01949F/0080
JNE DATA8_0194B3 ; 0194A1/0CB394
MOV REG,#$0000 ; 0194A4/1E0000
ASM_CALL WasBtnPressed_2b ; 0194A7/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 0194AB/8000
JNE DATA8_019483 ; 0194AD/0C8394
JMP DATA8_019496 ; 0194B0/1A9694
DATA8_0194B3:
ASM_CALL Sub_079F16 ; 0194B3/07169F07
ASM_CALL Show_Card_Menu ; 0194B7/07D29607 // Show Card Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 0194BB/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Card_menu_Inventory ; 0194BF/97CA08
.byte $01 ; 0194C2/01
JMP DATA8_0194F8 ; 0194C3/1AF894
DATA8_0194C6:
MOV REG,VAR2 ; 0194C6/2402
JEQ DATA8_0193F4 ; 0194C8/0BF493
ASM_CALL Load_Sprite_Setup_12b ; 0194CB/075D9C00 // Load Sprite Setup
.word 2 ; 0194CF/0200
.word 0 ; 0194D1/0000
.word 0 ; 0194D3/0000
.word 0 ; 0194D5/0000
.word 1 ; 0194D7/0100
.word 0 ; 0194D9/0000
ASM_CALL Store_A_in_11B5_x_1b ; 0194DB/079EAF07 // Store [val] in $11B5
.byte 0 ; 0194DF/00
MOV VAR3,#$0001 ; 0194E0/0F030100
MOV REG,VAR2 ; 0194E4/2402
ASM_CALL Store_A_in_11B5_x_1b ; 0194E6/079EAF07 // Store [val] in $11B5
.byte 1 ; 0194EA/01
JMP DATA8_0193F4 ; 0194EB/1AF493
DATA8_0194EE:
ASM_CALL GetSet_SFX_1b ; 0194EE/07449C00 // Get/Set Sound Effect
.byte 6 ; 0194F2/06
MOV REG,VAR3 ; 0194F3/2403
JEQ DATA8_019509 ; 0194F5/0B0995
DATA8_0194F8:
MOV REG,Tbl_Offset ; 0194F8/1FB511
MOV VAR3,REG ; 0194FB/2303
ASM_CALL Clear_Event_varX_1b ; 0194FD/07C99C00 // Menu Stuffs
.byte $03 ; 019501/03
MOV VAR3,#$0000 ; 019502/0F030000
JMP DATA8_0193F4 ; 019506/1AF493
DATA8_019509:
JMP DATA8_019357 ; 019509/1A5793
DATA8_01950C:
MOV.w Page_Num,#$0000 ; 01950C/16B9110000
MOV REG,#$0000 ; 019511/1E0000
ASM_CALL Empty_item_slot_far ; 019514/075BA407 // Empty item slot
JNE DATA8_01932E ; 019518/0C2E93
MOV VAR2,#$0003 ; 01951B/0F020300
MOV VAR3,#$0000 ; 01951F/0F030000
ASM_CALL Sub_07A11B ; 019523/071BA107 // Related to using items in battle
ASM_CALL Setup_Text_Parser_3b_1b ; 019527/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Item_menu ; 01952B/30CB08
.byte $01 ; 01952E/01
WAIT #1 ; 01952F/0601
ASM_CALL Pull_Item_Info ; 019531/077F9707 // Pull item info
DATA8_019535:
ASM_CALL Sub_0793D7 ; 019535/07D79307
JEQ DATA8_019540 ; 019539/0B4095
ASM_CALL Pull_Item_Info ; 01953C/077F9707 // Pull item info
DATA8_019540:
ASM_CALL Sub_079604 ; 019540/07049607
WAIT #1 ; 019544/0601
MOV REG,#$0000 ; 019546/1E0000
ASM_CALL WasBtnPressed_2b ; 019549/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 01954D/8000
JNE DATA8_01955E ; 01954F/0C5E95
ASM_CALL WasBtnPressed_2b ; 019552/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 019556/0080
JNE DATA8_01971B ; 019558/0C1B97
JMP DATA8_019535 ; 01955B/1A3595
DATA8_01955E:
ASM_CALL GetSet_SFX_1b ; 01955E/07449C00 // Get/Set Sound Effect
.byte 17 ; 019562/11
MOV REG,VAR2 ; 019563/2402
MULTI_JMP #3 ; 019565/1103
.word DATA8_0196FC ; 019567/FC96
.word DATA8_0196FC ; 019569/FC96
.word DATA8_019680 ; 01956B/8096
MOV REG,VAR3 ; 01956D/2403
JEQ DATA8_0196C7 ; 01956F/0BC796
ASM_CALL Compare_11B5_2b ; 019572/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 019576/02
.byte 3 ; 019577/03
JNE DATA8_019665 ; 019578/0C6596
ASM_CALL Compare_an_offset_to_11B5_2b; 01957B/07AAAF07 // Compare an [object var] to $11B5
.byte 2 ; 01957F/02
.byte 1 ; 019580/01
JNE DATA8_019665 ; 019581/0C6596
Event_Field_Medicine:
ASM_CALL Sub_07A071 ; 019584/0771A007
JEQ DATA8_019725 ; 019588/0B2597
ASM_CALL Sub_07A0DF ; 01958B/07DFA007
JNE DATA8_019725 ; 01958F/0C2597
ASM_CALL Sub_07A0AA ; 019592/07AAA007
ASM_CALL If_It_is_1_return_1 ; 019596/07C7A007 // If it is 1, return 0 (Why is THIS A FUNCTION)
JNE DATA8_0195C2 ; 01959A/0CC295
JSL Item_Handler ; 01959D/0437F105
JEQ DATA8_019725 ; 0195A1/0B2597
JSR DATA8_019636 ; 0195A4/1B3696
MOV REG,#$0000 ; 0195A7/1E0000
ASM_CALL Empty_item_slot_far ; 0195AA/075BA407 // Empty item slot
JEQ DATA8_019725 ; 0195AE/0B2597
MOV REG,Tbl_Offset ; 0195B1/1FB511
MOV VAR3,REG ; 0195B4/2303
ASM_CALL Clear_Event_varX_1b ; 0195B6/07C99C00 // Menu Stuffs
.byte $03 ; 0195BA/03
MOV VAR3,#$0000 ; 0195BB/0F030000
JMP DATA8_019357 ; 0195BF/1A5793
DATA8_0195C2:
JSR DATA8_019636 ; 0195C2/1B3696
Effect_Return_Ring:
START_LOOP #16 ; 0195C5/0110
ASM_CALL Fade ; 0195C7/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 0195CB/07199C00 // Sound stuff
.byte $F0 ; 0195CF/F0
WAIT #1 ; 0195D0/0601
END_LOOP ; 0195D2/02
ASM_CALL GetSet_SFX_1b ; 0195D3/07449C00 // Get/Set Sound Effect
.byte 24 ; 0195D7/18
WAIT #30 ; 0195D8/061E
ASM_CALL Clear_Event_1b ; 0195DA/07DD9C00 // Battle related
.byte $06 ; 0195DE/06
MOV REG,Tbl_Offset ; 0195DF/1FB511
MOV VAR3,REG ; 0195E2/2303
ASM_CALL Clear_Event_varX_1b ; 0195E4/07C99C00 // Menu Stuffs
.byte $03 ; 0195E8/03
MOV VAR3,#$0000 ; 0195E9/0F030000
SET_ANIM #-1 ; 0195ED/30FF
ASM_CALL Sub_Reset_Map ; 0195EF/07D4A007 // Sub: Set current area to current chapter's town
ASM_CALL Entering_Town ; 0195F3/0757B303 // Entering Town
ASM_CALL Town_loading ; 0195F7/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 0195FB/07FDB303 // More Town Loading
ASM_CALL MainScr_Add_1b ; 0195FF/07A89D00 // Main Screen add
.byte $02 ; 019603/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 019604/0795E503 // $1893 = 0, $2131 color math = E000
JSR Subscreen_Not_in_use ; 019608/1B5492
SET_ANIM #-1 ; 01960B/30FF
ASM_CALL Transfer_Graphics_3b ; 01960D/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 019611/74B601
MOV.w ShowCompass,#$0001 ; 019614/167B150100
WAIT #80 ; 019619/0650
ASM_CALL GetSet_Music_1b ; 01961B/073C9C00 // Get/Set Music
.byte 0 ; 01961F/00
WAIT #1 ; 019620/0601
ASM_CALL GetSet_Music_1b ; 019622/073C9C00 // Get/Set Music
.byte 89 ; 019626/59
START_LOOP #16 ; 019627/0110
ASM_CALL Unfade ; 019629/07CBA000 // Unfade (Increase lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 01962D/07199C00 // Sound stuff
.byte $10 ; 019631/10
WAIT #1 ; 019632/0601
END_LOOP ; 019634/02
RTS ; 019635/1C
DATA8_019636:
ASM_CALL Sub_079604 ; 019636/07049607
ASM_CALL Inventory_Delete_Item ; 01963A/07F89B07 // Inventory: Delete Item
MOV REG,VAR2 ; 01963E/2402
ASM_CALL Sub_07A4BA ; 019640/07BAA407
JEQ DATA8_01964C ; 019644/0B4C96
ADD VAR2,ADD,#-1 ; 019647/150202FFFF
DATA8_01964C:
ASM_CALL Sub_079F44 ; 01964C/07449F07
ASM_CALL Sub_07A11B ; 019650/071BA107 // Related to using items in battle
ASM_CALL Setup_Text_Parser_3b_1b ; 019654/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Item_menu ; 019658/30CB08
.byte $01 ; 01965B/01
WAIT #1 ; 01965C/0601
ASM_CALL Pull_Item_Info ; 01965E/077F9707 // Pull item info
WAIT #1 ; 019662/0601
RTS ; 019664/1C
DATA8_019665:
ASM_CALL Sub_079E36 ; 019665/07369E07
ASM_CALL Sub_07A11B ; 019669/071BA107 // Related to using items in battle
ASM_CALL Setup_Text_Parser_3b_1b ; 01966D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Item_menu ; 019671/30CB08
.byte $01 ; 019674/01
WAIT #1 ; 019675/0601
ASM_CALL Pull_Item_Info ; 019677/077F9707 // Pull item info
WAIT #1 ; 01967B/0601
JMP DATA8_019725 ; 01967D/1A2597
DATA8_019680:
MOV REG,VAR3 ; 019680/2403
JEQ DATA8_0196C7 ; 019682/0BC796
ASM_CALL Compare_11B5_2b ; 019685/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 019689/02
.byte 3 ; 01968A/03
JNE DATA8_019535 ; 01968B/0C3595
ASM_CALL Sub_07A0F0 ; 01968E/07F0A007
JNE DATA8_019725 ; 019692/0C2597
ASM_CALL Inventory_Delete_Item ; 019695/07F89B07 // Inventory: Delete Item
ASM_CALL Sub_079F44 ; 019699/07449F07
ASM_CALL Sub_07A11B ; 01969D/071BA107 // Related to using items in battle
ASM_CALL Setup_Text_Parser_3b_1b ; 0196A1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Item_menu ; 0196A5/30CB08
.byte $01 ; 0196A8/01
MOV REG,#$0000 ; 0196A9/1E0000
ASM_CALL Empty_item_slot_far ; 0196AC/075BA407 // Empty item slot
JEQ DATA8_0196C4 ; 0196B0/0BC496
MOV REG,Tbl_Offset ; 0196B3/1FB511
MOV VAR3,REG ; 0196B6/2303
ASM_CALL Clear_Event_varX_1b ; 0196B8/07C99C00 // Menu Stuffs
.byte $03 ; 0196BC/03
MOV VAR3,#$0000 ; 0196BD/0F030000
JMP DATA8_019357 ; 0196C1/1A5793
DATA8_0196C4:
JMP DATA8_019725 ; 0196C4/1A2597
DATA8_0196C7:
MOV REG,VAR2 ; 0196C7/2402
MULTI_JMP #3 ; 0196C9/1103
.word DATA8_019535 ; 0196CB/3595
.word DATA8_019535 ; 0196CD/3595
.word DATA8_019535 ; 0196CF/3595
ASM_CALL Load_Sprite_Setup_12b ; 0196D1/075D9C00 // Load Sprite Setup
.word 2 ; 0196D5/0200
.word 0 ; 0196D7/0000
.word 0 ; 0196D9/0000
.word 0 ; 0196DB/0000
.word 8 ; 0196DD/0800
.word 0 ; 0196DF/0000
ASM_CALL Store_A_in_11B5_x_1b ; 0196E1/079EAF07 // Store [val] in $11B5
.byte 0 ; 0196E5/00
MOV VAR3,#$0001 ; 0196E6/0F030100
MOV REG,VAR2 ; 0196EA/2402
ASM_CALL Store_A_in_11B5_x_1b ; 0196EC/079EAF07 // Store [val] in $11B5
.byte 1 ; 0196F0/01
MOV REG,Page_Num ; 0196F1/1FB911
ASM_CALL Store_A_in_11B5_x_1b ; 0196F4/079EAF07 // Store [val] in $11B5
.byte 3 ; 0196F8/03
JMP DATA8_019535 ; 0196F9/1A3595
DATA8_0196FC:
WAIT #1 ; 0196FC/0601
ASM_CALL Sub_079FA6 ; 0196FE/07A69F07
MOV REG,#$0000 ; 019702/1E0000
ASM_CALL Empty_item_slot_far ; 019705/075BA407 // Empty item slot
JNE DATA8_0196FC ; 019709/0CFC96
ASM_CALL Sub_07A11B ; 01970C/071BA107 // Related to using items in battle
ASM_CALL Setup_Text_Parser_3b_1b ; 019710/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Item_menu ; 019714/30CB08
.byte $01 ; 019717/01
JMP DATA8_019535 ; 019718/1A3595
DATA8_01971B:
ASM_CALL GetSet_SFX_1b ; 01971B/07449C00 // Get/Set Sound Effect
.byte 6 ; 01971F/06
MOV REG,VAR3 ; 019720/2403
JEQ DATA8_019736 ; 019722/0B3697
DATA8_019725:
MOV REG,Tbl_Offset ; 019725/1FB511
MOV VAR3,REG ; 019728/2303
ASM_CALL Clear_Event_varX_1b ; 01972A/07C99C00 // Menu Stuffs
.byte $03 ; 01972E/03
MOV VAR3,#$0000 ; 01972F/0F030000
JMP DATA8_019535 ; 019733/1A3595
DATA8_019736:
JMP DATA8_019357 ; 019736/1A5793
Color_menu:
MOV REG,VAR0 ; 019739/2400
MOV VAR1,REG ; 01973B/2301
MOV VAR0,#$0000 ; 01973D/0F000000
MOV VAR2,#$0000 ; 019741/0F020000
MOV.w Tbl_Offset,#$0000 ; 019745/16B5110000
MOV.w $11B7,#$0000 ; 01974A/16B7110000
MOV.w Page_Num,#$0000 ; 01974F/16B9110000
WAIT #1 ; 019754/0601
ASM_CALL Load_Window_Color_RGB ; 019756/07709207 // Load window color RGB
SET_ANIM #0 ; 01975A/3000
SET_XPOS #61 ; 01975C/383D00
SET_YPOS #176 ; 01975F/40B000
ASM_CALL Draw_RGB_to_text_buffer ; 019762/075E9207 // Draw RGB to text buffer
Draw_Window_Color_menu:
ASM_CALL Setup_Text_Parser_3b_1b ; 019766/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Draw_Color_Menu ; 01976A/F78308
.byte $00 ; 01976D/00
ASM_CALL Load_Sprite_Setup_12b ; 01976E/075D9C00 // Load Sprite Setup
.word 3 ; 019772/0300
.word 0 ; 019774/0000
.word 0 ; 019776/0000
.word 0 ; 019778/0000
.word 0 ; 01977A/0000
.word 0 ; 01977C/0000
ASM_CALL Store_A_in_11B5_x_1b ; 01977E/079EAF07 // Store [val] in $11B5
.byte 3 ; 019782/03
ASM_CALL Load_Sprite_Setup_12b ; 019783/075D9C00 // Load Sprite Setup
.word 3 ; 019787/0300
.word 0 ; 019789/0000
.word 0 ; 01978B/0000
.word 0 ; 01978D/0000
.word 1 ; 01978F/0100
.word 0 ; 019791/0000
ASM_CALL Store_A_in_11B5_x_1b ; 019793/079EAF07 // Store [val] in $11B5
.byte 4 ; 019797/04
ASM_CALL Load_Sprite_Setup_12b ; 019798/075D9C00 // Load Sprite Setup
.word 3 ; 01979C/0300
.word 0 ; 01979E/0000
.word 0 ; 0197A0/0000
.word 0 ; 0197A2/0000
.word 2 ; 0197A4/0200
.word 0 ; 0197A6/0000
ASM_CALL Store_A_in_11B5_x_1b ; 0197A8/079EAF07 // Store [val] in $11B5
.byte 5 ; 0197AC/05
DATA8_0197AD:
WAIT #1 ; 0197AD/0601
ASM_CALL Some_Input_Listen ; 0197AF/07E99107 // Some input listener
JNE DATA8_0197C5 ; 0197B3/0CC597
MOV REG,#$0000 ; 0197B6/1E0000
ASM_CALL WasBtnPressed_2b ; 0197B9/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 0197BD/0080
JNE DATA8_019813 ; 0197BF/0C1398
JMP DATA8_0197AD ; 0197C2/1AAD97
DATA8_0197C5:
ASM_CALL GetSet_SFX_1b ; 0197C5/07449C00 // Get/Set Sound Effect
.byte 17 ; 0197C9/11
MOV REG,VAR2 ; 0197CA/2402
Draw_RGB:
MULTI_JSR #3 ; 0197CC/1203
.word DATA8_019807 ; 0197CE/0798
.word DATA8_01980B ; 0197D0/0B98
.word DATA8_01980F ; 0197D2/0F98
ASM_CALL Sub_0792A2 ; 0197D4/07A29207 // Also involves window color
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0197D8/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 0197DC/771500
.byte $03 ; 0197DF/03
.word 2 ; 0197E0/0200
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0197E2/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 0197E6/771500
.byte $07 ; 0197E9/07
.word 2 ; 0197EA/0200
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0197EC/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 0197F0/771500
.byte $73 ; 0197F3/73
.word 2 ; 0197F4/0200
WAIT #1 ; 0197F6/0601
ASM_CALL Draw_RGB_to_text_buffer ; 0197F8/075E9207 // Draw RGB to text buffer
Refresh_Window_Color_Menu:
ASM_CALL Setup_Text_Parser_3b_1b ; 0197FC/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Draw_Color_Menu ; 019800/F78308
.byte $00 ; 019803/00
JMP DATA8_0197AD ; 019804/1AAD97
DATA8_019807:
SET_YPOS #176 ; 019807/40B000
RTS ; 01980A/1C
DATA8_01980B:
SET_YPOS #190 ; 01980B/40BE00
RTS ; 01980E/1C
DATA8_01980F:
SET_YPOS #204 ; 01980F/40CC00
RTS ; 019812/1C
DATA8_019813:
MOV REG,$11BB ; 019813/1FBB11
MOV VAR3,REG ; 019816/2303
ASM_CALL Clear_Event_varX_1b ; 019818/07C99C00 // Menu Stuffs
.byte $03 ; 01981C/03
MOV REG,$11BD ; 01981D/1FBD11
MOV VAR3,REG ; 019820/2303
ASM_CALL Clear_Event_varX_1b ; 019822/07C99C00 // Menu Stuffs
.byte $03 ; 019826/03
MOV REG,$11BF ; 019827/1FBF11
MOV VAR3,REG ; 01982A/2303
ASM_CALL Clear_Event_varX_1b ; 01982C/07C99C00 // Menu Stuffs
.byte $03 ; 019830/03
MOV REG,VAR1 ; 019831/2401
MOV VAR0,REG ; 019833/2300
JMP Open_the_menu ; 019835/1ACA91
Magic_menu1:
JSR Subscreen_In_use ; 019838/1B5A92
MOV VAR1,#$0000 ; 01983B/0F010000
MOV.w Page_Num,#$0000 ; 01983F/16B9110000
SET_XPOS #28 ; 019844/381C00
SET_YPOS #56 ; 019847/403800
SET_ANIM #7 ; 01984A/3007
ASM_CALL Draw_Magic_Menu2 ; 01984C/0799A107 // Draw Magic Menu-2
ASM_CALL Text_Init_3b_1b ; 019850/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A4A ; 019854/4A8A01
.byte 1 ; 019857/01
ASM_CALL Do_Stuff_far ; 019858/07A8A000 // Do Stuff
ASM_CALL Setup_Text_Parser_3b_1b ; 01985C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Magic_menu ; 019860/83CB08
.byte $01 ; 019863/01
ASM_CALL Color_stuff_2b ; 019864/0762E503 // Color stuff
.word $1F36 ; 019868/361F
ASM_CALL DoStuffWithEvent69 ; 01986A/07E0AD03 // Do stuff with event 69
MOV.w $1187,#$0000 ; 01986E/1687110000
WAIT #1 ; 019873/0601
ASM_CALL MainScr_Remove_1b ; 019875/07B69D00 // Main Screen remove
.byte $02 ; 019879/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 01987A/0795E503 // $1893 = 0, $2131 color math = E000
ASM_CALL Setup_Text_Parser_3b_1b ; 01987E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Select_a_Player ; 019882/259608
.byte $00 ; 019885/00
DATA8_019886:
WAIT #1 ; 019886/0601
MOV REG,#$0000 ; 019888/1E0000
ASM_CALL WasBtnPressed_2b ; 01988B/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 01988F/8000
JNE DATA8_019913 ; 019891/0C1399
MOV REG,#$0000 ; 019894/1E0000
ASM_CALL WasBtnPressed_2b ; 019897/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 01989B/0080
JNE DATA8_0198EB ; 01989D/0CEB98
ASM_CALL Checks_for_input_probably ; 0198A0/073A9307 // Checks for input (probably)
JEQ DATA8_019886 ; 0198A4/0B8698
DATA8_0198A7:
MOV REG,VAR1 ; 0198A7/2401
MULTI_JSR #4 ; 0198A9/1204
.word DATA8_0198CF ; 0198AB/CF98
.word DATA8_0198D6 ; 0198AD/D698
.word DATA8_0198DD ; 0198AF/DD98
.word DATA8_0198E4 ; 0198B1/E498
SET_ANIM #7 ; 0198B3/3007
ASM_CALL Draw_Magic_Menu2 ; 0198B5/0799A107 // Draw Magic Menu-2
WAIT #1 ; 0198B9/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 0198BB/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Magic_menu ; 0198BF/83CB08
.byte $01 ; 0198C2/01
WAIT #1 ; 0198C3/0601
MOV.w Page_Num,#$0000 ; 0198C5/16B9110000
WAIT #1 ; 0198CA/0601
JMP DATA8_019886 ; 0198CC/1A8698
DATA8_0198CF:
SET_XPOS #28 ; 0198CF/381C00
SET_YPOS #56 ; 0198D2/403800
RTS ; 0198D5/1C
DATA8_0198D6:
SET_XPOS #228 ; 0198D6/38E400
SET_YPOS #56 ; 0198D9/403800
RTS ; 0198DC/1C
DATA8_0198DD:
SET_XPOS #28 ; 0198DD/381C00
SET_YPOS #160 ; 0198E0/40A000
RTS ; 0198E3/1C
DATA8_0198E4:
SET_XPOS #228 ; 0198E4/38E400
SET_YPOS #160 ; 0198E7/40A000
RTS ; 0198EA/1C
DATA8_0198EB:
ASM_CALL GetSet_SFX_1b ; 0198EB/07449C00 // Get/Set Sound Effect
.byte 6 ; 0198EF/06
SET_ANIM #-1 ; 0198F0/30FF
JSL Open_menu ; 0198F2/043B9201
WAIT #1 ; 0198F6/0601
ASM_CALL Color_stuff_2b ; 0198F8/0762E503 // Color stuff
.word $1F36 ; 0198FC/361F
ASM_CALL Sub_03887A ; 0198FE/077A8803 // Sub: Involved in uncompressing the dungeon graphics
ASM_CALL MainScr_Add_1b ; 019902/07A89D00 // Main Screen add
.byte $02 ; 019906/02
JSR Subscreen_Not_in_use ; 019907/1B5492
WAIT #1 ; 01990A/0601
ASM_CALL Zero_1893_and_E000_to_2131 ; 01990C/0795E503 // $1893 = 0, $2131 color math = E000
JMP Menu_exit_check ; 019910/1AE191
DATA8_019913:
ASM_CALL GetSet_SFX_1b ; 019913/07449C00 // Get/Set Sound Effect
.byte 17 ; 019917/11
MOV REG,VAR1 ; 019918/2401
ASM_CALL Sub_0791C8 ; 01991A/07C89107
JNE DATA8_019886 ; 01991E/0C8698
MOV.w Page_Num,#$0000 ; 019921/16B9110000
MOV REG,#$0000 ; 019926/1E0000
ASM_CALL Sub_07A488_far ; 019929/0784A407
JNE DATA8_019886 ; 01992D/0C8698
MOV VAR2,#$0002 ; 019930/0F020200
MOV VAR3,#$0000 ; 019934/0F030000
ASM_CALL Load_Sprite_Setup_12b ; 019938/075D9C00 // Load Sprite Setup
.word 2 ; 01993C/0200
.word 0 ; 01993E/0000
.word 0 ; 019940/0000
.word 0 ; 019942/0000
.word 5 ; 019944/0500
.word 0 ; 019946/0000
ASM_CALL Store_A_in_11B5_x_1b ; 019948/079EAF07 // Store [val] in $11B5
.byte 4 ; 01994C/04
ASM_CALL Draw_Magic_Menu2 ; 01994D/0799A107 // Draw Magic Menu-2
ASM_CALL Setup_Text_Parser_3b_1b ; 019951/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Magic_menu ; 019955/83CB08
.byte $01 ; 019958/01
WAIT #1 ; 019959/0601
ASM_CALL Get_curr_spell_description ; 01995B/07569807 // Get current spell description
DATA8_01995F:
ASM_CALL Sub_0794AC ; 01995F/07AC9407
JEQ DATA8_01996A ; 019963/0B6A99
ASM_CALL Get_curr_spell_description ; 019966/07569807 // Get current spell description
DATA8_01996A:
ASM_CALL Sub_07964E ; 01996A/074E9607
WAIT #1 ; 01996E/0601
MOV REG,#$0000 ; 019970/1E0000
ASM_CALL WasBtnPressed_2b ; 019973/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 019977/8000
JNE DATA8_01998B ; 019979/0C8B99
MOV REG,#$0000 ; 01997C/1E0000
ASM_CALL WasBtnPressed_2b ; 01997F/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 019983/0080
JNE DATA8_019AB3 ; 019985/0CB39A
JMP DATA8_01995F ; 019988/1A5F99
DATA8_01998B:
ASM_CALL GetSet_SFX_1b ; 01998B/07449C00 // Get/Set Sound Effect
.byte 17 ; 01998F/11
MOV REG,VAR2 ; 019990/2402
MULTI_JMP #2 ; 019992/1102
.word DATA8_019A92 ; 019994/929A
.word DATA8_019A92 ; 019996/929A
MOV REG,VAR3 ; 019998/2403
JEQ DATA8_019A5F ; 01999A/0B5F9A
ASM_CALL Compare_11B5_2b ; 01999D/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 0199A1/02
.byte 3 ; 0199A2/03
JNE DATA8_019A44 ; 0199A3/0C449A
ASM_CALL Compare_an_offset_to_11B5_2b; 0199A6/07AAAF07 // Compare an [object var] to $11B5
.byte 2 ; 0199AA/02
.byte 1 ; 0199AB/01
JNE DATA8_019A44 ; 0199AC/0C449A
ASM_CALL Draw_Magic_Menu1 ; 0199AF/07F59D07 // Draw Magic Menu-1
JEQ DATA8_019ABD ; 0199B3/0BBD9A
JSL DATA8_05F34B ; 0199B6/044BF305
MULTI_JMP #3 ; 0199BA/1103
.word DATA8_019ABD ; 0199BC/BD9A
.word DATA8_0199C2 ; 0199BE/C299
.word DATA8_019ABD ; 0199C0/BD9A
DATA8_0199C2:
ASM_CALL Sub_079817 ; 0199C2/07179807
JEQ DATA8_019ABD ; 0199C6/0BBD9A
START_LOOP #16 ; 0199C9/0110
ASM_CALL Fade ; 0199CB/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 0199CF/07199C00 // Sound stuff
.byte $F0 ; 0199D3/F0
WAIT #1 ; 0199D4/0601
END_LOOP ; 0199D6/02
ASM_CALL GetSet_SFX_1b ; 0199D7/07449C00 // Get/Set Sound Effect
.byte 24 ; 0199DB/18
WAIT #30 ; 0199DC/061E
ASM_CALL Clear_Event_1b ; 0199DE/07DD9C00 // Battle related
.byte $06 ; 0199E2/06
MOV REG,Tbl_Offset ; 0199E3/1FB511
MOV VAR3,REG ; 0199E6/2303
ASM_CALL Clear_Event_varX_1b ; 0199E8/07C99C00 // Menu Stuffs
.byte $03 ; 0199EC/03
MOV VAR3,#$0000 ; 0199ED/0F030000
MOV REG,$11BD ; 0199F1/1FBD11
MOV VAR3,REG ; 0199F4/2303
ASM_CALL Clear_Event_varX_1b ; 0199F6/07C99C00 // Menu Stuffs
.byte $03 ; 0199FA/03
SET_ANIM #-1 ; 0199FB/30FF
ASM_CALL Sub_Reset_Map ; 0199FD/07D4A007 // Sub: Set current area to current chapter's town
ASM_CALL Entering_Town ; 019A01/0757B303 // Entering Town
ASM_CALL Town_loading ; 019A05/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 019A09/07FDB303 // More Town Loading
ASM_CALL MainScr_Add_1b ; 019A0D/07A89D00 // Main Screen add
.byte $02 ; 019A11/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 019A12/0795E503 // $1893 = 0, $2131 color math = E000
JSR Subscreen_Not_in_use ; 019A16/1B5492
SET_ANIM #-1 ; 019A19/30FF
ASM_CALL Transfer_Graphics_3b ; 019A1B/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 019A1F/74B601
MOV.w ShowCompass,#$0001 ; 019A22/167B150100
WAIT #80 ; 019A27/0650
ASM_CALL GetSet_Music_1b ; 019A29/073C9C00 // Get/Set Music
.byte 0 ; 019A2D/00
WAIT #1 ; 019A2E/0601
ASM_CALL GetSet_Music_1b ; 019A30/073C9C00 // Get/Set Music
.byte 89 ; 019A34/59
START_LOOP #16 ; 019A35/0110
ASM_CALL Unfade ; 019A37/07CBA000 // Unfade (Increase lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 019A3B/07199C00 // Sound stuff
.byte $10 ; 019A3F/10
WAIT #1 ; 019A40/0601
END_LOOP ; 019A42/02
RTS ; 019A43/1C
DATA8_019A44:
ASM_CALL Sub_079E7A ; 019A44/077A9E07
ASM_CALL Draw_Magic_Menu2 ; 019A48/0799A107 // Draw Magic Menu-2
ASM_CALL Setup_Text_Parser_3b_1b ; 019A4C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Magic_menu ; 019A50/83CB08
.byte $01 ; 019A53/01
WAIT #1 ; 019A54/0601
ASM_CALL Get_curr_spell_description ; 019A56/07569807 // Get current spell description
WAIT #1 ; 019A5A/0601
JMP DATA8_019ABD ; 019A5C/1ABD9A
DATA8_019A5F:
MOV REG,VAR2 ; 019A5F/2402
MULTI_JMP #2 ; 019A61/1102
.word DATA8_01995F ; 019A63/5F99
.word DATA8_01995F ; 019A65/5F99
ASM_CALL Load_Sprite_Setup_12b ; 019A67/075D9C00 // Load Sprite Setup
.word 2 ; 019A6B/0200
.word 0 ; 019A6D/0000
.word 0 ; 019A6F/0000
.word 0 ; 019A71/0000
.word 8 ; 019A73/0800
.word 0 ; 019A75/0000
ASM_CALL Store_A_in_11B5_x_1b ; 019A77/079EAF07 // Store [val] in $11B5
.byte 0 ; 019A7B/00
MOV VAR3,#$0001 ; 019A7C/0F030100
MOV REG,VAR2 ; 019A80/2402
ASM_CALL Store_A_in_11B5_x_1b ; 019A82/079EAF07 // Store [val] in $11B5
.byte 1 ; 019A86/01
MOV REG,Page_Num ; 019A87/1FB911
ASM_CALL Store_A_in_11B5_x_1b ; 019A8A/079EAF07 // Store [val] in $11B5
.byte 3 ; 019A8E/03
JMP DATA8_01995F ; 019A8F/1A5F99
DATA8_019A92:
WAIT #1 ; 019A92/0601
ASM_CALL Sub_079FCE ; 019A94/07CE9F07
MOV REG,#$0000 ; 019A98/1E0000
ASM_CALL Sub_07A488_far ; 019A9B/0784A407
JNE DATA8_019A92 ; 019A9F/0C929A
ASM_CALL Draw_Magic_Menu2 ; 019AA2/0799A107 // Draw Magic Menu-2
WAIT #1 ; 019AA6/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 019AA8/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Magic_menu ; 019AAC/83CB08
.byte $01 ; 019AAF/01
JMP DATA8_01995F ; 019AB0/1A5F99
DATA8_019AB3:
ASM_CALL GetSet_SFX_1b ; 019AB3/07449C00 // Get/Set Sound Effect
.byte 6 ; 019AB7/06
MOV REG,VAR3 ; 019AB8/2403
JEQ DATA8_019ACE ; 019ABA/0BCE9A
DATA8_019ABD:
MOV REG,Tbl_Offset ; 019ABD/1FB511
MOV VAR3,REG ; 019AC0/2303
ASM_CALL Clear_Event_varX_1b ; 019AC2/07C99C00 // Menu Stuffs
.byte $03 ; 019AC6/03
MOV VAR3,#$0000 ; 019AC7/0F030000
JMP DATA8_01995F ; 019ACB/1A5F99
DATA8_019ACE:
MOV REG,$11BD ; 019ACE/1FBD11
MOV VAR3,REG ; 019AD1/2303
ASM_CALL Clear_Event_varX_1b ; 019AD3/07C99C00 // Menu Stuffs
.byte $03 ; 019AD7/03
WAIT #1 ; 019AD8/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 019ADA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Select_a_Player ; 019ADE/259608
.byte $00 ; 019AE1/00
WAIT #1 ; 019AE2/0601
JMP DATA8_0198A7 ; 019AE4/1AA798
Status_screen1:
JSR Subscreen_In_use ; 019AE7/1B5A92
MOV VAR1,#$0000 ; 019AEA/0F010000
SET_ANIM #7 ; 019AEE/3007
SET_XPOS #28 ; 019AF0/381C00
SET_YPOS #56 ; 019AF3/403800
ASM_CALL Text_Init_3b_1b ; 019AF6/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A4A ; 019AFA/4A8A01
.byte 1 ; 019AFD/01
ASM_CALL Do_Stuff_far ; 019AFE/07A8A000 // Do Stuff
ASM_CALL Setup_Text_Parser_3b_1b ; 019B02/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_06_0C_0C ; 019B06/018008
.byte $01 ; 019B09/01
ASM_CALL Color_stuff_2b ; 019B0A/0762E503 // Color stuff
.word $1F36 ; 019B0E/361F
ASM_CALL DoStuffWithEvent69 ; 019B10/07E0AD03 // Do stuff with event 69
MOV.w $1187,#$0000 ; 019B14/1687110000
WAIT #1 ; 019B19/0601
ASM_CALL MainScr_Remove_1b ; 019B1B/07B69D00 // Main Screen remove
.byte $02 ; 019B1F/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 019B20/0795E503 // $1893 = 0, $2131 color math = E000
JMP DATA8_019B6B ; 019B24/1A6B9B
DATA8_019B27:
WAIT #1 ; 019B27/0601
MOV REG,#$0000 ; 019B29/1E0000
Status_screen_exit:
ASM_CALL WasBtnPressed_2b ; 019B2C/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 019B30/0080
JNE DATA8_019BB2 ; 019B32/0CB29B
SET_ANIM #7 ; 019B35/3007
ASM_CALL Some_Input_Check_ ; 019B37/07E79207 // Some input check
MOV REG,VAR1 ; 019B3B/2401
MULTI_JMP #4 ; 019B3D/1104
.word DATA8_019B4A ; 019B3F/4A9B
.word DATA8_019B53 ; 019B41/539B
.word DATA8_019B5C ; 019B43/5C9B
.word DATA8_019B65 ; 019B45/659B
JMP DATA8_019B27 ; 019B47/1A279B
DATA8_019B4A:
SET_XPOS #28 ; 019B4A/381C00
SET_YPOS #56 ; 019B4D/403800
JMP DATA8_019B6B ; 019B50/1A6B9B
DATA8_019B53:
SET_XPOS #228 ; 019B53/38E400
SET_YPOS #56 ; 019B56/403800
JMP DATA8_019B6B ; 019B59/1A6B9B
DATA8_019B5C:
SET_XPOS #28 ; 019B5C/381C00
SET_YPOS #160 ; 019B5F/40A000
JMP DATA8_019B6B ; 019B62/1A6B9B
DATA8_019B65:
SET_XPOS #228 ; 019B65/38E400
SET_YPOS #160 ; 019B68/40A000
DATA8_019B6B:
MOV REG,VAR1 ; 019B6B/2401
ASM_CALL Get_character_offset_far ; 019B6D/07F1B007 // Get character offset
ASM_CALL Is_Spirit_Selected ; 019B71/07D89B01 // Is Spirit Selected?
JNE Status_screen_spirit ; 019B75/0C8D9B
MOV REG,VAR1 ; 019B78/2401
ASM_CALL Get_character_offset_far ; 019B7A/07F1B007 // Get character offset
ASM_CALL Status_Screen_prep ; 019B7E/0772A607 // Status screen prep (Stores the stats in temp variables to be drawn to the screen)
Status_screen_draw:
ASM_CALL Setup_Text_Parser_3b_1b ; 019B82/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Status_screen ; 019B86/3EC908
.byte $01 ; 019B89/01
JMP DATA8_019B9F ; 019B8A/1A9F9B
Status_screen_spirit:
MOV REG,VAR1 ; 019B8D/2401
ASM_CALL Get_character_offset_far ; 019B8F/07F1B007 // Get character offset
ASM_CALL Status_Screen_prep ; 019B93/0772A607 // Status screen prep (Stores the stats in temp variables to be drawn to the screen)
ASM_CALL Setup_Text_Parser_3b_1b ; 019B97/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Spirit_status_screen ; 019B9B/F6C908
.byte $01 ; 019B9E/01
DATA8_019B9F:
WAIT #1 ; 019B9F/0601
Weapon_subcreen:
ASM_CALL Draw_Weapon_screen_from_char; 019BA1/0740A307 // Draw Weapon screen from character
ASM_CALL Setup_Text_Parser_3b_1b ; 019BA5/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Weapons_sub_menu ; 019BA9/EC8008
.byte $00 ; 019BAC/00
WAIT #1 ; 019BAD/0601
JMP DATA8_019B27 ; 019BAF/1A279B
DATA8_019BB2:
ASM_CALL GetSet_SFX_1b ; 019BB2/07449C00 // Get/Set Sound Effect
.byte 6 ; 019BB6/06
ASM_CALL Color_stuff_2b ; 019BB7/0762E503 // Color stuff
.word $1F36 ; 019BBB/361F
ASM_CALL Sub_03887A ; 019BBD/077A8803 // Sub: Involved in uncompressing the dungeon graphics
ASM_CALL MainScr_Add_1b ; 019BC1/07A89D00 // Main Screen add
.byte $02 ; 019BC5/02
SET_ANIM #-1 ; 019BC6/30FF
JSL Open_menu ; 019BC8/043B9201
JSR Subscreen_Not_in_use ; 019BCC/1B5492
WAIT #1 ; 019BCF/0601
ASM_CALL Zero_1893_and_E000_to_2131 ; 019BD1/0795E503 // $1893 = 0, $2131 color math = E000
JMP Menu_exit_check ; 019BD5/1AE191
Map_menu:
JSR Subscreen_In_use ; 019BE5/1B5A92
ASM_CALL Sub_Dungeon_check_far ; 019BE8/0720B207 // Sub: Dungeon Check - Returns 1 if in a dungeon, 0 if in a town
JNE DATA8_019BF4 ; 019BEC/0CF49B
WAIT #10 ; 019BEF/060A
JMP Menu_exit_check ; 019BF1/1AE191
DATA8_019BF4:
ASM_CALL Transfer_Graphics_3b ; 019BF4/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 019BF8/74B601
MOV.w ShowCompass,#$0001 ; 019BFB/167B150100
SET_ANIM #-1 ; 019C00/30FF
ASM_CALL Color_stuff_2b ; 019C02/0762E503 // Color stuff
.word $0036 ; 019C06/3600
START_LOOP #16 ; 019C08/0110
ASM_CALL Add_color_math_1b ; 019C0A/07BBE503 // Add color math designation
.byte $02 ; 019C0E/02
WAIT #1 ; 019C0F/0601
END_LOOP ; 019C11/02
ASM_CALL DoStuffWithEvent69 ; 019C12/07E0AD03 // Do stuff with event 69
ASM_CALL Map_Drawing ; 019C16/07FDEA03 // Map Drawing
ASM_CALL Color_stuff_2b ; 019C1A/0762E503 // Color stuff
.word $1F36 ; 019C1E/361F
START_LOOP #16 ; 019C20/0110
ASM_CALL Subtract_color_math_1b ; 019C22/079FE503 // Subtract color math designation
.byte $02 ; 019C26/02
WAIT #1 ; 019C27/0601
END_LOOP ; 019C29/02
SET_XPOS #120 ; 019C2A/387800
SET_YPOS #80 ; 019C2D/405000
ASM_CALL Facing_related ; 019C30/078BBA07 // Facing related
Loop_til_B_press:
WAIT #1 ; 019C34/0601
MOV REG,#$0000 ; 019C36/1E0000
ASM_CALL WasBtnPressed_2b ; 019C39/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 019C3D/0080
JEQ Loop_til_B_press ; 019C3F/0B349C
SET_ANIM #-1,WAIT #1 ; 019C42/31FF
ASM_CALL Color_stuff_2b ; 019C44/0762E503 // Color stuff
.word $0036 ; 019C48/3600
START_LOOP #16 ; 019C4A/0110
ASM_CALL Add_color_math_1b ; 019C4C/07BBE503 // Add color math designation
.byte $02 ; 019C50/02
WAIT #1 ; 019C51/0601
END_LOOP ; 019C53/02
ASM_CALL Decomp80_setup_3b ; 019C54/07F99C00 // Decomp80 setup
.long Decomp80_038756 ; 019C58/568703
ASM_CALL Map_stuff_and_vblank ; 019C5B/073F8803 // Map stuff and vblank
ASM_CALL Sub_03887A ; 019C5F/077A8803 // Sub: Involved in uncompressing the dungeon graphics
ASM_CALL Color_stuff_2b ; 019C63/0762E503 // Color stuff
.word $1F36 ; 019C67/361F
START_LOOP #16 ; 019C69/0110
ASM_CALL Subtract_color_math_1b ; 019C6B/079FE503 // Subtract color math designation
.byte $02 ; 019C6F/02
WAIT #1 ; 019C70/0601
END_LOOP ; 019C72/02
JSR Subscreen_Not_in_use ; 019C73/1B5492
RTS ; 019C76/1C
Equipment_menu:
JSR Subscreen_In_use ; 019C77/1B5A92
MOV VAR1,#$0000 ; 019C7A/0F010000
MOV.w Page_Num,#$0000 ; 019C7E/16B9110000
SET_XPOS #28 ; 019C83/381C00
SET_YPOS #56 ; 019C86/403800
SET_ANIM #7 ; 019C89/3007
ASM_CALL Load_Equipment_menu ; 019C8B/073EA207 // Draw Equipment Menu
ASM_CALL Text_Init_3b_1b ; 019C8F/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A4A ; 019C93/4A8A01
.byte 1 ; 019C96/01
ASM_CALL Do_Stuff_far ; 019C97/07A8A000 // Do Stuff
ASM_CALL Setup_Text_Parser_3b_1b ; 019C9B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019C9F/CDCB08
.byte $01 ; 019CA2/01
ASM_CALL Color_stuff_2b ; 019CA3/0762E503 // Color stuff
.word $1F36 ; 019CA7/361F
ASM_CALL DoStuffWithEvent69 ; 019CA9/07E0AD03 // Do stuff with event 69
MOV.w $1187,#$0000 ; 019CAD/1687110000
WAIT #1 ; 019CB2/0601
ASM_CALL MainScr_Remove_1b ; 019CB4/07B69D00 // Main Screen remove
.byte $02 ; 019CB8/02
ASM_CALL Zero_1893_and_E000_to_2131 ; 019CB9/0795E503 // $1893 = 0, $2131 color math = E000
ASM_CALL Draw_Weapon_screen_from_char; 019CBD/0740A307 // Draw Weapon screen from character
ASM_CALL Setup_Text_Parser_3b_1b ; 019CC1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Weapons_sub_menu ; 019CC5/EC8008
.byte $00 ; 019CC8/00
Equipment_Select_loop:
WAIT #1 ; 019CC9/0601
MOV REG,#$0000 ; 019CCB/1E0000
ASM_CALL WasBtnPressed_2b ; 019CCE/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 019CD2/8000
JNE DATA8_019D5C ; 019CD4/0C5C9D
MOV REG,#$0000 ; 019CD7/1E0000
ASM_CALL WasBtnPressed_2b ; 019CDA/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 019CDE/0080
JNE DATA8_019D36 ; 019CE0/0C369D
ASM_CALL Checks_for_input_probably ; 019CE3/073A9307 // Checks for input (probably)
JEQ Equipment_Select_loop ; 019CE7/0BC99C
DATA8_019CEA:
MOV REG,VAR1 ; 019CEA/2401
MULTI_JSR #4 ; 019CEC/1204
.word DATA8_019D1A ; 019CEE/1A9D
.word DATA8_019D21 ; 019CF0/219D
.word DATA8_019D28 ; 019CF2/289D
.word DATA8_019D2F ; 019CF4/2F9D
SET_ANIM #7 ; 019CF6/3007
ASM_CALL Load_Equipment_menu ; 019CF8/073EA207 // Draw Equipment Menu
Equipment_menu1:
ASM_CALL Setup_Text_Parser_3b_1b ; 019CFC/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019D00/CDCB08
.byte $01 ; 019D03/01
WAIT #1 ; 019D04/0601
ASM_CALL Draw_Weapon_screen_from_char; 019D06/0740A307 // Draw Weapon screen from character
ASM_CALL Setup_Text_Parser_3b_1b ; 019D0A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Weapons_sub_menu ; 019D0E/EC8008
.byte $00 ; 019D11/00
MOV.w Page_Num,#$0000 ; 019D12/16B9110000
JMP Equipment_Select_loop ; 019D17/1AC99C
DATA8_019D1A:
SET_XPOS #28 ; 019D1A/381C00
SET_YPOS #56 ; 019D1D/403800
RTS ; 019D20/1C
DATA8_019D21:
SET_XPOS #228 ; 019D21/38E400
SET_YPOS #56 ; 019D24/403800
RTS ; 019D27/1C
DATA8_019D28:
SET_XPOS #28 ; 019D28/381C00
SET_YPOS #160 ; 019D2B/40A000
RTS ; 019D2E/1C
DATA8_019D2F:
SET_XPOS #228 ; 019D2F/38E400
SET_YPOS #160 ; 019D32/40A000
RTS ; 019D35/1C
DATA8_019D36:
ASM_CALL GetSet_SFX_1b ; 019D36/07449C00 // Get/Set Sound Effect
.byte 6 ; 019D3A/06
SET_ANIM #-1 ; 019D3B/30FF
ASM_CALL Color_stuff_2b ; 019D3D/0762E503 // Color stuff
.word $1F36 ; 019D41/361F
ASM_CALL Sub_03887A ; 019D43/077A8803 // Sub: Involved in uncompressing the dungeon graphics
ASM_CALL MainScr_Add_1b ; 019D47/07A89D00 // Main Screen add
.byte $02 ; 019D4B/02
JSL Open_menu ; 019D4C/043B9201
JSR Subscreen_Not_in_use ; 019D50/1B5492
WAIT #1 ; 019D53/0601
ASM_CALL Zero_1893_and_E000_to_2131 ; 019D55/0795E503 // $1893 = 0, $2131 color math = E000
JMP Menu_exit_check ; 019D59/1AE191
DATA8_019D5C:
ASM_CALL GetSet_SFX_1b ; 019D5C/07449C00 // Get/Set Sound Effect
.byte 17 ; 019D60/11
MOV REG,VAR1 ; 019D61/2401
ASM_CALL Sub_0791C8 ; 019D63/07C89107
JNE Equipment_Select_loop ; 019D67/0CC99C
MOV.w Page_Num,#$0000 ; 019D6A/16B9110000
MOV REG,#$0000 ; 019D6F/1E0000
ASM_CALL Empty_Equip_item_slot_far ; 019D72/07D6A407 // Empty Equip item slot
JNE Equipment_Select_loop ; 019D76/0CC99C
MOV VAR2,#$0004 ; 019D79/0F020400
MOV VAR3,#$0000 ; 019D7D/0F030000
ASM_CALL Load_Sprite_Setup_12b ; 019D81/075D9C00 // Load Sprite Setup
.word 2 ; 019D85/0200
.word 0 ; 019D87/0000
.word 0 ; 019D89/0000
.word 0 ; 019D8B/0000
.word 5 ; 019D8D/0500
.word 0 ; 019D8F/0000
ASM_CALL Store_A_in_11B5_x_1b ; 019D91/079EAF07 // Store [val] in $11B5
.byte 4 ; 019D95/04
ASM_CALL Load_Equipment_menu ; 019D96/073EA207 // Draw Equipment Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 019D9A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019D9E/CDCB08
.byte $01 ; 019DA1/01
WAIT #1 ; 019DA2/0601
Input_loop_Equipment_menu:
WAIT #1 ; 019DA4/0601
ASM_CALL Sub_07954A ; 019DA6/074A9507
ASM_CALL Sub_07968D ; 019DAA/078D9607 // Involves updating position and anim frame from a table
MOV REG,#$0000 ; 019DAE/1E0000
ASM_CALL WasBtnPressed_2b ; 019DB1/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 019DB5/8000
JNE DATA8_019DC9 ; 019DB7/0CC99D
MOV REG,#$0000 ; 019DBA/1E0000
ASM_CALL WasBtnPressed_2b ; 019DBD/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 019DC1/0080
JNE DATA8_019F08 ; 019DC3/0C089F
JMP Input_loop_Equipment_menu ; 019DC6/1AA49D
DATA8_019DC9:
ASM_CALL GetSet_SFX_1b ; 019DC9/07449C00 // Get/Set Sound Effect
.byte 17 ; 019DCD/11
MOV REG,VAR2 ; 019DCE/2402
MULTI_JMP #4 ; 019DD0/1104
.word DATA8_019EE7 ; 019DD2/E79E
.word DATA8_019EE7 ; 019DD4/E79E
.word DATA8_019E30 ; 019DD6/309E
.word DATA8_019E7A ; 019DD8/7A9E
MOV REG,VAR3 ; 019DDA/2403
JEQ DATA8_019EAE ; 019DDC/0BAE9E
ASM_CALL Compare_11B5_2b ; 019DDF/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 019DE3/02
.byte 3 ; 019DE4/03
JNE DATA8_019E1B ; 019DE5/0C1B9E
ASM_CALL Compare_an_offset_to_11B5_2b; 019DE8/07AAAF07 // Compare an [object var] to $11B5
.byte 2 ; 019DEC/02
.byte 1 ; 019DED/01
JNE DATA8_019E1B ; 019DEE/0C1B9E
ASM_CALL Sub_079CB4 ; 019DF1/07B49C07
JEQ DATA8_019F12 ; 019DF5/0B129F
ASM_CALL Sub_079CE4 ; 019DF8/07E49C07
ASM_CALL Load_Equipment_menu ; 019DFC/073EA207 // Draw Equipment Menu
Show_Equip_Menu:
ASM_CALL Setup_Text_Parser_3b_1b ; 019E00/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019E04/CDCB08
.byte $01 ; 019E07/01
WAIT #1 ; 019E08/0601
ASM_CALL Draw_Weapon_screen_from_char; 019E0A/0740A307 // Draw Weapon screen from character
Show_Wpn_SubMenu:
ASM_CALL Setup_Text_Parser_3b_1b ; 019E0E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Weapons_sub_menu ; 019E12/EC8008
.byte $00 ; 019E15/00
WAIT #1 ; 019E16/0601
JMP DATA8_019F12 ; 019E18/1A129F
DATA8_019E1B:
ASM_CALL Sub_079ED6 ; 019E1B/07D69E07
ASM_CALL Load_Equipment_menu ; 019E1F/073EA207 // Draw Equipment Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 019E23/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019E27/CDCB08
.byte $01 ; 019E2A/01
WAIT #1 ; 019E2B/0601
JMP DATA8_019F12 ; 019E2D/1A129F
DATA8_019E30:
MOV REG,VAR3 ; 019E30/2403
JEQ DATA8_019EAE ; 019E32/0BAE9E
ASM_CALL Compare_11B5_2b ; 019E35/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 019E39/02
.byte 3 ; 019E3A/03
JNE Input_loop_Equipment_menu ; 019E3B/0CA49D
ASM_CALL Inventory_Key_Equipment_Check; 019E3E/07799C07 // Inventory: Key Equipment check - returns 1 if you're trying to drop the Crystal Sword or Spirit Sword
JNE DATA8_019F12 ; 019E42/0C129F
ASM_CALL Inventory_Unequip_Equipment ; 019E45/07119C07 // Inventory: Unequimp Equipment - returns 1 if successful
JEQ DATA8_019F12 ; 019E49/0B129F
ASM_CALL Sub_079F72 ; 019E4C/07729F07
ASM_CALL Load_Equipment_menu ; 019E50/073EA207 // Draw Equipment Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 019E54/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019E58/CDCB08
.byte $01 ; 019E5B/01
MOV REG,#$0000 ; 019E5C/1E0000
ASM_CALL Empty_Equip_item_slot_far ; 019E5F/07D6A407 // Empty Equip item slot
JEQ DATA8_019E77 ; 019E63/0B779E
MOV REG,Tbl_Offset ; 019E66/1FB511
MOV VAR3,REG ; 019E69/2303
ASM_CALL Clear_Event_varX_1b ; 019E6B/07C99C00 // Menu Stuffs
.byte $03 ; 019E6F/03
MOV VAR3,#$0000 ; 019E70/0F030000
JMP DATA8_019F23 ; 019E74/1A239F
DATA8_019E77:
JMP DATA8_019F12 ; 019E77/1A129F
DATA8_019E7A:
MOV REG,VAR3 ; 019E7A/2403
JEQ DATA8_019EAE ; 019E7C/0BAE9E
ASM_CALL Compare_11B5_2b ; 019E7F/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 019E83/02
.byte 3 ; 019E84/03
JNE Input_loop_Equipment_menu ; 019E85/0CA49D
ASM_CALL Inventory_Delete_Equipment ; 019E88/072D9C07 // Inventory: Delete Equipment - returns 1 if successful
JEQ DATA8_019F12 ; 019E8C/0B129F
ASM_CALL Load_Equipment_menu ; 019E8F/073EA207 // Draw Equipment Menu
ASM_CALL Setup_Text_Parser_3b_1b ; 019E93/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019E97/CDCB08
.byte $01 ; 019E9A/01
WAIT #1 ; 019E9B/0601
ASM_CALL Draw_Weapon_screen_from_char; 019E9D/0740A307 // Draw Weapon screen from character
ASM_CALL Setup_Text_Parser_3b_1b ; 019EA1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Weapons_sub_menu ; 019EA5/EC8008
.byte $00 ; 019EA8/00
WAIT #1 ; 019EA9/0601
JMP DATA8_019F12 ; 019EAB/1A129F
DATA8_019EAE:
WAIT #1 ; 019EAE/0601
MOV REG,VAR2 ; 019EB0/2402
MULTI_JMP #4 ; 019EB2/1104
.word Input_loop_Equipment_menu ; 019EB4/A49D
.word Input_loop_Equipment_menu ; 019EB6/A49D
.word Input_loop_Equipment_menu ; 019EB8/A49D
.word Input_loop_Equipment_menu ; 019EBA/A49D
ASM_CALL Load_Sprite_Setup_12b ; 019EBC/075D9C00 // Load Sprite Setup
.word 2 ; 019EC0/0200
.word 0 ; 019EC2/0000
.word 0 ; 019EC4/0000
.word 0 ; 019EC6/0000
.word 8 ; 019EC8/0800
.word 0 ; 019ECA/0000
ASM_CALL Store_A_in_11B5_x_1b ; 019ECC/079EAF07 // Store [val] in $11B5
.byte 0 ; 019ED0/00
MOV VAR3,#$0001 ; 019ED1/0F030100
MOV REG,VAR2 ; 019ED5/2402
ASM_CALL Store_A_in_11B5_x_1b ; 019ED7/079EAF07 // Store [val] in $11B5
.byte 1 ; 019EDB/01
MOV REG,Page_Num ; 019EDC/1FB911
ASM_CALL Store_A_in_11B5_x_1b ; 019EDF/079EAF07 // Store [val] in $11B5
.byte 3 ; 019EE3/03
JMP Input_loop_Equipment_menu ; 019EE4/1AA49D
DATA8_019EE7:
WAIT #1 ; 019EE7/0601
ASM_CALL Sub_079FF6 ; 019EE9/07F69F07
MOV REG,#$0000 ; 019EED/1E0000
ASM_CALL Empty_Equip_item_slot_far ; 019EF0/07D6A407 // Empty Equip item slot
JNE DATA8_019EE7 ; 019EF4/0CE79E
ASM_CALL Load_Equipment_menu ; 019EF7/073EA207 // Draw Equipment Menu
WAIT #1 ; 019EFB/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 019EFD/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Equipment_menu ; 019F01/CDCB08
.byte $01 ; 019F04/01
JMP Input_loop_Equipment_menu ; 019F05/1AA49D
DATA8_019F08:
ASM_CALL GetSet_SFX_1b ; 019F08/07449C00 // Get/Set Sound Effect
.byte 6 ; 019F0C/06
MOV REG,VAR3 ; 019F0D/2403
JEQ DATA8_019F23 ; 019F0F/0B239F
DATA8_019F12:
MOV REG,Tbl_Offset ; 019F12/1FB511
MOV VAR3,REG ; 019F15/2303
ASM_CALL Clear_Event_varX_1b ; 019F17/07C99C00 // Menu Stuffs
.byte $03 ; 019F1B/03
MOV VAR3,#$0000 ; 019F1C/0F030000
JMP Input_loop_Equipment_menu ; 019F20/1AA49D
DATA8_019F23:
MOV REG,$11BD ; 019F23/1FBD11
MOV VAR3,REG ; 019F26/2303
ASM_CALL Clear_Event_varX_1b ; 019F28/07C99C00 // Menu Stuffs
.byte $03 ; 019F2C/03
JMP DATA8_019CEA ; 019F2D/1AEA9C
Order:
MOV VAR1,#$0000 ; 019F30/0F010000
SET_XPOS #28 ; 019F34/381C00
SET_YPOS #56 ; 019F37/403800
SET_ANIM #7 ; 019F3A/3007
DATA8_019F3C:
MOV VAR2,#$FFFF ; 019F3C/0F02FFFF
MOV VAR3,#$FFFF ; 019F40/0F03FFFF
DATA8_019F44:
WAIT #1 ; 019F44/0601
MOV REG,#$0000 ; 019F46/1E0000
ASM_CALL WasBtnPressed_2b ; 019F49/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 019F4D/0080
JNE DATA8_019FD3 ; 019F4F/0CD39F
MOV REG,#$0000 ; 019F52/1E0000
ASM_CALL WasBtnPressed_2b ; 019F55/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 019F59/8000
JNE DATA8_019F92 ; 019F5B/0C929F
ASM_CALL Checks_for_input_probably ; 019F5E/073A9307 // Checks for input (probably)
JEQ DATA8_019F44 ; 019F62/0B449F
MOV REG,VAR1 ; 019F65/2401
MULTI_JSR #4 ; 019F67/1204
.word DATA8_019F76 ; 019F69/769F
.word DATA8_019F7D ; 019F6B/7D9F
.word DATA8_019F84 ; 019F6D/849F
.word DATA8_019F8B ; 019F6F/8B9F
SET_ANIM #7 ; 019F71/3007
JMP DATA8_019F44 ; 019F73/1A449F
DATA8_019F76:
SET_XPOS #28 ; 019F76/381C00
SET_YPOS #56 ; 019F79/403800
RTS ; 019F7C/1C
DATA8_019F7D:
SET_XPOS #228 ; 019F7D/38E400
SET_YPOS #56 ; 019F80/403800
RTS ; 019F83/1C
DATA8_019F84:
SET_XPOS #28 ; 019F84/381C00
SET_YPOS #160 ; 019F87/40A000
RTS ; 019F8A/1C
DATA8_019F8B:
SET_XPOS #228 ; 019F8B/38E400
SET_YPOS #160 ; 019F8E/40A000
RTS ; 019F91/1C
DATA8_019F92:
ASM_CALL GetSet_SFX_1b ; 019F92/07449C00 // Get/Set Sound Effect
.byte 17 ; 019F96/11
ASM_CALL Sub_07938D ; 019F97/078D9307
JEQ DATA8_019FBB ; 019F9B/0BBB9F
JSL Sub_Battle_setup ; 019F9E/04648105
JSL Sub_Another_setup ; 019FA2/04888705
JSL Sub_More_setup ; 019FA6/04AE8E05
JSL Sub_Another_setup_again ; 019FAA/046F9205
MOV REG,Tbl_Offset ; 019FAE/1FB511
MOV VAR3,REG ; 019FB1/2303
ASM_CALL Clear_Event_varX_1b ; 019FB3/07C99C00 // Menu Stuffs
.byte $03 ; 019FB7/03
JMP DATA8_019F3C ; 019FB8/1A3C9F
DATA8_019FBB:
ASM_CALL Load_Sprite_Setup_12b ; 019FBB/075D9C00 // Load Sprite Setup
.word 2 ; 019FBF/0200
.word 0 ; 019FC1/0000
.word 0 ; 019FC3/0000
.word 0 ; 019FC5/0000
.word 5 ; 019FC7/0500
.word 0 ; 019FC9/0000
ASM_CALL Store_A_in_11B5_x_1b ; 019FCB/079EAF07 // Store [val] in $11B5
.byte 0 ; 019FCF/00
JMP DATA8_019F44 ; 019FD0/1A449F
DATA8_019FD3:
ASM_CALL GetSet_SFX_1b ; 019FD3/07449C00 // Get/Set Sound Effect
.byte 6 ; 019FD7/06
ASM_CALL Sub_0793C7 ; 019FD8/07C79307
JEQ Menu_exit_check ; 019FDC/0BE191
MOV REG,Tbl_Offset ; 019FDF/1FB511
MOV VAR3,REG ; 019FE2/2303
ASM_CALL Clear_Event_varX_1b ; 019FE4/07C99C00 // Menu Stuffs
.byte $03 ; 019FE8/03
JMP DATA8_019F3C ; 019FE9/1A3C9F
Call_menu:
SET_ANIM #-1 ; 019FEC/30FF
MOV VAR1,#$0000 ; 019FEE/0F010000
ASM_CALL Get_active_spirit_ID ; 019FF2/07989107 // Get active spirit ID
MOV VAR3,REG ; 019FF6/2303
MOV REG,#$0001 ; 019FF8/1E0100
ASM_CALL Sub_07B9E2 ; 019FFB/07E2B907 // Updates a fighter's X and Y pos from a list. Battle related?
WAIT #1 ; 019FFF/0601
ASM_CALL Load_Sprite_Setup_12b ; 01A001/075D9C00 // Load Sprite Setup
.word 2 ; 01A005/0200
.word 0 ; 01A007/0000
.word 0 ; 01A009/0000
.word 0 ; 01A00B/0000
.word 5 ; 01A00D/0500
.word 0 ; 01A00F/0000
MOV VAR2,REG ; 01A011/2302
DATA8_01A013:
WAIT #1 ; 01A013/0601
MOV REG,#$0000 ; 01A015/1E0000
ASM_CALL WasBtnPressed_2b ; 01A018/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 01A01C/8000
JNE DATA8_01A0CB ; 01A01E/0CCBA0
DATA8_01A021:
ASM_CALL Sub_07A57A ; 01A021/077AA507
JEQ DATA8_01A013 ; 01A025/0B13A0
MOV REG,VAR3 ; 01A028/2403
ASM_CALL Spirit_check_far ; 01A02A/07F7A507 // Spirit check
JNE DATA8_01A021 ; 01A02E/0C21A0
ASM_CALL Update_Spirit_HPMP ; 01A031/078AB907 // Update Spirit HP/MP - Saves "current spirit" stats to that particular spirit's stats (The game tracks them separately)
ASM_CALL Clear_Event_1b ; 01A035/07DD9C00 // Battle related
.byte $0E ; 01A039/0E
ASM_CALL GetSet_SFX_1b ; 01A03A/07449C00 // Get/Set Sound Effect
.byte 17 ; 01A03E/11
WAIT #6 ; 01A03F/0606
MOV REG,VAR3 ; 01A041/2403
MULTI_JSR #5 ; 01A043/1205
.word DATA8_01A0A6 ; 01A045/A6A0
.word DATA8_01A052 ; 01A047/52A0
.word DATA8_01A067 ; 01A049/67A0
.word DATA8_01A07C ; 01A04B/7CA0
.word DATA8_01A091 ; 01A04D/91A0
JMP DATA8_01A013 ; 01A04F/1A13A0
DATA8_01A052:
JSR DATA8_01A0B8 ; 01A052/1BB8A0
ASM_CALL Load_Graphics__1b_12b ; 01A055/07BC9C00 // Load Graphics
.byte 14 ; 01A059/0E
.word 5 ; 01A05A/0500
.word 0 ; 01A05C/0000
.word 0 ; 01A05E/0000
.word 0 ; 01A060/0000
.word 0 ; 01A062/0000
.word 0 ; 01A064/0000
RTS ; 01A066/1C
DATA8_01A067:
JSR DATA8_01A0B8 ; 01A067/1BB8A0
ASM_CALL Load_Graphics__1b_12b ; 01A06A/07BC9C00 // Load Graphics
.byte 14 ; 01A06E/0E
.word 6 ; 01A06F/0600
.word 0 ; 01A071/0000
.word 0 ; 01A073/0000
.word 0 ; 01A075/0000
.word 0 ; 01A077/0000
.word 0 ; 01A079/0000
RTS ; 01A07B/1C
DATA8_01A07C:
JSR DATA8_01A0B8 ; 01A07C/1BB8A0
ASM_CALL Load_Graphics__1b_12b ; 01A07F/07BC9C00 // Load Graphics
.byte 14 ; 01A083/0E
.word 7 ; 01A084/0700
.word 0 ; 01A086/0000
.word 0 ; 01A088/0000
.word 0 ; 01A08A/0000
.word 0 ; 01A08C/0000
.word 0 ; 01A08E/0000
RTS ; 01A090/1C
DATA8_01A091:
JSR DATA8_01A0B8 ; 01A091/1BB8A0
ASM_CALL Load_Graphics__1b_12b ; 01A094/07BC9C00 // Load Graphics
.byte 14 ; 01A098/0E
.word 8 ; 01A099/0800
.word 0 ; 01A09B/0000
.word 0 ; 01A09D/0000
.word 0 ; 01A09F/0000
.word 0 ; 01A0A1/0000
.word 0 ; 01A0A3/0000
RTS ; 01A0A5/1C
DATA8_01A0A6:
ASM_CALL Load_Graphics__1b_12b ; 01A0A6/07BC9C00 // Load Graphics
.byte 14 ; 01A0AA/0E
.word 13 ; 01A0AB/0D00
.word 0 ; 01A0AD/0000
.word 0 ; 01A0AF/0000
.word 0 ; 01A0B1/0000
.word 0 ; 01A0B3/0000
.word 0 ; 01A0B5/0000
RTS ; 01A0B7/1C
DATA8_01A0B8:
MOV REG,VAR3 ; 01A0B8/2403
ASM_CALL Sub_07A639 ; 01A0BA/0739A607 // Related to spirits owned
JNE DATA8_01A0C6 ; 01A0BE/0CC6A0
MOV VAR1,#$0000 ; 01A0C1/0F010000
RTS ; 01A0C5/1C
DATA8_01A0C6:
MOV VAR1,#$0001 ; 01A0C6/0F010100
RTS ; 01A0CA/1C
DATA8_01A0CB:
ASM_CALL GetSet_SFX_1b ; 01A0CB/07449C00 // Get/Set Sound Effect
.byte 17 ; 01A0CF/11
ASM_CALL Clear_Event_varX_1b ; 01A0D0/07C99C00 // Menu Stuffs
.byte $02 ; 01A0D4/02
JMP Menu_exit_check ; 01A0D5/1AE191
Event_Main_13:
MOV REG,Curr_area ; 01A0D8/1F7315
MOV VAR3,REG ; 01A0DB/2303
TASK Event_Load_Area_Name ; 01A0DD/0896A1
JSR Event_GetPalettes_01A14A ; 01A0E0/1B4AA1
ON_TICK CODE_01A1A3 ; 01A0E3/09A3A101
SET_XPOS #128 ; 01A0E7/388000
SET_YPOS #192 ; 01A0EA/40C000
ASM_CALL Sub_Dungeon_check_far ; 01A0ED/0720B207 // Sub: Dungeon Check - Returns 1 if in a dungeon, 0 if in a town
JNE DATA8_01A10F ; 01A0F1/0C0FA1
ASM_CALL Sub_07BAC3 ; 01A0F4/07C3BA07 // Involves the compass subdirection 2
DATA8_01A0F8:
WAIT #1 ; 01A0F8/0601
ASM_CALL Turning_in_town ; 01A0FA/07758A18 // Turning in town
ASM_CALL Sub_07BAA3 ; 01A0FE/07A3BA07 // Involves the compass subdirection
MULTI_JSR #2 ; 01A102/1202
.word DATA8_01A134 ; 01A104/34A1
.word DATA8_01A13B ; 01A106/3BA1
ASM_CALL Sub_07BAC3 ; 01A108/07C3BA07 // Involves the compass subdirection 2
JMP DATA8_01A0F8 ; 01A10C/1AF8A0
DATA8_01A10F:
ASM_CALL Sub_07BAC3 ; 01A10F/07C3BA07 // Involves the compass subdirection 2
DATA8_01A113:
WAIT #1 ; 01A113/0601
ASM_CALL Sub_Turning_Around ; 01A115/079ABA07 // Turning around
MULTI_JSR #2 ; 01A119/1202
.word Event_Turning_Step ; 01A11B/26A1
.word DATA8_01A12D ; 01A11D/2DA1
ASM_CALL Sub_07BAC3 ; 01A11F/07C3BA07 // Involves the compass subdirection 2
JMP DATA8_01A113 ; 01A123/1A13A1
Event_Turning_Step:
ADD.w Compass_Subdirection,ADD,#-8192; 01A126/0E7D150200E0
L_01A12C:
RTS ; 01A12C/1C
DATA8_01A12D:
ADD.w Compass_Subdirection,ADD,#8192; 01A12D/0E7D15020020
L_01A133:
RTS ; 01A133/1C
DATA8_01A134:
ADD.w Compass_Subdirection,ADD,#-1024; 01A134/0E7D150200FC
L_01A13A:
RTS ; 01A13A/1C
DATA8_01A13B:
ADD.w Compass_Subdirection,ADD,#1024; 01A13B/0E7D15020004
L_01A141:
RTS ; 01A141/1C
L_01A142:
ON_TICK CODE_01A1BC ; 01A142/09BCA101
JSR DATA8_01A16B ; 01A146/1B6BA1
HALT ; 01A149/0A
Event_GetPalettes_01A14A:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 01A14A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Gfx_Palette_01A14A ; 01A14E/92950D
.byte $80 ; 01A151/80
.word 32 ; 01A152/2000
ASM_CALL Decomp_Setup2_3b_3b ; 01A154/0735A000 // Decompression setup 2
.long Gfx_Compass ; 01A158/11B70D
.long $7E9400 ; 01A15B/00947E
ASM_CALL Setup_Display_stuff_8b ; 01A15E/07349D00 // Setup: Display stuff
.byte 0 ; 01A162/00
.word 2048 ; 01A163/0008
.word 37888 ; 01A165/0094
.byte 126 ; 01A167/7E
.word 31744 ; 01A168/007C
RTS ; 01A16A/1C
DATA8_01A16B:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 01A16B/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Gfx_Palette_01A16B ; 01A16F/B2950D
.byte $80 ; 01A172/80
.word 32 ; 01A173/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 01A175/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Gfx_Palette_01A175 ; 01A179/D2950D
.byte $F0 ; 01A17C/F0
.word 32 ; 01A17D/2000
ASM_CALL Decomp_Setup2_3b_3b ; 01A17F/0735A000 // Decompression setup 2
.long DATA8_0DB410 ; 01A183/10B40D
.long $7E9400 ; 01A186/00947E
ASM_CALL Setup_Display_stuff_8b ; 01A189/07349D00 // Setup: Display stuff
.byte 0 ; 01A18D/00
.word 2048 ; 01A18E/0008
.word 37888 ; 01A190/0094
.byte 126 ; 01A192/7E
.word 31744 ; 01A193/007C
RTS ; 01A195/1C
Event_Load_Area_Name:
ASM_CALL Get_Area_Name ; 01A196/07D8B807 // Get Area Name
ASM_CALL Setup_Text_Parser_3b_1b ; 01A19A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Draw_Area_Name ; 01A19E/3A8408
.byte $00 ; 01A1A1/00
END_TASK ; 01A1A2/0D
$01A32F - Event 02
Event_Main_02:
MOV REG,VAR0 ; 01A32F/2400
MULTI_JMP #10 ; 01A331/110A
.word DATA8_01A345 ; 01A333/45A3
.word DATA8_01A34C ; 01A335/4CA3
.word DATA8_01A353 ; 01A337/53A3
.word DATA8_01A35A ; 01A339/5AA3
.word DATA8_01A361 ; 01A33B/61A3
.word DATA8_01A368 ; 01A33D/68A3
.word DATA8_01A36F ; 01A33F/6FA3
.word DATA8_01A376 ; 01A341/76A3
.word DATA8_01A37D ; 01A343/7DA3
.word Input_0037 ; 01A345/3700
SET_ANIM #-1,WAIT #7 ; 01A347/37FF
JMP DATA8_01A345 ; 01A349/1A45A3
DATA8_01A34C:
SET_ANIM #1,WAIT #7 ; 01A34C/3701
SET_ANIM #-1,WAIT #7 ; 01A34E/37FF
JMP DATA8_01A34C ; 01A350/1A4CA3
DATA8_01A353:
SET_ANIM #2,WAIT #7 ; 01A353/3702
SET_ANIM #-1,WAIT #7 ; 01A355/37FF
JMP DATA8_01A353 ; 01A357/1A53A3
DATA8_01A35A:
SET_ANIM #3,WAIT #7 ; 01A35A/3703
SET_ANIM #-1,WAIT #7 ; 01A35C/37FF
JMP DATA8_01A35A ; 01A35E/1A5AA3
DATA8_01A361:
SET_ANIM #4,WAIT #7 ; 01A361/3704
SET_ANIM #-1,WAIT #7 ; 01A363/37FF
JMP DATA8_01A361 ; 01A365/1A61A3
DATA8_01A368:
SET_ANIM #5,WAIT #7 ; 01A368/3705
SET_ANIM #-1,WAIT #7 ; 01A36A/37FF
JMP DATA8_01A368 ; 01A36C/1A68A3
DATA8_01A36F:
SET_ANIM #6,WAIT #7 ; 01A36F/3706
SET_ANIM #-1,WAIT #7 ; 01A371/37FF
JMP DATA8_01A36F ; 01A373/1A6FA3
DATA8_01A376:
SET_ANIM #7,WAIT #7 ; 01A376/3707
SET_ANIM #-1,WAIT #7 ; 01A378/37FF
JMP DATA8_01A376 ; 01A37A/1A76A3
DATA8_01A37D:
TASK DATA8_01A34C ; 01A37D/084CA3
DATA8_01A380:
WAIT #1 ; 01A380/0601
ASM_CALL Compare_11B5_2b ; 01A382/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 01A386/02
.byte 3 ; 01A387/03
JEQ DATA8_01A380 ; 01A388/0B80A3
UNK_TASK #1 ; 01A38B/1401
SET_ANIM #-1,WAIT #1 ; 01A38D/31FF
DATA8_01A38F:
WAIT #1 ; 01A38F/0601
ASM_CALL Compare_11B5_2b ; 01A391/075DB007 // Compare $11B5,[val] to $11B5,[val]
.byte 2 ; 01A395/02
.byte 3 ; 01A396/03
JNE DATA8_01A38F ; 01A397/0C8FA3
WAIT #3 ; 01A39A/0603
JMP DATA8_01A37D ; 01A39C/1A7DA3
$01A477 - Event 03
Event_Main_03:
MOV REG,VAR0 ; 01A477/2400
MULTI_JMP #3 ; 01A479/1103
.word DATA8_01A481 ; 01A47B/81A4
.word DATA8_01A48C ; 01A47D/8CA4
.word DATA8_01A497 ; 01A47F/97A4
DATA8_01A481:
SET_XPOS #122 ; 01A481/387A00
SET_YPOS #172 ; 01A484/40AC00
ON_TICK SetAnimFrame_with_11B5 ; 01A487/09A2A401
HALT ; 01A48B/0A
DATA8_01A48C:
SET_XPOS #122 ; 01A48C/387A00
SET_YPOS #186 ; 01A48F/40BA00
DATA8_01A492:
ON_TICK SetAnimFrame_with_11B7 ; 01A492/09AEA401
HALT ; 01A496/0A
DATA8_01A497:
SET_XPOS #122 ; 01A497/387A00
SET_YPOS #200 ; 01A49A/40C800
ON_TICK SetAnimFrame_with_11B9 ; 01A49D/09C4A401
HALT ; 01A4A1/0A
$01B807 - Event 6A: Credits scene
Event_Main_6A_CREDITS_SCENE:
ASM_CALL Display_Force_Blanking_far ; 01B807/07778100 // Display Force Blanking
ASM_CALL Read_BGmode_1b ; 01B80B/07699D00 // Read Background mode
.byte 1 ; 01B80F/01
ASM_CALL Display_brancher_6b ; 01B810/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $00 ; 01B814/00
.byte $00 ; 01B815/00
.word $1000 ; 01B816/0010
.word $0000 ; 01B818/0000
ASM_CALL Display_brancher_6b ; 01B81A/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 01B81E/01
.byte $00 ; 01B81F/00
.word $1000 ; 01B820/0010
.word $0400 ; 01B822/0004
ASM_CALL Display_brancher_6b ; 01B824/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $02 ; 01B828/02
.byte $00 ; 01B829/00
.word $5000 ; 01B82A/0050
.word $0C00 ; 01B82C/000C
ASM_CALL Set_Sprite_mode_4b ; 01B82E/07939D00 // Set Sprite mode - [A] [X] [OBJ size]
.byte $03 ; 01B832/03
.word $6000 ; 01B833/0060
.byte $00 ; 01B835/00
ASM_CALL Decomp80_setup_3b ; 01B836/07F99C00 // Decomp80 setup
.long More_Decomp_Data ; 01B83A/B3BC01
WAIT #10 ; 01B83D/060A
Something_with_displays:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 01B83F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long DATA8_01E65F ; 01B843/5FE601
.byte $00 ; 01B846/00
.word 64 ; 01B847/4000
ASM_CALL MainScr_Remove_1b ; 01B849/07B69D00 // Main Screen remove
.byte $1F ; 01B84D/1F
ASM_CALL Mosaic_Clear_1b ; 01B84E/078A9E00 // Mosaic Clear
.byte $0F ; 01B852/0F
ASM_CALL MainScr_Add_1b ; 01B853/07A89D00 // Main Screen add
.byte $07 ; 01B857/07
ASM_CALL Set_Display_far ; 01B858/078B8100 // Set Display
ASM_CALL HDMA_xfer_6b ; 01B85C/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $02 ; 01B860/02
.byte $42 ; 01B861/42
.byte $0D ; 01B862/0D
.long $01BBB0 ; 01B863/B0BB01
Part_of_mountain_scene:
ASM_CALL HDMA_xfer_6b ; 01B866/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $03 ; 01B86A/03
.byte $42 ; 01B86B/42
.byte $11 ; 01B86C/11
.long $01BBBB ; 01B86D/BBBB01
MOV.b Color_window,#$00 ; 01B870/13302100
MOV.b Color_math,#$A7 ; 01B874/133121A7
ASM_CALL Set_RGB_3b ; 01B878/07839F00 // Set RGB -2
.byte $1F ; 01B87C/1F
.byte $1F ; 01B87D/1F
.byte $1F ; 01B87E/1F
BGH_DISP #0,#$0000 ; 01B87F/78000000
BGV_DISP #0,#$0000 ; 01B883/80000000
BGH_DISP #1,#$0000 ; 01B887/78010000
BGV_DISP #1,#$0000 ; 01B88B/80010000
BGH_DISP #2,#$0000 ; 01B88F/78020000
BGV_DISP #2,#$0000 ; 01B893/80020000
SET_BGH_VEL #0,#$0800 ; 01B897/88000008
SET_BGH_VEL #1,#$0400 ; 01B89B/88010004
SET_BGH_VEL #2,#$0200 ; 01B89F/88020002
ASM_CALL GetSet_Music_1b ; 01B8A3/073C9C00 // Get/Set Music
.byte 51 ; 01B8A7/33
START_LOOP #16 ; 01B8A8/0110
ASM_CALL Unfade ; 01B8AA/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #0 ; 01B8AE/0600
END_LOOP ; 01B8B0/02
WAIT #1 ; 01B8B1/0601
TASK DATA8_01B99E ; 01B8B3/089EB9
START_LOOP #32 ; 01B8B6/0120
ASM_CALL Add_RGB_3b ; 01B8B8/07E29F00 // Add RGB
.byte $FF ; 01B8BC/FF
.byte $FF ; 01B8BD/FF
.byte $FF ; 01B8BE/FF
WAIT #21 ; 01B8BF/0615
END_LOOP ; 01B8C1/02
START_LOOP #10 ; 01B8C2/010A
WAIT #200 ; 01B8C4/06C8
END_LOOP ; 01B8C6/02
START_LOOP #16 ; 01B8C7/0110
ASM_CALL Fade ; 01B8C9/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #10 ; 01B8CD/060A
END_LOOP ; 01B8CF/02
WAIT #1 ; 01B8D0/0601
ASM_CALL Display_Force_Blanking_far ; 01B8D2/07778100 // Display Force Blanking
ZERO_BG_VEL #$00 ; 01B8D6/D800
ZERO_BG_VEL #$01 ; 01B8D8/D801
ZERO_BG_VEL #$02 ; 01B8DA/D802
BGH_DISP #0,#$0000 ; 01B8DC/78000000
BGV_DISP #0,#$0000 ; 01B8E0/80000000
ASM_CALL Rem_HDMA_ch_1b ; 01B8E4/071F9F00 // Remove HDMA channel
.byte $02 ; 01B8E8/02
ASM_CALL Rem_HDMA_ch_1b ; 01B8E9/071F9F00 // Remove HDMA channel
.byte $03 ; 01B8ED/03
WAIT #1 ; 01B8EE/0601
ASM_CALL Read_BGmode_1b ; 01B8F0/07699D00 // Read Background mode
.byte 7 ; 01B8F4/07
ASM_CALL Display_brancher_6b ; 01B8F5/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $00 ; 01B8F9/00
.byte $00 ; 01B8FA/00
.word $0000 ; 01B8FB/0000
.word $0000 ; 01B8FD/0000
ASM_CALL Set_Mode7_4b ; 01B8FF/07169E00 // Set Mode7
.byte 128 ; 01B903/80
.byte 0 ; 01B904/00
.byte 128 ; 01B905/80
.byte 0 ; 01B906/00
Load_after_mtn_fadeout:
ASM_CALL Decomp80_setup_3b ; 01B907/07F99C00 // Decomp80 setup
.long DATA8_01BCF4 ; 01B90B/F4BC01
ASM_CALL MainScr_Remove_1b ; 01B90E/07B69D00 // Main Screen remove
.byte $1F ; 01B912/1F
ASM_CALL Mosaic_Clear_1b ; 01B913/078A9E00 // Mosaic Clear
.byte $0F ; 01B917/0F
ASM_CALL MainScr_Add_1b ; 01B918/07A89D00 // Main Screen add
.byte $11 ; 01B91C/11
MOV.b M7SEL,#$80 ; 01B91D/131A2180
WAIT #180 ; 01B921/06B4
ASM_CALL Set_Display_far ; 01B923/078B8100 // Set Display
Load_before_card_spin:
ASM_CALL Sub_8A84_2b ; 01B927/07339E00 // Sub: Set $1068, sets up 9E39
.word 0 ; 01B92B/0000
ASM_CALL Sub_9E53_4b ; 01B92D/07539E00 // Sub: 9E53, sets 106A/106C, sets up 9E39
.word 260 ; 01B931/0401
.word 256 ; 01B933/0001
WAIT #1 ; 01B935/0601
ASM_CALL Zero_18FD ; 01B937/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
WAIT #1 ; 01B93B/0601
TASK Code_01BBC8 ; 01B93D/08C8BB
WAIT #1 ; 01B940/0601
TASK Code_01BADC ; 01B942/08DCBA
MOV REG,#$0000 ; 01B945/1E0000
MOV VAR0,REG ; 01B948/2300
TASK DATA8_01B994 ; 01B94A/0894B9
Loop_Card_spin:
MOV REG,#$0000 ; 01B94D/1E0000
MOV VAR1,REG ; 01B950/2301
START_LOOP #44 ; 01B952/012C
Before_card_spin:
ASM_CALL Sub_01B9B4 ; 01B954/07B4B901
END_LOOP ; 01B958/02
TASK DATA8_01BB55 ; 01B959/0855BB
BGV_DISP #0,#$00F9 ; 01B95C/8000F900
MOV REG,#$002B ; 01B960/1E2B00
MOV VAR1,REG ; 01B963/2301
START_LOOP #44 ; 01B965/012C
ASM_CALL Sub_01B9D6 ; 01B967/07D6B901
END_LOOP ; 01B96B/02
MOV REG,#$0000 ; 01B96C/1E0000
MOV VAR1,REG ; 01B96F/2301
START_LOOP #44 ; 01B971/012C
ASM_CALL Sub_01BA1E ; 01B973/071EBA01
END_LOOP ; 01B977/02
Loads_blank_spinny:
ASM_CALL Sub_01BB96 ; 01B978/0796BB01
BGV_DISP #0,#$0000 ; 01B97C/80000000
MOV REG,#$002B ; 01B980/1E2B00
MOV VAR1,REG ; 01B983/2301
START_LOOP #44 ; 01B985/012C
Card_spin_animation:
ASM_CALL Sub_01B9F8 ; 01B987/07F8B901
END_LOOP ; 01B98B/02
MOV REG,VAR0 ; 01B98C/2400
JNE Loop_Card_spin ; 01B98E/0C4DB9
UNK_TASK #1 ; 01B991/1401
HALT ; 01B993/0A
DATA8_01B994:
START_LOOP #16 ; 01B994/0110
ASM_CALL Unfade ; 01B996/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #40 ; 01B99A/0628
END_LOOP ; 01B99C/02
END_TASK ; 01B99D/0D
DATA8_01B99E:
WAIT #200 ; 01B99E/06C8
WAIT #200 ; 01B9A0/06C8
START_LOOP #14 ; 01B9A2/010E
WAIT #20 ; 01B9A4/0614
ADD_BGH_VEL #0,#$FF80 ; 01B9A6/980080FF
ADD_BGH_VEL #1,#$FFC0 ; 01B9AA/9801C0FF
ADD_BGH_VEL #2,#$FFE0 ; 01B9AE/9802E0FF
END_LOOP ; 01B9B2/02
END_TASK ; 01B9B3/0D
$01BADC - Credits stuff 01
Code_01BADC:
ASM_CALL Set_RGB_3b ; 01BADC/07839F00 // Set RGB -2
.byte $00 ; 01BAE0/00
.byte $00 ; 01BAE1/00
.byte $00 ; 01BAE2/00
MOV.b Color_window,#$00 ; 01BAE3/13302100
WAIT #1 ; 01BAE7/0601
DATA8_01BAE9:
MOV.b Color_math,#$81 ; 01BAE9/13312181
MOV REG,#$0000 ; 01BAED/1E0000
MOV VAR2,REG ; 01BAF0/2302
START_LOOP #18 ; 01BAF2/0112
ASM_CALL Add_RGB_3b ; 01BAF4/07E29F00 // Add RGB
.byte $01 ; 01BAF8/01
.byte $01 ; 01BAF9/01
.byte $01 ; 01BAFA/01
ASM_CALL Sub_Credits_Something1 ; 01BAFB/071ABB01 // Sub: Credits Something 1
END_LOOP ; 01BAFF/02
MOV.b Color_math,#$01 ; 01BB00/13312101
MOV REG,#$0011 ; 01BB04/1E1100
MOV VAR2,REG ; 01BB07/2302
START_LOOP #18 ; 01BB09/0112
ASM_CALL Add_RGB_3b ; 01BB0B/07E29F00 // Add RGB
.byte $FF ; 01BB0F/FF
.byte $FF ; 01BB10/FF
.byte $FF ; 01BB11/FF
ASM_CALL Sub_Credits_Something2 ; 01BB12/072BBB01 // Sub: Credits Something 2
END_LOOP ; 01BB16/02
JMP DATA8_01BAE9 ; 01BB17/1AE9BA
$01BB57 - Credits stuff 02
Code_01BB57:
ASM_CALL Sub_Credits_Something3 ; 01BB57/0765BB01 // Sub: Credits Something 3
Loop_until_true:
WAIT #1 ; 01BB5B/0601
ASM_CALL Make_Animation_Loop2 ; 01BB5D/0712D518 // Make animation loop 2
JEQ Loop_until_true ; 01BB61/0B5BBB
END_TASK ; 01BB64/0D
$01BBC8 - Credits stuff 03
Code_01BBC8:
WAIT #40 ; 01BBC8/0628
Draws_blank_spinny:
START_LOOP #11 ; 01BBCA/010B
WAIT #200 ; 01BBCC/06C8
END_LOOP ; 01BBCE/02
MOV.w Credits_Progress,#$0000 ; 01BBCF/1627190000
Loop_Scroll_Credits:
ASM_CALL Load_Sprite_Setup_12b ; 01BBD4/075D9C00 // Load Sprite Setup
.word 107 ; 01BBD8/6B00
.word 0 ; 01BBDA/0000
.word 0 ; 01BBDC/0000
.word 0 ; 01BBDE/0000
.word 0 ; 01BBE0/0000
.word 0 ; 01BBE2/0000
ASM_CALL Update_Credits_Distance ; 01BBE4/070ABC01 // Update credits distance
ASM_CALL End_Credits_Check ; 01BBE8/0749BC01 // End credits check
JNE Loop_Scroll_Credits ; 01BBEC/0CD4BB
Load_The_End:
START_LOOP #2 ; 01BBEF/0102
WAIT #200 ; 01BBF1/06C8
END_LOOP ; 01BBF3/02
WAIT #240 ; 01BBF4/06F0
SET_ANIM #68 ; 01BBF6/3044
ZERO_VEL ; 01BBF8/D0
SET_YVEL #-64 ; 01BBF9/60C0FF
SET_XPOS #128 ; 01BBFC/388000
SET_YPOS #255 ; 01BBFF/40FF00
WAIT #250 ; 01BC02/06FA
WAIT #250 ; 01BC04/06FA
WAIT #56 ; 01BC06/0638
ZERO_VEL ; 01BC08/D0
END_TASK ; 01BC09/0D
$01BC51 - Event 6B: Staff Roll
Event_Main_6B_STAFF_ROLL:
ASM_CALL Advance_Credits ; 01BC51/075FBC01 // Advance the credits
ZERO_VEL ; 01BC55/D0
SET_YVEL #-64 ; 01BC56/60C0FF
START_LOOP #6 ; 01BC59/0106
WAIT #200 ; 01BC5B/06C8
END_LOOP ; 01BC5D/02
END ; 01BC5E/00
$028001 - Enemy 00: Slime
LoadData_Enemy00_SLIME:
JSL ASM_Battle_Prep ; 028001/04249102
Enemy00_Main_Loop:
ON_TICK Sub_Enemy00_Death_Check ; 028005/09EF8002
JMP Enemy00_Animation_Idle ; 028009/1A2F80
L_02800C:
TASK Enemy00_Animation_Idle ; 02800C/082F80
JSL ASM_Wrapper_Enemy_Turn ; 02800F/04119102
JEQ DATA8_028021 ; 028013/0B2180
UNK_TASK #1 ; 028016/1401
UNK_TASK #1 ; 028018/1401
JMP Enemy00_Main_Loop ; 02801A/1A0580
L_02801D:
JSL Sub_Enemy_death_anim ; 02801D/04248F02
DATA8_028021:
MOV REG,VAR2 ; 028021/2402
ASM_CALL Condition_Check_2b ; 028023/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028027/0100
JEQ Enemy00_Main_Loop ; 028029/0B0580
JMP SFX_Dies_Enemy ; 02802C/1AF190
Enemy00_Animation_Idle:
MOV REG,VAR2 ; 02802F/2402
ASM_CALL Clear_Condition_mirror ; 028031/07F08107 // Clear Condition mirror
TASK Enemy00_SLIME_SATISFACTORY ; 028035/08C980
DATA8_028038:
MOV REG,VAR2 ; 028038/2402
ASM_CALL Sub_Get_Condition_Change ; 02803A/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 02803E/1205
.word DATA8_02804F ; 028040/4F80
.word DATA8_028055 ; 028042/5580
.word DATA8_02805B ; 028044/5B80
.word DATA8_028061 ; 028046/6180
.word DATA8_028067 ; 028048/6780
WAIT #1 ; 02804A/0601
JMP DATA8_028038 ; 02804C/1A3880
DATA8_02804F:
UNK_TASK #1 ; 02804F/1401
TASK Enemy00_SLIME_PARALYZED ; 028051/086D80
RTS ; 028054/1C
DATA8_028055:
UNK_TASK #1 ; 028055/1401
TASK Enemy00_SLIME_PETRIFIED ; 028057/087080
RTS ; 02805A/1C
DATA8_02805B:
UNK_TASK #1 ; 02805B/1401
TASK Enemy00_SLIME_CONFUSED ; 02805D/087380
RTS ; 028060/1C
DATA8_028061:
UNK_TASK #1 ; 028061/1401
TASK Enemy00_SLIME_SLEEP ; 028063/089780
RTS ; 028066/1C
DATA8_028067:
UNK_TASK #1 ; 028067/1401
TASK Enemy00_SLIME_SATISFACTORY ; 028069/08C980
RTS ; 02806C/1C
Enemy00_SLIME_PARALYZED:
SET_ANIM #4,WAIT #1 ; 02806D/3104
HALT ; 02806F/0A
Enemy00_SLIME_PETRIFIED:
SET_ANIM #3,WAIT #1 ; 028070/3103
HALT ; 028072/0A
Enemy00_SLIME_CONFUSED:
SET_ANIM #4,WAIT #1 ; 028073/3104
SET_ANIM #6,WAIT #1 ; 028075/3106
INC_ANIM WAIT #1 ; 028077/A9
SET_ANIM #5,WAIT #1 ; 028078/3105
DEC_ANIM WAIT #1 ; 02807A/B1
SET_ANIM #9,WAIT #1 ; 02807B/3109
INC_ANIM WAIT #1 ; 02807D/A9
SET_ANIM #8,WAIT #1 ; 02807E/3108
SET_ANIM #4,WAIT #1 ; 028080/3104
SET_ANIM #6,WAIT #1 ; 028082/3106
INC_ANIM WAIT #1 ; 028084/A9
SET_ANIM #5,WAIT #1 ; 028085/3105
DEC_ANIM WAIT #1 ; 028087/B1
SET_ANIM #9,WAIT #1 ; 028088/3109
INC_ANIM WAIT #1 ; 02808A/A9
SET_ANIM #8,WAIT #1 ; 02808B/3108
SET_ANIM #4,WAIT #1 ; 02808D/3104
SET_ANIM #6,WAIT #1 ; 02808F/3106
INC_ANIM WAIT #1 ; 028091/A9
SET_ANIM #5,WAIT #1 ; 028092/3105
JMP Enemy00_SLIME_CONFUSED ; 028094/1A7380
Enemy00_SLIME_SLEEP:
SET_ANIM #4,WAIT #4 ; 028097/3404
SET_ANIM #6,WAIT #2 ; 028099/3206
INC_ANIM ; 02809B/A8
WAIT #12 ; 02809C/060C
SET_ANIM #5 ; 02809E/3005
WAIT #8 ; 0280A0/0608
DEC_ANIM ; 0280A2/B0
WAIT #8 ; 0280A3/0608
SET_ANIM #9,WAIT #2 ; 0280A5/3209
INC_ANIM ; 0280A7/A8
WAIT #12 ; 0280A8/060C
SET_ANIM #8 ; 0280AA/3008
WAIT #8 ; 0280AC/0608
SET_ANIM #4 ; 0280AE/3004
WAIT #8 ; 0280B0/0608
SET_ANIM #6,WAIT #4 ; 0280B2/3406
INC_ANIM ; 0280B4/A8
WAIT #8 ; 0280B5/0608
SET_ANIM #5,WAIT #4 ; 0280B7/3405
DEC_ANIM WAIT #4 ; 0280B9/B4
SET_ANIM #9,WAIT #4 ; 0280BA/3409
INC_ANIM WAIT #4 ; 0280BC/AC
SET_ANIM #8,WAIT #4 ; 0280BD/3408
SET_ANIM #4,WAIT #4 ; 0280BF/3404
SET_ANIM #6,WAIT #4 ; 0280C1/3406
INC_ANIM WAIT #4 ; 0280C3/AC
SET_ANIM #5,WAIT #4 ; 0280C4/3405
JMP Enemy00_SLIME_SLEEP ; 0280C6/1A9780
Enemy00_SLIME_SATISFACTORY:
SET_ANIM #4 ; 0280C9/3004
WAIT #46 ; 0280CB/062E
SET_ANIM #6,WAIT #2 ; 0280CD/3206
INC_ANIM WAIT #3 ; 0280CF/AB
SET_ANIM #5,WAIT #2 ; 0280D0/3205
DEC_ANIM WAIT #2 ; 0280D2/B2
SET_ANIM #9,WAIT #2 ; 0280D3/3209
INC_ANIM WAIT #3 ; 0280D5/AB
SET_ANIM #8,WAIT #2 ; 0280D6/3208
SET_ANIM #4,WAIT #2 ; 0280D8/3204
SET_ANIM #6,WAIT #1 ; 0280DA/3106
INC_ANIM WAIT #2 ; 0280DC/AA
SET_ANIM #5,WAIT #1 ; 0280DD/3105
DEC_ANIM WAIT #1 ; 0280DF/B1
SET_ANIM #9,WAIT #1 ; 0280E0/3109
INC_ANIM WAIT #1 ; 0280E2/A9
SET_ANIM #8,WAIT #1 ; 0280E3/3108
SET_ANIM #4,WAIT #1 ; 0280E5/3104
SET_ANIM #6,WAIT #1 ; 0280E7/3106
INC_ANIM WAIT #1 ; 0280E9/A9
SET_ANIM #5,WAIT #1 ; 0280EA/3105
JMP Enemy00_SLIME_SATISFACTORY ; 0280EC/1AC980
$028137 - Enemy 01: Pilferer
LoadData_Enemy01:
JSL ASM_Battle_Prep ; 028137/04249102
DATA8_02813B:
ON_TICK CODE_02820D ; 02813B/090D8202
JMP DATA8_028165 ; 02813F/1A6581
L_028142:
TASK DATA8_028165 ; 028142/086581
JSL ASM_Wrapper_Enemy_Turn ; 028145/04119102
JEQ DATA8_028157 ; 028149/0B5781
UNK_TASK #1 ; 02814C/1401
UNK_TASK #1 ; 02814E/1401
JMP DATA8_02813B ; 028150/1A3B81
L_028153:
JSL Sub_Enemy_death_anim ; 028153/04248F02
DATA8_028157:
MOV REG,VAR2 ; 028157/2402
ASM_CALL Condition_Check_2b ; 028159/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 02815D/0100
JEQ DATA8_02813B ; 02815F/0B3B81
JMP SFX_Dies_Enemy ; 028162/1AF190
DATA8_028165:
MOV REG,VAR2 ; 028165/2402
ASM_CALL Clear_Condition_mirror ; 028167/07F08107 // Clear Condition mirror
TASK DATA8_0281E9 ; 02816B/08E981
DATA8_02816E:
MOV REG,VAR2 ; 02816E/2402
ASM_CALL Sub_Get_Condition_Change ; 028170/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 028174/1205
.word DATA8_028185 ; 028176/8581
.word DATA8_02818B ; 028178/8B81
.word DATA8_028191 ; 02817A/9181
.word DATA8_028197 ; 02817C/9781
.word DATA8_02819D ; 02817E/9D81
WAIT #1 ; 028180/0601
JMP DATA8_02816E ; 028182/1A6E81
DATA8_028185:
UNK_TASK #1 ; 028185/1401
TASK DATA8_0281A3 ; 028187/08A381
RTS ; 02818A/1C
DATA8_02818B:
UNK_TASK #1 ; 02818B/1401
TASK DATA8_0281A6 ; 02818D/08A681
RTS ; 028190/1C
DATA8_028191:
UNK_TASK #1 ; 028191/1401
TASK DATA8_0281A9 ; 028193/08A981
RTS ; 028196/1C
DATA8_028197:
UNK_TASK #1 ; 028197/1401
TASK DATA8_0281BF ; 028199/08BF81
RTS ; 02819C/1C
DATA8_02819D:
UNK_TASK #1 ; 02819D/1401
TASK DATA8_0281E9 ; 02819F/08E981
RTS ; 0281A2/1C
DATA8_0281A3:
SET_ANIM #4,WAIT #1 ; 0281A3/3104
HALT ; 0281A5/0A
DATA8_0281A6:
SET_ANIM #3,WAIT #1 ; 0281A6/3103
HALT ; 0281A8/0A
DATA8_0281A9:
SET_ANIM #4,WAIT #1 ; 0281A9/3104
SET_ANIM #8,WAIT #1 ; 0281AB/3108
SET_ANIM #5,WAIT #1 ; 0281AD/3105
INC_ANIM WAIT #1 ; 0281AF/A9
SET_ANIM #9,WAIT #1 ; 0281B0/3109
SET_ANIM #7,WAIT #1 ; 0281B2/3107
SET_ANIM #4,WAIT #1 ; 0281B4/3104
SET_ANIM #11,WAIT #1 ; 0281B6/310B
SET_ANIM #13,WAIT #1 ; 0281B8/310D
SET_ANIM #11,WAIT #1 ; 0281BA/310B
JMP DATA8_0281A9 ; 0281BC/1AA981
DATA8_0281BF:
SET_ANIM #4 ; 0281BF/3004
WAIT #48 ; 0281C1/0630
SET_ANIM #8 ; 0281C3/3008
WAIT #8 ; 0281C5/0608
SET_ANIM #5 ; 0281C7/3005
WAIT #36 ; 0281C9/0624
INC_ANIM ; 0281CB/A8
WAIT #20 ; 0281CC/0614
SET_ANIM #9 ; 0281CE/3009
WAIT #8 ; 0281D0/0608
SET_ANIM #7 ; 0281D2/3007
WAIT #52 ; 0281D4/0634
SET_ANIM #4 ; 0281D6/3004
WAIT #76 ; 0281D8/064C
SET_ANIM #11 ; 0281DA/300B
WAIT #254 ; 0281DC/06FE
SET_ANIM #13 ; 0281DE/300D
WAIT #192 ; 0281E0/06C0
SET_ANIM #11 ; 0281E2/300B
WAIT #254 ; 0281E4/06FE
JMP DATA8_0281BF ; 0281E6/1ABF81
DATA8_0281E9:
SET_ANIM #4 ; 0281E9/3004
WAIT #12 ; 0281EB/060C
SET_ANIM #8,WAIT #2 ; 0281ED/3208
SET_ANIM #5 ; 0281EF/3005
WAIT #9 ; 0281F1/0609
INC_ANIM WAIT #5 ; 0281F3/AD
SET_ANIM #9,WAIT #2 ; 0281F4/3209
SET_ANIM #7 ; 0281F6/3007
WAIT #13 ; 0281F8/060D
SET_ANIM #4 ; 0281FA/3004
WAIT #19 ; 0281FC/0613
SET_ANIM #11 ; 0281FE/300B
WAIT #64 ; 028200/0640
SET_ANIM #13 ; 028202/300D
WAIT #48 ; 028204/0630
SET_ANIM #11 ; 028206/300B
WAIT #64 ; 028208/0640
JMP DATA8_0281E9 ; 02820A/1AE981
$028255 - Enemy 02: Thief
LoadData_Enemy02:
JSL ASM_Battle_Prep ; 028255/04249102
DATA8_028259:
ON_TICK CODE_02832B ; 028259/092B8302
JMP DATA8_028283 ; 02825D/1A8382
L_028260:
TASK DATA8_028283 ; 028260/088382
JSL ASM_Wrapper_Enemy_Turn ; 028263/04119102
JEQ DATA8_028275 ; 028267/0B7582
UNK_TASK #1 ; 02826A/1401
UNK_TASK #1 ; 02826C/1401
JMP DATA8_028259 ; 02826E/1A5982
L_028271:
JSL Sub_Enemy_death_anim ; 028271/04248F02
DATA8_028275:
MOV REG,VAR2 ; 028275/2402
ASM_CALL Condition_Check_2b ; 028277/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 02827B/0100
JEQ DATA8_028259 ; 02827D/0B5982
JMP SFX_Dies_Enemy ; 028280/1AF190
DATA8_028283:
MOV REG,VAR2 ; 028283/2402
ASM_CALL Clear_Condition_mirror ; 028285/07F08107 // Clear Condition mirror
TASK DATA8_028307 ; 028289/080783
DATA8_02828C:
MOV REG,VAR2 ; 02828C/2402
ASM_CALL Sub_Get_Condition_Change ; 02828E/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 028292/1205
.word DATA8_0282A3 ; 028294/A382
.word DATA8_0282A9 ; 028296/A982
.word DATA8_0282AF ; 028298/AF82
.word DATA8_0282B5 ; 02829A/B582
.word DATA8_0282BB ; 02829C/BB82
WAIT #1 ; 02829E/0601
JMP DATA8_02828C ; 0282A0/1A8C82
DATA8_0282A3:
UNK_TASK #1 ; 0282A3/1401
TASK DATA8_0282C1 ; 0282A5/08C182
RTS ; 0282A8/1C
DATA8_0282A9:
UNK_TASK #1 ; 0282A9/1401
TASK DATA8_0282C4 ; 0282AB/08C482
RTS ; 0282AE/1C
DATA8_0282AF:
UNK_TASK #1 ; 0282AF/1401
TASK DATA8_0282C7 ; 0282B1/08C782
RTS ; 0282B4/1C
DATA8_0282B5:
UNK_TASK #1 ; 0282B5/1401
TASK DATA8_0282DD ; 0282B7/08DD82
RTS ; 0282BA/1C
DATA8_0282BB:
UNK_TASK #1 ; 0282BB/1401
TASK DATA8_028307 ; 0282BD/080783
RTS ; 0282C0/1C
DATA8_0282C1:
SET_ANIM #4,WAIT #1 ; 0282C1/3104
HALT ; 0282C3/0A
DATA8_0282C4:
SET_ANIM #3,WAIT #1 ; 0282C4/3103
HALT ; 0282C6/0A
DATA8_0282C7:
SET_ANIM #4,WAIT #1 ; 0282C7/3104
SET_ANIM #8,WAIT #1 ; 0282C9/3108
SET_ANIM #5,WAIT #1 ; 0282CB/3105
INC_ANIM WAIT #1 ; 0282CD/A9
SET_ANIM #9,WAIT #1 ; 0282CE/3109
SET_ANIM #7,WAIT #1 ; 0282D0/3107
SET_ANIM #4,WAIT #1 ; 0282D2/3104
SET_ANIM #11,WAIT #1 ; 0282D4/310B
SET_ANIM #13,WAIT #1 ; 0282D6/310D
SET_ANIM #11,WAIT #1 ; 0282D8/310B
JMP DATA8_0282C7 ; 0282DA/1AC782
DATA8_0282DD:
SET_ANIM #4 ; 0282DD/3004
WAIT #48 ; 0282DF/0630
SET_ANIM #8 ; 0282E1/3008
WAIT #8 ; 0282E3/0608
SET_ANIM #5 ; 0282E5/3005
WAIT #9 ; 0282E7/0609
INC_ANIM ; 0282E9/A8
WAIT #20 ; 0282EA/0614
SET_ANIM #9 ; 0282EC/3009
WAIT #8 ; 0282EE/0608
SET_ANIM #7 ; 0282F0/3007
WAIT #52 ; 0282F2/0634
SET_ANIM #4 ; 0282F4/3004
WAIT #76 ; 0282F6/064C
SET_ANIM #11 ; 0282F8/300B
WAIT #254 ; 0282FA/06FE
SET_ANIM #13 ; 0282FC/300D
WAIT #192 ; 0282FE/06C0
SET_ANIM #11 ; 028300/300B
WAIT #254 ; 028302/06FE
JMP DATA8_0282DD ; 028304/1ADD82
DATA8_028307:
SET_ANIM #4 ; 028307/3004
WAIT #12 ; 028309/060C
SET_ANIM #8,WAIT #2 ; 02830B/3208
SET_ANIM #5 ; 02830D/3005
WAIT #9 ; 02830F/0609
INC_ANIM WAIT #5 ; 028311/AD
SET_ANIM #9,WAIT #2 ; 028312/3209
SET_ANIM #7 ; 028314/3007
WAIT #13 ; 028316/060D
SET_ANIM #4 ; 028318/3004
WAIT #19 ; 02831A/0613
SET_ANIM #11 ; 02831C/300B
WAIT #64 ; 02831E/0640
SET_ANIM #13 ; 028320/300D
WAIT #48 ; 028322/0630
SET_ANIM #11 ; 028324/300B
WAIT #64 ; 028326/0640
JMP DATA8_028307 ; 028328/1A0783
$028373 - Enemy 03: Goblin
LoadData_Enemy03:
JSL ASM_Battle_Prep ; 028373/04249102
DATA8_028377:
ON_TICK CODE_028409 ; 028377/09098402
JMP DATA8_0283A1 ; 02837B/1AA183
L_02837E:
TASK DATA8_0283A1 ; 02837E/08A183
JSL ASM_Wrapper_Enemy_Turn ; 028381/04119102
JEQ DATA8_028393 ; 028385/0B9383
UNK_TASK #1 ; 028388/1401
UNK_TASK #1 ; 02838A/1401
JMP DATA8_028377 ; 02838C/1A7783
L_02838F:
JSL Sub_Enemy_death_anim ; 02838F/04248F02
DATA8_028393:
MOV REG,VAR2 ; 028393/2402
ASM_CALL Condition_Check_2b ; 028395/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028399/0100
JEQ DATA8_028377 ; 02839B/0B7783
JMP SFX_Dies_Enemy ; 02839E/1AF190
DATA8_0283A1:
MOV REG,VAR2 ; 0283A1/2402
ASM_CALL Clear_Condition_mirror ; 0283A3/07F08107 // Clear Condition mirror
TASK DATA8_0283FB ; 0283A7/08FB83
DATA8_0283AA:
MOV REG,VAR2 ; 0283AA/2402
ASM_CALL Sub_Get_Condition_Change ; 0283AC/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 0283B0/1205
.word DATA8_0283C1 ; 0283B2/C183
.word DATA8_0283C7 ; 0283B4/C783
.word DATA8_0283CD ; 0283B6/CD83
.word DATA8_0283D3 ; 0283B8/D383
.word DATA8_0283D9 ; 0283BA/D983
WAIT #1 ; 0283BC/0601
JMP DATA8_0283AA ; 0283BE/1AAA83
DATA8_0283C1:
UNK_TASK #1 ; 0283C1/1401
TASK DATA8_0283DF ; 0283C3/08DF83
RTS ; 0283C6/1C
DATA8_0283C7:
UNK_TASK #1 ; 0283C7/1401
TASK DATA8_0283E2 ; 0283C9/08E283
RTS ; 0283CC/1C
DATA8_0283CD:
UNK_TASK #1 ; 0283CD/1401
TASK DATA8_0283E5 ; 0283CF/08E583
RTS ; 0283D2/1C
DATA8_0283D3:
UNK_TASK #1 ; 0283D3/1401
TASK DATA8_0283ED ; 0283D5/08ED83
RTS ; 0283D8/1C
DATA8_0283D9:
UNK_TASK #1 ; 0283D9/1401
TASK DATA8_0283FB ; 0283DB/08FB83
RTS ; 0283DE/1C
DATA8_0283DF:
SET_ANIM #5,WAIT #1 ; 0283DF/3105
HALT ; 0283E1/0A
DATA8_0283E2:
SET_ANIM #3,WAIT #1 ; 0283E2/3103
HALT ; 0283E4/0A
DATA8_0283E5:
SET_ANIM #5,WAIT #1 ; 0283E5/3105
INC_ANIM WAIT #1 ; 0283E7/A9
SET_ANIM #4,WAIT #1 ; 0283E8/3104
JMP DATA8_0283E5 ; 0283EA/1AE583
DATA8_0283ED:
SET_ANIM #5 ; 0283ED/3005
WAIT #40 ; 0283EF/0628
INC_ANIM ; 0283F1/A8
WAIT #92 ; 0283F2/065C
SET_ANIM #4 ; 0283F4/3004
WAIT #40 ; 0283F6/0628
JMP DATA8_0283ED ; 0283F8/1AED83
DATA8_0283FB:
SET_ANIM #5 ; 0283FB/3005
WAIT #10 ; 0283FD/060A
INC_ANIM ; 0283FF/A8
WAIT #23 ; 028400/0617
SET_ANIM #4 ; 028402/3004
WAIT #10 ; 028404/060A
JMP DATA8_0283FB ; 028406/1AFB83
$028451 - Enemy 04: Ogre
LoadData_Enemy04:
JSL ASM_Battle_Prep ; 028451/04249102
DATA8_028455:
ON_TICK CODE_0284E7 ; 028455/09E78402
JMP DATA8_02847F ; 028459/1A7F84
L_02845C:
TASK DATA8_02847F ; 02845C/087F84
JSL ASM_Wrapper_Enemy_Turn ; 02845F/04119102
JEQ DATA8_028471 ; 028463/0B7184
UNK_TASK #1 ; 028466/1401
UNK_TASK #1 ; 028468/1401
JMP DATA8_028455 ; 02846A/1A5584
L_02846D:
JSL Sub_Enemy_death_anim ; 02846D/04248F02
DATA8_028471:
MOV REG,VAR2 ; 028471/2402
ASM_CALL Condition_Check_2b ; 028473/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028477/0100
JEQ DATA8_028455 ; 028479/0B5584
JMP SFX_Dies_Enemy ; 02847C/1AF190
DATA8_02847F:
MOV REG,VAR2 ; 02847F/2402
ASM_CALL Clear_Condition_mirror ; 028481/07F08107 // Clear Condition mirror
TASK DATA8_0284D9 ; 028485/08D984
DATA8_028488:
MOV REG,VAR2 ; 028488/2402
ASM_CALL Sub_Get_Condition_Change ; 02848A/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 02848E/1205
.word DATA8_02849F ; 028490/9F84
.word DATA8_0284A5 ; 028492/A584
.word DATA8_0284AB ; 028494/AB84
.word DATA8_0284B1 ; 028496/B184
.word DATA8_0284B7 ; 028498/B784
WAIT #1 ; 02849A/0601
JMP DATA8_028488 ; 02849C/1A8884
DATA8_02849F:
UNK_TASK #1 ; 02849F/1401
TASK DATA8_0284BD ; 0284A1/08BD84
RTS ; 0284A4/1C
DATA8_0284A5:
UNK_TASK #1 ; 0284A5/1401
TASK DATA8_0284C0 ; 0284A7/08C084
RTS ; 0284AA/1C
DATA8_0284AB:
UNK_TASK #1 ; 0284AB/1401
TASK DATA8_0284C3 ; 0284AD/08C384
RTS ; 0284B0/1C
DATA8_0284B1:
UNK_TASK #1 ; 0284B1/1401
TASK DATA8_0284CB ; 0284B3/08CB84
RTS ; 0284B6/1C
DATA8_0284B7:
UNK_TASK #1 ; 0284B7/1401
TASK DATA8_0284D9 ; 0284B9/08D984
RTS ; 0284BC/1C
DATA8_0284BD:
SET_ANIM #5,WAIT #1 ; 0284BD/3105
HALT ; 0284BF/0A
DATA8_0284C0:
SET_ANIM #3,WAIT #1 ; 0284C0/3103
HALT ; 0284C2/0A
DATA8_0284C3:
SET_ANIM #5,WAIT #1 ; 0284C3/3105
INC_ANIM WAIT #1 ; 0284C5/A9
SET_ANIM #4,WAIT #1 ; 0284C6/3104
JMP DATA8_0284C3 ; 0284C8/1AC384
DATA8_0284CB:
SET_ANIM #5 ; 0284CB/3005
WAIT #40 ; 0284CD/0628
INC_ANIM ; 0284CF/A8
WAIT #92 ; 0284D0/065C
SET_ANIM #4 ; 0284D2/3004
WAIT #40 ; 0284D4/0628
JMP DATA8_0284CB ; 0284D6/1ACB84
DATA8_0284D9:
SET_ANIM #5 ; 0284D9/3005
WAIT #10 ; 0284DB/060A
INC_ANIM ; 0284DD/A8
WAIT #23 ; 0284DE/0617
SET_ANIM #4 ; 0284E0/3004
WAIT #10 ; 0284E2/060A
JMP DATA8_0284D9 ; 0284E4/1AD984
$02852F - Enemy 05: Hound
LoadData_Enemy05:
JSL ASM_Battle_Prep ; 02852F/04249102
DATA8_028533:
ON_TICK CODE_02861E ; 028533/091E8602
JMP DATA8_02855D ; 028537/1A5D85
L_02853A:
TASK DATA8_02855D ; 02853A/085D85
JSL ASM_Wrapper_Enemy_Turn ; 02853D/04119102
JEQ DATA8_02854F ; 028541/0B4F85
UNK_TASK #1 ; 028544/1401
UNK_TASK #1 ; 028546/1401
JMP DATA8_028533 ; 028548/1A3385
L_02854B:
JSL Sub_Enemy_death_anim ; 02854B/04248F02
DATA8_02854F:
MOV REG,VAR2 ; 02854F/2402
ASM_CALL Condition_Check_2b ; 028551/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028555/0100
JEQ DATA8_028533 ; 028557/0B3385
JMP SFX_Dies_Enemy ; 02855A/1AF190
DATA8_02855D:
MOV REG,VAR2 ; 02855D/2402
ASM_CALL Clear_Condition_mirror ; 02855F/07F08107 // Clear Condition mirror
TASK DATA8_0285EB ; 028563/08EB85
DATA8_028566:
MOV REG,VAR2 ; 028566/2402
ASM_CALL Sub_Get_Condition_Change ; 028568/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 02856C/1205
.word DATA8_02857D ; 02856E/7D85
.word DATA8_028583 ; 028570/8385
.word DATA8_028589 ; 028572/8985
.word DATA8_02858F ; 028574/8F85
.word DATA8_028595 ; 028576/9585
WAIT #1 ; 028578/0601
JMP DATA8_028566 ; 02857A/1A6685
DATA8_02857D:
UNK_TASK #1 ; 02857D/1401
TASK DATA8_02859B ; 02857F/089B85
RTS ; 028582/1C
DATA8_028583:
UNK_TASK #1 ; 028583/1401
TASK DATA8_02859E ; 028585/089E85
RTS ; 028588/1C
DATA8_028589:
UNK_TASK #1 ; 028589/1401
TASK DATA8_0285A1 ; 02858B/08A185
RTS ; 02858E/1C
DATA8_02858F:
UNK_TASK #1 ; 02858F/1401
TASK DATA8_0285B8 ; 028591/08B885
RTS ; 028594/1C
DATA8_028595:
UNK_TASK #1 ; 028595/1401
TASK DATA8_0285EB ; 028597/08EB85
RTS ; 02859A/1C
DATA8_02859B:
SET_ANIM #7,WAIT #1 ; 02859B/3107
HALT ; 02859D/0A
DATA8_02859E:
SET_ANIM #3,WAIT #1 ; 02859E/3103
HALT ; 0285A0/0A
DATA8_0285A1:
SET_ANIM #7,WAIT #1 ; 0285A1/3107
SET_ANIM #4,WAIT #1 ; 0285A3/3104
INC_ANIM WAIT #1 ; 0285A5/A9
INC_ANIM WAIT #1 ; 0285A6/A9
SET_ANIM #4,WAIT #1 ; 0285A7/3104
INC_ANIM WAIT #1 ; 0285A9/A9
INC_ANIM WAIT #1 ; 0285AA/A9
SET_ANIM #4,WAIT #1 ; 0285AB/3104
SET_ANIM #7,WAIT #1 ; 0285AD/3107
INC_ANIM WAIT #1 ; 0285AF/A9
INC_ANIM WAIT #1 ; 0285B0/A9
SET_ANIM #7,WAIT #1 ; 0285B1/3107
INC_ANIM WAIT #1 ; 0285B3/A9
INC_ANIM WAIT #1 ; 0285B4/A9
JMP DATA8_0285A1 ; 0285B5/1AA185
DATA8_0285B8:
SET_ANIM #7 ; 0285B8/3007
WAIT #160 ; 0285BA/06A0
SET_ANIM #4 ; 0285BC/3004
WAIT #104 ; 0285BE/0668
INC_ANIM ; 0285C0/A8
WAIT #44 ; 0285C1/062C
INC_ANIM ; 0285C3/A8
WAIT #44 ; 0285C4/062C
SET_ANIM #4 ; 0285C6/3004
WAIT #40 ; 0285C8/0628
INC_ANIM ; 0285CA/A8
WAIT #32 ; 0285CB/0620
INC_ANIM ; 0285CD/A8
WAIT #32 ; 0285CE/0620
SET_ANIM #4 ; 0285D0/3004
WAIT #160 ; 0285D2/06A0
SET_ANIM #7 ; 0285D4/3007
WAIT #40 ; 0285D6/0628
INC_ANIM ; 0285D8/A8
WAIT #44 ; 0285D9/062C
INC_ANIM ; 0285DB/A8
WAIT #44 ; 0285DC/062C
SET_ANIM #7 ; 0285DE/3007
WAIT #40 ; 0285E0/0628
INC_ANIM ; 0285E2/A8
WAIT #32 ; 0285E3/0620
INC_ANIM ; 0285E5/A8
WAIT #32 ; 0285E6/0620
JMP DATA8_0285B8 ; 0285E8/1AB885
DATA8_0285EB:
SET_ANIM #7 ; 0285EB/3007
WAIT #40 ; 0285ED/0628
SET_ANIM #4 ; 0285EF/3004
WAIT #26 ; 0285F1/061A
INC_ANIM ; 0285F3/A8
WAIT #11 ; 0285F4/060B
INC_ANIM ; 0285F6/A8
WAIT #11 ; 0285F7/060B
Play_attack_anim:
SET_ANIM #4 ; 0285F9/3004
WAIT #10 ; 0285FB/060A
INC_ANIM ; 0285FD/A8
WAIT #8 ; 0285FE/0608
INC_ANIM ; 028600/A8
WAIT #8 ; 028601/0608
SET_ANIM #4 ; 028603/3004
WAIT #40 ; 028605/0628
SET_ANIM #7 ; 028607/3007
WAIT #10 ; 028609/060A
INC_ANIM ; 02860B/A8
WAIT #11 ; 02860C/060B
INC_ANIM ; 02860E/A8
WAIT #11 ; 02860F/060B
SET_ANIM #7 ; 028611/3007
WAIT #10 ; 028613/060A
INC_ANIM ; 028615/A8
WAIT #8 ; 028616/0608
INC_ANIM ; 028618/A8
WAIT #8 ; 028619/0608
JMP DATA8_0285EB ; 02861B/1AEB85
$028666 - Enemy 06: Lupus
LoadData_Enemy06:
JSL ASM_Battle_Prep ; 028666/04249102
DATA8_02866A:
ON_TICK CODE_028755 ; 02866A/09558702
JMP DATA8_028694 ; 02866E/1A9486
L_028671:
TASK DATA8_028694 ; 028671/089486
JSL ASM_Wrapper_Enemy_Turn ; 028674/04119102
JEQ DATA8_028686 ; 028678/0B8686
UNK_TASK #1 ; 02867B/1401
UNK_TASK #1 ; 02867D/1401
JMP DATA8_02866A ; 02867F/1A6A86
L_028682:
JSL Sub_Enemy_death_anim ; 028682/04248F02
DATA8_028686:
MOV REG,VAR2 ; 028686/2402
ASM_CALL Condition_Check_2b ; 028688/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 02868C/0100
JEQ DATA8_02866A ; 02868E/0B6A86
JMP SFX_Dies_Enemy ; 028691/1AF190
DATA8_028694:
MOV REG,VAR2 ; 028694/2402
ASM_CALL Clear_Condition_mirror ; 028696/07F08107 // Clear Condition mirror
TASK DATA8_028722 ; 02869A/082287
DATA8_02869D:
MOV REG,VAR2 ; 02869D/2402
ASM_CALL Sub_Get_Condition_Change ; 02869F/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 0286A3/1205
.word DATA8_0286B4 ; 0286A5/B486
.word DATA8_0286BA ; 0286A7/BA86
.word DATA8_0286C0 ; 0286A9/C086
.word DATA8_0286C6 ; 0286AB/C686
.word DATA8_0286CC ; 0286AD/CC86
WAIT #1 ; 0286AF/0601
JMP DATA8_02869D ; 0286B1/1A9D86
DATA8_0286B4:
UNK_TASK #1 ; 0286B4/1401
TASK DATA8_0286D2 ; 0286B6/08D286
RTS ; 0286B9/1C
DATA8_0286BA:
UNK_TASK #1 ; 0286BA/1401
TASK DATA8_0286D5 ; 0286BC/08D586
RTS ; 0286BF/1C
DATA8_0286C0:
UNK_TASK #1 ; 0286C0/1401
TASK DATA8_0286D8 ; 0286C2/08D886
RTS ; 0286C5/1C
DATA8_0286C6:
UNK_TASK #1 ; 0286C6/1401
TASK DATA8_0286EF ; 0286C8/08EF86
RTS ; 0286CB/1C
DATA8_0286CC:
UNK_TASK #1 ; 0286CC/1401
TASK DATA8_028722 ; 0286CE/082287
RTS ; 0286D1/1C
DATA8_0286D2:
SET_ANIM #7,WAIT #1 ; 0286D2/3107
HALT ; 0286D4/0A
DATA8_0286D5:
SET_ANIM #3,WAIT #1 ; 0286D5/3103
HALT ; 0286D7/0A
DATA8_0286D8:
SET_ANIM #7,WAIT #1 ; 0286D8/3107
SET_ANIM #4,WAIT #1 ; 0286DA/3104
INC_ANIM WAIT #1 ; 0286DC/A9
INC_ANIM WAIT #1 ; 0286DD/A9
SET_ANIM #4,WAIT #1 ; 0286DE/3104
INC_ANIM WAIT #1 ; 0286E0/A9
INC_ANIM WAIT #1 ; 0286E1/A9
SET_ANIM #4,WAIT #1 ; 0286E2/3104
SET_ANIM #7,WAIT #1 ; 0286E4/3107
INC_ANIM WAIT #1 ; 0286E6/A9
INC_ANIM WAIT #1 ; 0286E7/A9
SET_ANIM #7,WAIT #1 ; 0286E8/3107
INC_ANIM WAIT #1 ; 0286EA/A9
INC_ANIM WAIT #1 ; 0286EB/A9
JMP DATA8_0286D8 ; 0286EC/1AD886
DATA8_0286EF:
SET_ANIM #7 ; 0286EF/3007
WAIT #160 ; 0286F1/06A0
SET_ANIM #4 ; 0286F3/3004
WAIT #104 ; 0286F5/0668
INC_ANIM ; 0286F7/A8
WAIT #44 ; 0286F8/062C
INC_ANIM ; 0286FA/A8
WAIT #44 ; 0286FB/062C
SET_ANIM #4 ; 0286FD/3004
WAIT #40 ; 0286FF/0628
INC_ANIM ; 028701/A8
WAIT #32 ; 028702/0620
INC_ANIM ; 028704/A8
WAIT #32 ; 028705/0620
SET_ANIM #4 ; 028707/3004
WAIT #160 ; 028709/06A0
SET_ANIM #7 ; 02870B/3007
WAIT #40 ; 02870D/0628
INC_ANIM ; 02870F/A8
WAIT #44 ; 028710/062C
INC_ANIM ; 028712/A8
WAIT #44 ; 028713/062C
SET_ANIM #7 ; 028715/3007
WAIT #40 ; 028717/0628
INC_ANIM ; 028719/A8
WAIT #32 ; 02871A/0620
INC_ANIM ; 02871C/A8
WAIT #32 ; 02871D/0620
JMP DATA8_0286EF ; 02871F/1AEF86
DATA8_028722:
SET_ANIM #7 ; 028722/3007
WAIT #40 ; 028724/0628
SET_ANIM #4 ; 028726/3004
WAIT #26 ; 028728/061A
INC_ANIM ; 02872A/A8
WAIT #11 ; 02872B/060B
INC_ANIM ; 02872D/A8
WAIT #11 ; 02872E/060B
SET_ANIM #4 ; 028730/3004
WAIT #10 ; 028732/060A
INC_ANIM ; 028734/A8
WAIT #8 ; 028735/0608
INC_ANIM ; 028737/A8
WAIT #8 ; 028738/0608
SET_ANIM #4 ; 02873A/3004
WAIT #40 ; 02873C/0628
SET_ANIM #7 ; 02873E/3007
WAIT #10 ; 028740/060A
INC_ANIM ; 028742/A8
WAIT #11 ; 028743/060B
INC_ANIM ; 028745/A8
WAIT #11 ; 028746/060B
SET_ANIM #7 ; 028748/3007
WAIT #10 ; 02874A/060A
INC_ANIM ; 02874C/A8
WAIT #8 ; 02874D/0608
INC_ANIM ; 02874F/A8
WAIT #8 ; 028750/0608
JMP DATA8_028722 ; 028752/1A2287
$02879D - Enemy 07: Saurian
LoadData_Enemy07:
JSL ASM_Battle_Prep ; 02879D/04249102
DATA8_0287A1:
ON_TICK CODE_02888F ; 0287A1/098F8802
JMP DATA8_0287CB ; 0287A5/1ACB87
L_0287A8:
TASK DATA8_0287CB ; 0287A8/08CB87
JSL ASM_Wrapper_Enemy_Turn ; 0287AB/04119102
JEQ DATA8_0287BD ; 0287AF/0BBD87
UNK_TASK #1 ; 0287B2/1401
UNK_TASK #1 ; 0287B4/1401
JMP DATA8_0287A1 ; 0287B6/1AA187
L_0287B9:
JSL Sub_Enemy_death_anim ; 0287B9/04248F02
DATA8_0287BD:
MOV REG,VAR2 ; 0287BD/2402
ASM_CALL Condition_Check_2b ; 0287BF/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 0287C3/0100
JEQ DATA8_0287A1 ; 0287C5/0BA187
JMP SFX_Dies_Enemy ; 0287C8/1AF190
DATA8_0287CB:
MOV REG,VAR2 ; 0287CB/2402
ASM_CALL Clear_Condition_mirror ; 0287CD/07F08107 // Clear Condition mirror
TASK DATA8_028867 ; 0287D1/086788
DATA8_0287D4:
MOV REG,VAR2 ; 0287D4/2402
ASM_CALL Sub_Get_Condition_Change ; 0287D6/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 0287DA/1205
.word DATA8_0287EB ; 0287DC/EB87
.word DATA8_0287F1 ; 0287DE/F187
.word DATA8_0287F7 ; 0287E0/F787
.word DATA8_0287FD ; 0287E2/FD87
.word DATA8_028803 ; 0287E4/0388
WAIT #1 ; 0287E6/0601
JMP DATA8_0287D4 ; 0287E8/1AD487
DATA8_0287EB:
UNK_TASK #1 ; 0287EB/1401
TASK DATA8_028809 ; 0287ED/080988
RTS ; 0287F0/1C
DATA8_0287F1:
UNK_TASK #1 ; 0287F1/1401
TASK DATA8_02880C ; 0287F3/080C88
RTS ; 0287F6/1C
DATA8_0287F7:
UNK_TASK #1 ; 0287F7/1401
TASK DATA8_02880F ; 0287F9/080F88
RTS ; 0287FC/1C
DATA8_0287FD:
UNK_TASK #1 ; 0287FD/1401
TASK DATA8_028829 ; 0287FF/082988
RTS ; 028802/1C
DATA8_028803:
UNK_TASK #1 ; 028803/1401
TASK DATA8_028867 ; 028805/086788
RTS ; 028808/1C
DATA8_028809:
SET_ANIM #6,WAIT #1 ; 028809/3106
HALT ; 02880B/0A
DATA8_02880C:
SET_ANIM #3,WAIT #1 ; 02880C/3103
HALT ; 02880E/0A
DATA8_02880F:
SET_ANIM #6,WAIT #1 ; 02880F/3106
DEC_ANIM WAIT #1 ; 028811/B1
DEC_ANIM WAIT #1 ; 028812/B1
INC_ANIM WAIT #1 ; 028813/A9
INC_ANIM WAIT #1 ; 028814/A9
DEC_ANIM WAIT #1 ; 028815/B1
DEC_ANIM WAIT #1 ; 028816/B1
INC_ANIM WAIT #1 ; 028817/A9
INC_ANIM WAIT #1 ; 028818/A9
INC_ANIM WAIT #1 ; 028819/A9
SET_ANIM #8,WAIT #1 ; 02881A/3108
INC_ANIM WAIT #1 ; 02881C/A9
DEC_ANIM WAIT #1 ; 02881D/B1
SET_ANIM #7,WAIT #1 ; 02881E/3107
SET_ANIM #8,WAIT #1 ; 028820/3108
INC_ANIM WAIT #1 ; 028822/A9
DEC_ANIM WAIT #1 ; 028823/B1
SET_ANIM #7,WAIT #1 ; 028824/3107
JMP DATA8_02880F ; 028826/1A0F88
DATA8_028829:
SET_ANIM #6 ; 028829/3006
WAIT #152 ; 02882B/0698
DEC_ANIM ; 02882D/B0
WAIT #16 ; 02882E/0610
DEC_ANIM ; 028830/B0
WAIT #28 ; 028831/061C
INC_ANIM ; 028833/A8
WAIT #16 ; 028834/0610
INC_ANIM ; 028836/A8
WAIT #56 ; 028837/0638
DEC_ANIM ; 028839/B0
WAIT #8 ; 02883A/0608
DEC_ANIM ; 02883C/B0
WAIT #20 ; 02883D/0614
INC_ANIM ; 02883F/A8
WAIT #8 ; 028840/0608
INC_ANIM ; 028842/A8
WAIT #64 ; 028843/0640
INC_ANIM ; 028845/A8
WAIT #96 ; 028846/0660
SET_ANIM #8 ; 028848/3008
WAIT #20 ; 02884A/0614
INC_ANIM ; 02884C/A8
WAIT #64 ; 02884D/0640
DEC_ANIM ; 02884F/B0
WAIT #20 ; 028850/0614
SET_ANIM #7 ; 028852/3007
WAIT #36 ; 028854/0624
SET_ANIM #8 ; 028856/3008
WAIT #20 ; 028858/0614
INC_ANIM ; 02885A/A8
WAIT #20 ; 02885B/0614
DEC_ANIM ; 02885D/B0
WAIT #20 ; 02885E/0614
SET_ANIM #7 ; 028860/3007
WAIT #64 ; 028862/0640
JMP DATA8_028829 ; 028864/1A2988
DATA8_028867:
SET_ANIM #6 ; 028867/3006
WAIT #38 ; 028869/0626
DEC_ANIM WAIT #4 ; 02886B/B4
DEC_ANIM WAIT #7 ; 02886C/B7
INC_ANIM WAIT #4 ; 02886D/AC
INC_ANIM ; 02886E/A8
WAIT #14 ; 02886F/060E
DEC_ANIM WAIT #2 ; 028871/B2
DEC_ANIM WAIT #5 ; 028872/B5
INC_ANIM WAIT #2 ; 028873/AA
INC_ANIM ; 028874/A8
WAIT #16 ; 028875/0610
INC_ANIM ; 028877/A8
WAIT #24 ; 028878/0618
SET_ANIM #8,WAIT #5 ; 02887A/3508
INC_ANIM ; 02887C/A8
WAIT #16 ; 02887D/0610
DEC_ANIM WAIT #5 ; 02887F/B5
SET_ANIM #7 ; 028880/3007
WAIT #9 ; 028882/0609
SET_ANIM #8,WAIT #5 ; 028884/3508
INC_ANIM WAIT #5 ; 028886/AD
DEC_ANIM WAIT #5 ; 028887/B5
SET_ANIM #7 ; 028888/3007
WAIT #16 ; 02888A/0610
JMP DATA8_028867 ; 02888C/1A6788
$0288D7 - Enemy 08: Lizard
LoadData_Enemy08:
JSL ASM_Battle_Prep ; 0288D7/04249102
DATA8_0288DB:
ON_TICK CODE_028971 ; 0288DB/09718902
JMP DATA8_028905 ; 0288DF/1A0589
L_0288E2:
TASK DATA8_028905 ; 0288E2/080589
JSL ASM_Wrapper_Enemy_Turn ; 0288E5/04119102
JEQ DATA8_0288F7 ; 0288E9/0BF788
UNK_TASK #1 ; 0288EC/1401
UNK_TASK #1 ; 0288EE/1401
JMP DATA8_0288DB ; 0288F0/1ADB88
L_0288F3:
JSL Sub_Enemy_death_anim ; 0288F3/04248F02
DATA8_0288F7:
MOV REG,VAR2 ; 0288F7/2402
ASM_CALL Condition_Check_2b ; 0288F9/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 0288FD/0100
JEQ DATA8_0288DB ; 0288FF/0BDB88
JMP SFX_Dies_Enemy ; 028902/1AF190
DATA8_028905:
MOV REG,VAR2 ; 028905/2402
ASM_CALL Clear_Condition_mirror ; 028907/07F08107 // Clear Condition mirror
TASK DATA8_028961 ; 02890B/086189
DATA8_02890E:
MOV REG,VAR2 ; 02890E/2402
ASM_CALL Sub_Get_Condition_Change ; 028910/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 028914/1205
.word DATA8_028925 ; 028916/2589
.word DATA8_02892B ; 028918/2B89
.word DATA8_028931 ; 02891A/3189
.word DATA8_028937 ; 02891C/3789
.word DATA8_02893D ; 02891E/3D89
WAIT #1 ; 028920/0601
JMP DATA8_02890E ; 028922/1A0E89
DATA8_028925:
UNK_TASK #1 ; 028925/1401
TASK DATA8_028943 ; 028927/084389
RTS ; 02892A/1C
DATA8_02892B:
UNK_TASK #1 ; 02892B/1401
TASK DATA8_028946 ; 02892D/084689
RTS ; 028930/1C
DATA8_028931:
UNK_TASK #1 ; 028931/1401
TASK DATA8_028949 ; 028933/084989
RTS ; 028936/1C
DATA8_028937:
UNK_TASK #1 ; 028937/1401
TASK DATA8_028951 ; 028939/085189
RTS ; 02893C/1C
DATA8_02893D:
UNK_TASK #1 ; 02893D/1401
TASK DATA8_028961 ; 02893F/086189
RTS ; 028942/1C
DATA8_028943:
SET_ANIM #4,WAIT #1 ; 028943/3104
HALT ; 028945/0A
DATA8_028946:
SET_ANIM #3,WAIT #1 ; 028946/3103
HALT ; 028948/0A
DATA8_028949:
SET_ANIM #4,WAIT #1 ; 028949/3104
INC_ANIM WAIT #1 ; 02894B/A9
INC_ANIM WAIT #1 ; 02894C/A9
DEC_ANIM WAIT #1 ; 02894D/B1
JMP DATA8_028949 ; 02894E/1A4989
DATA8_028951:
SET_ANIM #4 ; 028951/3004
WAIT #56 ; 028953/0638
INC_ANIM ; 028955/A8
WAIT #32 ; 028956/0620
INC_ANIM ; 028958/A8
WAIT #36 ; 028959/0624
DEC_ANIM ; 02895B/B0
WAIT #36 ; 02895C/0624
JMP DATA8_028951 ; 02895E/1A5189
DATA8_028961:
SET_ANIM #4 ; 028961/3004
WAIT #14 ; 028963/060E
INC_ANIM ; 028965/A8
WAIT #8 ; 028966/0608
INC_ANIM ; 028968/A8
WAIT #9 ; 028969/0609
DEC_ANIM ; 02896B/B0
WAIT #9 ; 02896C/0609
JMP DATA8_028961 ; 02896E/1A6189
$0289B9 - Enemy 09: Gurgeon
LoadData_Enemy09:
JSL ASM_Battle_Prep ; 0289B9/04249102
DATA8_0289BD:
ON_TICK CODE_028A4F ; 0289BD/094F8A02
JMP DATA8_0289E7 ; 0289C1/1AE789
L_0289C4:
TASK DATA8_0289E7 ; 0289C4/08E789
JSL ASM_Wrapper_Enemy_Turn ; 0289C7/04119102
JEQ DATA8_0289D9 ; 0289CB/0BD989
UNK_TASK #1 ; 0289CE/1401
UNK_TASK #1 ; 0289D0/1401
JMP DATA8_0289BD ; 0289D2/1ABD89
L_0289D5:
JSL Sub_Enemy_death_anim ; 0289D5/04248F02
DATA8_0289D9:
MOV REG,VAR2 ; 0289D9/2402
ASM_CALL Condition_Check_2b ; 0289DB/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 0289DF/0100
JEQ DATA8_0289BD ; 0289E1/0BBD89
JMP SFX_Dies_Enemy ; 0289E4/1AF190
DATA8_0289E7:
MOV REG,VAR2 ; 0289E7/2402
ASM_CALL Clear_Condition_mirror ; 0289E9/07F08107 // Clear Condition mirror
TASK DATA8_028A41 ; 0289ED/08418A
DATA8_0289F0:
MOV REG,VAR2 ; 0289F0/2402
ASM_CALL Sub_Get_Condition_Change ; 0289F2/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 0289F6/1205
.word DATA8_028A07 ; 0289F8/078A
.word DATA8_028A0D ; 0289FA/0D8A
.word DATA8_028A13 ; 0289FC/138A
.word DATA8_028A19 ; 0289FE/198A
.word DATA8_028A1F ; 028A00/1F8A
WAIT #1 ; 028A02/0601
JMP DATA8_0289F0 ; 028A04/1AF089
DATA8_028A07:
UNK_TASK #1 ; 028A07/1401
TASK DATA8_028A25 ; 028A09/08258A
RTS ; 028A0C/1C
DATA8_028A0D:
UNK_TASK #1 ; 028A0D/1401
TASK DATA8_028A28 ; 028A0F/08288A
RTS ; 028A12/1C
DATA8_028A13:
UNK_TASK #1 ; 028A13/1401
TASK DATA8_028A2B ; 028A15/082B8A
RTS ; 028A18/1C
DATA8_028A19:
UNK_TASK #1 ; 028A19/1401
TASK DATA8_028A33 ; 028A1B/08338A
RTS ; 028A1E/1C
DATA8_028A1F:
UNK_TASK #1 ; 028A1F/1401
TASK DATA8_028A41 ; 028A21/08418A
RTS ; 028A24/1C
DATA8_028A25:
SET_ANIM #6,WAIT #1 ; 028A25/3106
HALT ; 028A27/0A
DATA8_028A28:
SET_ANIM #3,WAIT #1 ; 028A28/3103
HALT ; 028A2A/0A
DATA8_028A2B:
SET_ANIM #6,WAIT #1 ; 028A2B/3106
SET_ANIM #4,WAIT #1 ; 028A2D/3104
INC_ANIM WAIT #1 ; 028A2F/A9
JMP DATA8_028A2B ; 028A30/1A2B8A
DATA8_028A33:
SET_ANIM #6 ; 028A33/3006
WAIT #208 ; 028A35/06D0
SET_ANIM #4 ; 028A37/3004
WAIT #44 ; 028A39/062C
INC_ANIM ; 028A3B/A8
WAIT #36 ; 028A3C/0624
JMP DATA8_028A33 ; 028A3E/1A338A
DATA8_028A41:
SET_ANIM #6 ; 028A41/3006
WAIT #52 ; 028A43/0634
SET_ANIM #4 ; 028A45/3004
WAIT #11 ; 028A47/060B
INC_ANIM ; 028A49/A8
WAIT #9 ; 028A4A/0609
JMP DATA8_028A41 ; 028A4C/1A418A
$028A97 - Enemy 0A: Jell
LoadData_Enemy0A:
JSL ASM_Battle_Prep ; 028A97/04249102
DATA8_028A9B:
ON_TICK CODE_028B8B ; 028A9B/098B8B02
JMP DATA8_028AC5 ; 028A9F/1AC58A
L_028AA2:
TASK DATA8_028AC5 ; 028AA2/08C58A
JSL ASM_Wrapper_Enemy_Turn ; 028AA5/04119102
JEQ DATA8_028AB7 ; 028AA9/0BB78A
UNK_TASK #1 ; 028AAC/1401
UNK_TASK #1 ; 028AAE/1401
JMP DATA8_028A9B ; 028AB0/1A9B8A
L_028AB3:
JSL Sub_Enemy_death_anim ; 028AB3/04248F02
DATA8_028AB7:
MOV REG,VAR2 ; 028AB7/2402
ASM_CALL Condition_Check_2b ; 028AB9/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028ABD/0100
JEQ DATA8_028A9B ; 028ABF/0B9B8A
JMP SFX_Dies_Enemy ; 028AC2/1AF190
DATA8_028AC5:
MOV REG,VAR2 ; 028AC5/2402
ASM_CALL Clear_Condition_mirror ; 028AC7/07F08107 // Clear Condition mirror
TASK DATA8_028B65 ; 028ACB/08658B
DATA8_028ACE:
MOV REG,VAR2 ; 028ACE/2402
ASM_CALL Sub_Get_Condition_Change ; 028AD0/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 028AD4/1205
.word DATA8_028AE5 ; 028AD6/E58A
.word DATA8_028AEB ; 028AD8/EB8A
.word DATA8_028AF1 ; 028ADA/F18A
.word DATA8_028AF7 ; 028ADC/F78A
.word DATA8_028AFD ; 028ADE/FD8A
WAIT #1 ; 028AE0/0601
JMP DATA8_028ACE ; 028AE2/1ACE8A
DATA8_028AE5:
UNK_TASK #1 ; 028AE5/1401
TASK DATA8_028B03 ; 028AE7/08038B
RTS ; 028AEA/1C
DATA8_028AEB:
UNK_TASK #1 ; 028AEB/1401
TASK DATA8_028B06 ; 028AED/08068B
RTS ; 028AF0/1C
DATA8_028AF1:
UNK_TASK #1 ; 028AF1/1401
TASK DATA8_028B09 ; 028AF3/08098B
RTS ; 028AF6/1C
DATA8_028AF7:
UNK_TASK #1 ; 028AF7/1401
TASK DATA8_028B2D ; 028AF9/082D8B
RTS ; 028AFC/1C
DATA8_028AFD:
UNK_TASK #1 ; 028AFD/1401
TASK DATA8_028B65 ; 028AFF/08658B
RTS ; 028B02/1C
DATA8_028B03:
SET_ANIM #4,WAIT #1 ; 028B03/3104
HALT ; 028B05/0A
DATA8_028B06:
SET_ANIM #3,WAIT #1 ; 028B06/3103
HALT ; 028B08/0A
DATA8_028B09:
SET_ANIM #4,WAIT #1 ; 028B09/3104
SET_ANIM #6,WAIT #1 ; 028B0B/3106
INC_ANIM WAIT #1 ; 028B0D/A9
SET_ANIM #5,WAIT #1 ; 028B0E/3105
DEC_ANIM WAIT #1 ; 028B10/B1
SET_ANIM #9,WAIT #1 ; 028B11/3109
INC_ANIM WAIT #1 ; 028B13/A9
SET_ANIM #8,WAIT #1 ; 028B14/3108
SET_ANIM #4,WAIT #1 ; 028B16/3104
SET_ANIM #6,WAIT #1 ; 028B18/3106
INC_ANIM WAIT #1 ; 028B1A/A9
SET_ANIM #5,WAIT #1 ; 028B1B/3105
DEC_ANIM WAIT #1 ; 028B1D/B1
SET_ANIM #9,WAIT #1 ; 028B1E/3109
INC_ANIM WAIT #1 ; 028B20/A9
SET_ANIM #8,WAIT #1 ; 028B21/3108
SET_ANIM #4,WAIT #1 ; 028B23/3104
SET_ANIM #6,WAIT #1 ; 028B25/3106
INC_ANIM WAIT #1 ; 028B27/A9
SET_ANIM #5,WAIT #1 ; 028B28/3105
JMP DATA8_028B09 ; 028B2A/1A098B
DATA8_028B2D:
SET_ANIM #4 ; 028B2D/3004
WAIT #184 ; 028B2F/06B8
SET_ANIM #6 ; 028B31/3006
WAIT #8 ; 028B33/0608
INC_ANIM ; 028B35/A8
WAIT #12 ; 028B36/060C
SET_ANIM #5 ; 028B38/3005
WAIT #8 ; 028B3A/0608
DEC_ANIM ; 028B3C/B0
WAIT #8 ; 028B3D/0608
SET_ANIM #9 ; 028B3F/3009
WAIT #8 ; 028B41/0608
INC_ANIM ; 028B43/A8
WAIT #12 ; 028B44/060C
SET_ANIM #8 ; 028B46/3008
WAIT #8 ; 028B48/0608
SET_ANIM #4 ; 028B4A/3004
WAIT #8 ; 028B4C/0608
SET_ANIM #6,WAIT #4 ; 028B4E/3406
INC_ANIM ; 028B50/A8
WAIT #8 ; 028B51/0608
SET_ANIM #5,WAIT #4 ; 028B53/3405
DEC_ANIM WAIT #4 ; 028B55/B4
SET_ANIM #9,WAIT #4 ; 028B56/3409
INC_ANIM WAIT #4 ; 028B58/AC
SET_ANIM #8,WAIT #4 ; 028B59/3408
SET_ANIM #4,WAIT #4 ; 028B5B/3404
SET_ANIM #6,WAIT #4 ; 028B5D/3406
INC_ANIM WAIT #4 ; 028B5F/AC
SET_ANIM #5,WAIT #4 ; 028B60/3405
JMP DATA8_028B2D ; 028B62/1A2D8B
DATA8_028B65:
SET_ANIM #4 ; 028B65/3004
WAIT #46 ; 028B67/062E
SET_ANIM #6,WAIT #2 ; 028B69/3206
INC_ANIM WAIT #3 ; 028B6B/AB
SET_ANIM #5,WAIT #2 ; 028B6C/3205
DEC_ANIM WAIT #2 ; 028B6E/B2
SET_ANIM #9,WAIT #2 ; 028B6F/3209
INC_ANIM WAIT #3 ; 028B71/AB
SET_ANIM #8,WAIT #2 ; 028B72/3208
SET_ANIM #4,WAIT #2 ; 028B74/3204
SET_ANIM #6,WAIT #1 ; 028B76/3106
INC_ANIM WAIT #2 ; 028B78/AA
SET_ANIM #5,WAIT #1 ; 028B79/3105
DEC_ANIM WAIT #1 ; 028B7B/B1
SET_ANIM #9,WAIT #1 ; 028B7C/3109
INC_ANIM WAIT #1 ; 028B7E/A9
SET_ANIM #8,WAIT #1 ; 028B7F/3108
SET_ANIM #4,WAIT #1 ; 028B81/3104
SET_ANIM #6,WAIT #1 ; 028B83/3106
INC_ANIM WAIT #1 ; 028B85/A9
SET_ANIM #5,WAIT #1 ; 028B86/3105
JMP DATA8_028B65 ; 028B88/1A658B
$028BD3 - Enemy 0B: Stone Guardina
LoadData_Enemy0B:
JSL ASM_Battle_Prep ; 028BD3/04249102
DATA8_028BD7:
ON_TICK CODE_028C11 ; 028BD7/09118C02
JMP DATA8_028C03 ; 028BDB/1A038C
L_028BDE:
TASK DATA8_028C03 ; 028BDE/08038C
JSL ASM_Wrapper_Enemy_Turn ; 028BE1/04119102
JMP DATA8_028BD7 ; 028BE5/1AD78B
L_028BE8:
ASM_CALL GetSet_SFX_1b ; 028BE8/07449C00 // Get/Set Sound Effect
.byte 7 ; 028BEC/07
SET_ANIM #5 ; 028BED/3005
WAIT #28 ; 028BEF/061C
SET_ANIM #4 ; 028BF1/3004
WAIT #28 ; 028BF3/061C
MOV REG,VAR2 ; 028BF5/2402
ASM_CALL Condition_Check_2b ; 028BF7/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028BFB/0100
JEQ DATA8_028BD7 ; 028BFD/0BD78B
JMP DATA8_0290F9 ; 028C00/1AF990
DATA8_028C03:
SET_ANIM #0 ; 028C03/3000
WAIT #86 ; 028C05/0656
SET_ANIM #2 ; 028C07/3002
WAIT #32 ; 028C09/0620
INC_ANIM ; 028C0B/A8
WAIT #9 ; 028C0C/0609
JMP DATA8_028C03 ; 028C0E/1A038C
$028C59 - Enemy 0C: Iron Guardian
LoadData_Enemy0C:
JSL ASM_Battle_Prep ; 028C59/04249102
DATA8_028C5D:
ON_TICK CODE_028C97 ; 028C5D/09978C02
JMP DATA8_028C89 ; 028C61/1A898C
L_028C64:
TASK DATA8_028C89 ; 028C64/08898C
JSL ASM_Wrapper_Enemy_Turn ; 028C67/04119102
JMP DATA8_028C5D ; 028C6B/1A5D8C
L_028C6E:
ASM_CALL GetSet_SFX_1b ; 028C6E/07449C00 // Get/Set Sound Effect
.byte 7 ; 028C72/07
SET_ANIM #5 ; 028C73/3005
WAIT #28 ; 028C75/061C
SET_ANIM #4 ; 028C77/3004
WAIT #28 ; 028C79/061C
MOV REG,VAR2 ; 028C7B/2402
ASM_CALL Condition_Check_2b ; 028C7D/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028C81/0100
JEQ DATA8_028C5D ; 028C83/0B5D8C
JMP DATA8_0290F9 ; 028C86/1AF990
DATA8_028C89:
SET_ANIM #0 ; 028C89/3000
WAIT #86 ; 028C8B/0656
SET_ANIM #2 ; 028C8D/3002
WAIT #32 ; 028C8F/0620
INC_ANIM ; 028C91/A8
WAIT #9 ; 028C92/0609
JMP DATA8_028C89 ; 028C94/1A898C
$028CDF - Sub: Enemy Turn, Status Handling, Attack Animation, Target Selection
ASM_Enemy_Turn:
ASM_CALL Get_enemy_ID_from_103F_far ; 028CDF/072A9107
ASM_CALL Get_EnemyX_Name ; 028CE3/071CB507
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 028CE7/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Red ; 028CEB/8C950D
.byte $02 ; 028CEE/02
.word 2 ; 028CEF/0200
MOV REG,VAR2 ; 028CF1/2402
ASM_CALL Get_Condition1 ; 028CF3/07298207
MULTI_JMP #5 ; 028CF7/1105
.word X_paralyzed ; 028CF9/038D
.word X_petrified ; 028CFB/0E8D
.word X_confused ; 028CFD/198D
.word X_asleep ; 028CFF/278D
.word Enemy_Target_Select ; 028D01/508D
X_paralyzed:
ASM_CALL Setup_Text_Parser_3b_1b ; 028D03/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsParalyzed ; 028D07/368908
.byte $00 ; 028D0A/00
JMP Sub_Battle_Pause_End ; 028D0B/1A658F
X_petrified:
ASM_CALL Setup_Text_Parser_3b_1b ; 028D0E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsPetrified ; 028D12/4E8908
.byte $00 ; 028D15/00
JMP Sub_Battle_Pause_End ; 028D16/1A658F
X_confused:
ASM_CALL Setup_Text_Parser_3b_1b ; 028D19/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsConfused ; 028D1D/668908
.byte $00 ; 028D20/00
JSR Sub_Battle_Pause_End ; 028D21/1B658F
JMP Confusion_Targeting ; 028D24/1A658D
X_asleep:
ASM_CALL Setup_Text_Parser_3b_1b ; 028D27/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsAsleep ; 028D2B/7D8908
.byte $00 ; 028D2E/00
JSR Sub_Battle_Pause_End ; 028D2F/1B658F
ASM_CALL RNG_1b ; 028D32/07BDA000 // RNG = Random Number Generator
.byte 4 ; 028D36/04
JEQ X_awakened ; 028D37/0B3B8D
RTS ; 028D3A/1C
X_awakened:
ASM_CALL Setup_Text_Parser_3b_1b ; 028D3B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long HasAwakened ; 028D3F/928908
.byte $00 ; 028D42/00
JSR Sub_Battle_Pause_End ; 028D43/1B658F
ASM_CALL Set_Condition_4b ; 028D46/071CB107 // Set Condition
.word $0002 ; 028D4A/0200
.word $0000 ; 028D4C/0000
WAIT #1 ; 028D4E/0601
Enemy_Target_Select:
ASM_CALL RNG_1b ; 028D50/07BDA000 // RNG = Random Number Generator
.byte 4 ; 028D54/04
MULTI_JSR #4 ; 028D55/1204
.word Rooks_Targetable ; 028D57/8A8D
.word Spirit_Targetable ; 028D59/B38D
.word Guest1_Targetable ; 028D5B/DC8D
.word Guest2_Targetable ; 028D5D/058E
JEQ Enemy_Target_Select ; 028D5F/0B508D
JMP Enemy_Action ; 028D62/1A838E
Confusion_Targeting:
ASM_CALL RNG_1b ; 028D65/07BDA000 // RNG = Random Number Generator
.byte 12 ; 028D69/0C
MULTI_JSR #12 ; 028D6A/120C
.word Rooks_Targetable ; 028D6C/8A8D
.word Spirit_Targetable ; 028D6E/B38D
.word Guest1_Targetable ; 028D70/DC8D
.word Guest2_Targetable ; 028D72/058E
.word Enemy1_8_Targetable ; 028D74/2E8E
.word DATA8_028E35 ; 028D76/358E
.word DATA8_028E3C ; 028D78/3C8E
.word DATA8_028E43 ; 028D7A/438E
.word DATA8_028E4A ; 028D7C/4A8E
.word DATA8_028E51 ; 028D7E/518E
.word DATA8_028E58 ; 028D80/588E
.word DATA8_028E5F ; 028D82/5F8E
JEQ Confusion_Targeting ; 028D84/0B658D
JMP Enemy_Action ; 028D87/1A838E
Rooks_Targetable:
MOV REG,#$0000 ; 028D8A/1E0000
ASM_CALL Condition_Check_2b ; 028D8D/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0002 ; 028D91/0200
JNE Invalid_Target ; 028D93/0C7B8E
MOV REG,#$0000 ; 028D96/1E0000
ASM_CALL Condition_Check_2b ; 028D99/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028D9D/0100
JNE Invalid_Target ; 028D9F/0C7B8E
MOV VAR3,#$0000 ; 028DA2/0F030000
ASM_CALL Load_Object_Var_2b ; 028DA6/07A1B407 // Load object var [0-3]
.word $0003 ; 028DAA/0300
ASM_CALL Get_PC_name2 ; 028DAC/07FEB407
JMP Valid_Target ; 028DB0/1A7F8E
Spirit_Targetable:
MOV REG,#$0001 ; 028DB3/1E0100
ASM_CALL Condition_Check_2b ; 028DB6/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0002 ; 028DBA/0200
JNE Invalid_Target ; 028DBC/0C7B8E
MOV REG,#$0001 ; 028DBF/1E0100
ASM_CALL Condition_Check_2b ; 028DC2/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028DC6/0100
JNE Invalid_Target ; 028DC8/0C7B8E
MOV VAR3,#$0001 ; 028DCB/0F030100
ASM_CALL Load_Object_Var_2b ; 028DCF/07A1B407 // Load object var [0-3]
.word $0003 ; 028DD3/0300
ASM_CALL Get_PC_name2 ; 028DD5/07FEB407
JMP Valid_Target ; 028DD9/1A7F8E
Guest1_Targetable:
MOV REG,#$0002 ; 028DDC/1E0200
ASM_CALL Condition_Check_2b ; 028DDF/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0002 ; 028DE3/0200
JNE Invalid_Target ; 028DE5/0C7B8E
MOV REG,#$0002 ; 028DE8/1E0200
ASM_CALL Condition_Check_2b ; 028DEB/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028DEF/0100
JNE Invalid_Target ; 028DF1/0C7B8E
MOV VAR3,#$0002 ; 028DF4/0F030200
ASM_CALL Load_Object_Var_2b ; 028DF8/07A1B407 // Load object var [0-3]
.word $0003 ; 028DFC/0300
ASM_CALL Get_PC_name2 ; 028DFE/07FEB407
JMP Valid_Target ; 028E02/1A7F8E
Guest2_Targetable:
MOV REG,#$0003 ; 028E05/1E0300
ASM_CALL Condition_Check_2b ; 028E08/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0002 ; 028E0C/0200
JNE Invalid_Target ; 028E0E/0C7B8E
MOV REG,#$0003 ; 028E11/1E0300
ASM_CALL Condition_Check_2b ; 028E14/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028E18/0100
JNE Invalid_Target ; 028E1A/0C7B8E
MOV VAR3,#$0003 ; 028E1D/0F030300
ASM_CALL Load_Object_Var_2b ; 028E21/07A1B407 // Load object var [0-3]
.word $0003 ; 028E25/0300
ASM_CALL Get_PC_name2 ; 028E27/07FEB407
JMP Valid_Target ; 028E2B/1A7F8E
Enemy1_8_Targetable:
MOV VAR3,#$0004 ; 028E2E/0F030400
JMP Enemy_Dead_Check ; 028E32/1A638E
DATA8_028E35:
MOV VAR3,#$0005 ; 028E35/0F030500
JMP Enemy_Dead_Check ; 028E39/1A638E
DATA8_028E3C:
MOV VAR3,#$0006 ; 028E3C/0F030600
JMP Enemy_Dead_Check ; 028E40/1A638E
DATA8_028E43:
MOV VAR3,#$0007 ; 028E43/0F030700
JMP Enemy_Dead_Check ; 028E47/1A638E
DATA8_028E4A:
MOV VAR3,#$0008 ; 028E4A/0F030800
JMP Enemy_Dead_Check ; 028E4E/1A638E
DATA8_028E51:
MOV VAR3,#$0009 ; 028E51/0F030900
JMP Enemy_Dead_Check ; 028E55/1A638E
DATA8_028E58:
MOV VAR3,#$000A ; 028E58/0F030A00
JMP Enemy_Dead_Check ; 028E5C/1A638E
DATA8_028E5F:
MOV VAR3,#$000B ; 028E5F/0F030B00
Enemy_Dead_Check:
MOV REG,VAR3 ; 028E63/2403
ASM_CALL Condition_Check_2b ; 028E65/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 028E69/0100
JNE Invalid_Target ; 028E6B/0C7B8E
MOV REG,VAR3 ; 028E6E/2403
ASM_CALL CODE_FL_079139 ; 028E70/07399107
ASM_CALL Get_Enemy_Name ; 028E74/07BAB507
JMP Valid_Target ; 028E78/1A7F8E
Invalid_Target:
MOV REG,#$0000 ; 028E7B/1E0000
RTS ; 028E7E/1C
Valid_Target:
MOV REG,#$0001 ; 028E7F/1E0100
RTS ; 028E82/1C
Enemy_Action:
ASM_CALL Enemy_spellcast_check ; 028E83/07728207
JEQ Enemy_Physical_Attack ; 028E87/0BB68E
Enemy_Spell_Attack:
ASM_CALL RNG_1b ; 028E8A/07BDA000 // RNG = Random Number Generator
.byte 4 ; 028E8E/04
MULTI_JSR #4 ; 028E8F/1204
.word Rooks_Targetable ; 028E91/8A8D
.word Spirit_Targetable ; 028E93/B38D
.word Guest1_Targetable ; 028E95/DC8D
.word Guest2_Targetable ; 028E97/058E
JEQ Enemy_Spell_Attack ; 028E99/0B8A8E
ASM_CALL Set_attacker_target_using_var3; 028E9C/076B9107
ASM_CALL Cast_Spell ; 028EA0/07ACBF07
JSL DATA8_05F480 ; 028EA4/0480F405
ASM_CALL Get_enemy_ID_from_103F_far ; 028EA8/072A9107
ASM_CALL Boss_monster ; 028EAC/072D8307
JEQ DATA8_028EB5 ; 028EB0/0BB58E
UNK_TASK #1 ; 028EB3/1401
DATA8_028EB5:
RTS ; 028EB5/1C
Enemy_Physical_Attack:
ASM_CALL Setup_Text_Parser_3b_1b ; 028EB6/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long X_Attacks ; 028EBA/928408
.byte $00 ; 028EBD/00
JSR Sub_Battle_Pause_End ; 028EBE/1B658F
JSR Sub_Attack_Animation ; 028EC1/1B798F
WAIT #2 ; 028EC4/0602
ASM_CALL Set_attacker_target_using_var3; 028EC6/076B9107
ASM_CALL Is_Targeting_another ; 028ECA/077D9107
JEQ Confusion_damage ; 028ECE/0BE28E
ASM_CALL Call_Roll_to_hit ; 028ED1/078D9107
JEQ Ally_Dodge ; 028ED5/0B618F
ASM_CALL Is_Fatal_damage ; 028ED8/07B88C07
JEQ Ally_Nonfatal_damage ; 028EDC/0B378F
JMP Ally_Fatal_damage ; 028EDF/1A4C8F
Confusion_damage:
ASM_CALL Call_Roll_to_hit ; 028EE2/078D9107
JEQ Enemy_Surprised_by_his_wounds; 028EE6/0B148F
ASM_CALL Is_Fatal_damage ; 028EE9/07B88C07
JEQ Enemy_despises_himself ; 028EED/0B048F
Enemy_lost_his_mind:
ASM_CALL Setup_Text_Parser_3b_1b ; 028EF0/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Lost_His_Mind ; 028EF4/AF8508
.byte $00 ; 028EF7/00
JSR Sub_Battle_Pause_End ; 028EF8/1B658F
UNK_TASK #1 ; 028EFB/1401
UNK_TASK #1 ; 028EFD/1401
JSL Sub_Enemy_death_anim ; 028EFF/04248F02
RTS ; 028F03/1C
Enemy_despises_himself:
ASM_CALL Setup_Text_Parser_3b_1b ; 028F04/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Despises_Himself ; 028F08/C88508
.byte $00 ; 028F0B/00
JSR Sub_Battle_Pause_End ; 028F0C/1B658F
UNK_TASK #1 ; 028F0F/1401
UNK_TASK #1 ; 028F11/1401
RTS ; 028F13/1C
Enemy_Surprised_by_his_wounds:
ASM_CALL Setup_Text_Parser_3b_1b ; 028F14/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Surprised_by_wounds ; 028F18/DF8508
.byte $00 ; 028F1B/00
JSR Sub_Battle_Pause_End ; 028F1C/1B658F
UNK_TASK #1 ; 028F1F/1401
UNK_TASK #1 ; 028F21/1401
RTS ; 028F23/1C
Sub_Enemy_death_anim:
ASM_CALL GetSet_SFX_1b ; 028F24/07449C00 // Get/Set Sound Effect
.byte 7 ; 028F28/07
MOV REG,#$0007 ; 028F29/1E0700
ASM_CALL GetAttackAnimation ; 028F2C/07E68218 // Get Attack Animation - Takes in an attack animation 0-7 (Sword, Bite, Splash, Claw, Sting, Punch) (6=??) (7=Damaged Star)
SET_ANIM #0,WAIT #1 ; 028F30/3100
INC_ANIM WAIT #4 ; 028F32/AC
DEC_ANIM WAIT #1 ; 028F33/B1
SET_ANIM #2,WAIT #4 ; 028F34/3402
RTL ; 028F36/05
Ally_Nonfatal_damage:
ASM_CALL Sub_Battle_Say_Ouch ; 028F37/0755B707 // Battle: Show ouch! text
JEQ DATA8_028F41 ; 028F3B/0B418F
JSR Sub_Battle_Pause_End ; 028F3E/1B658F
DATA8_028F41:
ASM_CALL Setup_Text_Parser_3b_1b ; 028F41/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long X_taken_damage ; 028F45/868508
.byte $00 ; 028F48/00
JMP Sub_Battle_Pause_End ; 028F49/1A658F
Ally_Fatal_damage:
ASM_CALL Sub_Battle_Say_Ouch ; 028F4C/0755B707 // Battle: Show ouch! text
JEQ DATA8_028F56 ; 028F50/0B568F
JSR Sub_Battle_Pause_End ; 028F53/1B658F
DATA8_028F56:
ASM_CALL Setup_Text_Parser_3b_1b ; 028F56/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long X_damaged_perished ; 028F5A/3E8508
.byte $00 ; 028F5D/00
JMP Sub_Battle_Pause_End ; 028F5E/1A658F
Ally_Dodge:
ASM_CALL Show_Dodge_text ; 028F61/07A6B707 // Battle: Show dodge text
Sub_Battle_Pause_End:
WAIT #1 ; 028F65/0601
ASM_CALL Some_1095_check_1b ; 028F67/074FBA07 // Some pause status check
.byte $00 ; 028F6B/00
JEQ Sub_Battle_Pause_End ; 028F6C/0B658F
MOV REG,Text_Line_Speed ; 028F6F/1F9710
MOV VAR0,REG ; 028F72/2300
WAIT VAR0 ; 028F74/2500
WAIT #10 ; 028F76/060A
RTS ; 028F78/1C
Sub_Attack_Animation:
ASM_CALL Get_enemy_ID_from_103F_far ; 028F79/072A9107
ASM_CALL Boss_monster ; 028F7D/072D8307
JNE Get_Boss_attack_animation ; 028F81/0CBD8F
MOV REG,VAR2 ; 028F84/2402
ASM_CALL Store_A_in_11B5_x_1b ; 028F86/079EAF07 // Store [val] in $11B5
.byte 0 ; 028F8A/00
MOV REG,VAR3 ; 028F8B/2403
ASM_CALL Store_A_in_11B5_x_1b ; 028F8D/079EAF07 // Store [val] in $11B5
.byte 1 ; 028F91/01
ASM_CALL Get_enemy_ID_from_103F_far ; 028F92/072A9107
ASM_CALL Store_A_in_11B5_x_1b ; 028F96/079EAF07 // Store [val] in $11B5
.byte 2 ; 028F9A/02
ASM_CALL Load_Sprite_1b_1b_12b ; 028F9B/07AE9C00 // Load Sprite
.byte 0 ; 028F9F/00
.byte 10 ; 028FA0/0A
.word 16 ; 028FA1/1000
.word 0 ; 028FA3/0000
.word 0 ; 028FA5/0000
.word 0 ; 028FA7/0000
.word 0 ; 028FA9/0000
.word 0 ; 028FAB/0000
Wait_for_Atk_anim:
ASM_CALL Store_A_in_11B5_x_1b ; 028FAD/079EAF07 // Store [val] in $11B5
.byte 3 ; 028FB1/03
DATA8_028FB2:
WAIT #1 ; 028FB2/0601
ASM_CALL Is_Enemy_Attack_Done_1b ; 028FB4/076CAF07 // Is Enemy [x] Attack Done?
.byte 3 ; 028FB8/03
JEQ DATA8_028FB2 ; 028FB9/0BB28F
RTS ; 028FBC/1C
Get_Boss_attack_animation:
UNK_TASK #1 ; 028FBD/1401
ASM_CALL Get_enemy_ID_from_103F_far ; 028FBF/072A9107
ASM_CALL Get_Boss_num ; 028FC3/07248307
MULTI_JMP #16 ; 028FC7/1110
.word Atk_Stone_Guardian ; 028FC9/EA8F
.word Atk_Iron_Guardian ; 028FCB/FC8F
.word Atk_Cyclops ; 028FCD/0E90
.word Atk_Efrite ; 028FCF/1A90
.word Atk_Zerel ; 028FD1/2290
.word Atk_Hydra ; 028FD3/2D90
.word Atk_Sauza ; 028FD5/3C90
.word Atk_Darah ; 028FD7/4D90
.word Atk_Barah ; 028FD9/5990
.word Atk_Ariel ; 028FDB/6E90
.word Atk_Teefa ; 028FDD/7990
.word Atk_Karul ; 028FDF/8490
.word Atk_Galneon1 ; 028FE1/8F90
.word Atk_Galneon2 ; 028FE3/9A90
.word Atk_Rimsala1 ; 028FE5/A590
.word Atk_Rimsala2 ; 028FE7/B990
RTS ; 028FE9/1C
Atk_Stone_Guardian:
JSR SFX_Atk_Enemy ; 028FEA/1BE590
SET_ANIM #0 ; 028FED/3000
WAIT #1 ; 028FEF/0601
INC_ANIM ; 028FF1/A8
WAIT #24 ; 028FF2/0618
SET_ANIM #0 ; 028FF4/3000
WAIT #16 ; 028FF6/0610
INC_ANIM ; 028FF8/A8
WAIT #24 ; 028FF9/0618
RTS ; 028FFB/1C
Atk_Iron_Guardian:
JSR SFX_Atk_Enemy ; 028FFC/1BE590
SET_ANIM #0 ; 028FFF/3000
WAIT #1 ; 029001/0601
INC_ANIM ; 029003/A8
WAIT #24 ; 029004/0618
SET_ANIM #0 ; 029006/3000
WAIT #16 ; 029008/0610
INC_ANIM ; 02900A/A8
WAIT #24 ; 02900B/0618
RTS ; 02900D/1C
Atk_Cyclops:
JSR SFX_Atk_Enemy ; 02900E/1BE590
SET_ANIM #4 ; 029011/3004
WAIT #6 ; 029013/0606
INC_ANIM WAIT #4 ; 029015/AC
INC_ANIM ; 029016/A8
WAIT #46 ; 029017/062E
RTS ; 029019/1C
Atk_Efrite:
JSR SFX_Atk_Enemy ; 02901A/1BE590
SET_ANIM #7 ; 02901D/3007
WAIT #48 ; 02901F/0630
RTS ; 029021/1C
Atk_Zerel:
JSR SFX_Atk_Enemy ; 029022/1BE590
SET_ANIM #3 ; 029025/3003
WAIT #20 ; 029027/0614
INC_ANIM ; 029029/A8
WAIT #10 ; 02902A/060A
RTS ; 02902C/1C
Atk_Hydra:
JSR SFX_Atk_Enemy ; 02902D/1BE590
SET_ANIM #4 ; 029030/3004
WAIT #8 ; 029032/0608
SET_ANIM #6 ; 029034/3006
WAIT #16 ; 029036/0610
INC_ANIM ; 029038/A8
WAIT #32 ; 029039/0620
RTS ; 02903B/1C
Atk_Sauza:
SET_ANIM #3 ; 02903C/3003
WAIT #20 ; 02903E/0614
JSR SFX_Atk_Enemy ; 029040/1BE590
INC_ANIM ; 029043/A8
WAIT #10 ; 029044/060A
INC_ANIM ; 029046/A8
WAIT #13 ; 029047/060D
INC_ANIM ; 029049/A8
WAIT #10 ; 02904A/060A
RTS ; 02904C/1C
Atk_Darah:
JSR SFX_Atk_Enemy ; 02904D/1BE590
SET_ANIM #5 ; 029050/3005
WAIT #12 ; 029052/060C
INC_ANIM WAIT #3 ; 029054/AB
INC_ANIM ; 029055/A8
WAIT #14 ; 029056/060E
RTS ; 029058/1C
Atk_Barah:
JSR SFX_Atk_Enemy ; 029059/1BE590
START_LOOP #4 ; 02905C/0104
SET_ANIM #3,WAIT #1 ; 02905E/3103
SET_ANIM #5,WAIT #3 ; 029060/3305
SET_ANIM #3,WAIT #1 ; 029062/3103
SET_ANIM #6,WAIT #3 ; 029064/3306
SET_ANIM #3,WAIT #1 ; 029066/3103
SET_ANIM #7,WAIT #3 ; 029068/3307
END_LOOP ; 02906A/02
SET_ANIM #4,WAIT #3 ; 02906B/3304
RTS ; 02906D/1C
Atk_Ariel:
SET_ANIM #3 ; 02906E/3003
WAIT #20 ; 029070/0614
JSR SFX_Atk_Enemy ; 029072/1BE590
INC_ANIM ; 029075/A8
WAIT #10 ; 029076/060A
RTS ; 029078/1C
Atk_Teefa:
SET_ANIM #3 ; 029079/3003
WAIT #20 ; 02907B/0614
JSR SFX_Atk_Enemy ; 02907D/1BE590
INC_ANIM ; 029080/A8
WAIT #10 ; 029081/060A
RTS ; 029083/1C
Atk_Karul:
SET_ANIM #3 ; 029084/3003
WAIT #20 ; 029086/0614
JSR SFX_Atk_Enemy ; 029088/1BE590
INC_ANIM ; 02908B/A8
WAIT #10 ; 02908C/060A
RTS ; 02908E/1C
Atk_Galneon1:
SET_ANIM #3 ; 02908F/3003
WAIT #20 ; 029091/0614
JSR SFX_Atk_Enemy ; 029093/1BE590
INC_ANIM ; 029096/A8
WAIT #10 ; 029097/060A
RTS ; 029099/1C
Atk_Galneon2:
SET_ANIM #3 ; 02909A/3003
WAIT #20 ; 02909C/0614
JSR SFX_Atk_Enemy ; 02909E/1BE590
INC_ANIM ; 0290A1/A8
WAIT #10 ; 0290A2/060A
RTS ; 0290A4/1C
Atk_Rimsala1:
SET_ANIM #0 ; 0290A5/3000
WAIT #32 ; 0290A7/0620
JSR SFX_Atk_Enemy ; 0290A9/1BE590
SET_ANIM #3 ; 0290AC/3003
WAIT #10 ; 0290AE/060A
SET_ANIM #0 ; 0290B0/3000
WAIT #16 ; 0290B2/0610
SET_ANIM #3 ; 0290B4/3003
WAIT #10 ; 0290B6/060A
RTS ; 0290B8/1C
Atk_Rimsala2:
JSR SFX_Atk_Rimsala ; 0290B9/1BEB90
BGH_DISP #1,#$0000 ; 0290BC/78010000
BGV_DISP #1,#$0000 ; 0290C0/80010000
WAIT #10 ; 0290C4/060A
BGH_DISP #1,#$0000 ; 0290C6/78010000
BGV_DISP #1,#$0100 ; 0290CA/80010001
WAIT #10 ; 0290CE/060A
BGH_DISP #1,#$0100 ; 0290D0/78010001
BGV_DISP #1,#$0100 ; 0290D4/80010001
WAIT #10 ; 0290D8/060A
BGH_DISP #1,#$0000 ; 0290DA/78010000
BGV_DISP #1,#$0100 ; 0290DE/80010001
WAIT #10 ; 0290E2/060A
RTS ; 0290E4/1C
SFX_Atk_Enemy:
ASM_CALL GetSet_SFX_1b ; 0290E5/07449C00 // Get/Set Sound Effect
.byte 1 ; 0290E9/01
RTS ; 0290EA/1C
SFX_Atk_Rimsala:
ASM_CALL GetSet_SFX_1b ; 0290EB/07449C00 // Get/Set Sound Effect
.byte 23 ; 0290EF/17
RTS ; 0290F0/1C
SFX_Dies_Enemy:
ASM_CALL GetSet_SFX_1b ; 0290F1/07449C00 // Get/Set Sound Effect
.byte 47 ; 0290F5/2F
JMP Add_enemy_loot_to_total ; 0290F6/1AFE90
DATA8_0290F9:
ASM_CALL GetSet_SFX_1b ; 0290F9/07449C00 // Get/Set Sound Effect
.byte 2 ; 0290FD/02
Add_enemy_loot_to_total:
ASM_CALL Add_EXP_to_total_won ; 0290FE/074CB407 // Add EXP to total won
ASM_CALL Add_GP_to_total_won ; 029102/075FB407
ASM_CALL Set_Condition_4b ; 029106/071CB107 // Set Condition
.word $0002 ; 02910A/0200
.word $0001 ; 02910C/0100
SET_ANIM #-1 ; 02910E/30FF
END ; 029110/00
ASM_Wrapper_Enemy_Turn:
JSR ASM_Enemy_Turn ; 029111/1BDF8C
MOV REG,#$FFFF ; 029114/1EFFFF
MOV VAR3,REG ; 029117/2303
ASM_CALL Set_1575_from_2b ; 029119/0739AF07 // Set $1575 from [val]
.word 3 ; 02911D/0300
ASM_CALL Is_Targeting_another ; 02911F/077D9107
RTL ; 029123/05
ASM_Battle_Prep:
MOV REG,VAR1 ; 029124/2401
MOV VAR2,REG ; 029126/2302
MOV VAR1,#$0000 ; 029128/0F010000
ASM_CALL Set_Condition_4b ; 02912C/071CB107 // Set Condition
.word $0002 ; 029130/0200
.word $0000 ; 029132/0000
ASM_CALL Get_EnemyID_BattleStats ; 029134/07399102
RTL ; 029138/05
$02919B - Enemy 0D: Bee
LoadData_Enemy0D:
JSL ASM_Battle_Prep ; 02919B/04249102
DATA8_02919F:
ON_TICK CODE_029226 ; 02919F/09269202
JMP DATA8_0291C9 ; 0291A3/1AC991
L_0291A6:
TASK DATA8_0291C9 ; 0291A6/08C991
JSL ASM_Wrapper_Enemy_Turn ; 0291A9/04119102
JEQ DATA8_0291BB ; 0291AD/0BBB91
UNK_TASK #1 ; 0291B0/1401
UNK_TASK #1 ; 0291B2/1401
JMP DATA8_02919F ; 0291B4/1A9F91
L_0291B7:
JSL Sub_Enemy_death_anim ; 0291B7/04248F02
DATA8_0291BB:
MOV REG,VAR2 ; 0291BB/2402
ASM_CALL Condition_Check_2b ; 0291BD/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 0291C1/0100
JEQ DATA8_02919F ; 0291C3/0B9F91
JMP SFX_Dies_Enemy ; 0291C6/1AF190
DATA8_0291C9:
MOV REG,VAR2 ; 0291C9/2402
ASM_CALL Clear_Condition_mirror ; 0291CB/07F08107 // Clear Condition mirror
TASK DATA8_02921F ; 0291CF/081F92
DATA8_0291D2:
MOV REG,VAR2 ; 0291D2/2402
ASM_CALL Sub_Get_Condition_Change ; 0291D4/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 0291D8/1205
.word DATA8_0291E9 ; 0291DA/E991
.word DATA8_0291EF ; 0291DC/EF91
.word DATA8_0291F5 ; 0291DE/F591
.word DATA8_0291FB ; 0291E0/FB91
.word DATA8_029201 ; 0291E2/0192
WAIT #1 ; 0291E4/0601
JMP DATA8_0291D2 ; 0291E6/1AD291
DATA8_0291E9:
UNK_TASK #1 ; 0291E9/1401
TASK DATA8_029207 ; 0291EB/080792
RTS ; 0291EE/1C
DATA8_0291EF:
UNK_TASK #1 ; 0291EF/1401
TASK DATA8_02920A ; 0291F1/080A92
RTS ; 0291F4/1C
DATA8_0291F5:
UNK_TASK #1 ; 0291F5/1401
TASK DATA8_02920D ; 0291F7/080D92
RTS ; 0291FA/1C
DATA8_0291FB:
UNK_TASK #1 ; 0291FB/1401
TASK DATA8_029214 ; 0291FD/081492
RTS ; 029200/1C
DATA8_029201:
UNK_TASK #1 ; 029201/1401
TASK DATA8_02921F ; 029203/081F92
RTS ; 029206/1C
DATA8_029207:
SET_ANIM #4,WAIT #1 ; 029207/3104
HALT ; 029209/0A
DATA8_02920A:
SET_ANIM #3,WAIT #1 ; 02920A/3103
HALT ; 02920C/0A
DATA8_02920D:
SET_ANIM #4,WAIT #1 ; 02920D/3104
INC_ANIM WAIT #1 ; 02920F/A9
INC_ANIM WAIT #1 ; 029210/A9
JMP DATA8_02920D ; 029211/1A0D92
DATA8_029214:
SET_ANIM #4 ; 029214/3004
WAIT #8 ; 029216/0608
INC_ANIM WAIT #4 ; 029218/AC
INC_ANIM ; 029219/A8
WAIT #8 ; 02921A/0608
JMP DATA8_029214 ; 02921C/1A1492
DATA8_02921F:
SET_ANIM #4,WAIT #2 ; 02921F/3204
INC_ANIM WAIT #1 ; 029221/A9
INC_ANIM WAIT #2 ; 029222/AA
JMP DATA8_02921F ; 029223/1A1F92
$02926E - Enemy 0E: Flytrap
LoadData_Enemy0E:
JSL ASM_Battle_Prep ; 02926E/04249102
DATA8_029272:
ON_TICK CODE_0292FF ; 029272/09FF9202
JMP DATA8_02929C ; 029276/1A9C92
L_029279:
TASK DATA8_02929C ; 029279/089C92
JSL ASM_Wrapper_Enemy_Turn ; 02927C/04119102
JEQ DATA8_02928E ; 029280/0B8E92
UNK_TASK #1 ; 029283/1401
UNK_TASK #1 ; 029285/1401
JMP DATA8_029272 ; 029287/1A7292
L_02928A:
JSL Sub_Enemy_death_anim ; 02928A/04248F02
DATA8_02928E:
MOV REG,VAR2 ; 02928E/2402
ASM_CALL Condition_Check_2b ; 029290/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 029294/0100
JEQ DATA8_029272 ; 029296/0B7292
JMP SFX_Dies_Enemy ; 029299/1AF190
DATA8_02929C:
MOV REG,VAR2 ; 02929C/2402
ASM_CALL Clear_Condition_mirror ; 02929E/07F08107 // Clear Condition mirror
TASK DATA8_0292F4 ; 0292A2/08F492
DATA8_0292A5:
MOV REG,VAR2 ; 0292A5/2402
ASM_CALL Sub_Get_Condition_Change ; 0292A7/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 0292AB/1205
.word DATA8_0292BC ; 0292AD/BC92
.word DATA8_0292C2 ; 0292AF/C292
.word DATA8_0292C8 ; 0292B1/C892
.word DATA8_0292CE ; 0292B3/CE92
.word DATA8_0292D4 ; 0292B5/D492
WAIT #1 ; 0292B7/0601
JMP DATA8_0292A5 ; 0292B9/1AA592
DATA8_0292BC:
UNK_TASK #1 ; 0292BC/1401
TASK DATA8_0292DA ; 0292BE/08DA92
RTS ; 0292C1/1C
DATA8_0292C2:
UNK_TASK #1 ; 0292C2/1401
TASK DATA8_0292DD ; 0292C4/08DD92
RTS ; 0292C7/1C
DATA8_0292C8:
UNK_TASK #1 ; 0292C8/1401
TASK DATA8_0292E0 ; 0292CA/08E092
RTS ; 0292CD/1C
DATA8_0292CE:
UNK_TASK #1 ; 0292CE/1401
TASK DATA8_0292E7 ; 0292D0/08E792
RTS ; 0292D3/1C
DATA8_0292D4:
UNK_TASK #1 ; 0292D4/1401
TASK DATA8_0292F4 ; 0292D6/08F492
RTS ; 0292D9/1C
DATA8_0292DA:
SET_ANIM #4,WAIT #1 ; 0292DA/3104
HALT ; 0292DC/0A
DATA8_0292DD:
SET_ANIM #3,WAIT #1 ; 0292DD/3103
HALT ; 0292DF/0A
DATA8_0292E0:
SET_ANIM #4,WAIT #1 ; 0292E0/3104
INC_ANIM WAIT #1 ; 0292E2/A9
INC_ANIM WAIT #1 ; 0292E3/A9
JMP DATA8_0292E0 ; 0292E4/1AE092
DATA8_0292E7:
SET_ANIM #4 ; 0292E7/3004
WAIT #28 ; 0292E9/061C
INC_ANIM ; 0292EB/A8
WAIT #84 ; 0292EC/0654
INC_ANIM ; 0292EE/A8
WAIT #60 ; 0292EF/063C
JMP DATA8_0292E7 ; 0292F1/1AE792
DATA8_0292F4:
SET_ANIM #4,WAIT #7 ; 0292F4/3704
INC_ANIM ; 0292F6/A8
WAIT #21 ; 0292F7/0615
INC_ANIM ; 0292F9/A8
WAIT #15 ; 0292FA/060F
JMP DATA8_0292F4 ; 0292FC/1AF492
$029347 - Enemy 0F: Wolfsbane
LoadData_Enemy0F:
JSL ASM_Battle_Prep ; 029347/04249102
DATA8_02934B:
ON_TICK CODE_0293D8 ; 02934B/09D89302
JMP DATA8_029375 ; 02934F/1A7593
L_029352:
TASK DATA8_029375 ; 029352/087593
JSL ASM_Wrapper_Enemy_Turn ; 029355/04119102
JEQ DATA8_029367 ; 029359/0B6793
UNK_TASK #1 ; 02935C/1401
UNK_TASK #1 ; 02935E/1401
JMP DATA8_02934B ; 029360/1A4B93
L_029363:
JSL Sub_Enemy_death_anim ; 029363/04248F02
DATA8_029367:
MOV REG,VAR2 ; 029367/2402
ASM_CALL Condition_Check_2b ; 029369/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 02936D/0100
JEQ DATA8_02934B ; 02936F/0B4B93
JMP SFX_Dies_Enemy ; 029372/1AF190
DATA8_029375:
MOV REG,VAR2 ; 029375/2402
ASM_CALL Clear_Condition_mirror ; 029377/07F08107 // Clear Condition mirror
TASK DATA8_0293CD ; 02937B/08CD93
DATA8_02937E:
MOV REG,VAR2 ; 02937E/2402
ASM_CALL Sub_Get_Condition_Change ; 029380/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 029384/1205
.word DATA8_029395 ; 029386/9593
.word DATA8_02939B ; 029388/9B93
.word DATA8_0293A1 ; 02938A/A193
.word DATA8_0293A7 ; 02938C/A793
.word DATA8_0293AD ; 02938E/AD93
WAIT #1 ; 029390/0601
JMP DATA8_02937E ; 029392/1A7E93
DATA8_029395:
UNK_TASK #1 ; 029395/1401
TASK DATA8_0293B3 ; 029397/08B393
RTS ; 02939A/1C
DATA8_02939B:
UNK_TASK #1 ; 02939B/1401
TASK DATA8_0293B6 ; 02939D/08B693
RTS ; 0293A0/1C
DATA8_0293A1:
UNK_TASK #1 ; 0293A1/1401
TASK DATA8_0293B9 ; 0293A3/08B993
RTS ; 0293A6/1C
DATA8_0293A7:
UNK_TASK #1 ; 0293A7/1401
TASK DATA8_0293C0 ; 0293A9/08C093
RTS ; 0293AC/1C
DATA8_0293AD:
UNK_TASK #1 ; 0293AD/1401
TASK DATA8_0293CD ; 0293AF/08CD93
RTS ; 0293B2/1C
DATA8_0293B3:
SET_ANIM #4,WAIT #1 ; 0293B3/3104
HALT ; 0293B5/0A
DATA8_0293B6:
SET_ANIM #3,WAIT #1 ; 0293B6/3103
HALT ; 0293B8/0A
DATA8_0293B9:
SET_ANIM #4,WAIT #1 ; 0293B9/3104
INC_ANIM WAIT #1 ; 0293BB/A9
INC_ANIM WAIT #1 ; 0293BC/A9
JMP DATA8_0293B9 ; 0293BD/1AB993
DATA8_0293C0:
SET_ANIM #4 ; 0293C0/3004
WAIT #28 ; 0293C2/061C
INC_ANIM ; 0293C4/A8
WAIT #84 ; 0293C5/0654
INC_ANIM ; 0293C7/A8
WAIT #60 ; 0293C8/063C
JMP DATA8_0293C0 ; 0293CA/1AC093
DATA8_0293CD:
SET_ANIM #4,WAIT #7 ; 0293CD/3704
INC_ANIM ; 0293CF/A8
WAIT #21 ; 0293D0/0615
INC_ANIM ; 0293D2/A8
WAIT #15 ; 0293D3/060F
JMP DATA8_0293CD ; 0293D5/1ACD93
$029420 - Enemy 10: Huetree
LoadData_Enemy10:
JSL ASM_Battle_Prep ; 029420/04249102
DATA8_029424:
ON_TICK CODE_0294FE ; 029424/09FE9402
JMP DATA8_02944E ; 029428/1A4E94
L_02942B:
TASK DATA8_02944E ; 02942B/084E94
JSL ASM_Wrapper_Enemy_Turn ; 02942E/04119102
JEQ DATA8_029440 ; 029432/0B4094
UNK_TASK #1 ; 029435/1401
UNK_TASK #1 ; 029437/1401
JMP DATA8_029424 ; 029439/1A2494
L_02943C:
JSL Sub_Enemy_death_anim ; 02943C/04248F02
DATA8_029440:
MOV REG,VAR2 ; 029440/2402
ASM_CALL Condition_Check_2b ; 029442/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 029446/0100
JEQ DATA8_029424 ; 029448/0B2494
JMP SFX_Dies_Enemy ; 02944B/1AF190
DATA8_02944E:
MOV REG,VAR2 ; 02944E/2402
ASM_CALL Clear_Condition_mirror ; 029450/07F08107 // Clear Condition mirror
TASK DATA8_0294D6 ; 029454/08D694
DATA8_029457:
MOV REG,VAR2 ; 029457/2402
ASM_CALL Sub_Get_Condition_Change ; 029459/07198207 // Get Condition Change (returns (-1,4) for a new status change. 0: paralyzed, 1: petrified, 2: confused, 3: sleep, 4: satisfactory, -1: no change)
MULTI_JSR #5 ; 02945D/1205
.word DATA8_02946E ; 02945F/6E94
.word DATA8_029474 ; 029461/7494
.word DATA8_02947A ; 029463/7A94
.word DATA8_029480 ; 029465/8094
.word DATA8_029486 ; 029467/8694
WAIT #1 ; 029469/0601
JMP DATA8_029457 ; 02946B/1A5794
DATA8_02946E:
UNK_TASK #1 ; 02946E/1401
TASK DATA8_02948C ; 029470/088C94
RTS ; 029473/1C
DATA8_029474:
UNK_TASK #1 ; 029474/1401
TASK DATA8_02948F ; 029476/088F94
RTS ; 029479/1C
DATA8_02947A:
UNK_TASK #1 ; 02947A/1401
TASK DATA8_029492 ; 02947C/089294
RTS ; 02947F/1C
DATA8_029480:
UNK_TASK #1 ; 029480/1401
TASK DATA8_0294A8 ; 029482/08A894
RTS ; 029485/1C
DATA8_029486:
UNK_TASK #1 ; 029486/1401
TASK DATA8_0294D6 ; 029488/08D694
RTS ; 02948B/1C
DATA8_02948C:
SET_ANIM #4,WAIT #1 ; 02948C/3104
HALT ; 02948E/0A
DATA8_02948F:
SET_ANIM #3,WAIT #1 ; 02948F/3103
HALT ; 029491/0A
DATA8_029492:
SET_ANIM #4,WAIT #1 ; 029492/3104
INC_ANIM WAIT #1 ; 029494/A9
INC_ANIM WAIT #1 ; 029495/A9
DEC_ANIM WAIT #1 ; 029496/B1
DEC_ANIM WAIT #1 ; 029497/B1
INC_ANIM WAIT #1 ; 029498/A9
INC_ANIM WAIT #1 ; 029499/A9
DEC_ANIM WAIT #1 ; 02949A/B1
DEC_ANIM WAIT #1 ; 02949B/B1
START_LOOP #2 ; 02949C/0102
SET_ANIM #7,WAIT #1 ; 02949E/3107
SET_ANIM #4,WAIT #1 ; 0294A0/3104
END_LOOP ; 0294A2/02
SET_ANIM #7,WAIT #1 ; 0294A3/3107
JMP DATA8_029492 ; 0294A5/1A9294
DATA8_0294A8:
SET_ANIM #4 ; 0294A8/3004
WAIT #208 ; 0294AA/06D0
INC_ANIM ; 0294AC/A8
WAIT #36 ; 0294AD/0624
INC_ANIM ; 0294AF/A8
WAIT #84 ; 0294B0/0654
DEC_ANIM ; 0294B2/B0
WAIT #24 ; 0294B3/0618
DEC_ANIM ; 0294B5/B0
WAIT #176 ; 0294B6/06B0
INC_ANIM ; 0294B8/A8
WAIT #20 ; 0294B9/0614
INC_ANIM ; 0294BB/A8
WAIT #60 ; 0294BC/063C
DEC_ANIM ; 0294BE/B0
WAIT #20 ; 0294BF/0614
DEC_ANIM ; 0294C1/B0
WAIT #128 ; 0294C2/0680
START_LOOP #2 ; 0294C4/0102
SET_ANIM #7 ; 0294C6/3007
WAIT #64 ; 0294C8/0640
SET_ANIM #4 ; 0294CA/3004
WAIT #64 ; 0294CC/0640
END_LOOP ; 0294CE/02
SET_ANIM #7 ; 0294CF/3007
WAIT #64 ; 0294D1/0640
JMP DATA8_0294A8 ; 0294D3/1AA894
DATA8_0294D6:
SET_ANIM #4 ; 0294D6/3004
WAIT #52 ; 0294D8/0634
INC_ANIM ; 0294DA/A8
WAIT #9 ; 0294DB/0609
INC_ANIM ; 0294DD/A8
WAIT #21 ; 0294DE/0615
DEC_ANIM WAIT #6 ; 0294E0/B6
DEC_ANIM ; 0294E1/B0
WAIT #44 ; 0294E2/062C
INC_ANIM WAIT #5 ; 0294E4/AD
INC_ANIM ; 0294E5/A8
WAIT #15 ; 0294E6/060F
DEC_ANIM WAIT #5 ; 0294E8/B5
DEC_ANIM ; 0294E9/B0
WAIT #32 ; 0294EA/0620
START_LOOP #2 ; 0294EC/0102
SET_ANIM #7 ; 0294EE/3007
WAIT #16 ; 0294F0/0610
SET_ANIM #4 ; 0294F2/3004
WAIT #16 ; 0294F4/0610
END_LOOP ; 0294F6/02
SET_ANIM #7 ; 0294F7/3007
WAIT #16 ; 0294F9/0610
JMP DATA8_0294D6 ; 0294FB/1AD694
$03ADFE - Event 69 (Nice)
Event_Main_69:
SET_XPOS #128 ; 03ADFE/388000
SET_YPOS #80 ; 03AE01/405000
DATA8_03AE04:
SET_ANIM #0 ; 03AE04/3000
WAIT #12 ; 03AE06/060C
SET_ANIM #1 ; 03AE08/3001
WAIT #12 ; 03AE0A/060C
SET_ANIM #2 ; 03AE0C/3002
WAIT #12 ; 03AE0E/060C
JMP DATA8_03AE04 ; 03AE10/1A04AE
$03B88B - Sub: Towns; Movement, Axs house etc
Town_turning2:
MOV REG,#$0000 ; 03B88B/1E0000
ASM_CALL WasBtnPressedX_2b ; 03B88E/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0100 ; 03B892/0001
JNE Town_turning_right ; 03B894/0CA4B8
MOV REG,#$0000 ; 03B897/1E0000
ASM_CALL WasBtnPressedX_2b ; 03B89A/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0200 ; 03B89E/0002
JNE Town_turning_left ; 03B8A0/0CB0B8
RTL ; 03B8A3/05
Town_turning_right:
WAIT #1 ; 03B8A4/0601
ASM_CALL Sub_03B6BC ; 03B8A6/07BCB603
JEQ Town_turning_right ; 03B8AA/0BA4B8
JMP Town_turning2 ; 03B8AD/1A8BB8
Town_turning_left:
WAIT #1 ; 03B8B0/0601
ASM_CALL Town_turning1 ; 03B8B2/07FEB603 // Town Turning-1
JEQ Town_turning_left ; 03B8B6/0BB0B8
JMP Town_turning2 ; 03B8B9/1A8BB8
Town_entering_something:
MOV REG,VAR0 ; 03B8BC/2400
ASM_CALL Cmp_2_values_2b ; 03B8BE/0781B007 // Compare [A] with [val] - Returns 0 (eq), 1 (A>=val), 2 (A<val)
.word 65535 ; 03B8C2/FFFF
JNE DATA8_03B93F ; 03B8C4/0C3FB9
ASM_CALL Sub_03E63B ; 03B8C7/073BE603 // Get town turn speed?
ASM_CALL Sub_03D045 ; 03B8CB/0745D003 // Involves the event house, plays The Legend bgm
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03B8CF/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03B8D3/8E950D
.byte $02 ; 03B8D6/02
.word 2 ; 03B8D7/0200
ASM_CALL _063x_stuff_4b ; 03B8D9/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03B8DD/6800
.word $0000 ; 03B8DF/0000
MOV VAR3,REG ; 03B8E1/2303
ASM_CALL Text_Init_3b_1b ; 03B8E3/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A45 ; 03B8E7/458A01
.byte 0 ; 03B8EA/00
ASM_CALL Text_Init_3b_1b ; 03B8EB/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A4A ; 03B8EF/4A8A01
.byte 1 ; 03B8F2/01
ASM_CALL Do_Stuff_far ; 03B8F3/07A8A000 // Do Stuff
ASM_CALL Setup_Text_Parser_3b_1b ; 03B8F7/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Speaking_text_setup ; 03B8FB/BACC08
.byte $01 ; 03B8FE/01
WAIT #1 ; 03B8FF/0601
ASM_CALL Transfer_Graphics_3b ; 03B901/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_Menu ; 03B905/2FB501
MOV.w ShowCompass,#$0000 ; 03B908/167B150000
WAIT #15 ; 03B90D/060F
ASM_CALL Setup_Text_Parser_3b_1b ; 03B90F/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Speaking_text_setup ; 03B913/BACC08
.byte $00 ; 03B916/00
WAIT #1 ; 03B917/0601
ASM_CALL Color_stuff_2b ; 03B919/0762E503 // Color stuff
.word $003F ; 03B91D/3F00
ASM_CALL Zero_1893_and_E000_to_2131 ; 03B91F/0795E503 // $1893 = 0, $2131 color math = E000
START_LOOP #16 ; 03B923/0110
ASM_CALL Unfade ; 03B925/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 03B929/0603
END_LOOP ; 03B92B/02
ASM_CALL Setup_Text_Parser_3b_1b ; 03B92C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Loading_save ; 03B930/82CE08
.byte $00 ; 03B933/00
JSR Pause_Loop ; 03B934/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03B937/07449C00 // Get/Set Sound Effect
.byte 17 ; 03B93B/11
JMP Exiting_a_shop ; 03B93C/1A2DCA
DATA8_03B93F:
ASM_CALL Town_Facing_Exit ; 03B93F/071BD003 // Town: Facing Exit? (Returns 1 if $1881 = -32768)
JNE Traveling_to_dungeon ; 03B943/0C74CA
ASM_CALL Color_stuff_2b ; 03B946/0762E503 // Color stuff
.word $0026 ; 03B94A/2600
START_LOOP #32 ; 03B94C/0120
ASM_CALL Add_color_math_1b ; 03B94E/07BBE503 // Add color math designation
.byte $01 ; 03B952/01
ASM_CALL Sound_stuff_1b ; 03B953/07199C00 // Sound stuff
.byte $F8 ; 03B957/F8
WAIT #1 ; 03B958/0601
END_LOOP ; 03B95A/02
ASM_CALL GetSet_Music_1b ; 03B95B/073C9C00 // Get/Set Music
.byte 0 ; 03B95F/00
ASM_CALL Sub_03D045 ; 03B960/0745D003 // Involves the event house, plays The Legend bgm
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03B964/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03B968/8E950D
.byte $02 ; 03B96B/02
.word 2 ; 03B96C/0200
ASM_CALL _063x_stuff_4b ; 03B96E/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03B972/6800
.word $0000 ; 03B974/0000
MOV VAR3,REG ; 03B976/2303
ASM_CALL Color_stuff_2b ; 03B978/0762E503 // Color stuff
.word $1F36 ; 03B97C/361F
START_LOOP #32 ; 03B97E/0120
ASM_CALL Subtract_color_math_1b ; 03B980/079FE503 // Subtract color math designation
.byte $01 ; 03B984/01
WAIT #1 ; 03B985/0601
END_LOOP ; 03B987/02
ASM_CALL Text_Init_3b_1b ; 03B988/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A45 ; 03B98C/458A01
.byte 0 ; 03B98F/00
ASM_CALL Text_Init_3b_1b ; 03B990/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long DATA8_018A4A ; 03B994/4A8A01
.byte 1 ; 03B997/01
ASM_CALL Do_Stuff_far ; 03B998/07A8A000 // Do Stuff
ASM_CALL Setup_Text_Parser_3b_1b ; 03B99C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Speaking_text_setup ; 03B9A0/BACC08
.byte $00 ; 03B9A3/00
WAIT #1 ; 03B9A4/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 03B9A6/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Speaking_text_setup ; 03B9AA/BACC08
.byte $01 ; 03B9AD/01
WAIT #1 ; 03B9AE/0601
ASM_CALL Transfer_Graphics_3b ; 03B9B0/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_Menu ; 03B9B4/2FB501
MOV.w ShowCompass,#$0000 ; 03B9B7/167B150000
WAIT #15 ; 03B9BC/060F
MOV REG,Town_Selection ; 03B9BE/1F8118
MULTI_JMP #6 ; 03B9C1/1106
.word Event_Outfitter_Start ; 03B9C3/30C1
.word Event_Inn_Start ; 03B9C5/3DBD
.word Event_Healer_Start ; 03B9C7/D1BE
.word Event_Alchemist_Start ; 03B9C9/35BB
.word Icorina_house_events ; 03B9CB/CFB9
.word Event_Icorina_House ; 03B9CD/99BA
Icorina_house_events:
ASM_CALL Icorina_Setup ; 03B9CF/0725D003 // Town: Icorina Setup
ASM_CALL Check_some_events ; 03B9D3/0779BA03 // Check some events
MULTI_JMP #4 ; 03B9D7/1104
.word DATA8_03B9E1 ; 03B9D9/E1B9
.word DATA8_03BA34 ; 03B9DB/34BA
.word DATA8_03BA47 ; 03B9DD/47BA
.word DATA8_03BA5A ; 03B9DF/5ABA
DATA8_03B9E1:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03B9E1/0751A000 // Loop til (RAM) is (val)
.word $189F ; 03B9E5/9F18
.word 5 ; 03B9E7/0500
WAIT #30 ; 03B9E9/061E
MOV.w $18A1,#$0001 ; 03B9EB/16A1180100
WAIT #30 ; 03B9F0/061E
MOV.w $18A1,#$0002 ; 03B9F2/16A1180200
Entrust_the_princess1:
ASM_CALL Setup_Text_Parser_3b_1b ; 03B9F7/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Entrust_the_princess ; 03B9FB/02E208
.byte $00 ; 03B9FE/00
JSR _1095_odd_loop ; 03B9FF/1BEACF
MOV.w $18A1,#$0003 ; 03BA02/16A1180300
JSR Loop_til_A_or_B ; 03BA07/1B0AD0
ASM_CALL GetSet_SFX_1b ; 03BA0A/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BA0E/11
MOV.w $18A1,#$0000 ; 03BA0F/16A1180000
ASM_CALL _1095_AND_2 ; 03BA14/0700D003 // Sets Pause_status ($1095) AND 2
JSR Pause_Loop ; 03BA18/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BA1B/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BA1F/11
MOV.w $18A1,#$0002 ; 03BA20/16A1180200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03BA25/0751A000 // Loop til (RAM) is (val)
.word $189F ; 03BA29/9F18
.word 6 ; 03BA2B/0600
ASM_CALL Zero_Winmask ; 03BA2D/073DD003 // Zero Main screen winmask
JMP Exiting_a_shop ; 03BA31/1A2DCA
DATA8_03BA34:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03BA34/0751A000 // Loop til (RAM) is (val)
.word $189F ; 03BA38/9F18
.word 5 ; 03BA3A/0500
ASM_CALL Setup_Text_Parser_3b_1b ; 03BA3C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Axs_isnt_here ; 03BA40/57E208
.byte $00 ; 03BA43/00
JMP DATA8_03BA6A ; 03BA44/1A6ABA
DATA8_03BA47:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03BA47/0751A000 // Loop til (RAM) is (val)
.word $189F ; 03BA4B/9F18
.word 5 ; 03BA4D/0500
ASM_CALL Setup_Text_Parser_3b_1b ; 03BA4F/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Axs_not_back ; 03BA53/91E208
.byte $00 ; 03BA56/00
JMP DATA8_03BA6A ; 03BA57/1A6ABA
DATA8_03BA5A:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03BA5A/0751A000 // Loop til (RAM) is (val)
.word $189F ; 03BA5E/9F18
.word 5 ; 03BA60/0500
ASM_CALL Setup_Text_Parser_3b_1b ; 03BA62/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Is_Anyone_there ; 03BA66/B7E208
.byte $00 ; 03BA69/00
DATA8_03BA6A:
JSR Pause_Loop ; 03BA6A/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BA6D/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BA71/11
ASM_CALL Zero_Winmask ; 03BA72/073DD003 // Zero Main screen winmask
JMP Exiting_a_shop ; 03BA76/1A2DCA
$03BA99 - Sub: Icorina house
Event_Icorina_House:
ASM_CALL Icorina_Setup ; 03BA99/0725D003 // Town: Icorina Setup
MOV.w $189F,#$0001 ; 03BA9D/169F180100
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03BAA2/0751A000 // Loop til (RAM) is (val)
.word $189F ; 03BAA6/9F18
.word 2 ; 03BAA8/0200
ASM_CALL Check_Salah ; 03BAAA/0728BB03 // Is Salah recovered?
MULTI_JMP #2 ; 03BAAE/1102
.word Icorina1 ; 03BAB0/B4BA
.word Icorina2 ; 03BAB2/F4BA
Icorina1:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BAB4/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Is_Salah_All_right ; 03BAB8/FDE208
.byte $00 ; 03BABB/00
JSR Pause_Loop ; 03BABC/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BABF/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BAC3/11
MOV.w $18A1,#$0001 ; 03BAC4/16A1180100
WAIT #20 ; 03BAC9/0614
MOV.w $18A1,#$0002 ; 03BACB/16A1180200
JSR _1095_odd_loop ; 03BAD0/1BEACF
MOV.w $18A1,#$0001 ; 03BAD3/16A1180100
JSR Loop_til_A_or_B ; 03BAD8/1B0AD0
ASM_CALL GetSet_SFX_1b ; 03BADB/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BADF/11
MOV.w $18A1,#$0000 ; 03BAE0/16A1180000
ASM_CALL _1095_AND_2 ; 03BAE5/0700D003 // Sets Pause_status ($1095) AND 2
JSR Pause_Loop ; 03BAE9/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BAEC/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BAF0/11
JMP DATA8_03BB1C ; 03BAF1/1A1CBB
Icorina2:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BAF4/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Be_Careful ; 03BAF8/6BE308
.byte $00 ; 03BAFB/00
MOV.w $18A1,#$0001 ; 03BAFC/16A1180100
WAIT #20 ; 03BB01/0614
MOV.w $18A1,#$0002 ; 03BB03/16A1180200
JSR _1095_odd_loop ; 03BB08/1BEACF
MOV.w $18A1,#$0001 ; 03BB0B/16A1180100
JSR Loop_til_A_or_B ; 03BB10/1B0AD0
ASM_CALL GetSet_SFX_1b ; 03BB13/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BB17/11
ASM_CALL _1095_AND_2 ; 03BB18/0700D003 // Sets Pause_status ($1095) AND 2
DATA8_03BB1C:
MOV.w $189F,#$0003 ; 03BB1C/169F180300
ASM_CALL Zero_Winmask ; 03BB21/073DD003 // Zero Main screen winmask
JMP Exiting_a_shop ; 03BB25/1A2DCA
$03BB35 - Event 68: Shop Gfx; Town Shop Handling
Event_Alchemist_Start:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BB35/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Alchemist_welcome ; 03BB39/C4D108
.byte $00 ; 03BB3C/00
JSR Inn_Wait_for_input ; 03BB3D/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03BB40/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Alchemist_main; 03BB44/C2E603
Event_Alchemist_Listen:
WAIT #1 ; 03BB47/0601
ASM_CALL Shop_input_checker ; 03BB49/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BB4D/1106
.word Event_Alchemist_Listen ; 03BB4F/47BB
.word Event_Alchemist_Confirm ; 03BB51/69BB
.word Event_Alchemist_Leave ; 03BB53/5BBB
.word Event_Alchemist_Listen ; 03BB55/47BB
.word Event_Alchemist_Listen ; 03BB57/47BB
.word Event_Alchemist_Listen ; 03BB59/47BB
Event_Alchemist_Leave:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BB5B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Alchemist_Leaving ; 03BB5F/66D208
.byte $00 ; 03BB62/00
JSR Pause_Loop ; 03BB63/1BD4CF
JMP Exiting_a_shop ; 03BB66/1A2DCA
Event_Alchemist_Confirm:
MOV REG,Shop_selection ; 03BB69/1F8518
JEQ Event_Alchemist_Drink_Menu ; 03BB6C/0BA4BB
ASM_CALL Alchemist_Convo_Picker ; 03BB6F/076EDE03 // Alchemist convo picker - Decides which convos to load based on story progress
JEQ DATA8_03BB7E ; 03BB73/0B7EBB
JSR Pause_Loop ; 03BB76/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BB79/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BB7D/11
DATA8_03BB7E:
JSR Pause_Loop ; 03BB7E/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BB81/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BB85/11
ASM_CALL Setup_Text_Parser_3b_1b ; 03BB86/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Alchemist_Anything_else ; 03BB8A/2AD208
.byte $00 ; 03BB8D/00
JSR Inn_Wait_for_input ; 03BB8E/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03BB91/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Alchemist_main; 03BB95/C2E603
MOV VAR0,#$0001 ; 03BB98/0F000100
ASM_CALL Set_Cursors_1b ; 03BB9C/0709E503 // Set Cursors
.byte $00 ; 03BBA0/00
JMP Event_Alchemist_Listen ; 03BBA1/1A47BB
Event_Alchemist_Drink_Menu:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BBA4/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03BBA8/E3CC08
.byte $01 ; 03BBAB/01
WAIT #1 ; 03BBAC/0601
ASM_CALL Transfer_Graphics_3b ; 03BBAE/07079D00 // 00/8698 setup
.long DATA8_03E767 ; 03BBB2/67E703
SET_BGH_VEL #1,#$FC00 ; 03BBB5/880100FC
WAIT #9 ; 03BBB9/0609
SET_BGH_VEL #1,#$0000 ; 03BBBB/88010000
ASM_CALL Setup_Text_Parser_3b_1b ; 03BBBF/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Alchemist_shop_text ; 03BBC3/E0DB08
.byte $01 ; 03BBC6/01
WAIT #1 ; 03BBC7/0601
Does__something:
ASM_CALL Transfer_Graphics_3b ; 03BBC9/07079D00 // 00/8698 setup
.long DATA8_03E760 ; 03BBCD/60E703
ASM_CALL Setup_Text_Parser_3b_1b ; 03BBD0/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Alchemist_Pick_drink ; 03BBD4/03D208
.byte $00 ; 03BBD7/00
ASM_CALL Shop_cursor_setup_3b ; 03BBD8/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E729 ; 03BBDC/29E703
Event_Alchemist_Choose_Drink:
WAIT #1 ; 03BBDF/0601
ASM_CALL Shop_input_checker ; 03BBE1/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BBE5/1106
.word Event_Alchemist_Choose_Drink; 03BBE7/DFBB
.word Event_Alchemist_Pay ; 03BBE9/F3BB
.word Event_Alchemist_Close_drinks; 03BBEB/E7BC
.word Event_Alchemist_Choose_Drink; 03BBED/DFBB
.word Event_Alchemist_Choose_Drink; 03BBEF/DFBB
.word Event_Alchemist_Choose_Drink; 03BBF1/DFBB
Event_Alchemist_Pay:
ASM_CALL Buy_a_drink ; 03BBF3/070DDF03 // Alchemist buy food/drink - returns 0-3 if bought, or 4 if not enough money
MULTI_JMP #5 ; 03BBF7/1105
.word Event_Alchemist_Water ; 03BBF9/03BC
.word Event_Alchemist_Elixir ; 03BBFB/20BC
.word Event_Alchemist_FoodA ; 03BBFD/58BC
.word Event_Alchemist_FoodB ; 03BBFF/90BC
.word Event_Alchemist_Nocash ; 03BC01/C8BC
Event_Alchemist_Water:
JSR Sale_SFX_update_GP ; 03BC03/1B14BD
ASM_CALL Setup_Text_Parser_3b_1b ; 03BC06/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Drink_water ; 03BC0A/A7D208
.byte $00 ; 03BC0D/00
JSR Some_decomp_sub ; 03BC0E/1B24BD
ASM_CALL GetSet_SFX_1b ; 03BC11/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BC15/11
ASM_CALL Decomp80_setup_3b ; 03BC16/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BC1A/9DE703
JMP Event_Alchemist_Drinks_Else ; 03BC1D/1AFFBC
Event_Alchemist_Elixir:
JSR Sale_SFX_update_GP ; 03BC20/1B14BD
ASM_CALL Setup_Text_Parser_3b_1b ; 03BC23/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Drink_Elixir ; 03BC27/D1D208
.byte $00 ; 03BC2A/00
JSR Some_decomp_sub ; 03BC2B/1B24BD
START_LOOP #4 ; 03BC2E/0104
ASM_CALL Alchemist_healing ; 03BC30/072FDF03 // Alchemist healing - [0 = Elixir, 1 = Food A, 2 = Food B]
.byte 0 ; 03BC34/00
JEQ Event_Alchemist_Post_Elixir ; 03BC35/0B48BC
ASM_CALL Setup_Text_Parser_3b_1b ; 03BC38/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Gained_5_HP ; 03BC3C/4ED308
.byte $00 ; 03BC3F/00
ASM_CALL GetSet_SFX_1b ; 03BC40/07449C00 // Get/Set Sound Effect
.byte 31 ; 03BC44/1F
JSR Pause_Loop ; 03BC45/1BD4CF
Event_Alchemist_Post_Elixir:
END_LOOP ; 03BC48/02
ASM_CALL GetSet_SFX_1b ; 03BC49/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BC4D/11
ASM_CALL Decomp80_setup_3b ; 03BC4E/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BC52/9DE703
JMP Event_Alchemist_Drinks_Else ; 03BC55/1AFFBC
Event_Alchemist_FoodA:
JSR Sale_SFX_update_GP ; 03BC58/1B14BD
ASM_CALL Setup_Text_Parser_3b_1b ; 03BC5B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Eat_Food_A ; 03BC5F/FCD208
.byte $00 ; 03BC62/00
JSR Some_decomp_sub ; 03BC63/1B24BD
START_LOOP #4 ; 03BC66/0104
ASM_CALL Alchemist_healing ; 03BC68/072FDF03 // Alchemist healing - [0 = Elixir, 1 = Food A, 2 = Food B]
.byte 1 ; 03BC6C/01
JEQ Event_Alchemist_Post_FoodA ; 03BC6D/0B80BC
ASM_CALL Setup_Text_Parser_3b_1b ; 03BC70/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Gained_10_HP ; 03BC74/6ED308
.byte $00 ; 03BC77/00
ASM_CALL GetSet_SFX_1b ; 03BC78/07449C00 // Get/Set Sound Effect
.byte 31 ; 03BC7C/1F
JSR Pause_Loop ; 03BC7D/1BD4CF
Event_Alchemist_Post_FoodA:
END_LOOP ; 03BC80/02
ASM_CALL GetSet_SFX_1b ; 03BC81/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BC85/11
ASM_CALL Decomp80_setup_3b ; 03BC86/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BC8A/9DE703
JMP Event_Alchemist_Drinks_Else ; 03BC8D/1AFFBC
Event_Alchemist_FoodB:
JSR Sale_SFX_update_GP ; 03BC90/1B14BD
ASM_CALL Setup_Text_Parser_3b_1b ; 03BC93/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Eat_Food_B ; 03BC97/25D308
.byte $00 ; 03BC9A/00
JSR Some_decomp_sub ; 03BC9B/1B24BD
START_LOOP #4 ; 03BC9E/0104
ASM_CALL Alchemist_healing ; 03BCA0/072FDF03 // Alchemist healing - [0 = Elixir, 1 = Food A, 2 = Food B]
.byte 2 ; 03BCA4/02
JEQ Event_Alchemist_Post_FoodB ; 03BCA5/0BB8BC
ASM_CALL Setup_Text_Parser_3b_1b ; 03BCA8/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Gained_10_HP_5_MP ; 03BCAC/8FD308
.byte $00 ; 03BCAF/00
ASM_CALL GetSet_SFX_1b ; 03BCB0/07449C00 // Get/Set Sound Effect
.byte 31 ; 03BCB4/1F
JSR Pause_Loop ; 03BCB5/1BD4CF
Event_Alchemist_Post_FoodB:
END_LOOP ; 03BCB8/02
ASM_CALL GetSet_SFX_1b ; 03BCB9/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BCBD/11
ASM_CALL Decomp80_setup_3b ; 03BCBE/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BCC2/9DE703
JMP Event_Alchemist_Drinks_Else ; 03BCC5/1AFFBC
Event_Alchemist_Nocash:
ASM_CALL _063x_stuff_4b ; 03BCC8/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03BCCC/0200
.word $0007 ; 03BCCE/0700
MOV VAR2,REG ; 03BCD0/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03BCD2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Alchemist_Not_enough ; 03BCD6/89D208
.byte $00 ; 03BCD9/00
JSR Pause_Loop ; 03BCDA/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BCDD/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BCE1/11
ASM_CALL Clear_Event_varX_1b ; 03BCE2/07C99C00 // Menu Stuffs
.byte $02 ; 03BCE6/02
Event_Alchemist_Close_drinks:
ASM_CALL Decomp80_setup_3b ; 03BCE7/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03BCEB/94E703
ASM_CALL Decomp80_setup_3b ; 03BCEE/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BCF2/9DE703
SET_BGH_VEL #1,#$0400 ; 03BCF5/88010004
WAIT #9 ; 03BCF9/0609
SET_BGH_VEL #1,#$0000 ; 03BCFB/88010000
Event_Alchemist_Drinks_Else:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BCFF/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Alchemist_Anything_else ; 03BD03/2AD208
.byte $00 ; 03BD06/00
JSR Inn_Wait_for_input ; 03BD07/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03BD0A/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Alchemist_main; 03BD0E/C2E603
JMP Event_Alchemist_Listen ; 03BD11/1A47BB
Sale_SFX_update_GP:
ASM_CALL GetSet_SFX_1b ; 03BD14/07449C00 // Get/Set Sound Effect
.byte 5 ; 03BD18/05
ASM_CALL Setup_Text_Parser_3b_1b ; 03BD19/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03BD1D/E3CC08
.byte $01 ; 03BD20/01
WAIT #1 ; 03BD21/0601
RTS ; 03BD23/1C
Some_decomp_sub:
ASM_CALL Decomp80_setup_3b ; 03BD24/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03BD28/94E703
SET_BGH_VEL #1,#$0400 ; 03BD2B/88010004
WAIT #9 ; 03BD2F/0609
SET_BGH_VEL #1,#$0000 ; 03BD31/88010000
Finished_moving_text:
JSR Pause_Loop ; 03BD35/1BD4CF
MOV VAR0,#$0000 ; 03BD38/0F000000
RTS ; 03BD3C/1C
Event_Inn_Start:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BD3D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_menu ; 03BD41/58CD08
.byte $00 ; 03BD44/00
JMP DATA8_03BD57 ; 03BD45/1A57BD
Inn_Anything_Else1:
ASM_CALL Decomp80_setup_3b ; 03BD48/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BD4C/9DE703
ASM_CALL Setup_Text_Parser_3b_1b ; 03BD4F/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Anything_Else ; 03BD53/91CD08
.byte $00 ; 03BD56/00
DATA8_03BD57:
JSR Inn_Wait_for_input ; 03BD57/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03BD5A/07A8E203 // Shop cursor setup
.long Shop_cursor_data_inn ; 03BD5E/ACE603
Innput_checker_loop:
WAIT #1 ; 03BD61/0601
ASM_CALL Shop_input_checker ; 03BD63/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BD67/1106
.word Innput_checker_loop ; 03BD69/61BD
.word DATA8_03BD75 ; 03BD6B/75BD
.word Leaving_inn1 ; 03BD6D/C3BE
.word Innput_checker_loop ; 03BD6F/61BD
.word Innput_checker_loop ; 03BD71/61BD
.word Innput_checker_loop ; 03BD73/61BD
DATA8_03BD75:
MOV REG,Shop_selection ; 03BD75/1F8518
JEQ DATA8_03BE0F ; 03BD78/0B0FBE
ASM_CALL Setup_Text_Parser_3b_1b ; 03BD7B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Save_in_which_file ; 03BD7F/B8CD08
.byte $00 ; 03BD82/00
JSR Inn_Wait_for_input ; 03BD83/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03BD86/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E74B ; 03BD8A/4BE703
DATA8_03BD8D:
WAIT #1 ; 03BD8D/0601
ASM_CALL Shop_input_checker ; 03BD8F/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BD93/1106
.word DATA8_03BD8D ; 03BD95/8DBD
.word DATA8_03BDA1 ; 03BD97/A1BD
.word DATA8_03BDEA ; 03BD99/EABD
.word DATA8_03BD8D ; 03BD9B/8DBD
.word DATA8_03BD8D ; 03BD9D/8DBD
.word DATA8_03BD8D ; 03BD9F/8DBD
DATA8_03BDA1:
ASM_CALL Store_RAM_2b_into_2b ; 03BDA1/07F8E403 // Store [RAM] into [RAM]
.word Shop_selection ; 03BDA5/8518
.word Text_temp ; 03BDA7/DB16
ADD.w Text_temp,ADD,#1 ; 03BDA9/0EDB16020100
Saving_fileX:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BDAF/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Saving_file_x ; 03BDB3/EDCD08
.byte $00 ; 03BDB6/00
JSR Inn_Wait_for_input ; 03BDB7/1BDFCF
ASM_CALL Lots_of_1885 ; 03BDBA/07D9E503 // Lots of Shop_Selection ($1885) - Saves the game??
JNE File_saved ; 03BDBE/0CD3BD
FileX_not_saved:
ASM_CALL GetSet_SFX_1b ; 03BDC1/07449C00 // Get/Set Sound Effect
.byte 23 ; 03BDC5/17
WAIT #90 ; 03BDC6/065A
ASM_CALL Setup_Text_Parser_3b_1b ; 03BDC8/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_File_x_not_saved ; 03BDCC/4CCE08
.byte $00 ; 03BDCF/00
JMP Inn_Anything_Else2 ; 03BDD0/1AE2BD
File_saved:
ASM_CALL GetSet_SFX_1b ; 03BDD3/07449C00 // Get/Set Sound Effect
.byte 42 ; 03BDD7/2A
WAIT #90 ; 03BDD8/065A
ASM_CALL Setup_Text_Parser_3b_1b ; 03BDDA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_File_x_is_saved ; 03BDDE/1BCE08
.byte $00 ; 03BDE1/00
Inn_Anything_Else2:
JSR Pause_Loop ; 03BDE2/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BDE5/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BDE9/11
DATA8_03BDEA:
ASM_CALL Decomp80_setup_3b ; 03BDEA/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BDEE/9DE703
ASM_CALL Setup_Text_Parser_3b_1b ; 03BDF1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Anything_Else ; 03BDF5/91CD08
.byte $00 ; 03BDF8/00
JSR Inn_Wait_for_input ; 03BDF9/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03BDFC/07A8E203 // Shop cursor setup
.long Shop_cursor_data_inn ; 03BE00/ACE603
MOV VAR0,#$0001 ; 03BE03/0F000100
ASM_CALL Set_Cursors_1b ; 03BE07/0709E503 // Set Cursors
.byte $00 ; 03BE0B/00
JMP Innput_checker_loop ; 03BE0C/1A61BD
DATA8_03BE0F:
ASM_CALL Get_inn_price ; 03BE0F/07EBDD03 // Get inn price - Loads price based on current area $1573
ASM_CALL Setup_Text_Parser_3b_1b ; 03BE13/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03BE17/E3CC08
.byte $01 ; 03BE1A/01
WAIT #1 ; 03BE1B/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 03BE1D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_One_night_costs_x ; 03BE21/A9CE08
.byte $00 ; 03BE24/00
JSR Inn_Wait_for_input ; 03BE25/1BDFCF
ASM_CALL Transfer_Graphics_3b ; 03BE28/07079D00 // 00/8698 setup
.long DATA8_03E767 ; 03BE2C/67E703
ASM_CALL Shop_cursor_setup_3b ; 03BE2F/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E6B7 ; 03BE33/B7E603
Innput_Check:
WAIT #1 ; 03BE36/0601
ASM_CALL Shop_input_checker ; 03BE38/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BE3C/1106
.word Innput_Check ; 03BE3E/36BE
.word DATA8_03BE4A ; 03BE40/4ABE
.word Inn_Anything_Else1 ; 03BE42/48BD
.word Innput_Check ; 03BE44/36BE
.word Innput_Check ; 03BE46/36BE
.word Innput_Check ; 03BE48/36BE
DATA8_03BE4A:
MOV REG,Shop_selection ; 03BE4A/1F8518
JNE Inn_Anything_Else1 ; 03BE4D/0C48BD
ASM_CALL Cant_buy_thing ; 03BE50/0705DE03 // Can't buy thing - Returns 1 (not enough money) or 0 (otherwise)
JEQ Inn_Good_Night ; 03BE54/0B71BE
ASM_CALL Decomp80_setup_3b ; 03BE57/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BE5B/9DE703
Inn_Not_Enough1:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BE5E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Not_Enough ; 03BE62/1DCF08
.byte $00 ; 03BE65/00
JSR Pause_Loop ; 03BE66/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BE69/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BE6D/11
JMP Inn_Anything_Else1 ; 03BE6E/1A48BD
Inn_Good_Night:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BE71/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Good_night ; 03BE75/2ECF08
.byte $00 ; 03BE78/00
JSR Pause_Loop ; 03BE79/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BE7C/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BE80/11
ASM_CALL GetSet_Music_1b ; 03BE81/073C9C00 // Get/Set Music
.byte 87 ; 03BE85/57
START_LOOP #16 ; 03BE86/0110
ASM_CALL Fade ; 03BE88/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #5 ; 03BE8C/0605
END_LOOP ; 03BE8E/02
ASM_CALL Inn_Full_heal ; 03BE8F/0716DE03 // Inn: Full heal - Inns remove Paralyzed, Petrified, Confused, Sleeping status but not Deceased or Not Here status
WAIT #1 ; 03BE93/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 03BE95/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Speaking_text_setup ; 03BE99/BACC08
.byte $00 ; 03BE9C/00
WAIT #180 ; 03BE9D/06B4
START_LOOP #16 ; 03BE9F/0110
ASM_CALL Unfade ; 03BEA1/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 03BEA5/0603
END_LOOP ; 03BEA7/02
WAIT #60 ; 03BEA8/063C
ASM_CALL Load_shop_music__ ; 03BEAA/0707D203 // Load shop music
WAIT #15 ; 03BEAE/060F
ASM_CALL Setup_Text_Parser_3b_1b ; 03BEB0/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Good_morning_Crono ; 03BEB4/4BCF08
.byte $00 ; 03BEB7/00
JSR Pause_Loop ; 03BEB8/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BEBB/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BEBF/11
JMP Inn_Anything_Else1 ; 03BEC0/1A48BD
Leaving_inn1:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BEC3/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Inn_Bye ; 03BEC7/E7CE08
.byte $00 ; 03BECA/00
JSR Pause_Loop ; 03BECB/1BD4CF
JMP Exiting_a_shop ; 03BECE/1A2DCA
Event_Healer_Start:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BED1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Spirit_Healer_shop ; 03BED5/87CF08
.byte $00 ; 03BED8/00
DATA8_03BED9:
MOV VAR0,#$0000 ; 03BED9/0F000000
Healer_Main_Menu:
JSR Inn_Wait_for_input ; 03BEDD/1BDFCF
ASM_CALL Setup_Text_Parser_3b_1b ; 03BEE0/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03BEE4/E3CC08
.byte $01 ; 03BEE7/01
WAIT #1 ; 03BEE8/0601
ASM_CALL Transfer_Graphics_3b ; 03BEEA/07079D00 // 00/8698 setup
.long DATA8_03E767 ; 03BEEE/67E703
SH_Set_up_shop_cursor:
ASM_CALL Shop_cursor_setup_3b ; 03BEF1/07A8E203 // Shop cursor setup
.long Shop_cursor_data_spirit_healer; 03BEF5/A1E603
ASM_CALL Set_Cursors_1b ; 03BEF8/0709E503 // Set Cursors
.byte $00 ; 03BEFC/00
Loop_SH_main_menu:
WAIT #1 ; 03BEFD/0601
ASM_CALL Shop_input_checker ; 03BEFF/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BF03/1106
.word Loop_SH_main_menu ; 03BF05/FDBE
.word SpiritHealer_A_pressed ; 03BF07/26BF
.word SH_What_else ; 03BF09/11BF
.word Loop_SH_main_menu ; 03BF0B/FDBE
.word Loop_SH_main_menu ; 03BF0D/FDBE
.word Loop_SH_main_menu ; 03BF0F/FDBE
SH_What_else:
ASM_CALL Decomp80_setup_3b ; 03BF11/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03BF15/9DE703
ASM_CALL Setup_Text_Parser_3b_1b ; 03BF18/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Bye ; 03BF1C/20D008
.byte $00 ; 03BF1F/00
JSR Pause_Loop ; 03BF20/1BD4CF
JMP Exiting_a_shop ; 03BF23/1A2DCA
SpiritHealer_A_pressed:
MOV REG,Shop_selection ; 03BF26/1F8518
JEQ Healer_Menu_Cards ; 03BF29/0B2BC0
Healer_Menu_Revive:
ASM_CALL Shop_cursor_setup_3b ; 03BF2C/07A8E203 // Shop cursor setup
.long Shop_cursor_data_SpiritHealer_Revive; 03BF30/3AE703
ASM_CALL Sub_Heal_Spirits ; 03BF33/07D0E003 // Heal Spirits
JNE Healer_Revive_Menu ; 03BF37/0C59BF
Healer_No_Revives:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BF3A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_No_Torn_Spirits ; 03BF3E/8DD008
.byte $00 ; 03BF41/00
JSR Pause_Loop ; 03BF42/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BF45/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BF49/11
ASM_CALL Setup_Text_Parser_3b_1b ; 03BF4A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_What_Else ; 03BF4E/30D008
.byte $00 ; 03BF51/00
MOV VAR0,#$0001 ; 03BF52/0F000100
JMP Healer_Main_Menu ; 03BF56/1ADDBE
Healer_Revive_Menu:
SET_BGH_VEL #1,#$FC00 ; 03BF59/880100FC
WAIT #8 ; 03BF5D/0608
SET_BGH_VEL #1,#$0000 ; 03BF5F/88010000
Choose_spirit:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BF63/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Choose_Spirit ; 03BF67/91D108
.byte $01 ; 03BF6A/01
WAIT #1 ; 03BF6B/0601
ASM_CALL Transfer_Graphics_3b ; 03BF6D/07079D00 // 00/8698 setup
.long DATA8_03E77C ; 03BF71/7CE703
Revive_spirit:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BF74/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Revive ; 03BF78/64D008
.byte $00 ; 03BF7B/00
JSR Inn_Wait_for_input ; 03BF7C/1BDFCF
DATA8_03BF7F:
ASM_CALL Sub_03E15E ; 03BF7F/075EE103 // Involves clearing an event -1
DATA8_03BF83:
WAIT #1 ; 03BF83/0601
ASM_CALL Shop_input_checker ; 03BF85/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BF89/1106
.word DATA8_03BF83 ; 03BF8B/83BF
.word DATA8_03BF97 ; 03BF8D/97BF
.word DATA8_03C005 ; 03BF8F/05C0
.word DATA8_03BF7F ; 03BF91/7FBF
.word DATA8_03BF83 ; 03BF93/83BF
.word DATA8_03BF83 ; 03BF95/83BF
DATA8_03BF97:
ASM_CALL _063x_stuff_4b ; 03BF97/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03BF9B/0200
.word $0004 ; 03BF9D/0400
MOV VAR2,REG ; 03BF9F/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03BFA1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Revive_Price ; 03BFA5/BCD008
.byte $00 ; 03BFA8/00
JSR Inn_Wait_for_input ; 03BFA9/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03BFAC/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E696 ; 03BFB0/96E603
DATA8_03BFB3:
WAIT #1 ; 03BFB3/0601
ASM_CALL Shop_input_checker ; 03BFB5/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03BFB9/1106
.word DATA8_03BFB3 ; 03BFBB/B3BF
.word DATA8_03BFC7 ; 03BFBD/C7BF
.word DATA8_03C000 ; 03BFBF/00C0
.word DATA8_03BFB3 ; 03BFC1/B3BF
.word DATA8_03BFB3 ; 03BFC3/B3BF
.word DATA8_03BFB3 ; 03BFC5/B3BF
DATA8_03BFC7:
MOV REG,Shop_selection ; 03BFC7/1F8518
JNE DATA8_03C000 ; 03BFCA/0C00C0
ASM_CALL Buy_Revival ; 03BFCD/07C3E103 // Buy Revival - Returns 1 (not enough money), or 0 (otherwise)
JNE No_money_revival ; 03BFD1/0CF0BF
ASM_CALL Some_purchase_helper ; 03BFD4/07D7E103 // Some purchase helper
ASM_CALL GetSet_SFX_1b ; 03BFD8/07449C00 // Get/Set Sound Effect
.byte 31 ; 03BFDC/1F
ASM_CALL Setup_Text_Parser_3b_1b ; 03BFDD/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Revive_Complete ; 03BFE1/6BD108
.byte $00 ; 03BFE4/00
JSR Pause_Loop ; 03BFE5/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BFE8/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BFEC/11
JMP DATA8_03C000 ; 03BFED/1A00C0
No_money_revival:
ASM_CALL Setup_Text_Parser_3b_1b ; 03BFF0/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Cant_buy_revive ; 03BFF4/11D108
.byte $00 ; 03BFF7/00
JSR Pause_Loop ; 03BFF8/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03BFFB/07449C00 // Get/Set Sound Effect
.byte 17 ; 03BFFF/11
DATA8_03C000:
ASM_CALL Clear_Event_varX_1b ; 03C000/07C99C00 // Menu Stuffs
.byte $02 ; 03C004/02
DATA8_03C005:
ASM_CALL Sub_03E18B ; 03C005/078BE103 // Involves clearing an event -2
WAIT #1 ; 03C009/0601
ASM_CALL Decomp80_setup_3b ; 03C00B/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C00F/94E703
SET_BGH_VEL #1,#$0400 ; 03C012/88010004
WAIT #8 ; 03C016/0608
SET_BGH_VEL #1,#$0000 ; 03C018/88010000
ASM_CALL Setup_Text_Parser_3b_1b ; 03C01C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_What_Else ; 03C020/30D008
.byte $00 ; 03C023/00
MOV VAR0,#$0001 ; 03C024/0F000100
JMP Healer_Main_Menu ; 03C028/1ADDBE
Healer_Menu_Cards:
SET_BGH_VEL #1,#$FC00 ; 03C02B/880100FC
WAIT #9 ; 03C02F/0609
SET_BGH_VEL #1,#$0000 ; 03C031/88010000
ASM_CALL Shop_cursor_setup_3b ; 03C035/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E729 ; 03C039/29E703
MOV VAR0,#$0000 ; 03C03C/0F000000
ASM_CALL Sub_03DFD9 ; 03C040/07D9DF03 // Involves shops and clearing an input
ASM_CALL Setup_Text_Parser_3b_1b ; 03C044/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_4_Items_For_Sale ; 03C048/33E008
.byte $01 ; 03C04B/01
WAIT #1 ; 03C04C/0601
ASM_CALL Transfer_Graphics_3b ; 03C04E/07079D00 // 00/8698 setup
.long DATA8_03E760 ; 03C052/60E703
DATA8_03C055:
ASM_CALL Display_Card_store ; 03C055/0726E003
CardBuy_Input_Check:
WAIT #1 ; 03C059/0601
ASM_CALL Shop_input_checker ; 03C05B/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
Healer_Card_Cursor:
MULTI_JMP #6 ; 03C05F/1106
.word CardBuy_Input_Check ; 03C061/59C0
.word Healer_Cards_A_press ; 03C063/B7C0
.word Healer_Anything_Else ; 03C065/97C0
.word DATA8_03C055 ; 03C067/55C0
.word DATA8_03C06D ; 03C069/6DC0
.word DATA8_03C082 ; 03C06B/82C0
DATA8_03C06D:
SET_ANIM #-1 ; 03C06D/30FF
ASM_CALL Sub_03DFAE ; 03C06F/07AEDF03
ASM_CALL Setup_Text_Parser_3b_1b ; 03C073/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_4_Items_For_Sale ; 03C077/33E008
.byte $01 ; 03C07A/01
ASM_CALL Sub_00A764_far ; 03C07B/0760A700 // Involved in text display
JMP DATA8_03C055 ; 03C07F/1A55C0
DATA8_03C082:
SET_ANIM #-1 ; 03C082/30FF
ASM_CALL Sub_03DFC6 ; 03C084/07C6DF03
ASM_CALL Setup_Text_Parser_3b_1b ; 03C088/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_3_Items_For_Sale ; 03C08C/81E008
.byte $01 ; 03C08F/01
ASM_CALL Sub_00A764_far ; 03C090/0760A700 // Involved in text display
JMP DATA8_03C055 ; 03C094/1A55C0
Healer_Anything_Else:
ASM_CALL Decomp80_setup_3b ; 03C097/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C09B/94E703
SET_BGH_VEL #1,#$0400 ; 03C09E/88010004
WAIT #9 ; 03C0A2/0609
SET_BGH_VEL #1,#$0000 ; 03C0A4/88010000
ASM_CALL Setup_Text_Parser_3b_1b ; 03C0A8/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_What_Else ; 03C0AC/30D008
.byte $00 ; 03C0AF/00
MOV VAR0,#$0000 ; 03C0B0/0F000000
JMP Healer_Main_Menu ; 03C0B4/1ADDBE
Healer_Cards_A_press:
ASM_CALL Buying_Cards ; 03C0B7/0760E003
MULTI_JMP #3 ; 03C0BB/1103
.word Card_Buy ; 03C0BD/C3C0
.word Card_No_Money ; 03C0BF/ECC0
.word Card_No_Room ; 03C0C1/0EC1
Card_Buy:
ASM_CALL GetSet_SFX_1b ; 03C0C3/07449C00 // Get/Set Sound Effect
.byte 5 ; 03C0C7/05
ASM_CALL Setup_Text_Parser_3b_1b ; 03C0C8/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C0CC/E3CC08
.byte $01 ; 03C0CF/01
ASM_CALL Decomp80_setup_3b ; 03C0D0/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C0D4/94E703
SET_BGH_VEL #1,#$0400 ; 03C0D7/88010004
WAIT #9 ; 03C0DB/0609
SET_BGH_VEL #1,#$0000 ; 03C0DD/88010000
ASM_CALL Setup_Text_Parser_3b_1b ; 03C0E1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_What_Else ; 03C0E5/30D008
.byte $00 ; 03C0E8/00
JMP DATA8_03BED9 ; 03C0E9/1AD9BE
Card_No_Money:
ASM_CALL _063x_stuff_4b ; 03C0EC/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C0F0/0200
.word $0007 ; 03C0F2/0700
MOV VAR2,REG ; 03C0F4/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03C0F6/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Cant_Buy_Card ; 03C0FA/BFCF08
.byte $00 ; 03C0FD/00
JSR Pause_Loop ; 03C0FE/1BD4CF
ASM_CALL Clear_Event_varX_1b ; 03C101/07C99C00 // Menu Stuffs
.byte $02 ; 03C105/02
ASM_CALL GetSet_SFX_1b ; 03C106/07449C00 // Get/Set Sound Effect
.byte 17 ; 03C10A/11
JMP Healer_Anything_Else ; 03C10B/1A97C0
Card_No_Room:
ASM_CALL _063x_stuff_4b ; 03C10E/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C112/0200
.word $0007 ; 03C114/0700
MOV VAR2,REG ; 03C116/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03C118/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Healer_Full_Cards ; 03C11C/F2CF08
.byte $00 ; 03C11F/00
JSR Pause_Loop ; 03C120/1BD4CF
ASM_CALL Clear_Event_varX_1b ; 03C123/07C99C00 // Menu Stuffs
.byte $02 ; 03C127/02
ASM_CALL GetSet_SFX_1b ; 03C128/07449C00 // Get/Set Sound Effect
.byte 17 ; 03C12C/11
JMP Healer_Anything_Else ; 03C12D/1A97C0
Event_Outfitter_Start:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C130/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_menu ; 03C134/27DC08
.byte $00 ; 03C137/00
DATA8_03C138:
MOV VAR0,#$0000 ; 03C138/0F000000
DATA8_03C13C:
JSR Inn_Wait_for_input ; 03C13C/1BDFCF
ASM_CALL Setup_Text_Parser_3b_1b ; 03C13F/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C143/E3CC08
.byte $01 ; 03C146/01
WAIT #1 ; 03C147/0601
ASM_CALL Transfer_Graphics_3b ; 03C149/07079D00 // 00/8698 setup
.long DATA8_03E767 ; 03C14D/67E703
Outfitter_menu1:
ASM_CALL Shop_cursor_setup_3b ; 03C150/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E667 ; 03C154/67E603
ASM_CALL Set_Cursors_1b ; 03C157/0709E503 // Set Cursors
.byte $00 ; 03C15B/00
DATA8_03C15C:
WAIT #1 ; 03C15C/0601
ASM_CALL Shop_input_checker ; 03C15E/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C162/1106
.word DATA8_03C15C ; 03C164/5CC1
.word DATA8_03C170 ; 03C166/70C1
.word DATA8_03C17B ; 03C168/7BC1
.word DATA8_03C15C ; 03C16A/5CC1
.word DATA8_03C15C ; 03C16C/5CC1
.word DATA8_03C15C ; 03C16E/5CC1
DATA8_03C170:
MOV REG,Shop_selection ; 03C170/1F8518
MULTI_JMP #3 ; 03C173/1103
.word DATA8_03C190 ; 03C175/90C1
.word DATA8_03C439 ; 03C177/39C4
.word DATA8_03C6DA ; 03C179/DAC6
DATA8_03C17B:
ASM_CALL Decomp80_setup_3b ; 03C17B/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03C17F/9DE703
ASM_CALL Setup_Text_Parser_3b_1b ; 03C182/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Bye ; 03C186/43DD08
.byte $00 ; 03C189/00
JSR Pause_Loop ; 03C18A/1BD4CF
JMP Exiting_a_shop ; 03C18D/1A2DCA
DATA8_03C190:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C190/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Gray ; 03C194/90950D
.byte $02 ; 03C197/02
.word 2 ; 03C198/0200
ASM_CALL Shop_cursor_setup_3b ; 03C19A/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Outfitter_main; 03C19E/CDE603
MOV VAR0,#$0000 ; 03C1A1/0F000000
ASM_CALL Sub_03D240 ; 03C1A5/0740D203
WAIT #1 ; 03C1A9/0601
ASM_CALL Transfer_Graphics_3b ; 03C1AB/07079D00 // 00/8698 setup
.long DATA8_03E759 ; 03C1AF/59E703
ASM_CALL Clear_Event_varX_1b ; 03C1B2/07C99C00 // Menu Stuffs
.byte $03 ; 03C1B6/03
DATA8_03C1B7:
ASM_CALL Buy_Weapons_Desc ; 03C1B7/07A6D203
DATA8_03C1BB:
WAIT #1 ; 03C1BB/0601
ASM_CALL Shop_input_checker ; 03C1BD/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C1C1/1106
.word DATA8_03C1BB ; 03C1C3/BBC1
.word DATA8_03C205 ; 03C1C5/05C2
.word DATA8_03C1E9 ; 03C1C7/E9C1
.word DATA8_03C1B7 ; 03C1C9/B7C1
.word DATA8_03C1CF ; 03C1CB/CFC1
.word DATA8_03C1DC ; 03C1CD/DCC1
DATA8_03C1CF:
SET_ANIM #-1 ; 03C1CF/30FF
ASM_CALL Shop_Handling ; 03C1D1/0715D203
ASM_CALL Sub_00A764_far ; 03C1D5/0760A700 // Involved in text display
JMP DATA8_03C1B7 ; 03C1D9/1AB7C1
DATA8_03C1DC:
SET_ANIM #-1 ; 03C1DC/30FF
ASM_CALL Sub_03D22D ; 03C1DE/072DD203
ASM_CALL Sub_00A764_far ; 03C1E2/0760A700 // Involved in text display
JMP DATA8_03C1B7 ; 03C1E6/1AB7C1
DATA8_03C1E9:
ASM_CALL _063x_stuff_4b ; 03C1E9/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C1ED/6800
.word $0000 ; 03C1EF/0000
MOV VAR3,REG ; 03C1F1/2303
ASM_CALL Decomp80_setup_3b ; 03C1F3/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C1F7/94E703
ASM_CALL Setup_Text_Parser_3b_1b ; 03C1FA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Anything_else ; 03C1FE/CFDC08
.byte $00 ; 03C201/00
JMP DATA8_03C138 ; 03C202/1A38C1
DATA8_03C205:
ASM_CALL Store_RAM_2b_into_2b ; 03C205/07F8E403 // Store [RAM] into [RAM]
.word Shop_selection ; 03C209/8518
.word $189F ; 03C20B/9F18
ASM_CALL Shop_cursor_setup_3b ; 03C20D/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E675 ; 03C211/75E603
DATA8_03C214:
ASM_CALL _063x_stuff_4b ; 03C214/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C218/0200
.word $0006 ; 03C21A/0600
MOV VAR2,REG ; 03C21C/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03C21E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Pay_How ; 03C222/64DC08
.byte $00 ; 03C225/00
JSR Inn_Wait_for_input ; 03C226/1BDFCF
DATA8_03C229:
WAIT #1 ; 03C229/0601
ASM_CALL Shop_input_checker ; 03C22B/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C22F/1106
.word DATA8_03C229 ; 03C231/29C2
.word DATA8_03C25A ; 03C233/5AC2
.word DATA8_03C23D ; 03C235/3DC2
.word DATA8_03C229 ; 03C237/29C2
.word DATA8_03C229 ; 03C239/29C2
.word DATA8_03C229 ; 03C23B/29C2
DATA8_03C23D:
ASM_CALL Clear_Event_varX_1b ; 03C23D/07C99C00 // Menu Stuffs
.byte $02 ; 03C241/02
ASM_CALL Shop_cursor_setup_3b ; 03C242/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Outfitter_main; 03C246/CDE603
ASM_CALL Shop_related_2b ; 03C249/0771DA03 // Shop related
.word 6303 ; 03C24D/9F18
ASM_CALL Sub_03D240 ; 03C24F/0740D203
ASM_CALL Sub_00A764_far ; 03C253/0760A700 // Involved in text display
JMP DATA8_03C1B7 ; 03C257/1AB7C1
DATA8_03C25A:
MOV REG,Shop_selection ; 03C25A/1F8518
JNE DATA8_03C2CF ; 03C25D/0CCFC2
ASM_CALL Purchase_item ; 03C260/0731D503
MULTI_JMP #3 ; 03C264/1103
.word DATA8_03C26C ; 03C266/6CC2
.word DATA8_03C29C ; 03C268/9CC2
.word DATA8_03C2A7 ; 03C26A/A7C2
DATA8_03C26C:
ASM_CALL Clear_Event_varX_1b ; 03C26C/07C99C00 // Menu Stuffs
.byte $02 ; 03C270/02
ASM_CALL _063x_stuff_4b ; 03C271/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C275/6800
.word $0000 ; 03C277/0000
MOV VAR3,REG ; 03C279/2303
ASM_CALL Setup_Text_Parser_3b_1b ; 03C27B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C27F/E3CC08
.byte $01 ; 03C282/01
ASM_CALL Decomp80_setup_3b ; 03C283/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C287/94E703
WAIT #1 ; 03C28A/0601
ASM_CALL GetSet_SFX_1b ; 03C28C/07449C00 // Get/Set Sound Effect
.byte 5 ; 03C290/05
ASM_CALL Setup_Text_Parser_3b_1b ; 03C291/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Thanks ; 03C295/95DC08
.byte $00 ; 03C298/00
JMP DATA8_03C138 ; 03C299/1A38C1
DATA8_03C29C:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C29C/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Money ; 03C2A0/89DD08
.byte $00 ; 03C2A3/00
JMP DATA8_03C2AF ; 03C2A4/1AAFC2
DATA8_03C2A7:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C2A7/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Full_Items ; 03C2AB/BCDD08
.byte $00 ; 03C2AE/00
DATA8_03C2AF:
JSR Pause_Loop ; 03C2AF/1BD4CF
ASM_CALL Clear_Event_varX_1b ; 03C2B2/07C99C00 // Menu Stuffs
.byte $02 ; 03C2B6/02
ASM_CALL Shop_cursor_setup_3b ; 03C2B7/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Outfitter_main; 03C2BB/CDE603
ASM_CALL Shop_related_2b ; 03C2BE/0771DA03 // Shop related
.word 6303 ; 03C2C2/9F18
ASM_CALL Sub_03D240 ; 03C2C4/0740D203
ASM_CALL Sub_00A764_far ; 03C2C8/0760A700 // Involved in text display
JMP DATA8_03C1B7 ; 03C2CC/1AB7C1
DATA8_03C2CF:
ASM_CALL Get_First_Equipment ; 03C2CF/0798D903
JNE DATA8_03C2E1 ; 03C2D3/0CE1C2
ASM_CALL Setup_Text_Parser_3b_1b ; 03C2D6/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Trade ; 03C2DA/3EDE08
.byte $00 ; 03C2DD/00
JMP DATA8_03C2AF ; 03C2DE/1AAFC2
DATA8_03C2E1:
ASM_CALL Clear_Event_varX_1b ; 03C2E1/07C99C00 // Menu Stuffs
.byte $02 ; 03C2E5/02
MOV VAR0,#$0000 ; 03C2E6/0F000000
ASM_CALL Shop_cursor_setup_3b ; 03C2EA/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E6DE ; 03C2EE/DEE603
ASM_CALL Sub_03D781 ; 03C2F1/0781D703
WAIT #1 ; 03C2F5/0601
ASM_CALL Decomp80_setup_3b ; 03C2F7/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C2FB/94E703
ASM_CALL Transfer_Graphics_3b ; 03C2FE/07079D00 // 00/8698 setup
.long DATA8_03E76E ; 03C302/6EE703
ASM_CALL Decomp80_setup_3b ; 03C305/07F99C00 // Decomp80 setup
.long DATA8_03E783 ; 03C309/83E703
SET_YPOS #256 ; 03C30C/400001
ASM_CALL _063x_stuff_4b ; 03C30F/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C313/0200
.word $0005 ; 03C315/0500
MOV VAR3,REG ; 03C317/2303
DATA8_03C319:
ASM_CALL Get_Equipment_Description ; 03C319/07AAD803
DATA8_03C31D:
WAIT #1 ; 03C31D/0601
ASM_CALL Shop_input_checker ; 03C31F/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C323/1106
.word DATA8_03C31D ; 03C325/1DC3
.word DATA8_03C37B ; 03C327/7BC3
.word DATA8_03C34B ; 03C329/4BC3
.word DATA8_03C319 ; 03C32B/19C3
.word DATA8_03C331 ; 03C32D/31C3
.word DATA8_03C33E ; 03C32F/3EC3
DATA8_03C331:
SET_ANIM #-1 ; 03C331/30FF
ASM_CALL Sub_03D756 ; 03C333/0756D703
ASM_CALL Sub_00A764_far ; 03C337/0760A700 // Involved in text display
JMP DATA8_03C319 ; 03C33B/1A19C3
DATA8_03C33E:
SET_ANIM #-1 ; 03C33E/30FF
ASM_CALL Sub_03D76E ; 03C340/076ED703
ASM_CALL Sub_00A764_far ; 03C344/0760A700 // Involved in text display
JMP DATA8_03C319 ; 03C348/1A19C3
DATA8_03C34B:
ASM_CALL Clear_Event_varX_1b ; 03C34B/07C99C00 // Menu Stuffs
.byte $03 ; 03C34F/03
ASM_CALL Sub_03DA03 ; 03C350/0703DA03
ASM_CALL Sub_03D240 ; 03C354/0740D203
WAIT #1 ; 03C358/0601
ASM_CALL Shop_cursor_setup_3b ; 03C35A/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E675 ; 03C35E/75E603
MOV VAR0,#$0001 ; 03C361/0F000100
ASM_CALL Set_Cursors_1b ; 03C365/0709E503 // Set Cursors
.byte $00 ; 03C369/00
ASM_CALL Decomp80_setup_3b ; 03C36A/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C36E/94E703
ASM_CALL Transfer_Graphics_3b ; 03C371/07079D00 // 00/8698 setup
.long DATA8_03E759 ; 03C375/59E703
JMP DATA8_03C214 ; 03C378/1A14C2
DATA8_03C37B:
ASM_CALL Get_Weapon_Shop_related ; 03C37B/07FED503
MULTI_JMP #3 ; 03C37F/1103
.word DATA8_03C3F4 ; 03C381/F4C3
.word DATA8_03C3C0 ; 03C383/C0C3
.word DATA8_03C387 ; 03C385/87C3
DATA8_03C387:
ASM_CALL Store_RAM_2b_into_2b ; 03C387/07F8E403 // Store [RAM] into [RAM]
.word Shop_selection ; 03C38B/8518
.word $18A1 ; 03C38D/A118
ASM_CALL _063x_stuff_4b ; 03C38F/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C393/0200
.word $0001 ; 03C395/0100
MOV VAR2,REG ; 03C397/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03C399/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Cant_Trade ; 03C39D/72DE08
.byte $00 ; 03C3A0/00
JSR Pause_Loop ; 03C3A1/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03C3A4/07449C00 // Get/Set Sound Effect
.byte 6 ; 03C3A8/06
ASM_CALL Clear_Event_varX_1b ; 03C3A9/07C99C00 // Menu Stuffs
.byte $02 ; 03C3AD/02
ASM_CALL Shop_cursor_setup_3b ; 03C3AE/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E6DE ; 03C3B2/DEE603
ASM_CALL Sub_03D9A3 ; 03C3B5/07A3D903
ASM_CALL Sub_03D781 ; 03C3B9/0781D703
JMP DATA8_03C319 ; 03C3BD/1A19C3
DATA8_03C3C0:
ASM_CALL Store_RAM_2b_into_2b ; 03C3C0/07F8E403 // Store [RAM] into [RAM]
.word Shop_selection ; 03C3C4/8518
.word $18A1 ; 03C3C6/A118
ASM_CALL _063x_stuff_4b ; 03C3C8/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C3CC/0200
.word $0001 ; 03C3CE/0100
MOV VAR2,REG ; 03C3D0/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03C3D2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Money ; 03C3D6/89DD08
.byte $00 ; 03C3D9/00
JSR Pause_Loop ; 03C3DA/1BD4CF
ASM_CALL Clear_Event_varX_1b ; 03C3DD/07C99C00 // Menu Stuffs
.byte $02 ; 03C3E1/02
ASM_CALL Shop_cursor_setup_3b ; 03C3E2/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E6DE ; 03C3E6/DEE603
ASM_CALL Sub_03D9A3 ; 03C3E9/07A3D903
ASM_CALL Sub_03D781 ; 03C3ED/0781D703
JMP DATA8_03C319 ; 03C3F1/1A19C3
DATA8_03C3F4:
ASM_CALL Clear_Event_varX_1b ; 03C3F4/07C99C00 // Menu Stuffs
.byte $03 ; 03C3F8/03
ASM_CALL Decomp80_setup_3b ; 03C3F9/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C3FD/94E703
ASM_CALL _063x_stuff_4b ; 03C400/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C404/6800
.word $0000 ; 03C406/0000
MOV VAR3,REG ; 03C408/2303
ASM_CALL Setup_Text_Parser_3b_1b ; 03C40A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C40E/E3CC08
.byte $01 ; 03C411/01
WAIT #1 ; 03C412/0601
ASM_CALL GetSet_SFX_1b ; 03C414/07449C00 // Get/Set Sound Effect
.byte 5 ; 03C418/05
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C419/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03C41D/8E950D
.byte $02 ; 03C420/02
.word 2 ; 03C421/0200
ASM_CALL Setup_Text_Parser_3b_1b ; 03C423/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Traded_X ; 03C427/5EDE08
.byte $00 ; 03C42A/00
JSR Pause_Loop ; 03C42B/1BD4CF
ASM_CALL Setup_Text_Parser_3b_1b ; 03C42E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Anything_else ; 03C432/CFDC08
.byte $00 ; 03C435/00
JMP DATA8_03C138 ; 03C436/1A38C1
DATA8_03C439:
ASM_CALL Shop_cursor_setup_3b ; 03C439/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Outfitter_main; 03C43D/CDE603
MOV VAR0,#$0000 ; 03C440/0F000000
ASM_CALL Shop_input_related ; 03C444/07B0D303
WAIT #1 ; 03C448/0601
ASM_CALL Transfer_Graphics_3b ; 03C44A/07079D00 // 00/8698 setup
.long DATA8_03E759 ; 03C44E/59E703
ASM_CALL Clear_Event_varX_1b ; 03C451/07C99C00 // Menu Stuffs
.byte $03 ; 03C455/03
DATA8_03C456:
ASM_CALL Get_Item_Description ; 03C456/0736D403
DATA8_03C45A:
WAIT #1 ; 03C45A/0601
ASM_CALL Shop_input_checker ; 03C45C/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C460/1106
.word DATA8_03C45A ; 03C462/5AC4
.word DATA8_03C4A8 ; 03C464/A8C4
.word DATA8_03C488 ; 03C466/88C4
.word DATA8_03C456 ; 03C468/56C4
.word DATA8_03C46E ; 03C46A/6EC4
.word DATA8_03C47B ; 03C46C/7BC4
DATA8_03C46E:
SET_ANIM #-1 ; 03C46E/30FF
ASM_CALL Prev_Shop_Item ; 03C470/0785D303
ASM_CALL Sub_00A764_far ; 03C474/0760A700 // Involved in text display
JMP DATA8_03C456 ; 03C478/1A56C4
DATA8_03C47B:
SET_ANIM #-1 ; 03C47B/30FF
ASM_CALL Next_Shop_Item ; 03C47D/079DD303
ASM_CALL Sub_00A764_far ; 03C481/0760A700 // Involved in text display
JMP DATA8_03C456 ; 03C485/1A56C4
DATA8_03C488:
ASM_CALL _063x_stuff_4b ; 03C488/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C48C/6800
.word $0000 ; 03C48E/0000
MOV VAR3,REG ; 03C490/2303
ASM_CALL Decomp80_setup_3b ; 03C492/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C496/94E703
ASM_CALL Setup_Text_Parser_3b_1b ; 03C499/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Anything_else ; 03C49D/CFDC08
.byte $00 ; 03C4A0/00
MOV VAR0,#$0001 ; 03C4A1/0F000100
JMP DATA8_03C13C ; 03C4A5/1A3CC1
DATA8_03C4A8:
ASM_CALL Store_RAM_2b_into_2b ; 03C4A8/07F8E403 // Store [RAM] into [RAM]
.word Shop_selection ; 03C4AC/8518
.word $189F ; 03C4AE/9F18
ASM_CALL Shop_cursor_setup_3b ; 03C4B0/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E675 ; 03C4B4/75E603
DATA8_03C4B7:
ASM_CALL _063x_stuff_4b ; 03C4B7/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C4BB/0200
.word $0006 ; 03C4BD/0600
MOV VAR2,REG ; 03C4BF/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03C4C1/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Pay_How ; 03C4C5/64DC08
.byte $00 ; 03C4C8/00
JSR Inn_Wait_for_input ; 03C4C9/1BDFCF
DATA8_03C4CC:
WAIT #1 ; 03C4CC/0601
ASM_CALL Shop_input_checker ; 03C4CE/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C4D2/1106
.word DATA8_03C4CC ; 03C4D4/CCC4
.word DATA8_03C4FD ; 03C4D6/FDC4
.word DATA8_03C4E0 ; 03C4D8/E0C4
.word DATA8_03C4CC ; 03C4DA/CCC4
.word DATA8_03C4CC ; 03C4DC/CCC4
.word DATA8_03C4CC ; 03C4DE/CCC4
DATA8_03C4E0:
ASM_CALL Clear_Event_varX_1b ; 03C4E0/07C99C00 // Menu Stuffs
.byte $02 ; 03C4E4/02
ASM_CALL Shop_cursor_setup_3b ; 03C4E5/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Outfitter_main; 03C4E9/CDE603
ASM_CALL Shop_related_2b ; 03C4EC/0771DA03 // Shop related
.word 6303 ; 03C4F0/9F18
ASM_CALL Shop_input_related ; 03C4F2/07B0D303
ASM_CALL Sub_00A764_far ; 03C4F6/0760A700 // Involved in text display
JMP DATA8_03C456 ; 03C4FA/1A56C4
DATA8_03C4FD:
MOV REG,Shop_selection ; 03C4FD/1F8518
JNE DATA8_03C576 ; 03C500/0C76C5
ASM_CALL Sub_03D585 ; 03C503/0785D503
MULTI_JMP #3 ; 03C507/1103
.word DATA8_03C50F ; 03C509/0FC5
.word DATA8_03C543 ; 03C50B/43C5
.word DATA8_03C54E ; 03C50D/4EC5
DATA8_03C50F:
ASM_CALL Clear_Event_varX_1b ; 03C50F/07C99C00 // Menu Stuffs
.byte $02 ; 03C513/02
ASM_CALL _063x_stuff_4b ; 03C514/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C518/6800
.word $0000 ; 03C51A/0000
MOV VAR3,REG ; 03C51C/2303
ASM_CALL Setup_Text_Parser_3b_1b ; 03C51E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C522/E3CC08
.byte $01 ; 03C525/01
ASM_CALL Decomp80_setup_3b ; 03C526/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C52A/94E703
WAIT #1 ; 03C52D/0601
ASM_CALL GetSet_SFX_1b ; 03C52F/07449C00 // Get/Set Sound Effect
.byte 5 ; 03C533/05
ASM_CALL Setup_Text_Parser_3b_1b ; 03C534/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Thanks ; 03C538/95DC08
.byte $00 ; 03C53B/00
MOV VAR0,#$0001 ; 03C53C/0F000100
JMP DATA8_03C13C ; 03C540/1A3CC1
DATA8_03C543:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C543/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Money ; 03C547/89DD08
.byte $00 ; 03C54A/00
JMP DATA8_03C556 ; 03C54B/1A56C5
DATA8_03C54E:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C54E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Full_Items ; 03C552/BCDD08
.byte $00 ; 03C555/00
DATA8_03C556:
JSR Pause_Loop ; 03C556/1BD4CF
ASM_CALL Clear_Event_varX_1b ; 03C559/07C99C00 // Menu Stuffs
.byte $02 ; 03C55D/02
ASM_CALL Shop_cursor_setup_3b ; 03C55E/07A8E203 // Shop cursor setup
.long Shop_cursor_data_Outfitter_main; 03C562/CDE603
ASM_CALL Shop_related_2b ; 03C565/0771DA03 // Shop related
.word 6303 ; 03C569/9F18
ASM_CALL Shop_input_related ; 03C56B/07B0D303
ASM_CALL Sub_00A764_far ; 03C56F/0760A700 // Involved in text display
JMP DATA8_03C456 ; 03C573/1A56C4
DATA8_03C576:
ASM_CALL Get_Curr_Item ; 03C576/079FD903
JNE DATA8_03C588 ; 03C57A/0C88C5
ASM_CALL Setup_Text_Parser_3b_1b ; 03C57D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Trade ; 03C581/3EDE08
.byte $00 ; 03C584/00
JMP DATA8_03C556 ; 03C585/1A56C5
DATA8_03C588:
ASM_CALL Clear_Event_varX_1b ; 03C588/07C99C00 // Menu Stuffs
.byte $02 ; 03C58C/02
MOV VAR0,#$0000 ; 03C58D/0F000000
ASM_CALL Shop_cursor_setup_3b ; 03C591/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E6F5 ; 03C595/F5E603
ASM_CALL Trade_Draw_Items ; 03C598/0745D803
ASM_CALL Clear_Event_varX_1b ; 03C59C/07C99C00 // Menu Stuffs
.byte $03 ; 03C5A0/03
WAIT #1 ; 03C5A1/0601
ASM_CALL Decomp80_setup_3b ; 03C5A3/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C5A7/94E703
ASM_CALL Transfer_Graphics_3b ; 03C5AA/07079D00 // 00/8698 setup
.long DATA8_03E775 ; 03C5AE/75E703
ASM_CALL Decomp80_setup_3b ; 03C5B1/07F99C00 // Decomp80 setup
.long DATA8_03E783 ; 03C5B5/83E703
DATA8_03C5B8:
ASM_CALL Trade_Item ; 03C5B8/0745D903
DATA8_03C5BC:
WAIT #1 ; 03C5BC/0601
ASM_CALL Shop_input_checker ; 03C5BE/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C5C2/1106
.word DATA8_03C5BC ; 03C5C4/BCC5
.word DATA8_03C615 ; 03C5C6/15C6
.word DATA8_03C5EA ; 03C5C8/EAC5
.word DATA8_03C5B8 ; 03C5CA/B8C5
.word DATA8_03C5D0 ; 03C5CC/D0C5
.word DATA8_03C5DD ; 03C5CE/DDC5
DATA8_03C5D0:
SET_ANIM #-1 ; 03C5D0/30FF
ASM_CALL Sub_03D81A ; 03C5D2/071AD803
ASM_CALL Sub_00A764_far ; 03C5D6/0760A700 // Involved in text display
JMP DATA8_03C5B8 ; 03C5DA/1AB8C5
DATA8_03C5DD:
SET_ANIM #-1 ; 03C5DD/30FF
ASM_CALL Sub_03D832 ; 03C5DF/0732D803
ASM_CALL Sub_00A764_far ; 03C5E3/0760A700 // Involved in text display
JMP DATA8_03C5B8 ; 03C5E7/1AB8C5
DATA8_03C5EA:
ASM_CALL Sub_03DA3A ; 03C5EA/073ADA03
ASM_CALL Shop_input_related ; 03C5EE/07B0D303
WAIT #1 ; 03C5F2/0601
ASM_CALL Shop_cursor_setup_3b ; 03C5F4/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E675 ; 03C5F8/75E603
MOV VAR0,#$0001 ; 03C5FB/0F000100
ASM_CALL Set_Cursors_1b ; 03C5FF/0709E503 // Set Cursors
.byte $00 ; 03C603/00
ASM_CALL Decomp80_setup_3b ; 03C604/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C608/94E703
ASM_CALL Transfer_Graphics_3b ; 03C60B/07079D00 // 00/8698 setup
.long DATA8_03E759 ; 03C60F/59E703
JMP DATA8_03C4B7 ; 03C612/1AB7C4
DATA8_03C615:
ASM_CALL Get_Item_Prices ; 03C615/07D0D603
MULTI_JMP #3 ; 03C619/1103
.word DATA8_03C696 ; 03C61B/96C6
.word DATA8_03C65E ; 03C61D/5EC6
.word DATA8_03C621 ; 03C61F/21C6
DATA8_03C621:
ASM_CALL Store_RAM_2b_into_2b ; 03C621/07F8E403 // Store [RAM] into [RAM]
.word Shop_selection ; 03C625/8518
.word $18A1 ; 03C627/A118
ASM_CALL _063x_stuff_4b ; 03C629/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C62D/0200
.word $0006 ; 03C62F/0600
MOV VAR2,REG ; 03C631/2302
ASM_CALL Setup_Text_Parser_3b_1b ; 03C633/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Cant_Trade ; 03C637/72DE08
.byte $00 ; 03C63A/00
JSR Pause_Loop ; 03C63B/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03C63E/07449C00 // Get/Set Sound Effect
.byte 6 ; 03C642/06
ASM_CALL Clear_Event_varX_1b ; 03C643/07C99C00 // Menu Stuffs
.byte $02 ; 03C647/02
ASM_CALL Shop_cursor_setup_3b ; 03C648/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E6F5 ; 03C64C/F5E603
ASM_CALL Trade_Cursor_Sus1 ; 03C64F/07CED903
ASM_CALL Trade_Draw_Items ; 03C653/0745D803
ASM_CALL Sub_00A764_far ; 03C657/0760A700 // Involved in text display
JMP DATA8_03C5B8 ; 03C65B/1AB8C5
DATA8_03C65E:
ASM_CALL Store_RAM_2b_into_2b ; 03C65E/07F8E403 // Store [RAM] into [RAM]
.word Shop_selection ; 03C662/8518
.word $18A1 ; 03C664/A118
ASM_CALL _063x_stuff_4b ; 03C666/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C66A/0200
.word $0006 ; 03C66C/0600
MOV VAR2,REG ; 03C66E/2302
Trade_Fail_ASM:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C670/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Money ; 03C674/89DD08
.byte $00 ; 03C677/00
JSR Pause_Loop ; 03C678/1BD4CF
ASM_CALL Clear_Event_varX_1b ; 03C67B/07C99C00 // Menu Stuffs
.byte $02 ; 03C67F/02
ASM_CALL Shop_cursor_setup_3b ; 03C680/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E6F5 ; 03C684/F5E603
Trade_Investigate_Me:
ASM_CALL Trade_Cursor_Sus1 ; 03C687/07CED903
ASM_CALL Trade_Draw_Items ; 03C68B/0745D803
ASM_CALL Sub_00A764_far ; 03C68F/0760A700 // Involved in text display
JMP DATA8_03C5B8 ; 03C693/1AB8C5
DATA8_03C696:
ASM_CALL Decomp80_setup_3b ; 03C696/07F99C00 // Decomp80 setup
.long DATA8_03E794 ; 03C69A/94E703
ASM_CALL _063x_stuff_4b ; 03C69D/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C6A1/6800
.word $0000 ; 03C6A3/0000
MOV VAR3,REG ; 03C6A5/2303
ASM_CALL Setup_Text_Parser_3b_1b ; 03C6A7/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C6AB/E3CC08
.byte $01 ; 03C6AE/01
WAIT #1 ; 03C6AF/0601
ASM_CALL GetSet_SFX_1b ; 03C6B1/07449C00 // Get/Set Sound Effect
.byte 5 ; 03C6B5/05
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C6B6/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03C6BA/8E950D
.byte $02 ; 03C6BD/02
.word 2 ; 03C6BE/0200
ASM_CALL Setup_Text_Parser_3b_1b ; 03C6C0/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Traded_X ; 03C6C4/5EDE08
.byte $00 ; 03C6C7/00
JSR Pause_Loop ; 03C6C8/1BD4CF
ASM_CALL Setup_Text_Parser_3b_1b ; 03C6CB/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Anything_else ; 03C6CF/CFDC08
.byte $00 ; 03C6D2/00
MOV VAR0,#$0001 ; 03C6D3/0F000100
JMP DATA8_03C13C ; 03C6D7/1A3CC1
DATA8_03C6DA:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C6DA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Sell_Choice ; 03C6DE/09DD08
.byte $00 ; 03C6E1/00
JSR Inn_Wait_for_input ; 03C6E2/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03C6E5/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E680 ; 03C6E9/80E603
DATA8_03C6EC:
WAIT #1 ; 03C6EC/0601
ASM_CALL Shop_input_checker ; 03C6EE/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C6F2/1106
.word DATA8_03C6EC ; 03C6F4/ECC6
.word DATA8_03C700 ; 03C6F6/00C7
.word DATA8_03C70D ; 03C6F8/0DC7
.word DATA8_03C6EC ; 03C6FA/ECC6
.word DATA8_03C6EC ; 03C6FC/ECC6
.word DATA8_03C6EC ; 03C6FE/ECC6
DATA8_03C700:
MOV VAR0,#$0000 ; 03C700/0F000000
MOV REG,Shop_selection ; 03C704/1F8518
MULTI_JMP #2 ; 03C707/1102
.word DATA8_03C71C ; 03C709/1CC7
.word DATA8_03C8A9 ; 03C70B/A9C8
DATA8_03C70D:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C70D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Anything_else ; 03C711/CFDC08
.byte $00 ; 03C714/00
MOV VAR0,#$0002 ; 03C715/0F000200
JMP DATA8_03C13C ; 03C719/1A3CC1
DATA8_03C71C:
ASM_CALL Shop_cursor_setup_3b ; 03C71C/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E70C ; 03C720/0CE703
ASM_CALL Shop_Equipment_Helper ; 03C723/078FDA03
JEQ DATA8_03C89B ; 03C727/0B9BC8
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C72A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Gray ; 03C72E/90950D
.byte $02 ; 03C731/02
.word 2 ; 03C732/0200
ASM_CALL Decomp80_setup_3b ; 03C734/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03C738/9DE703
ASM_CALL Setup_Text_Parser_3b_1b ; 03C73B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Menu_Sell_8_Weapons ; 03C73F/F2E008
.byte $01 ; 03C742/01
WAIT #1 ; 03C743/0601
ASM_CALL Clear_Event_varX_1b ; 03C745/07C99C00 // Menu Stuffs
.byte $03 ; 03C749/03
ASM_CALL MainScr_Remove_1b ; 03C74A/07B69D00 // Main Screen remove
.byte $02 ; 03C74E/02
SET_YPOS #256 ; 03C74F/400001
ASM_CALL _063x_stuff_4b ; 03C752/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C756/0200
.word $0005 ; 03C758/0500
MOV VAR3,REG ; 03C75A/2303
DATA8_03C75C:
ASM_CALL Sell_Weapon_Desc ; 03C75C/0773DB03
DATA8_03C760:
WAIT #1 ; 03C760/0601
ASM_CALL Shop_input_checker ; 03C762/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C766/1106
.word DATA8_03C760 ; 03C768/60C7
.word DATA8_03C774 ; 03C76A/74C7
.word DATA8_03CA08 ; 03C76C/08CA
.word DATA8_03C75C ; 03C76E/5CC7
.word DATA8_03C818 ; 03C770/18C8
.word DATA8_03C760 ; 03C772/60C7
DATA8_03C774:
ASM_CALL Clear_Event_varX_1b ; 03C774/07C99C00 // Menu Stuffs
.byte $03 ; 03C778/03
ASM_CALL Sub_03DCAB ; 03C779/07ABDC03
MULTI_JMP #2 ; 03C77D/1102
.word DATA8_03C783 ; 03C77F/83C7
.word DATA8_03C7FB ; 03C781/FBC7
DATA8_03C783:
ASM_CALL _063x_stuff_4b ; 03C783/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C787/6800
.word $0000 ; 03C789/0000
MOV VAR3,REG ; 03C78B/2303
ASM_CALL Setup_Text_Parser_3b_1b ; 03C78D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C791/E3CC08
.byte $01 ; 03C794/01
WAIT #1 ; 03C795/0601
ASM_CALL MainScr_Add_1b ; 03C797/07A89D00 // Main Screen add
.byte $02 ; 03C79B/02
ASM_CALL Transfer_Graphics_3b ; 03C79C/07079D00 // 00/8698 setup
.long DATA8_03E767 ; 03C7A0/67E703
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C7A3/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03C7A7/8E950D
.byte $02 ; 03C7AA/02
.word 2 ; 03C7AB/0200
ASM_CALL Setup_Text_Parser_3b_1b ; 03C7AD/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Sell_Price ; 03C7B1/CCDE08
.byte $00 ; 03C7B4/00
JSR Inn_Wait_for_input ; 03C7B5/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03C7B8/07A8E203 // Shop cursor setup
.long Shop_cursor_data_spirit_healer; 03C7BC/A1E603
DATA8_03C7BF:
WAIT #1 ; 03C7BF/0601
ASM_CALL Shop_input_checker ; 03C7C1/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C7C5/1106
.word DATA8_03C7BF ; 03C7C7/BFC7
.word DATA8_03C7D3 ; 03C7C9/D3C7
.word WP_Anything_else ; 03C7CB/1ECA
.word DATA8_03C7BF ; 03C7CD/BFC7
.word DATA8_03C7BF ; 03C7CF/BFC7
.word DATA8_03C7BF ; 03C7D1/BFC7
DATA8_03C7D3:
MOV REG,Shop_selection ; 03C7D3/1F8518
JNE WP_Anything_else ; 03C7D6/0C1ECA
ASM_CALL GetSet_SFX_1b ; 03C7D9/07449C00 // Get/Set Sound Effect
.byte 5 ; 03C7DD/05
ASM_CALL Shut_Up_And_Take_My_Money ; 03C7DE/0750DD03
ASM_CALL Setup_Text_Parser_3b_1b ; 03C7E2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C7E6/E3CC08
.byte $01 ; 03C7E9/01
WAIT #1 ; 03C7EA/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 03C7EC/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Thanks ; 03C7F0/95DC08
.byte $00 ; 03C7F3/00
MOV VAR0,#$0002 ; 03C7F4/0F000200
JMP DATA8_03C13C ; 03C7F8/1A3CC1
DATA8_03C7FB:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C7FB/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03C7FF/8E950D
.byte $02 ; 03C802/02
.word 2 ; 03C803/0200
ASM_CALL Setup_Text_Parser_3b_1b ; 03C805/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Cant_Sell ; 03C809/9FDE08
.byte $00 ; 03C80C/00
JSR Pause_Loop ; 03C80D/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03C810/07449C00 // Get/Set Sound Effect
.byte 6 ; 03C814/06
JMP DATA8_03CA0D ; 03C815/1A0DCA
DATA8_03C818:
ASM_CALL Clear_Event_varX_1b ; 03C818/07C99C00 // Menu Stuffs
.byte $03 ; 03C81C/03
ASM_CALL Shop_cursor_setup_3b ; 03C81D/07A8E203 // Shop cursor setup
.long Shop_cursor__data_03E68B ; 03C821/8BE603
MOV.w Shop_selection,#$0001 ; 03C824/1685180100
MOV.w $188B,#$0001 ; 03C829/168B180100
MOV.w $188F,#$0001 ; 03C82E/168F180100
ASM_CALL Setup_Text_Parser_3b_1b ; 03C833/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Speaking_text_setup ; 03C837/BACC08
.byte $00 ; 03C83A/00
DATA8_03C83B:
WAIT #1 ; 03C83B/0601
ASM_CALL Shop_input_checker ; 03C83D/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C841/1106
.word DATA8_03C83B ; 03C843/3BC8
.word DATA8_03C86A ; 03C845/6AC8
.word DATA8_03CA0D ; 03C847/0DCA
.word DATA8_03C83B ; 03C849/3BC8
.word DATA8_03C83B ; 03C84B/3BC8
.word DATA8_03C84F ; 03C84D/4FC8
DATA8_03C84F:
ASM_CALL Shop_cursor_setup_3b ; 03C84F/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E70C ; 03C853/0CE703
ASM_CALL Shop_Equipment_Helper ; 03C856/078FDA03
SET_YPOS #256 ; 03C85A/400001
ASM_CALL _063x_stuff_4b ; 03C85D/0723E503 // Involves the 063x vars (sprite data)
.word $0002 ; 03C861/0200
.word $0005 ; 03C863/0500
MOV VAR3,REG ; 03C865/2303
JMP DATA8_03C75C ; 03C867/1A5CC7
DATA8_03C86A:
MOV REG,Shop_selection ; 03C86A/1F8518
JNE DATA8_03C87E ; 03C86D/0C7EC8
ASM_CALL Sub_03DC0D ; 03C870/070DDC03
ASM_CALL Shop_cursor_setup_3b ; 03C874/07A8E203 // Shop cursor setup
.long Shop_cursor__data_03E68B ; 03C878/8BE603
JMP DATA8_03C83B ; 03C87B/1A3BC8
DATA8_03C87E:
ASM_CALL Sub_03DC2A ; 03C87E/072ADC03
ASM_CALL Shop_cursor_setup_3b ; 03C882/07A8E203 // Shop cursor setup
.long Shop_cursor__data_03E68B ; 03C886/8BE603
MOV.w Shop_selection,#$0001 ; 03C889/1685180100
MOV.w $188B,#$0001 ; 03C88E/168B180100
MOV.w $188F,#$0001 ; 03C893/168F180100
JMP DATA8_03C83B ; 03C898/1A3BC8
DATA8_03C89B:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C89B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Equipment ; 03C89F/F4DD08
.byte $00 ; 03C8A2/00
JSR Pause_Loop ; 03C8A3/1BD4CF
JMP WP_Anything_else ; 03C8A6/1A1ECA
DATA8_03C8A9:
ASM_CALL Shop_cursor_setup_3b ; 03C8A9/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E70C ; 03C8AD/0CE703
ASM_CALL Sub_03DB19 ; 03C8B0/0719DB03
JEQ Code_Outfitter_No_Items ; 03C8B4/0BFAC9
ASM_CALL Decomp80_setup_3b ; 03C8B7/07F99C00 // Decomp80 setup
.long DATA8_03E79D ; 03C8BB/9DE703
ASM_CALL Setup_Text_Parser_3b_1b ; 03C8BE/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Menu_Sell_8_Items ; 03C8C2/90E108
.byte $01 ; 03C8C5/01
WAIT #1 ; 03C8C6/0601
ASM_CALL Clear_Event_varX_1b ; 03C8C8/07C99C00 // Menu Stuffs
.byte $03 ; 03C8CC/03
ASM_CALL MainScr_Remove_1b ; 03C8CD/07B69D00 // Main Screen remove
.byte $02 ; 03C8D1/02
DATA8_03C8D2:
ASM_CALL Get_Sale_Item_Description ; 03C8D2/07E4DB03
DATA8_03C8D6:
WAIT #1 ; 03C8D6/0601
ASM_CALL Shop_input_checker ; 03C8D8/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C8DC/1106
.word DATA8_03C8D6 ; 03C8DE/D6C8
.word DATA8_03C8EA ; 03C8E0/EAC8
.word DATA8_03CA0D ; 03C8E2/0DCA
.word DATA8_03C8D2 ; 03C8E4/D2C8
.word DATA8_03C989 ; 03C8E6/89C9
.word DATA8_03C8D6 ; 03C8E8/D6C8
DATA8_03C8EA:
ASM_CALL Get_Item_Name ; 03C8EA/07F9DC03
MULTI_JMP #2 ; 03C8EE/1102
.word DATA8_03C8F4 ; 03C8F0/F4C8
.word DATA8_03C96C ; 03C8F2/6CC9
DATA8_03C8F4:
ASM_CALL _063x_stuff_4b ; 03C8F4/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03C8F8/6800
.word $0000 ; 03C8FA/0000
MOV VAR3,REG ; 03C8FC/2303
ASM_CALL Setup_Text_Parser_3b_1b ; 03C8FE/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C902/E3CC08
.byte $01 ; 03C905/01
WAIT #1 ; 03C906/0601
ASM_CALL MainScr_Add_1b ; 03C908/07A89D00 // Main Screen add
.byte $02 ; 03C90C/02
ASM_CALL Transfer_Graphics_3b ; 03C90D/07079D00 // 00/8698 setup
.long DATA8_03E767 ; 03C911/67E703
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C914/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03C918/8E950D
.byte $02 ; 03C91B/02
.word 2 ; 03C91C/0200
ASM_CALL Setup_Text_Parser_3b_1b ; 03C91E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Sell_Price ; 03C922/CCDE08
.byte $00 ; 03C925/00
JSR Inn_Wait_for_input ; 03C926/1BDFCF
ASM_CALL Shop_cursor_setup_3b ; 03C929/07A8E203 // Shop cursor setup
.long Shop_cursor_data_spirit_healer; 03C92D/A1E603
DATA8_03C930:
WAIT #1 ; 03C930/0601
ASM_CALL Shop_input_checker ; 03C932/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C936/1106
.word DATA8_03C930 ; 03C938/30C9
.word DATA8_03C944 ; 03C93A/44C9
.word WP_Anything_else ; 03C93C/1ECA
.word DATA8_03C930 ; 03C93E/30C9
.word DATA8_03C930 ; 03C940/30C9
.word DATA8_03C930 ; 03C942/30C9
DATA8_03C944:
MOV REG,Shop_selection ; 03C944/1F8518
JNE WP_Anything_else ; 03C947/0C1ECA
ASM_CALL GetSet_SFX_1b ; 03C94A/07449C00 // Get/Set Sound Effect
.byte 5 ; 03C94E/05
ASM_CALL Shut_up_and_take_my_money_2 ; 03C94F/07C3DD03
ASM_CALL Setup_Text_Parser_3b_1b ; 03C953/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Sub_Shop_menu_GP ; 03C957/E3CC08
.byte $01 ; 03C95A/01
WAIT #1 ; 03C95B/0601
ASM_CALL Setup_Text_Parser_3b_1b ; 03C95D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Thanks ; 03C961/95DC08
.byte $00 ; 03C964/00
MOV VAR0,#$0002 ; 03C965/0F000200
JMP DATA8_03C13C ; 03C969/1A3CC1
DATA8_03C96C:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03C96C/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 03C970/8E950D
.byte $02 ; 03C973/02
.word 2 ; 03C974/0200
ASM_CALL Setup_Text_Parser_3b_1b ; 03C976/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Cant_Sell ; 03C97A/9FDE08
.byte $00 ; 03C97D/00
JSR Pause_Loop ; 03C97E/1BD4CF
ASM_CALL GetSet_SFX_1b ; 03C981/07449C00 // Get/Set Sound Effect
.byte 6 ; 03C985/06
JMP DATA8_03CA0D ; 03C986/1A0DCA
DATA8_03C989:
ASM_CALL Shop_cursor_setup_3b ; 03C989/07A8E203 // Shop cursor setup
.long Shop_cursor__data_03E68B ; 03C98D/8BE603
MOV.w Shop_selection,#$0001 ; 03C990/1685180100
MOV.w $188B,#$0001 ; 03C995/168B180100
MOV.w $188F,#$0001 ; 03C99A/168F180100
ASM_CALL Setup_Text_Parser_3b_1b ; 03C99F/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Speaking_text_setup ; 03C9A3/BACC08
.byte $00 ; 03C9A6/00
DATA8_03C9A7:
WAIT #1 ; 03C9A7/0601
ASM_CALL Shop_input_checker ; 03C9A9/0717E303 // Shop input checker - Returns button pressed (A=1, B=2, )
MULTI_JMP #6 ; 03C9AD/1106
.word DATA8_03C9A7 ; 03C9AF/A7C9
.word DATA8_03C9C9 ; 03C9B1/C9C9
.word DATA8_03CA0D ; 03C9B3/0DCA
.word DATA8_03C9A7 ; 03C9B5/A7C9
.word DATA8_03C9A7 ; 03C9B7/A7C9
.word DATA8_03C9BB ; 03C9B9/BBC9
DATA8_03C9BB:
ASM_CALL Shop_cursor_setup_3b ; 03C9BB/07A8E203 // Shop cursor setup
.long Shop_cursor_data_03E70C ; 03C9BF/0CE703
ASM_CALL Sub_03DB19 ; 03C9C2/0719DB03
JMP DATA8_03C8D2 ; 03C9C6/1AD2C8
DATA8_03C9C9:
MOV REG,Shop_selection ; 03C9C9/1F8518
JNE DATA8_03C9DD ; 03C9CC/0CDDC9
ASM_CALL Sub_03DC5F ; 03C9CF/075FDC03
ASM_CALL Shop_cursor_setup_3b ; 03C9D3/07A8E203 // Shop cursor setup
.long Shop_cursor__data_03E68B ; 03C9D7/8BE603
JMP DATA8_03C9A7 ; 03C9DA/1AA7C9
DATA8_03C9DD:
ASM_CALL Shop_cursor_related ; 03C9DD/077CDC03
ASM_CALL Shop_cursor_setup_3b ; 03C9E1/07A8E203 // Shop cursor setup
.long Shop_cursor__data_03E68B ; 03C9E5/8BE603
MOV.w Shop_selection,#$0001 ; 03C9E8/1685180100
MOV.w $188B,#$0001 ; 03C9ED/168B180100
MOV.w $188F,#$0001 ; 03C9F2/168F180100
JMP DATA8_03C9A7 ; 03C9F7/1AA7C9
Code_Outfitter_No_Items:
ASM_CALL Setup_Text_Parser_3b_1b ; 03C9FA/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_No_Items ; 03C9FE/1ADE08
.byte $00 ; 03CA01/00
JSR Pause_Loop ; 03CA02/1BD4CF
JMP WP_Anything_else ; 03CA05/1A1ECA
DATA8_03CA08:
ASM_CALL Clear_Event_varX_1b ; 03CA08/07C99C00 // Menu Stuffs
.byte $03 ; 03CA0C/03
DATA8_03CA0D:
ASM_CALL _063x_stuff_4b ; 03CA0D/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03CA11/6800
.word $0000 ; 03CA13/0000
MOV VAR3,REG ; 03CA15/2303
WAIT #1 ; 03CA17/0601
ASM_CALL MainScr_Add_1b ; 03CA19/07A89D00 // Main Screen add
.byte $02 ; 03CA1D/02
WP_Anything_else:
ASM_CALL Setup_Text_Parser_3b_1b ; 03CA1E/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Outfitter_Anything_else ; 03CA22/CFDC08
.byte $00 ; 03CA25/00
MOV VAR0,#$0002 ; 03CA26/0F000200
JMP DATA8_03C13C ; 03CA2A/1A3CC1
Exiting_a_shop:
SET_ANIM #-1 ; 03CA2D/30FF
ASM_CALL Transfer_Graphics_3b ; 03CA2F/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 03CA33/74B601
MOV.w ShowCompass,#$0001 ; 03CA36/167B150100
ASM_CALL Color_stuff_2b ; 03CA3B/0762E503 // Color stuff
.word $0036 ; 03CA3F/3600
START_LOOP #32 ; 03CA41/0120
ASM_CALL Add_color_math_1b ; 03CA43/07BBE503 // Add color math designation
.byte $01 ; 03CA47/01
ASM_CALL Sound_stuff_1b ; 03CA48/07199C00 // Sound stuff
.byte $F8 ; 03CA4C/F8
WAIT #1 ; 03CA4D/0601
END_LOOP ; 03CA4F/02
ASM_CALL GetSet_Music_1b ; 03CA50/073C9C00 // Get/Set Music
.byte 0 ; 03CA54/00
ASM_CALL Clear_Event_varX_1b ; 03CA55/07C99C00 // Menu Stuffs
.byte $03 ; 03CA59/03
ASM_CALL MainScr_Add_1b ; 03CA5A/07A89D00 // Main Screen add
.byte $04 ; 03CA5E/04
ASM_CALL Town_loading ; 03CA5F/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 03CA63/07FDB303 // More Town Loading
ASM_CALL GetSet_Music_1b ; 03CA67/073C9C00 // Get/Set Music
.byte 89 ; 03CA6B/59
MOV VAR0,#$0000 ; 03CA6C/0F000000
MOV REG,#$0000 ; 03CA70/1E0000
RTL ; 03CA73/05
Traveling_to_dungeon:
MOV.w ShowCompass,#$0000 ; 03CA74/167B150000
ASM_CALL DoStuffWithEvent69 ; 03CA79/07E0AD03 // Do stuff with event 69
Call_Travel_ASM:
JSL Travel_subasm ; 03CA7D/045FD518
JSL Setup_Draw_Field_Sprites ; 03CA81/04C2CD03
ASM_CALL Dungeon_Enter ; 03CA85/0754E203
ASM_CALL Sub_Default_BGM ; 03CA89/0720A503 // Sub: Default Dungeon BGM
WAIT #15 ; 03CA8D/060F
START_LOOP #16 ; 03CA8F/0110
ASM_CALL Unfade ; 03CA91/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 03CA95/0603
END_LOOP ; 03CA97/02
MOV REG,#$0000 ; 03CA98/1E0000
ASM_CALL Sub_038761 ; 03CA9B/07618703
WAIT #1 ; 03CA9F/0601
ASM_CALL Map_stuff_and_vblank ; 03CAA1/073F8803 // Map stuff and vblank
MOV VAR0,#$0000 ; 03CAA5/0F000000
MOV REG,#$0001 ; 03CAA9/1E0100
RTL ; 03CAAC/05
Event_Main_68_SHOP_GFX:
ANIM_2 #$01 ; 03CAAD/2101
SET_XPOS #128 ; 03CAAF/388000
SET_YPOS #72 ; 03CAB2/404800
ASM_CALL Sub_Get_Shop_Gfx_Offset ; 03CAB5/078BCD03
MULTI_JMP #12 ; 03CAB9/110C
.word DATA8_03CAD3 ; 03CABB/D3CA
.word DATA8_03CAE0 ; 03CABD/E0CA
.word DATA8_03CAED ; 03CABF/EDCA
.word DATA8_03CAFA ; 03CAC1/FACA
.word DATA8_03CB07 ; 03CAC3/07CB
.word DATA8_03CB14 ; 03CAC5/14CB
.word DATA8_03CB21 ; 03CAC7/21CB
.word DATA8_03CB2E ; 03CAC9/2ECB
.word DATA8_03CB3B ; 03CACB/3BCB
.word DATA8_03CB4B ; 03CACD/4BCB
.word ASM_Continue_Palette_Shop_0A; 03CACF/58CB
.word ASM_Continue_Palette_Shop_0B; 03CAD1/E1CB
DATA8_03CAD3:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CAD3/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop00 ; 03CAD7/4BCC03
.byte $C0 ; 03CADA/C0
.word 32 ; 03CADB/2000
SET_ANIM #0 ; 03CADD/3000
HALT ; 03CADF/0A
DATA8_03CAE0:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CAE0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop01 ; 03CAE4/6BCC03
.byte $C0 ; 03CAE7/C0
.word 32 ; 03CAE8/2000
SET_ANIM #0 ; 03CAEA/3000
HALT ; 03CAEC/0A
DATA8_03CAED:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CAED/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop02 ; 03CAF1/8BCC03
.byte $C0 ; 03CAF4/C0
.word 32 ; 03CAF5/2000
SET_ANIM #1 ; 03CAF7/3001
HALT ; 03CAF9/0A
DATA8_03CAFA:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CAFA/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop03 ; 03CAFE/ABCC03
.byte $C0 ; 03CB01/C0
.word 32 ; 03CB02/2000
SET_ANIM #1 ; 03CB04/3001
HALT ; 03CB06/0A
DATA8_03CB07:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CB07/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop04 ; 03CB0B/CBCC03
.byte $C0 ; 03CB0E/C0
.word 32 ; 03CB0F/2000
SET_ANIM #2 ; 03CB11/3002
HALT ; 03CB13/0A
DATA8_03CB14:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CB14/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop05 ; 03CB18/EBCC03
.byte $C0 ; 03CB1B/C0
.word 32 ; 03CB1C/2000
SET_ANIM #2 ; 03CB1E/3002
HALT ; 03CB20/0A
DATA8_03CB21:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CB21/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop06 ; 03CB25/0BCD03
.byte $C0 ; 03CB28/C0
.word 64 ; 03CB29/4000
SET_ANIM #3 ; 03CB2B/3003
HALT ; 03CB2D/0A
DATA8_03CB2E:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CB2E/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop01 ; 03CB32/6BCC03
.byte $C0 ; 03CB35/C0
.word 32 ; 03CB36/2000
SET_ANIM #5 ; 03CB38/3005
HALT ; 03CB3A/0A
DATA8_03CB3B:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CB3B/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop08 ; 03CB3F/6BCD03
.byte $C0 ; 03CB42/C0
.word 32 ; 03CB43/2000
SET_YPOS #80 ; 03CB45/405000
SET_ANIM #4 ; 03CB48/3004
HALT ; 03CB4A/0A
DATA8_03CB4B:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CB4B/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Shop01 ; 03CB4F/6BCC03
.byte $C0 ; 03CB52/C0
.word 32 ; 03CB53/2000
SET_ANIM #6 ; 03CB55/3006
HALT ; 03CB57/0A
ASM_Continue_Palette_Shop_0A:
WAIT #1 ; 03CB58/0601
MOV REG,$189F ; 03CB5A/1F9F18
MULTI_JMP #6 ; 03CB5D/1106
.word ASM_Continue_Palette_Shop_0A; 03CB5F/58CB
.word DATA8_03CB71 ; 03CB61/71CB
.word DATA8_03CB6B ; 03CB63/6BCB
.word DATA8_03CB6B ; 03CB65/6BCB
.word DATA8_03CB6B ; 03CB67/6BCB
.word DATA8_03CBB7 ; 03CB69/B7CB
DATA8_03CB6B:
MOV.w $189F,#$0005 ; 03CB6B/169F180500
HALT ; 03CB70/0A
DATA8_03CB71:
SET_XPOS #224 ; 03CB71/38E000
SET_YPOS #96 ; 03CB74/406000
SET_ANIMPTR Tbl_Tileset_Event12_STORY ; 03CB77/1DD9C01C
SET_ANIM #59 ; 03CB7B/303B
SET_XVEL #-256 ; 03CB7D/5800FF
WAIT #60 ; 03CB80/063C
SET_XVEL #0 ; 03CB82/580000
MOV.w $189F,#$0005 ; 03CB85/169F180500
DATA8_03CB8A:
WAIT #1 ; 03CB8A/0601
MOV REG,$18A1 ; 03CB8C/1FA118
MULTI_JMP #3 ; 03CB8F/1103
.word DATA8_03CB8A ; 03CB91/8ACB
.word DATA8_03CB97 ; 03CB93/97CB
.word DATA8_03CBB1 ; 03CB95/B1CB
DATA8_03CB97:
ASM_CALL _063x_stuff_4b ; 03CB97/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03CB9B/6800
.word $0000 ; 03CB9D/0000
MOV VAR3,REG ; 03CB9F/2303
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03CBA1/0751A000 // Loop til (RAM) is (val)
.word $18A1 ; 03CBA5/A118
.word 0 ; 03CBA7/0000
ASM_CALL Clear_Event_varX_1b ; 03CBA9/07C99C00 // Menu Stuffs
.byte $03 ; 03CBAD/03
JMP DATA8_03CB8A ; 03CBAE/1A8ACB
DATA8_03CBB1:
MOV.w $189F,#$0006 ; 03CBB1/169F180600
HALT ; 03CBB6/0A
DATA8_03CBB7:
SET_XPOS #72 ; 03CBB7/384800
SET_YPOS #108 ; 03CBBA/406C00
SET_ANIMPTR Tbl_Tileset_Event12_STORY ; 03CBBD/1DD9C01C
SET_ANIM #8 ; 03CBC1/3008
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03CBC3/0751A000 // Loop til (RAM) is (val)
.word $18A1 ; 03CBC7/A118
.word 2 ; 03CBC9/0200
DATA8_03CBCB:
SET_ANIM #8 ; 03CBCB/3008
WAIT #5 ; 03CBCD/0605
SET_ANIM #9 ; 03CBCF/3009
WAIT #5 ; 03CBD1/0605
ASM_CALL RAM_minus_val_2b_2b ; 03CBD3/076FA000 // (RAM) minus (val)
.word $18A1 ; 03CBD7/A118
.word 3 ; 03CBD9/0300
JNE DATA8_03CBCB ; 03CBDB/0CCBCB
SET_ANIM #8 ; 03CBDE/3008
HALT ; 03CBE0/0A
ASM_Continue_Palette_Shop_0B:
WAIT #1 ; 03CBE1/0601
MOV REG,$189F ; 03CBE3/1F9F18
MULTI_JMP #3 ; 03CBE6/1103
.word ASM_Continue_Palette_Shop_0B; 03CBE8/E1CB
.word DATA8_03CBEE ; 03CBEA/EECB
.word DATA8_03CC1F ; 03CBEC/1FCC
DATA8_03CBEE:
SET_XPOS #224 ; 03CBEE/38E000
SET_YPOS #112 ; 03CBF1/407000
SET_ANIMPTR Tbl_Tileset_Event12_STORY ; 03CBF4/1DD9C01C
SET_ANIM #78 ; 03CBF8/304E
SET_XVEL #-256 ; 03CBFA/5800FF
WAIT #60 ; 03CBFD/063C
SET_XVEL #0 ; 03CBFF/580000
MOV.w $189F,#$0002 ; 03CC02/169F180200
ASM_CALL _063x_stuff_4b ; 03CC07/0723E503 // Involves the 063x vars (sprite data)
.word $0068 ; 03CC0B/6800
.word $0000 ; 03CC0D/0000
MOV VAR3,REG ; 03CC0F/2303
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 03CC11/0751A000 // Loop til (RAM) is (val)
.word $189F ; 03CC15/9F18
.word 3 ; 03CC17/0300
ASM_CALL Clear_Event_varX_1b ; 03CC19/07C99C00 // Menu Stuffs
.byte $03 ; 03CC1D/03
HALT ; 03CC1E/0A
DATA8_03CC1F:
SET_XPOS #72 ; 03CC1F/384800
SET_YPOS #124 ; 03CC22/407C00
SET_ANIMPTR Tbl_Tileset_Event12_STORY ; 03CC25/1DD9C01C
DATA8_03CC29:
WAIT #1 ; 03CC29/0601
MOV REG,$18A1 ; 03CC2B/1FA118
MULTI_JMP #3 ; 03CC2E/1103
.word DATA8_03CC36 ; 03CC30/36CC
.word DATA8_03CC3B ; 03CC32/3BCC
.word DATA8_03CC40 ; 03CC34/40CC
DATA8_03CC36:
SET_ANIM #-1 ; 03CC36/30FF
JMP DATA8_03CC29 ; 03CC38/1A29CC
DATA8_03CC3B:
SET_ANIM #28 ; 03CC3B/301C
JMP DATA8_03CC29 ; 03CC3D/1A29CC
DATA8_03CC40:
SET_ANIM #29 ; 03CC40/301D
WAIT #5 ; 03CC42/0605
SET_ANIM #28 ; 03CC44/301C
WAIT #4 ; 03CC46/0604
JMP DATA8_03CC29 ; 03CC48/1A29CC
$03CDC2 - Sub: Field Sprites; Card Sprites
Setup_Draw_Field_Sprites:
JSL Sub_Setup_Field_Sprites1 ; 03CDC2/045A8901
JSL Sub_Setup_Field_Sprites2 ; 03CDC6/04848901
ASM_CALL Decomp80_setup_3b ; 03CDCA/07F99C00 // Decomp80 setup
.long RLE_Loc_0D833F ; 03CDCE/01800D
JSL Xfer_Window_Color ; 03CDD1/04068A01
JSR Sub_Load_Gfx_Rooks ; 03CDD5/1B75CE
Case_Slot2_Member:
ASM_CALL Get_Slot2_WeirdOffset ; 03CDD8/07BAAB07 // Get Slot2 Weird Offset (returns 4, or party ID - 1)
MULTI_JSR #5 ; 03CDDC/1205
.word Sub_Load_Gfx_Sylph ; 03CDDE/84CE
.word Sub_Load_Gfx_Marid ; 03CDE0/A6CE
.word Sub_Load_Gfx_Dao ; 03CDE2/BDCE
.word Sub_Load_Gfx_Efrite ; 03CDE4/D4CE
.word Sub_Load_Gfx_Skull_Card ; 03CDE6/EBCE
ASM_CALL RAM_Decomp_801A ; 03CDE8/0712800E // RAM Decomp (801A)
Case_Slot3_Member:
ASM_CALL Get_Slot3_WeirdOffset ; 03CDEC/07CBAB07 // Get Slot3 Weird Offset
MULTI_JSR #3 ; 03CDF0/1203
.word Sub_Load_Gfx_Teefa ; 03CDF2/F6CE
.word Sub_Load_Gfx_Salah ; 03CDF4/13CF
.word Sub_Load_Gfx_Skull_Card1 ; 03CDF6/1ECF
ASM_CALL RAM_Decomp_802B ; 03CDF8/0723800E // RAM Decomp (802B)
Case_Slot4_Member:
ASM_CALL Get_Slot4_WeirdOffset ; 03CDFC/07DCAB07 // Get Slot4 Weird Offset
MULTI_JSR #3 ; 03CE00/1203
.word Sub_Load_Gfx_Darwin ; 03CE02/29CF
.word Sub_Load_Gfx_Axs ; 03CE04/34CF
.word Sub_Load_Gfx_Skull_Card2 ; 03CE06/3FCF
ASM_CALL RAM_Decomp_803C ; 03CE08/0734800E // RAM Decomp (803C)
MOV VAR2,#$0000 ; 03CE0C/0F020000
JSR Sub_Load_Palette_03CF4A ; 03CE10/1B4ACF
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CE13/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long RLE_0D_91F0 ; 03CE17/F0910D
.byte $70 ; 03CE1A/70
.word 18 ; 03CE1B/1200
JSL Xfer_Window_Color ; 03CE1D/04068A01
Case_Slot2_GetData:
ASM_CALL Get_Slot2_WeirdOffset ; 03CE21/07BAAB07 // Get Slot2 Weird Offset (returns 4, or party ID - 1)
MULTI_JSR #5 ; 03CE25/1205
.word DATA8_03CF59 ; 03CE27/59CF
.word DATA8_03CF5E ; 03CE29/5ECF
.word DATA8_03CF63 ; 03CE2B/63CF
.word DATA8_03CF68 ; 03CE2D/68CF
.word GetPalette_03CF6D ; 03CE2F/6DCF
MOV VAR2,#$0002 ; 03CE31/0F020200
Case_Slot3_GetData:
ASM_CALL Get_Slot3_WeirdOffset ; 03CE35/07CBAB07 // Get Slot3 Weird Offset
MULTI_JSR #3 ; 03CE39/1203
.word GetPalette_03CF82 ; 03CE3B/82CF
.word GetPalette_03CF91 ; 03CE3D/91CF
.word GetPalette_03CFA0 ; 03CE3F/A0CF
MOV VAR2,#$0003 ; 03CE41/0F020300
Case_Slot4_GetData:
ASM_CALL Get_Slot4_WeirdOffset ; 03CE45/07DCAB07 // Get Slot4 Weird Offset
MULTI_JSR #3 ; 03CE49/1203
.word GetPalette_03CFAB ; 03CE4B/ABCF
.word GetPalette_03CFBA ; 03CE4D/BACF
.word GetPalette_03CFC9 ; 03CE4F/C9CF
Similar_things:
JSL Sub_Battle_setup ; 03CE51/04648105
JSL Sub_Another_setup ; 03CE55/04888705
JSL Sub_More_setup ; 03CE59/04AE8E05
JSL Sub_Another_setup_again ; 03CE5D/046F9205
MOV.w ShowCompass,#$0001 ; 03CE61/167B150100
JSL Sub_Transfer_stuff ; 03CE66/04CD8901
JSL Something ; 03CE6A/046D8901
ASM_CALL Color_stuff_2b ; 03CE6E/0762E503 // Color stuff
.word $003F ; 03CE72/3F00
RTL ; 03CE74/05
Sub_Load_Gfx_Rooks:
ASM_CALL Decomp_Setup2_3b_3b ; 03CE75/0735A000 // Decompression setup 2
.long Sprite_Field_Rooks ; 03CE79/91810E
.long $7E8000 ; 03CE7C/00807E
ASM_CALL RAM_Decomp_8009 ; 03CE7F/0701800E // RAM Decomp (8009)
RTS ; 03CE83/1C
Sub_Load_Gfx_Sylph:
MOV REG,#$0001 ; 03CE84/1E0100
ASM_CALL Condition_Check_2b ; 03CE87/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 03CE8B/0100
JNE Load_Gfx_Torn_Card ; 03CE8D/0C9BCE
Load_Gfx_Sylph:
ASM_CALL Decomp_Setup2_3b_3b ; 03CE90/0735A000 // Decompression setup 2
.long Sprite_Field_Sylph ; 03CE94/A3950E
.long $7E8500 ; 03CE97/00857E
RTS ; 03CE9A/1C
Load_Gfx_Torn_Card:
ASM_CALL Decomp_Setup2_3b_3b ; 03CE9B/0735A000 // Decompression setup 2
.long Sprite_Torn_Card ; 03CE9F/CC8F0E
.long $7E8500 ; 03CEA2/00857E
RTS ; 03CEA5/1C
Sub_Load_Gfx_Marid:
MOV REG,#$0001 ; 03CEA6/1E0100
ASM_CALL Condition_Check_2b ; 03CEA9/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 03CEAD/0100
JNE Load_Gfx_Torn_Card ; 03CEAF/0C9BCE
Load_Gfx_Marid:
ASM_CALL Decomp_Setup2_3b_3b ; 03CEB2/0735A000 // Decompression setup 2
.long Sprite_Field_Dao ; 03CEB6/2CA10E
.long $7E8500 ; 03CEB9/00857E
RTS ; 03CEBC/1C
Sub_Load_Gfx_Dao:
MOV REG,#$0001 ; 03CEBD/1E0100
ASM_CALL Condition_Check_2b ; 03CEC0/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 03CEC4/0100
JNE Load_Gfx_Torn_Card ; 03CEC6/0C9BCE
Load_Gfx_Dao:
ASM_CALL Decomp_Setup2_3b_3b ; 03CEC9/0735A000 // Decompression setup 2
.long Sprite_Field_Marid ; 03CECD/91AC0E
.long $7E8500 ; 03CED0/00857E
RTS ; 03CED3/1C
Sub_Load_Gfx_Efrite:
MOV REG,#$0001 ; 03CED4/1E0100
ASM_CALL Condition_Check_2b ; 03CED7/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 03CEDB/0100
JNE Load_Gfx_Torn_Card ; 03CEDD/0C9BCE
Load_Gfx_Efrite:
ASM_CALL Decomp_Setup2_3b_3b ; 03CEE0/0735A000 // Decompression setup 2
.long Sprite_Field_Efrite ; 03CEE4/15B70E
.long $7E8500 ; 03CEE7/00857E
RTS ; 03CEEA/1C
Sub_Load_Gfx_Skull_Card:
ASM_CALL Decomp_Setup2_3b_3b ; 03CEEB/0735A000 // Decompression setup 2
.long Sprite_Skull_Card ; 03CEEF/F9920E
.long $7E8500 ; 03CEF2/00857E
RTS ; 03CEF5/1C
Sub_Load_Gfx_Teefa:
ASM_CALL Chapter5_Check ; 03CEF6/07098E05
JNE Load_Good_Teefa ; 03CEFA/0C08CF
Load_Gfx_RedTeefa:
ASM_CALL Decomp_Setup2_3b_3b ; 03CEFD/0735A000 // Decompression setup 2
.long Sprite_Field_BadTeefa ; 03CF01/92C20E
.long $7E8A00 ; 03CF04/008A7E
RTS ; 03CF07/1C
Load_Good_Teefa:
ASM_CALL Decomp_Setup2_3b_3b ; 03CF08/0735A000 // Decompression setup 2
.long Sprite_Field_GdTeefa ; 03CF0C/ABC60E
.long $7E8A00 ; 03CF0F/008A7E
RTS ; 03CF12/1C
Sub_Load_Gfx_Salah:
ASM_CALL Decomp_Setup2_3b_3b ; 03CF13/0735A000 // Decompression setup 2
.long Sprite_Field_Salah ; 03CF17/5CD20E
.long $7E8A00 ; 03CF1A/008A7E
RTS ; 03CF1D/1C
Sub_Load_Gfx_Skull_Card1:
ASM_CALL Decomp_Setup2_3b_3b ; 03CF1E/0735A000 // Decompression setup 2
.long Sprite_Skull_Card ; 03CF22/F9920E
.long $7E8A00 ; 03CF25/008A7E
RTS ; 03CF28/1C
Sub_Load_Gfx_Darwin:
ASM_CALL Decomp_Setup2_3b_3b ; 03CF29/0735A000 // Decompression setup 2
.long Sprite_Field_Darwin ; 03CF2D/F8DD0E
.long $7E8F00 ; 03CF30/008F7E
RTS ; 03CF33/1C
Sub_Load_Gfx_Axs:
ASM_CALL Decomp_Setup2_3b_3b ; 03CF34/0735A000 // Decompression setup 2
.long Sprite_Field_Axs ; 03CF38/63E80E
.long $7E8F00 ; 03CF3B/008F7E
RTS ; 03CF3E/1C
Sub_Load_Gfx_Skull_Card2:
ASM_CALL Decomp_Setup2_3b_3b ; 03CF3F/0735A000 // Decompression setup 2
.long Sprite_Skull_Card ; 03CF43/F9920E
.long $7E8F00 ; 03CF46/008F7E
RTS ; 03CF49/1C
Sub_Load_Palette_03CF4A:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CF4A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Gfx_Palette_03CF4A ; 03CF4E/2A920D
.byte $40 ; 03CF51/40
.word 10 ; 03CF52/0A00
JSL Event_Select_Death_Palette ; 03CF54/04638405
RTS ; 03CF58/1C
DATA8_03CF59:
JSL Xfer_0584A0 ; 03CF59/049F8405
RTS ; 03CF5D/1C
DATA8_03CF5E:
JSL Xfer_0584AA ; 03CF5E/04AA8405
RTS ; 03CF62/1C
DATA8_03CF63:
JSL Xfer_0584B5 ; 03CF63/04B58405
RTS ; 03CF67/1C
DATA8_03CF68:
JSL Xfer_0584C0 ; 03CF68/04C08405
RTS ; 03CF6C/1C
GetPalette_03CF6D:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CF6D/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059503 ; 03CF71/0A920D
.byte $70 ; 03CF74/70
.word 32 ; 03CF75/2000
GetPalette_03CF77:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CF77/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 03CF7B/771500
.byte $73 ; 03CF7E/73
.word 2 ; 03CF7F/0200
RTS ; 03CF81/1C
GetPalette_03CF82:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CF82/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058D70 ; 03CF86/A2920D
.byte $50 ; 03CF89/50
.word 10 ; 03CF8A/0A00
JSL Case_Condition_0584CB ; 03CF8C/04CB8405
RTS ; 03CF90/1C
GetPalette_03CF91:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CF91/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058FA2 ; 03CF95/C2920D
.byte $50 ; 03CF98/50
.word 10 ; 03CF99/0A00
JSL Case_Condition_058507 ; 03CF9B/04078505
RTS ; 03CF9F/1C
GetPalette_03CFA0:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CFA0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059503 ; 03CFA4/0A920D
.byte $50 ; 03CFA7/50
.word 32 ; 03CFA8/2000
RTS ; 03CFAA/1C
GetPalette_03CFAB:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CFAB/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059155 ; 03CFAF/E2920D
.byte $50 ; 03CFB2/50
.word 10 ; 03CFB3/0A00
JSL Case_Condition_058543 ; 03CFB5/04438505
RTS ; 03CFB9/1C
GetPalette_03CFBA:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CFBA/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059363 ; 03CFBE/02930D
.byte $50 ; 03CFC1/50
.word 10 ; 03CFC2/0A00
JSL Case_Condition_05857F ; 03CFC4/047F8505
RTS ; 03CFC8/1C
GetPalette_03CFC9:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 03CFC9/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059503 ; 03CFCD/0A920D
.byte $60 ; 03CFD0/60
.word 32 ; 03CFD1/2000
RTS ; 03CFD3/1C
Pause_Loop:
WAIT #1 ; 03CFD4/0601
ASM_CALL Wait_For_A_Press_1b ; 03CFD6/0703BA07 // Wait for A-press
.byte $00 ; 03CFDA/00
JEQ Pause_Loop ; 03CFDB/0BD4CF
RTS ; 03CFDE/1C
Inn_Wait_for_input:
WAIT #1 ; 03CFDF/0601
ASM_CALL Some_1095_check_1b ; 03CFE1/074FBA07 // Some pause status check
.byte $00 ; 03CFE5/00
JEQ Inn_Wait_for_input ; 03CFE6/0BDFCF
RTS ; 03CFE9/1C
_1095_odd_loop:
WAIT #1 ; 03CFEA/0601
ASM_CALL _1095_odd ; 03CFEC/07F4CF03 // Is Pause_status odd? (Returns based on $1095)
JEQ _1095_odd_loop ; 03CFF0/0BEACF
RTS ; 03CFF3/1C
$03D00A - Sub: Loop til A or B press
Loop_til_A_or_B:
WAIT #1 ; 03D00A/0601
ASM_CALL A_or_B_pressed ; 03D00C/0714D003 // A or B pressed this frame
JEQ Loop_til_A_or_B ; 03D010/0B0AD0
RTS ; 03D013/1C
$058001 - Event 04: Rooks
Event_Main_04_ROOKS:
MOV VAR2,#$0000 ; 058001/0F020000
MOV REG,VAR0 ; 058005/2400
JNE Character_Init_2 ; 058007/0C4080
MOV VAR0,#$0000 ; 05800A/0F000000
MOV VAR1,#$0000 ; 05800E/0F010000
MOV VAR3,#$0000 ; 058012/0F030000
Initialize_Rooks:
ASM_CALL Set_character_ID_2b ; 058016/0770B407 // Set character ID
.word $0000 ; 05801A/0000
ASM_CALL Sub_Get_EXP_to_next ; 05801C/077AB207 // Sub: Get EXP to next LVL
ASM_CALL LevelUp2 ; 058020/0735B307 // Sub: Levelup-2
MOV REG,VAR2 ; 058024/2402
ASM_CALL Sub_Wipe_Spells ; 058026/07EDAB07 // Wipe Spells
MOV REG,VAR2 ; 05802A/2402
ASM_CALL GetJoinSpells ; 05802C/0708AC07 // Get Join Spells
ASM_CALL Sub_Increase_LV ; 058030/0756B207 // Sub: Increase LVL
ASM_CALL Max_heal ; 058034/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 058038/071CB107 // Set Condition
.word $0002 ; 05803C/0200
.word $0000 ; 05803E/0000
Character_Init_2:
MOV REG,VAR2 ; 058040/2402
ASM_CALL OR_element_with_2b ; 058042/0769B107 // OR element with [var]
.word $0000 ; 058046/0000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058048/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Gfx_Palette_03CF4A ; 05804C/2A920D
.byte $40 ; 05804F/40
.word 32 ; 058050/2000
MOV REG,VAR2 ; 058052/2402
ASM_CALL Load_PC_Name ; 058054/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058058/2402
ASM_CALL Sub_Draw_HP_I_think ; 05805A/07468D07 // Draw HP?
MOV REG,VAR2 ; 05805E/2402
ASM_CALL Sub_Draw_MP_I_think ; 058060/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058064/2402
ASM_CALL Sub_Draw_Level ; 058066/07F08D07 // Sub: Draw Level
ASM_CALL Get_ID_in_slot_2b ; 05806A/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0000 ; 05806E/0000
MULTI_JSR #4 ; 058070/1204
.word DATA8_058197 ; 058072/9781
.word DATA8_0581A1 ; 058074/A181
.word DATA8_0581AB ; 058076/AB81
.word DATA8_0581B5 ; 058078/B581
JSL Some_Death_Check ; 05807A/04498405
TASK DATA8_05815E ; 05807E/085E81
MOV REG,VAR2 ; 058081/2402
ASM_CALL LoadGfx_07906F_far ; 058083/076B9007 // Load Graphics
MOV REG,VAR2 ; 058087/2402
ASM_CALL Sub_Draw_Level ; 058089/07F08D07 // Sub: Draw Level
AND.w Condition,AND,#$FBFF ; 05808D/0EC31100FFFB
L_058093:
AND.w Condition,AND,#$FEFF ; 058093/0EC31100FFFE
L_058099:
ASM_CALL Is_Equals_1575 ; 058099/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_0580E8 ; 05809D/0CE880
MOV REG,Game_State ; 0580A0/1FC111
MULTI_JMP #6 ; 0580A3/1106
.word DATA8_0580B2 ; 0580A5/B280
.word DATA8_0580B2 ; 0580A7/B280
.word DATA8_0580CD ; 0580A9/CD80
.word DATA8_0580B2 ; 0580AB/B280
.word DATA8_0580B2 ; 0580AD/B280
.word DATA8_0580B2 ; 0580AF/B280
HALT ; 0580B1/0A
DATA8_0580B2:
ON_TICK CODE_0581C5 ; 0580B2/09C58105
JSL Some_Death_Check ; 0580B6/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 0580BA/0735A000 // Decompression setup 2
.long Sprite_Field_Rooks ; 0580BE/91810E
.long $7E8000 ; 0580C1/00807E
WAIT #1 ; 0580C4/0601
ASM_CALL RAM_Decomp_8009 ; 0580C6/0701800E // RAM Decomp (8009)
WAIT #1 ; 0580CA/0601
HALT ; 0580CC/0A
DATA8_0580CD:
ON_TICK CODE_0581BF ; 0580CD/09BF8105
JSL Some_Death_Check ; 0580D1/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 0580D5/0735A000 // Decompression setup 2
.long Sprite_Battle_Rooks ; 0580D9/51850E
.long $7E8000 ; 0580DC/00807E
WAIT #1 ; 0580DF/0601
ASM_CALL RAM_Decomp_8009 ; 0580E1/0701800E // RAM Decomp (8009)
WAIT #1 ; 0580E5/0601
HALT ; 0580E7/0A
DATA8_0580E8:
ON_TICK CODE_0581C5 ; 0580E8/09C58105
MOV VAR0,#$0000 ; 0580EC/0F000000
ASM_CALL Get_MenuCursorCoords ; 0580F0/0765AE07 // Get Menu cursor coords
AND.w Condition,AND,#$FEFF ; 0580F4/0EC31100FFFE
L_0580FA:
JMP DATA8_059683 ; 0580FA/1A8396
DATA8_0580FD:
MOV REG,VAR2 ; 0580FD/2402
ASM_CALL LoadGfx_07906F_far ; 0580FF/076B9007 // Load Graphics
MOV REG,VAR2 ; 058103/2402
ASM_CALL Sub_Draw_Level ; 058105/07F08D07 // Sub: Draw Level
WAIT #30 ; 058109/061E
WAIT #10 ; 05810B/060A
ASM_CALL Decomp_Setup2_3b_3b ; 05810D/0735A000 // Decompression setup 2
.long Sprite_Dead_PC ; 058111/1F8C0E
.long $7E8000 ; 058114/00807E
ASM_CALL RAM_Decomp_8009 ; 058117/0701800E // RAM Decomp (8009)
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05811B/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_05922A ; 05811F/48950D
.byte $43 ; 058122/43
.word 26 ; 058123/1A00
HALT ; 058125/0A
L_058126:
TASK DATA8_05815E ; 058126/085E81
JSR DATA8_058425 ; 058129/1B2584
MOV REG,VAR2 ; 05812C/2402
ASM_CALL Condition_Check_2b ; 05812E/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058132/0100
JNE DATA8_0580FD ; 058134/0CFD80
JMP DATA8_0580CD ; 058137/1ACD80
DATA8_05813A:
ASM_CALL Decomp_Setup2_3b_3b ; 05813A/0735A000 // Decompression setup 2
.long Sprite_Attack_Rooks ; 05813E/E5880E
.long $7E8000 ; 058141/00807E
ASM_CALL RAM_Decomp_8009 ; 058144/0701800E // RAM Decomp (8009)
ASM_CALL GetSet_SFX_1b ; 058148/07449C00 // Get/Set Sound Effect
.byte 1 ; 05814C/01
WAIT #20 ; 05814D/0614
ASM_CALL Decomp_Setup2_3b_3b ; 05814F/0735A000 // Decompression setup 2
.long Sprite_Battle_Rooks ; 058153/51850E
.long $7E8000 ; 058156/00807E
ASM_CALL RAM_Decomp_8009 ; 058159/0701800E // RAM Decomp (8009)
END_TASK ; 05815D/0D
DATA8_05815E:
JSR Load_Color_Attr_and_Condition; 05815E/1B1283
JMP DATA8_05815E ; 058161/1A5E81
Sub_Battle_setup:
ASM_CALL Get_ID_in_slot_2b ; 058164/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0000 ; 058168/0000
MULTI_JSR #4 ; 05816A/1204
.word DATA8_058197 ; 05816C/9781
.word DATA8_0581A1 ; 05816E/A181
.word DATA8_0581AB ; 058170/AB81
.word DATA8_0581B5 ; 058172/B581
MOV VAR2,#$0000 ; 058174/0F020000
MOV REG,VAR2 ; 058178/2402
ASM_CALL LoadGfx_07906F_far ; 05817A/076B9007 // Load Graphics
MOV REG,VAR2 ; 05817E/2402
ASM_CALL Load_PC_Name ; 058180/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058184/2402
ASM_CALL Sub_Draw_HP_I_think ; 058186/07468D07 // Draw HP?
MOV REG,VAR2 ; 05818A/2402
ASM_CALL Sub_Draw_MP_I_think ; 05818C/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058190/2402
ASM_CALL Sub_Draw_Level ; 058192/07F08D07 // Sub: Draw Level
RTL ; 058196/05
DATA8_058197:
ASM_CALL Setup_8698_3b_2b ; 058197/071F9D00 // 00/8698 setup
.long DATA16_0E8045 ; 05819B/45800E
.word $0061 ; 05819E/6100
RTS ; 0581A0/1C
DATA8_0581A1:
ASM_CALL Setup_8698_3b_2b ; 0581A1/071F9D00 // 00/8698 setup
.long DATA16_0E8045 ; 0581A5/45800E
.word $007A ; 0581A8/7A00
RTS ; 0581AA/1C
DATA8_0581AB:
ASM_CALL Setup_8698_3b_2b ; 0581AB/071F9D00 // 00/8698 setup
.long DATA16_0E8045 ; 0581AF/45800E
.word $0201 ; 0581B2/0102
RTS ; 0581B4/1C
DATA8_0581B5:
ASM_CALL Setup_8698_3b_2b ; 0581B5/071F9D00 // 00/8698 setup
.long DATA16_0E8045 ; 0581B9/45800E
.word $021A ; 0581BC/1A02
RTS ; 0581BE/1C
$058312 - Event 05: Sylph; Load Attribute/Cond. color
Load_Color_Attr_and_Condition:
WAIT #1 ; 058312/0601
Check_Condition1:
MOV REG,VAR2 ; 058314/2402
ASM_CALL Get_Condition2 ; 058316/077FB107 // Get Condition-2
MULTI_JSR #8 ; 05831A/1208
.word Load_Palette_for_Condition ; 05831C/7783
.word DATA8_058382 ; 05831E/8283
.word DATA8_05838D ; 058320/8D83
.word DATA8_058398 ; 058322/9883
.word DATA8_0583A3 ; 058324/A383
.word DATA8_0583AE ; 058326/AE83
.word DATA8_0583B9 ; 058328/B983
.word DATA8_0583C4 ; 05832A/C483
MOV REG,VAR2 ; 05832C/2402
ASM_CALL Get_Current_Attribute ; 05832E/0788AA07 // Get Current Attribute (returns 0: no attribute, 1-4: attribute, 5: some combination??)
MULTI_JMP #6 ; 058332/1106
.word DATA8_058340 ; 058334/4083
.word DATA8_05834B ; 058336/4B83
.word DATA8_058356 ; 058338/5683
.word DATA8_058361 ; 05833A/6183
.word DATA8_05836C ; 05833C/6C83
.word DATA8_058376 ; 05833E/7683
DATA8_058340:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058340/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Attribute_Man ; 058344/62950D
.byte $03 ; 058347/03
.word 4 ; 058348/0400
RTS ; 05834A/1C
DATA8_05834B:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 05834B/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Attribute_Wind ; 05834F/66950D
.byte $03 ; 058352/03
.word 4 ; 058353/0400
RTS ; 058355/1C
DATA8_058356:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058356/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Attribute_Earth ; 05835A/6A950D
.byte $03 ; 05835D/03
.word 4 ; 05835E/0400
RTS ; 058360/1C
DATA8_058361:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058361/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Attribute_Water ; 058365/6E950D
.byte $03 ; 058368/03
.word 4 ; 058369/0400
RTS ; 05836B/1C
DATA8_05836C:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 05836C/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Attribute_Fire ; 058370/72950D
.byte $03 ; 058373/03
.word 4 ; 058374/0400
DATA8_058376:
RTS ; 058376/1C
Load_Palette_for_Condition:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058377/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Satisfactory ; 05837B/76950D
.byte $01 ; 05837E/01
.word 2 ; 05837F/0200
RTS ; 058381/1C
DATA8_058382:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058382/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Deceased ; 058386/78950D
.byte $01 ; 058389/01
.word 2 ; 05838A/0200
RTS ; 05838C/1C
DATA8_05838D:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 05838D/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Deceased ; 058391/78950D
.byte $01 ; 058394/01
.word 2 ; 058395/0200
RTS ; 058397/1C
DATA8_058398:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058398/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Paralyzed ; 05839C/7A950D
.byte $01 ; 05839F/01
.word 2 ; 0583A0/0200
RTS ; 0583A2/1C
DATA8_0583A3:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583A3/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Petrified ; 0583A7/7C950D
.byte $01 ; 0583AA/01
.word 2 ; 0583AB/0200
RTS ; 0583AD/1C
DATA8_0583AE:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583AE/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Confused ; 0583B2/7E950D
.byte $01 ; 0583B5/01
.word 2 ; 0583B6/0200
RTS ; 0583B8/1C
DATA8_0583B9:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583B9/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Sleeping ; 0583BD/80950D
.byte $01 ; 0583C0/01
.word 2 ; 0583C1/0200
RTS ; 0583C3/1C
DATA8_0583C4:
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583C4/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal1 ; 0583C8/82950D
.byte $01 ; 0583CB/01
.word 2 ; 0583CC/0200
WAIT #7 ; 0583CE/0607
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583D0/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal2 ; 0583D4/84950D
.byte $01 ; 0583D7/01
.word 2 ; 0583D8/0200
WAIT #7 ; 0583DA/0607
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583DC/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal3 ; 0583E0/86950D
.byte $01 ; 0583E3/01
.word 2 ; 0583E4/0200
WAIT #7 ; 0583E6/0607
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583E8/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal4 ; 0583EC/88950D
.byte $01 ; 0583EF/01
.word 2 ; 0583F0/0200
WAIT #7 ; 0583F2/0607
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 0583F4/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal5 ; 0583F8/8A950D
.byte $01 ; 0583FB/01
.word 2 ; 0583FC/0200
WAIT #7 ; 0583FE/0607
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058400/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal4 ; 058404/88950D
.byte $01 ; 058407/01
.word 2 ; 058408/0200
WAIT #7 ; 05840A/0607
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 05840C/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal3 ; 058410/86950D
.byte $01 ; 058413/01
.word 2 ; 058414/0200
WAIT #7 ; 058416/0607
ASM_CALL Gfx_GetPalette2_3b_1b_2b ; 058418/0705A100 // Gfx: Get Palette 2 - Prereq: Uses an offset [0-3] from var2 to change the destination address. [Source addr] [Destination RAM ($0420 + 2* ([val] + [$40 | $70 | $50 | $60])] [# bytes to transfer]
.long Palette_Cond_Near_Fatal2 ; 05841C/84950D
.byte $01 ; 05841F/01
.word 2 ; 058420/0200
WAIT #7 ; 058422/0607
RTS ; 058424/1C
DATA8_058425:
MOV REG,VAR2 ; 058425/2402
ASM_CALL Sub_07B9E2 ; 058427/07E2B907 // Updates a fighter's X and Y pos from a list. Battle related?
MOV REG,Text_Line_Speed ; 05842B/1F9710
MOV VAR1,REG ; 05842E/2301
WAIT VAR1 ; 058430/2501
MOV REG,#$0007 ; 058432/1E0700
ASM_CALL GetAttackAnimation ; 058435/07E68218 // Get Attack Animation - Takes in an attack animation 0-7 (Sword, Bite, Splash, Claw, Sting, Punch) (6=??) (7=Damaged Star)
ASM_CALL GetSet_SFX_1b ; 058439/07449C00 // Get/Set Sound Effect
.byte 7 ; 05843D/07
SET_ANIM #11,WAIT #1 ; 05843E/310B
INC_ANIM WAIT #4 ; 058440/AC
DEC_ANIM WAIT #2 ; 058441/B2
JSL Sub_Pixellation_Damage ; 058442/04509605
SET_ANIM #-1 ; 058446/30FF
RTS ; 058448/1C
Some_Death_Check:
ASM_CALL Load_Object_Var_2b ; 058449/07A1B407 // Load object var [0-3]
.word $0002 ; 05844D/0200
MULTI_JMP #9 ; 05844F/1109
.word Event_Select_Death_Palette ; 058451/6384
.word Xfer_0584A0 ; 058453/9F84
.word Xfer_0584AA ; 058455/AA84
.word Xfer_0584B5 ; 058457/B584
.word Xfer_0584C0 ; 058459/C084
.word Case_Condition_0584CB ; 05845B/CB84
.word Case_Condition_058507 ; 05845D/0785
.word Case_Condition_058543 ; 05845F/4385
.word Case_Condition_05857F ; 058461/7F85
Event_Select_Death_Palette:
MOV REG,VAR2 ; 058463/2402
ASM_CALL Check_Condition2 ; 058465/0788AB07
MULTI_JMP #4 ; 058469/1104
.word Xfer_058473 ; 05846B/7384
.word Xfer_05847E ; 05846D/7E84
.word Gfx_GetPalette_Petrify ; 05846F/8984
.word Xfer_058494 ; 058471/9484
Xfer_058473:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058473/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058473 ; 058477/22930D
.byte $45 ; 05847A/45
.word 22 ; 05847B/1600
RTL ; 05847D/05
Xfer_05847E:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05847E/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_05847E ; 058482/56940D
.byte $45 ; 058485/45
.word 22 ; 058486/1600
RTL ; 058488/05
Gfx_GetPalette_Petrify:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058489/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_PC_Petrify ; 05848D/E8930D
.byte $45 ; 058490/45
.word 22 ; 058491/1600
RTL ; 058493/05
Xfer_058494:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058494/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058494 ; 058498/DA940D
.byte $45 ; 05849B/45
.word 22 ; 05849C/1600
RTL ; 05849E/05
Xfer_0584A0:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05849F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0586B8 ; 0584A3/38930D
.byte $75 ; 0584A6/75
.word 22 ; 0584A7/1600
RTL ; 0584A9/05
Xfer_0584AA:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0584AA/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0588A8 ; 0584AE/4E930D
.byte $75 ; 0584B1/75
.word 22 ; 0584B2/1600
RTL ; 0584B4/05
Xfer_0584B5:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0584B5/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058A45 ; 0584B9/64930D
.byte $75 ; 0584BC/75
.word 22 ; 0584BD/1600
RTL ; 0584BF/05
Xfer_0584C0:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0584C0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058BE2 ; 0584C4/7A930D
.byte $75 ; 0584C7/75
.word 22 ; 0584C8/1600
RTL ; 0584CA/05
Case_Condition_0584CB:
MOV REG,VAR2 ; 0584CB/2402
ASM_CALL Check_Condition2 ; 0584CD/0788AB07
MULTI_JMP #4 ; 0584D1/1104
.word DATA8_0584DB ; 0584D3/DB84
.word DATA8_0584E6 ; 0584D5/E684
.word DATA8_0584F1 ; 0584D7/F184
.word DATA8_0584FC ; 0584D9/FC84
DATA8_0584DB:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0584DB/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D9390 ; 0584DF/90930D
.byte $55 ; 0584E2/55
.word 22 ; 0584E3/1600
RTL ; 0584E5/05
DATA8_0584E6:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0584E6/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D9482 ; 0584EA/82940D
.byte $55 ; 0584ED/55
.word 22 ; 0584EE/1600
RTL ; 0584F0/05
DATA8_0584F1:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0584F1/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D93FE ; 0584F5/FE930D
.byte $55 ; 0584F8/55
.word 22 ; 0584F9/1600
RTL ; 0584FB/05
DATA8_0584FC:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0584FC/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D94F0 ; 058500/F0940D
.byte $55 ; 058503/55
.word 22 ; 058504/1600
RTL ; 058506/05
Case_Condition_058507:
MOV REG,VAR2 ; 058507/2402
ASM_CALL Check_Condition2 ; 058509/0788AB07
MULTI_JMP #4 ; 05850D/1104
.word DATA8_058517 ; 05850F/1785
.word DATA8_058522 ; 058511/2285
.word DATA8_05852D ; 058513/2D85
.word DATA8_058538 ; 058515/3885
DATA8_058517:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058517/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D93A6 ; 05851B/A6930D
.byte $55 ; 05851E/55
.word 22 ; 05851F/1600
RTL ; 058521/05
DATA8_058522:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058522/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D9498 ; 058526/98940D
.byte $55 ; 058529/55
.word 22 ; 05852A/1600
RTL ; 05852C/05
DATA8_05852D:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05852D/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D9414 ; 058531/14940D
.byte $55 ; 058534/55
.word 22 ; 058535/1600
RTL ; 058537/05
DATA8_058538:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058538/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D9506 ; 05853C/06950D
.byte $55 ; 05853F/55
.word 22 ; 058540/1600
RTL ; 058542/05
Case_Condition_058543:
MOV REG,VAR2 ; 058543/2402
ASM_CALL Check_Condition2 ; 058545/0788AB07
MULTI_JMP #4 ; 058549/1104
.word DATA8_058553 ; 05854B/5385
.word DATA8_05855E ; 05854D/5E85
.word DATA8_058569 ; 05854F/6985
.word DATA8_058574 ; 058551/7485
DATA8_058553:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058553/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D93BC ; 058557/BC930D
.byte $65 ; 05855A/65
.word 22 ; 05855B/1600
RTL ; 05855D/05
DATA8_05855E:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05855E/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D94AE ; 058562/AE940D
.byte $65 ; 058565/65
.word 22 ; 058566/1600
RTL ; 058568/05
DATA8_058569:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058569/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D942A ; 05856D/2A940D
.byte $65 ; 058570/65
.word 22 ; 058571/1600
RTL ; 058573/05
DATA8_058574:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058574/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long UNREACH_0D951C ; 058578/1C950D
.byte $65 ; 05857B/65
.word 22 ; 05857C/1600
RTL ; 05857E/05
Case_Condition_05857F:
MOV REG,VAR2 ; 05857F/2402
ASM_CALL Check_Condition2 ; 058581/0788AB07
MULTI_JMP #4 ; 058585/1104
.word Xfer_05858F ; 058587/8F85
.word Xfer_05859A ; 058589/9A85
.word Xfer_0585A5 ; 05858B/A585
.word Xfer_0585B0 ; 05858D/B085
Xfer_05858F:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05858F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long DATA8_0D93D2 ; 058593/D2930D
.byte $65 ; 058596/65
.word 22 ; 058597/1600
RTL ; 058599/05
Xfer_05859A:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05859A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_05859A ; 05859E/C4940D
.byte $65 ; 0585A1/65
.word 22 ; 0585A2/1600
RTL ; 0585A4/05
Xfer_0585A5:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0585A5/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0585A5 ; 0585A9/40940D
.byte $65 ; 0585AC/65
.word 22 ; 0585AD/1600
RTL ; 0585AF/05
Xfer_0585B0:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0585B0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0585B0 ; 0585B4/32950D
.byte $65 ; 0585B7/65
.word 22 ; 0585B8/1600
RTL ; 0585BA/05
DATA8_0585BB:
MOV REG,VAR0 ; 0585BB/2400
JNE DATA8_058637 ; 0585BD/0C3786
MOV VAR0,#$0000 ; 0585C0/0F000000
MOV VAR3,#$0000 ; 0585C4/0F030000
MOV REG,VAR2 ; 0585C8/2402
GetNewLevel:
ASM_CALL Set_LVL ; 0585CA/07ABB207
GetNewExp:
ASM_CALL Sub_Get_EXP_to_next ; 0585CE/077AB207 // Sub: Get EXP to next LVL
MOV REG,VAR2 ; 0585D2/2402
ASM_CALL LevelJoinStats ; 0585D4/0707B307 // Sub: Level join stats
MOV REG,VAR2 ; 0585D8/2402
ASM_CALL Sub_Wipe_Spells ; 0585DA/07EDAB07 // Wipe Spells
MOV REG,VAR2 ; 0585DE/2402
ASM_CALL GetJoinSpells ; 0585E0/0708AC07 // Get Join Spells
MOV REG,VAR1 ; 0585E4/2401
JEQ DATA8_058600 ; 0585E6/0B0086
DATA8_0585E9:
ASM_CALL Kill_Spirit ; 0585E9/074AB907 // Kill spirit (zeroes HP and MP)
ASM_CALL Set_Condition_4b ; 0585ED/071CB107 // Set Condition
.word $0002 ; 0585F1/0200
.word $0001 ; 0585F3/0100
WAIT #1 ; 0585F5/0601
MOV REG,VAR2 ; 0585F7/2402
ASM_CALL LoadGfx_07906F_far ; 0585F9/076B9007 // Load Graphics
JMP DATA8_05860E ; 0585FD/1A0E86
DATA8_058600:
MOV REG,VAR2 ; 058600/2402
ASM_CALL IsNewSpirit ; 058602/075FB907 // Is New Spirit?
ASM_CALL Set_Condition_4b ; 058606/071CB107 // Set Condition
.word $0002 ; 05860A/0200
.word $0000 ; 05860C/0000
DATA8_05860E:
MOV REG,VAR2 ; 05860E/2402
ASM_CALL Load_PC_Name ; 058610/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058614/2402
ASM_CALL Sub_Draw_HP_I_think ; 058616/07468D07 // Draw HP?
MOV REG,VAR2 ; 05861A/2402
ASM_CALL Sub_Draw_MP_I_think ; 05861C/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058620/2402
ASM_CALL Sub_Draw_Level ; 058622/07F08D07 // Sub: Draw Level
ASM_CALL Get_ID_in_slot_2b ; 058626/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0002 ; 05862A/0200
MULTI_JSR #4 ; 05862C/1204
.word DATA8_0587BB ; 05862E/BB87
.word DATA8_0587C5 ; 058630/C587
.word DATA8_0587CF ; 058632/CF87
.word DATA8_0587D9 ; 058634/D987
RTS ; 058636/1C
DATA8_058637:
MOV REG,VAR2 ; 058637/2402
ASM_CALL Condition_Check_2b ; 058639/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 05863D/0100
JEQ DATA8_058600 ; 05863F/0B0086
JMP DATA8_0585E9 ; 058642/1AE985
Event_Main_05_SYLPH:
MOV VAR2,#$0001 ; 058645/0F020100
ASM_CALL Set_character_ID_2b ; 058649/0770B407 // Set character ID
.word $0001 ; 05864D/0100
MOV REG,VAR2 ; 05864F/2402
ASM_CALL OR_element_with_2b ; 058651/0769B107 // OR element with [var]
.word $0100 ; 058655/0001
JSR DATA8_0585BB ; 058657/1BBB85
MOV REG,VAR2 ; 05865A/2402
ASM_CALL Condition_Check_2b ; 05865C/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058660/0100
JNE DATA8_0586FF ; 058662/0CFF86
DATA8_058665:
TASK DATA8_058782 ; 058665/088287
MOV REG,VAR2 ; 058668/2402
ASM_CALL LoadGfx_07906F_far ; 05866A/076B9007 // Load Graphics
AND.w Condition_Spirit,AND,#$FBFF ; 05866E/0EC51100FFFB
L_058674:
AND.w Condition_Spirit,AND,#$FEFF ; 058674/0EC51100FFFE
L_05867A:
ASM_CALL Is_Equals_1575 ; 05867A/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_0586D5 ; 05867E/0CD586
MOV REG,Game_State ; 058681/1FC111
MULTI_JMP #6 ; 058684/1106
.word DATA8_058693 ; 058686/9386
.word DATA8_058693 ; 058688/9386
.word DATA8_0586B4 ; 05868A/B486
.word DATA8_058693 ; 05868C/9386
.word DATA8_058693 ; 05868E/9386
.word DATA8_058693 ; 058690/9386
HALT ; 058692/0A
DATA8_058693:
ON_TICK CODE_0587E9 ; 058693/09E98705
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058697/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0586B8 ; 05869B/38930D
.byte $75 ; 05869E/75
.word 22 ; 05869F/1600
ASM_CALL Decomp_Setup2_3b_3b ; 0586A1/0735A000 // Decompression setup 2
.long Sprite_Field_Sylph ; 0586A5/A3950E
.long $7E8500 ; 0586A8/00857E
WAIT #1 ; 0586AB/0601
ASM_CALL RAM_Decomp_801A ; 0586AD/0712800E // RAM Decomp (801A)
WAIT #1 ; 0586B1/0601
HALT ; 0586B3/0A
DATA8_0586B4:
ON_TICK Sub_0587E3 ; 0586B4/09E38705
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0586B8/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0586B8 ; 0586BC/38930D
.byte $75 ; 0586BF/75
.word 22 ; 0586C0/1600
ASM_CALL Decomp_Setup2_3b_3b ; 0586C2/0735A000 // Decompression setup 2
.long Sprite_Battle_Sylph ; 0586C6/D9990E
.long $7E8500 ; 0586C9/00857E
WAIT #1 ; 0586CC/0601
ASM_CALL RAM_Decomp_801A ; 0586CE/0712800E // RAM Decomp (801A)
WAIT #1 ; 0586D2/0601
HALT ; 0586D4/0A
DATA8_0586D5:
ON_TICK CODE_0587E9 ; 0586D5/09E98705
MOV VAR0,#$0000 ; 0586D9/0F000000
ASM_CALL Get_MenuCursorCoords ; 0586DD/0765AE07 // Get Menu cursor coords
AND.w Condition_Spirit,AND,#$FEFF ; 0586E1/0EC51100FFFE
L_0586E7:
JMP DATA8_059683 ; 0586E7/1A8396
DATA8_0586EA:
ASM_CALL GetSet_SFX_1b ; 0586EA/07449C00 // Get/Set Sound Effect
.byte 47 ; 0586EE/2F
MOV REG,VAR2 ; 0586EF/2402
ASM_CALL LoadGfx_07906F_far ; 0586F1/076B9007 // Load Graphics
ASM_CALL Kill_Spirit ; 0586F5/074AB907 // Kill spirit (zeroes HP and MP)
ASM_CALL Update_SpiritHP_far ; 0586F9/07FB8205
WAIT #30 ; 0586FD/061E
DATA8_0586FF:
TASK DATA8_058782 ; 0586FF/088287
ON_TICK CODE_058817 ; 058702/09178805
MOV REG,VAR2 ; 058706/2402
ASM_CALL Load_PC_Name ; 058708/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 05870C/2402
ASM_CALL Sub_Draw_HP_I_think ; 05870E/07468D07 // Draw HP?
MOV REG,VAR2 ; 058712/2402
ASM_CALL Sub_Draw_MP_I_think ; 058714/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058718/2402
ASM_CALL Sub_Draw_Level ; 05871A/07F08D07 // Sub: Draw Level
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05871E/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0586B8 ; 058722/38930D
.byte $75 ; 058725/75
.word 22 ; 058726/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058728/0735A000 // Decompression setup 2
.long Sprite_Torn_Card ; 05872C/CC8F0E
.long $7E8500 ; 05872F/00857E
ASM_CALL RAM_Decomp_801A ; 058732/0712800E // RAM Decomp (801A)
HALT ; 058736/0A
L_058737:
ASM_CALL Max_heal ; 058737/072FB907 // Max heal
MOV REG,VAR2 ; 05873B/2402
ASM_CALL Sub_Draw_HP_I_think ; 05873D/07468D07 // Draw HP?
MOV REG,VAR2 ; 058741/2402
ASM_CALL Sub_Draw_MP_I_think ; 058743/07B08D07 // Sub: Draw MP ?
JMP DATA8_058665 ; 058747/1A6586
DATA8_05874A:
ASM_CALL Decomp_Setup2_3b_3b ; 05874A/0735A000 // Decompression setup 2
.long Sprite_Attack_Sylph ; 05874E/799D0E
.long $7E8500 ; 058751/00857E
ASM_CALL RAM_Decomp_801A ; 058754/0712800E // RAM Decomp (801A)
ASM_CALL GetSet_SFX_1b ; 058758/07449C00 // Get/Set Sound Effect
.byte 1 ; 05875C/01
WAIT #20 ; 05875D/0614
ASM_CALL Decomp_Setup2_3b_3b ; 05875F/0735A000 // Decompression setup 2
.long Sprite_Battle_Sylph ; 058763/D9990E
.long $7E8500 ; 058766/00857E
ASM_CALL RAM_Decomp_801A ; 058769/0712800E // RAM Decomp (801A)
END_TASK ; 05876D/0D
TASK DATA8_058782 ; 05876E/088287
JSR DATA8_058425 ; 058771/1B2584
MOV REG,VAR2 ; 058774/2402
ASM_CALL Condition_Check_2b ; 058776/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 05877A/0100
JNE DATA8_0586EA ; 05877C/0CEA86
JMP DATA8_0586B4 ; 05877F/1AB486
DATA8_058782:
JSR Load_Color_Attr_and_Condition; 058782/1B1283
JMP DATA8_058782 ; 058785/1A8287
Sub_Another_setup:
ASM_CALL Get_ID_in_slot_2b ; 058788/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0002 ; 05878C/0200
MULTI_JSR #4 ; 05878E/1204
.word DATA8_0587BB ; 058790/BB87
.word DATA8_0587C5 ; 058792/C587
.word DATA8_0587CF ; 058794/CF87
.word DATA8_0587D9 ; 058796/D987
MOV VAR2,#$0001 ; 058798/0F020100
MOV REG,VAR2 ; 05879C/2402
ASM_CALL LoadGfx_07906F_far ; 05879E/076B9007 // Load Graphics
MOV REG,VAR2 ; 0587A2/2402
ASM_CALL Load_PC_Name ; 0587A4/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 0587A8/2402
ASM_CALL Sub_Draw_HP_I_think ; 0587AA/07468D07 // Draw HP?
MOV REG,VAR2 ; 0587AE/2402
ASM_CALL Sub_Draw_MP_I_think ; 0587B0/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 0587B4/2402
ASM_CALL Sub_Draw_Level ; 0587B6/07F08D07 // Sub: Draw Level
RTL ; 0587BA/05
DATA8_0587BB:
ASM_CALL Setup_8698_3b_2b ; 0587BB/071F9D00 // 00/8698 setup
.long Called_by_9D1F ; 0587BF/98800E
.word $0061 ; 0587C2/6100
RTS ; 0587C4/1C
DATA8_0587C5:
ASM_CALL Setup_8698_3b_2b ; 0587C5/071F9D00 // 00/8698 setup
.long Called_by_9D1F ; 0587C9/98800E
.word $007A ; 0587CC/7A00
RTS ; 0587CE/1C
DATA8_0587CF:
ASM_CALL Setup_8698_3b_2b ; 0587CF/071F9D00 // 00/8698 setup
.long Called_by_9D1F ; 0587D3/98800E
.word $0201 ; 0587D6/0102
RTS ; 0587D8/1C
DATA8_0587D9:
ASM_CALL Setup_8698_3b_2b ; 0587D9/071F9D00 // 00/8698 setup
.long Called_by_9D1F ; 0587DD/98800E
.word $021A ; 0587E0/1A02
RTS ; 0587E2/1C
$05884E - Event 06: Dao
Event_Main_06_DAO:
MOV VAR2,#$0001 ; 05884E/0F020100
ASM_CALL Set_character_ID_2b ; 058852/0770B407 // Set character ID
.word $0002 ; 058856/0200
MOV REG,VAR2 ; 058858/2402
ASM_CALL OR_element_with_2b ; 05885A/0769B107 // OR element with [var]
.word $0200 ; 05885E/0002
JSR DATA8_0585BB ; 058860/1BBB85
MOV REG,VAR2 ; 058863/2402
ASM_CALL Condition_Check_2b ; 058865/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058869/0100
JNE DATA8_058910 ; 05886B/0C1089
DATA8_05886E:
TASK DATA8_058993 ; 05886E/089389
ASM_CALL Set_Condition_4b ; 058871/071CB107 // Set Condition
.word $0002 ; 058875/0200
.word $0000 ; 058877/0000
MOV REG,VAR2 ; 058879/2402
ASM_CALL LoadGfx_07906F_far ; 05887B/076B9007 // Load Graphics
AND.w Condition_Spirit,AND,#$FBFF ; 05887F/0EC51100FFFB
L_058885:
AND.w Condition_Spirit,AND,#$FEFF ; 058885/0EC51100FFFE
L_05888B:
ASM_CALL Is_Equals_1575 ; 05888B/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_0588E6 ; 05888F/0CE688
MOV REG,Game_State ; 058892/1FC111
MULTI_JMP #6 ; 058895/1106
.word DATA8_0588A4 ; 058897/A488
.word DATA8_0588A4 ; 058899/A488
.word DATA8_0588C5 ; 05889B/C588
.word DATA8_0588A4 ; 05889D/A488
.word DATA8_0588A4 ; 05889F/A488
.word DATA8_0588A4 ; 0588A1/A488
HALT ; 0588A3/0A
DATA8_0588A4:
ON_TICK CODE_05899F ; 0588A4/099F8905
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0588A8/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0588A8 ; 0588AC/4E930D
.byte $75 ; 0588AF/75
.word 22 ; 0588B0/1600
ASM_CALL Decomp_Setup2_3b_3b ; 0588B2/0735A000 // Decompression setup 2
.long Sprite_Field_Dao ; 0588B6/2CA10E
.long $7E8500 ; 0588B9/00857E
WAIT #1 ; 0588BC/0601
ASM_CALL RAM_Decomp_801A ; 0588BE/0712800E // RAM Decomp (801A)
WAIT #1 ; 0588C2/0601
HALT ; 0588C4/0A
DATA8_0588C5:
ON_TICK ASM_Event_Main_06 ; 0588C5/09998905
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 0588C9/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0588A8 ; 0588CD/4E930D
.byte $75 ; 0588D0/75
.word 22 ; 0588D1/1600
ASM_CALL Decomp_Setup2_3b_3b ; 0588D3/0735A000 // Decompression setup 2
.long Sprite_Battle_Dao ; 0588D7/DFA40E
.long $7E8500 ; 0588DA/00857E
WAIT #1 ; 0588DD/0601
ASM_CALL RAM_Decomp_801A ; 0588DF/0712800E // RAM Decomp (801A)
WAIT #1 ; 0588E3/0601
HALT ; 0588E5/0A
DATA8_0588E6:
ON_TICK CODE_05899F ; 0588E6/099F8905
MOV VAR0,#$0000 ; 0588EA/0F000000
ASM_CALL Get_MenuCursorCoords ; 0588EE/0765AE07 // Get Menu cursor coords
AND.w Condition_Spirit,AND,#$FEFF ; 0588F2/0EC51100FFFE
L_0588F8:
JMP DATA8_059683 ; 0588F8/1A8396
DATA8_0588FB:
ASM_CALL GetSet_SFX_1b ; 0588FB/07449C00 // Get/Set Sound Effect
.byte 47 ; 0588FF/2F
MOV REG,VAR2 ; 058900/2402
ASM_CALL LoadGfx_07906F_far ; 058902/076B9007 // Load Graphics
ASM_CALL Kill_Spirit ; 058906/074AB907 // Kill spirit (zeroes HP and MP)
ASM_CALL Update_SpiritHP_far ; 05890A/07FB8205
WAIT #30 ; 05890E/061E
DATA8_058910:
TASK DATA8_058993 ; 058910/089389
ON_TICK CODE_0589CE ; 058913/09CE8905
MOV REG,VAR2 ; 058917/2402
ASM_CALL Load_PC_Name ; 058919/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 05891D/2402
ASM_CALL Sub_Draw_HP_I_think ; 05891F/07468D07 // Draw HP?
MOV REG,VAR2 ; 058923/2402
ASM_CALL Sub_Draw_MP_I_think ; 058925/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058929/2402
ASM_CALL Sub_Draw_Level ; 05892B/07F08D07 // Sub: Draw Level
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05892F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_0588A8 ; 058933/4E930D
.byte $75 ; 058936/75
.word 22 ; 058937/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058939/0735A000 // Decompression setup 2
.long Sprite_Torn_Card ; 05893D/CC8F0E
.long $7E8500 ; 058940/00857E
ASM_CALL RAM_Decomp_801A ; 058943/0712800E // RAM Decomp (801A)
HALT ; 058947/0A
L_058948:
ASM_CALL Max_heal ; 058948/072FB907 // Max heal
MOV REG,VAR2 ; 05894C/2402
ASM_CALL Sub_Draw_HP_I_think ; 05894E/07468D07 // Draw HP?
MOV REG,VAR2 ; 058952/2402
ASM_CALL Sub_Draw_MP_I_think ; 058954/07B08D07 // Sub: Draw MP ?
JMP DATA8_05886E ; 058958/1A6E88
DATA8_05895B:
ASM_CALL Decomp_Setup2_3b_3b ; 05895B/0735A000 // Decompression setup 2
.long Sprite_Attack_Dao ; 05895F/CDA80E
.long $7E8500 ; 058962/00857E
ASM_CALL RAM_Decomp_801A ; 058965/0712800E // RAM Decomp (801A)
ASM_CALL GetSet_SFX_1b ; 058969/07449C00 // Get/Set Sound Effect
.byte 1 ; 05896D/01
WAIT #20 ; 05896E/0614
ASM_CALL Decomp_Setup2_3b_3b ; 058970/0735A000 // Decompression setup 2
.long Sprite_Battle_Dao ; 058974/DFA40E
.long $7E8500 ; 058977/00857E
ASM_CALL RAM_Decomp_801A ; 05897A/0712800E // RAM Decomp (801A)
END_TASK ; 05897E/0D
TASK DATA8_058993 ; 05897F/089389
JSR DATA8_058425 ; 058982/1B2584
MOV REG,VAR2 ; 058985/2402
ASM_CALL Condition_Check_2b ; 058987/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 05898B/0100
JNE DATA8_0588FB ; 05898D/0CFB88
JMP DATA8_0588C5 ; 058990/1AC588
DATA8_058993:
JSR Load_Color_Attr_and_Condition; 058993/1B1283
JMP DATA8_058993 ; 058996/1A9389
$0589EB - Event 07: Marid
Event_Main_07_MARID:
MOV VAR2,#$0001 ; 0589EB/0F020100
ASM_CALL Set_character_ID_2b ; 0589EF/0770B407 // Set character ID
.word $0003 ; 0589F3/0300
MOV REG,VAR2 ; 0589F5/2402
ASM_CALL OR_element_with_2b ; 0589F7/0769B107 // OR element with [var]
.word $0400 ; 0589FB/0004
JSR DATA8_0585BB ; 0589FD/1BBB85
MOV REG,VAR2 ; 058A00/2402
ASM_CALL Condition_Check_2b ; 058A02/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058A06/0100
JNE DATA8_058AAD ; 058A08/0CAD8A
DATA8_058A0B:
TASK DATA8_058B30 ; 058A0B/08308B
ASM_CALL Set_Condition_4b ; 058A0E/071CB107 // Set Condition
.word $0002 ; 058A12/0200
.word $0000 ; 058A14/0000
MOV REG,VAR2 ; 058A16/2402
ASM_CALL LoadGfx_07906F_far ; 058A18/076B9007 // Load Graphics
AND.w Condition_Spirit,AND,#$FBFF ; 058A1C/0EC51100FFFB
L_058A22:
AND.w Condition_Spirit,AND,#$FEFF ; 058A22/0EC51100FFFE
L_058A28:
ASM_CALL Is_Equals_1575 ; 058A28/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_058A83 ; 058A2C/0C838A
MOV REG,Game_State ; 058A2F/1FC111
MULTI_JMP #6 ; 058A32/1106
.word DATA8_058A41 ; 058A34/418A
.word DATA8_058A41 ; 058A36/418A
.word DATA8_058A62 ; 058A38/628A
.word DATA8_058A41 ; 058A3A/418A
.word DATA8_058A41 ; 058A3C/418A
.word DATA8_058A41 ; 058A3E/418A
HALT ; 058A40/0A
DATA8_058A41:
ON_TICK CODE_058B3C ; 058A41/093C8B05
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058A45/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058A45 ; 058A49/64930D
.byte $75 ; 058A4C/75
.word 22 ; 058A4D/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058A4F/0735A000 // Decompression setup 2
.long Sprite_Field_Marid ; 058A53/91AC0E
.long $7E8500 ; 058A56/00857E
WAIT #1 ; 058A59/0601
ASM_CALL RAM_Decomp_801A ; 058A5B/0712800E // RAM Decomp (801A)
WAIT #1 ; 058A5F/0601
HALT ; 058A61/0A
DATA8_058A62:
ON_TICK ASM_Event_Main_07 ; 058A62/09368B05
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058A66/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058A66 ; 058A6A/6C940D
.byte $75 ; 058A6D/75
.word 22 ; 058A6E/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058A70/0735A000 // Decompression setup 2
.long Sprite_Battle_Marid ; 058A74/8DB00E
.long $7E8500 ; 058A77/00857E
WAIT #1 ; 058A7A/0601
ASM_CALL RAM_Decomp_801A ; 058A7C/0712800E // RAM Decomp (801A)
WAIT #1 ; 058A80/0601
HALT ; 058A82/0A
DATA8_058A83:
ON_TICK CODE_058B3C ; 058A83/093C8B05
MOV VAR0,#$0000 ; 058A87/0F000000
ASM_CALL Get_MenuCursorCoords ; 058A8B/0765AE07 // Get Menu cursor coords
AND.w Condition_Spirit,AND,#$FEFF ; 058A8F/0EC51100FFFE
L_058A95:
JMP DATA8_059683 ; 058A95/1A8396
DATA8_058A98:
ASM_CALL GetSet_SFX_1b ; 058A98/07449C00 // Get/Set Sound Effect
.byte 47 ; 058A9C/2F
MOV REG,VAR2 ; 058A9D/2402
ASM_CALL LoadGfx_07906F_far ; 058A9F/076B9007 // Load Graphics
ASM_CALL Kill_Spirit ; 058AA3/074AB907 // Kill spirit (zeroes HP and MP)
ASM_CALL Update_SpiritHP_far ; 058AA7/07FB8205
WAIT #30 ; 058AAB/061E
DATA8_058AAD:
TASK DATA8_058782 ; 058AAD/088287
ON_TICK CODE_058B6B ; 058AB0/096B8B05
MOV REG,VAR2 ; 058AB4/2402
ASM_CALL Load_PC_Name ; 058AB6/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058ABA/2402
ASM_CALL Sub_Draw_HP_I_think ; 058ABC/07468D07 // Draw HP?
MOV REG,VAR2 ; 058AC0/2402
ASM_CALL Sub_Draw_MP_I_think ; 058AC2/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058AC6/2402
ASM_CALL Sub_Draw_Level ; 058AC8/07F08D07 // Sub: Draw Level
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058ACC/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058A45 ; 058AD0/64930D
.byte $75 ; 058AD3/75
.word 22 ; 058AD4/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058AD6/0735A000 // Decompression setup 2
.long Sprite_Torn_Card ; 058ADA/CC8F0E
.long $7E8500 ; 058ADD/00857E
ASM_CALL RAM_Decomp_801A ; 058AE0/0712800E // RAM Decomp (801A)
HALT ; 058AE4/0A
L_058AE5:
ASM_CALL Max_heal ; 058AE5/072FB907 // Max heal
MOV REG,VAR2 ; 058AE9/2402
ASM_CALL Sub_Draw_HP_I_think ; 058AEB/07468D07 // Draw HP?
MOV REG,VAR2 ; 058AEF/2402
ASM_CALL Sub_Draw_MP_I_think ; 058AF1/07B08D07 // Sub: Draw MP ?
JMP DATA8_058A0B ; 058AF5/1A0B8A
DATA8_058AF8:
ASM_CALL Decomp_Setup2_3b_3b ; 058AF8/0735A000 // Decompression setup 2
.long Sprite_Attack_Marid ; 058AFC/D1B30E
.long $7E8500 ; 058AFF/00857E
ASM_CALL RAM_Decomp_801A ; 058B02/0712800E // RAM Decomp (801A)
ASM_CALL GetSet_SFX_1b ; 058B06/07449C00 // Get/Set Sound Effect
.byte 1 ; 058B0A/01
WAIT #20 ; 058B0B/0614
ASM_CALL Decomp_Setup2_3b_3b ; 058B0D/0735A000 // Decompression setup 2
.long Sprite_Battle_Marid ; 058B11/8DB00E
.long $7E8500 ; 058B14/00857E
ASM_CALL RAM_Decomp_801A ; 058B17/0712800E // RAM Decomp (801A)
END_TASK ; 058B1B/0D
TASK DATA8_058B30 ; 058B1C/08308B
JSR DATA8_058425 ; 058B1F/1B2584
MOV REG,VAR2 ; 058B22/2402
ASM_CALL Condition_Check_2b ; 058B24/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058B28/0100
JNE DATA8_058A98 ; 058B2A/0C988A
JMP DATA8_058A62 ; 058B2D/1A628A
DATA8_058B30:
JSR Load_Color_Attr_and_Condition; 058B30/1B1283
JMP DATA8_058B30 ; 058B33/1A308B
$058B88 - Event 08: Efrite
Event_Main_08_EFRITE:
MOV VAR2,#$0001 ; 058B88/0F020100
Add_char_04_to_party:
ASM_CALL Set_character_ID_2b ; 058B8C/0770B407 // Set character ID
.word $0004 ; 058B90/0400
MOV REG,VAR2 ; 058B92/2402
ASM_CALL OR_element_with_2b ; 058B94/0769B107 // OR element with [var]
.word $0800 ; 058B98/0008
JSR DATA8_0585BB ; 058B9A/1BBB85
MOV REG,VAR2 ; 058B9D/2402
ASM_CALL Condition_Check_2b ; 058B9F/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058BA3/0100
JNE DATA8_058C4A ; 058BA5/0C4A8C
DATA8_058BA8:
TASK DATA8_058CCD ; 058BA8/08CD8C
ASM_CALL Set_Condition_4b ; 058BAB/071CB107 // Set Condition
.word $0002 ; 058BAF/0200
.word $0000 ; 058BB1/0000
MOV REG,VAR2 ; 058BB3/2402
ASM_CALL LoadGfx_07906F_far ; 058BB5/076B9007 // Load Graphics
AND.w Condition_Spirit,AND,#$FBFF ; 058BB9/0EC51100FFFB
L_058BBF:
AND.w Condition_Spirit,AND,#$FEFF ; 058BBF/0EC51100FFFE
L_058BC5:
ASM_CALL Is_Equals_1575 ; 058BC5/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_058C20 ; 058BC9/0C208C
MOV REG,Game_State ; 058BCC/1FC111
MULTI_JMP #6 ; 058BCF/1106
.word ASM_058BDE ; 058BD1/DE8B
.word ASM_058BDE ; 058BD3/DE8B
.word ASM_058BFF_In_Battle ; 058BD5/FF8B
.word ASM_058BDE ; 058BD7/DE8B
.word ASM_058BDE ; 058BD9/DE8B
.word ASM_058BDE ; 058BDB/DE8B
HALT ; 058BDD/0A
ASM_058BDE:
ON_TICK CODE_058CD9 ; 058BDE/09D98C05
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058BE2/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058BE2 ; 058BE6/7A930D
.byte $75 ; 058BE9/75
.word 22 ; 058BEA/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058BEC/0735A000 // Decompression setup 2
.long Sprite_Field_Efrite ; 058BF0/15B70E
.long $7E8500 ; 058BF3/00857E
WAIT #1 ; 058BF6/0601
ASM_CALL RAM_Decomp_801A ; 058BF8/0712800E // RAM Decomp (801A)
WAIT #1 ; 058BFC/0601
HALT ; 058BFE/0A
ASM_058BFF_In_Battle:
ON_TICK ASM_Event_Main_08 ; 058BFF/09D38C05
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058C03/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058BE2 ; 058C07/7A930D
.byte $75 ; 058C0A/75
.word 22 ; 058C0B/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058C0D/0735A000 // Decompression setup 2
.long Sprite_Battle_Efrite ; 058C11/0EBB0E
.long $7E8500 ; 058C14/00857E
WAIT #1 ; 058C17/0601
ASM_CALL RAM_Decomp_801A ; 058C19/0712800E // RAM Decomp (801A)
WAIT #1 ; 058C1D/0601
HALT ; 058C1F/0A
DATA8_058C20:
ON_TICK CODE_058CD9 ; 058C20/09D98C05
MOV VAR0,#$0000 ; 058C24/0F000000
ASM_CALL Get_MenuCursorCoords ; 058C28/0765AE07 // Get Menu cursor coords
AND.w Condition_Spirit,AND,#$FEFF ; 058C2C/0EC51100FFFE
L_058C32:
JMP DATA8_059683 ; 058C32/1A8396
DATA8_058C35:
ASM_CALL GetSet_SFX_1b ; 058C35/07449C00 // Get/Set Sound Effect
.byte 47 ; 058C39/2F
MOV REG,VAR2 ; 058C3A/2402
ASM_CALL LoadGfx_07906F_far ; 058C3C/076B9007 // Load Graphics
ASM_CALL Kill_Spirit ; 058C40/074AB907 // Kill spirit (zeroes HP and MP)
ASM_CALL Update_SpiritHP_far ; 058C44/07FB8205
WAIT #30 ; 058C48/061E
DATA8_058C4A:
TASK DATA8_058782 ; 058C4A/088287
ON_TICK CODE_058D08 ; 058C4D/09088D05
MOV REG,VAR2 ; 058C51/2402
ASM_CALL Load_PC_Name ; 058C53/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058C57/2402
ASM_CALL Sub_Draw_HP_I_think ; 058C59/07468D07 // Draw HP?
MOV REG,VAR2 ; 058C5D/2402
ASM_CALL Sub_Draw_MP_I_think ; 058C5F/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058C63/2402
ASM_CALL Sub_Draw_Level ; 058C65/07F08D07 // Sub: Draw Level
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058C69/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058BE2 ; 058C6D/7A930D
.byte $75 ; 058C70/75
.word 22 ; 058C71/1600
ASM_CALL Decomp_Setup2_3b_3b ; 058C73/0735A000 // Decompression setup 2
.long Sprite_Torn_Card ; 058C77/CC8F0E
.long $7E8500 ; 058C7A/00857E
ASM_CALL RAM_Decomp_801A ; 058C7D/0712800E // RAM Decomp (801A)
HALT ; 058C81/0A
L_058C82:
ASM_CALL Max_heal ; 058C82/072FB907 // Max heal
MOV REG,VAR2 ; 058C86/2402
ASM_CALL Sub_Draw_HP_I_think ; 058C88/07468D07 // Draw HP?
MOV REG,VAR2 ; 058C8C/2402
ASM_CALL Sub_Draw_MP_I_think ; 058C8E/07B08D07 // Sub: Draw MP ?
JMP DATA8_058BA8 ; 058C92/1AA88B
DATA8_058C95:
ASM_CALL Decomp_Setup2_3b_3b ; 058C95/0735A000 // Decompression setup 2
.long Sprite_Attack_Efrite ; 058C99/A9BE0E
.long $7E8500 ; 058C9C/00857E
ASM_CALL RAM_Decomp_801A ; 058C9F/0712800E // RAM Decomp (801A)
ASM_CALL GetSet_SFX_1b ; 058CA3/07449C00 // Get/Set Sound Effect
.byte 1 ; 058CA7/01
WAIT #20 ; 058CA8/0614
ASM_CALL Decomp_Setup2_3b_3b ; 058CAA/0735A000 // Decompression setup 2
.long Sprite_Battle_Efrite ; 058CAE/0EBB0E
.long $7E8500 ; 058CB1/00857E
ASM_CALL RAM_Decomp_801A ; 058CB4/0712800E // RAM Decomp (801A)
END_TASK ; 058CB8/0D
TASK DATA8_058CCD ; 058CB9/08CD8C
JSR DATA8_058425 ; 058CBC/1B2584
MOV REG,VAR2 ; 058CBF/2402
ASM_CALL Condition_Check_2b ; 058CC1/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058CC5/0100
JNE DATA8_058C35 ; 058CC7/0C358C
JMP ASM_058BFF_In_Battle ; 058CCA/1AFF8B
DATA8_058CCD:
JSR Load_Color_Attr_and_Condition; 058CCD/1B1283
JMP DATA8_058CCD ; 058CD0/1ACD8C
$058D25 - Event 09: Teefa
Event_Main_09_TEEFA:
MOV VAR2,#$0002 ; 058D25/0F020200
MOV REG,VAR0 ; 058D29/2400
JNE DATA8_058D68 ; 058D2B/0C688D
MOV VAR0,#$0000 ; 058D2E/0F000000
MOV VAR1,#$0000 ; 058D32/0F010000
MOV VAR3,#$0000 ; 058D36/0F030000
ASM_CALL Set_character_ID_2b ; 058D3A/0770B407 // Set character ID
.word $0005 ; 058D3E/0500
MOV REG,VAR2 ; 058D40/2402
ASM_CALL Set_LVL ; 058D42/07ABB207
ASM_CALL Sub_Get_EXP_to_next ; 058D46/077AB207 // Sub: Get EXP to next LVL
MOV REG,VAR2 ; 058D4A/2402
ASM_CALL LevelJoinStats ; 058D4C/0707B307 // Sub: Level join stats
MOV REG,VAR2 ; 058D50/2402
ASM_CALL Sub_Wipe_Spells ; 058D52/07EDAB07 // Wipe Spells
MOV REG,VAR2 ; 058D56/2402
ASM_CALL GetJoinSpells ; 058D58/0708AC07 // Get Join Spells
ASM_CALL Max_heal ; 058D5C/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 058D60/071CB107 // Set Condition
.word $0002 ; 058D64/0200
.word $0000 ; 058D66/0000
DATA8_058D68:
MOV REG,VAR2 ; 058D68/2402
ASM_CALL OR_element_with_2b ; 058D6A/0769B107 // OR element with [var]
.word $0000 ; 058D6E/0000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058D70/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058D70 ; 058D74/A2920D
.byte $50 ; 058D77/50
.word 32 ; 058D78/2000
MOV REG,VAR2 ; 058D7A/2402
ASM_CALL Load_PC_Name ; 058D7C/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058D80/2402
ASM_CALL Sub_Draw_HP_I_think ; 058D82/07468D07 // Draw HP?
MOV REG,VAR2 ; 058D86/2402
ASM_CALL Sub_Draw_MP_I_think ; 058D88/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058D8C/2402
ASM_CALL Sub_Draw_Level ; 058D8E/07F08D07 // Sub: Draw Level
ASM_CALL Get_ID_in_slot_2b ; 058D92/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0004 ; 058D96/0400
MULTI_JSR #4 ; 058D98/1204
.word DATA8_058EE1 ; 058D9A/E18E
.word DATA8_058EEB ; 058D9C/EB8E
.word DATA8_058EF5 ; 058D9E/F58E
.word DATA8_058EFF ; 058DA0/FF8E
JSL Some_Death_Check ; 058DA2/04498405
TASK DATA8_058EA8 ; 058DA6/08A88E
MOV REG,VAR2 ; 058DA9/2402
ASM_CALL LoadGfx_07906F_far ; 058DAB/076B9007 // Load Graphics
MOV REG,VAR2 ; 058DAF/2402
ASM_CALL Sub_Draw_Level ; 058DB1/07F08D07 // Sub: Draw Level
AND.w Condition_Guest1,AND,#$FBFF ; 058DB5/0EC71100FFFB
L_058DBB:
AND.w Condition_Guest1,AND,#$FEFF ; 058DBB/0EC71100FFFE
L_058DC1:
ASM_CALL Is_Equals_1575 ; 058DC1/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_058E34 ; 058DC5/0C348E
MOV REG,Game_State ; 058DC8/1FC111
MULTI_JMP #6 ; 058DCB/1106
.word DATA8_058DDA ; 058DCD/DA8D
.word DATA8_058DDA ; 058DCF/DA8D
.word Event_Main_09_TEEFA_part_2 ; 058DD1/198E
.word DATA8_058DDA ; 058DD3/DA8D
.word DATA8_058DDA ; 058DD5/DA8D
.word DATA8_058DDA ; 058DD7/DA8D
HALT ; 058DD9/0A
DATA8_058DDA:
ON_TICK CODE_058F0F ; 058DDA/090F8F05
JSL Some_Death_Check ; 058DDE/04498405
ASM_CALL Chapter5_Check ; 058DE2/07098E05
JNE DATA8_058DF6 ; 058DE6/0CF68D
ASM_CALL Decomp_Setup2_3b_3b ; 058DE9/0735A000 // Decompression setup 2
.long Sprite_Field_BadTeefa ; 058DED/92C20E
.long $7E8A00 ; 058DF0/008A7E
JMP DATA8_058E00 ; 058DF3/1A008E
DATA8_058DF6:
ASM_CALL Decomp_Setup2_3b_3b ; 058DF6/0735A000 // Decompression setup 2
.long Sprite_Field_GdTeefa ; 058DFA/ABC60E
.long $7E8A00 ; 058DFD/008A7E
DATA8_058E00:
WAIT #1 ; 058E00/0601
ASM_CALL RAM_Decomp_802B ; 058E02/0723800E // RAM Decomp (802B)
WAIT #1 ; 058E06/0601
HALT ; 058E08/0A
$058E19 - Sub: Teefa part 2
Event_Main_09_TEEFA_part_2:
ON_TICK ASM_Event_Main_09 ; 058E19/09098F05
JSL Some_Death_Check ; 058E1D/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 058E21/0735A000 // Decompression setup 2
.long Sprite_Battle_Teefa ; 058E25/C5CA0E
.long $7E8A00 ; 058E28/008A7E
WAIT #1 ; 058E2B/0601
ASM_CALL RAM_Decomp_802B ; 058E2D/0723800E // RAM Decomp (802B)
WAIT #1 ; 058E31/0601
HALT ; 058E33/0A
DATA8_058E34:
ON_TICK CODE_058F0F ; 058E34/090F8F05
MOV VAR0,#$0000 ; 058E38/0F000000
ASM_CALL Get_MenuCursorCoords ; 058E3C/0765AE07 // Get Menu cursor coords
AND.w Condition_Guest1,AND,#$FEFF ; 058E40/0EC71100FFFE
L_058E46:
JMP DATA8_059683 ; 058E46/1A8396
DATA8_058E49:
MOV REG,VAR2 ; 058E49/2402
ASM_CALL LoadGfx_07906F_far ; 058E4B/076B9007 // Load Graphics
MOV REG,VAR2 ; 058E4F/2402
ASM_CALL Sub_Draw_Level ; 058E51/07F08D07 // Sub: Draw Level
WAIT #30 ; 058E55/061E
ASM_CALL Decomp_Setup2_3b_3b ; 058E57/0735A000 // Decompression setup 2
.long Sprite_Dead_PC ; 058E5B/1F8C0E
.long $7E8A00 ; 058E5E/008A7E
ASM_CALL RAM_Decomp_802B ; 058E61/0723800E // RAM Decomp (802B)
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058E65/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_05922A ; 058E69/48950D
.byte $53 ; 058E6C/53
.word 26 ; 058E6D/1A00
HALT ; 058E6F/0A
DATA8_058E70:
ASM_CALL Decomp_Setup2_3b_3b ; 058E70/0735A000 // Decompression setup 2
.long Sprite_Attack_Teefa ; 058E74/75CE0E
.long $7E8A00 ; 058E77/008A7E
ASM_CALL RAM_Decomp_802B ; 058E7A/0723800E // RAM Decomp (802B)
ASM_CALL GetSet_SFX_1b ; 058E7E/07449C00 // Get/Set Sound Effect
.byte 1 ; 058E82/01
WAIT #20 ; 058E83/0614
ASM_CALL Decomp_Setup2_3b_3b ; 058E85/0735A000 // Decompression setup 2
.long Sprite_Battle_Teefa ; 058E89/C5CA0E
.long $7E8A00 ; 058E8C/008A7E
ASM_CALL RAM_Decomp_802B ; 058E8F/0723800E // RAM Decomp (802B)
END_TASK ; 058E93/0D
TASK DATA8_058EA8 ; 058E94/08A88E
JSR DATA8_058425 ; 058E97/1B2584
MOV REG,VAR2 ; 058E9A/2402
ASM_CALL Condition_Check_2b ; 058E9C/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 058EA0/0100
JNE DATA8_058E49 ; 058EA2/0C498E
JMP Event_Main_09_TEEFA_part_2 ; 058EA5/1A198E
DATA8_058EA8:
JSR Load_Color_Attr_and_Condition; 058EA8/1B1283
JMP DATA8_058EA8 ; 058EAB/1AA88E
Sub_More_setup:
ASM_CALL Get_ID_in_slot_2b ; 058EAE/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0004 ; 058EB2/0400
MULTI_JSR #4 ; 058EB4/1204
.word DATA8_058EE1 ; 058EB6/E18E
.word DATA8_058EEB ; 058EB8/EB8E
.word DATA8_058EF5 ; 058EBA/F58E
.word DATA8_058EFF ; 058EBC/FF8E
MOV VAR2,#$0002 ; 058EBE/0F020200
MOV REG,VAR2 ; 058EC2/2402
ASM_CALL LoadGfx_07906F_far ; 058EC4/076B9007 // Load Graphics
MOV REG,VAR2 ; 058EC8/2402
ASM_CALL Load_PC_Name ; 058ECA/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058ECE/2402
ASM_CALL Sub_Draw_HP_I_think ; 058ED0/07468D07 // Draw HP?
MOV REG,VAR2 ; 058ED4/2402
ASM_CALL Sub_Draw_MP_I_think ; 058ED6/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058EDA/2402
ASM_CALL Sub_Draw_Level ; 058EDC/07F08D07 // Sub: Draw Level
RTL ; 058EE0/05
DATA8_058EE1:
ASM_CALL Setup_8698_3b_2b ; 058EE1/071F9D00 // 00/8698 setup
.long DATA8_0E80EB ; 058EE5/EB800E
.word $0061 ; 058EE8/6100
RTS ; 058EEA/1C
DATA8_058EEB:
ASM_CALL Setup_8698_3b_2b ; 058EEB/071F9D00 // 00/8698 setup
.long DATA8_0E80EB ; 058EEF/EB800E
.word $007A ; 058EF2/7A00
RTS ; 058EF4/1C
DATA8_058EF5:
ASM_CALL Setup_8698_3b_2b ; 058EF5/071F9D00 // 00/8698 setup
.long DATA8_0E80EB ; 058EF9/EB800E
.word $0201 ; 058EFC/0102
RTS ; 058EFE/1C
DATA8_058EFF:
ASM_CALL Setup_8698_3b_2b ; 058EFF/071F9D00 // 00/8698 setup
.long DATA8_0E80EB ; 058F03/EB800E
.word $021A ; 058F06/1A02
RTS ; 058F08/1C
$058F57 - Event 0A: Salah
Event_Main_0A_SALAH:
MOV VAR2,#$0002 ; 058F57/0F020200
MOV REG,VAR0 ; 058F5B/2400
JNE DATA8_058F9A ; 058F5D/0C9A8F
MOV VAR0,#$0000 ; 058F60/0F000000
MOV VAR1,#$0000 ; 058F64/0F010000
MOV VAR3,#$0000 ; 058F68/0F030000
ASM_CALL Set_character_ID_2b ; 058F6C/0770B407 // Set character ID
.word $0006 ; 058F70/0600
MOV REG,VAR2 ; 058F72/2402
ASM_CALL Set_LVL ; 058F74/07ABB207
ASM_CALL Sub_Get_EXP_to_next ; 058F78/077AB207 // Sub: Get EXP to next LVL
MOV REG,VAR2 ; 058F7C/2402
ASM_CALL LevelJoinStats ; 058F7E/0707B307 // Sub: Level join stats
MOV REG,VAR2 ; 058F82/2402
ASM_CALL Sub_Wipe_Spells ; 058F84/07EDAB07 // Wipe Spells
MOV REG,VAR2 ; 058F88/2402
ASM_CALL GetJoinSpells ; 058F8A/0708AC07 // Get Join Spells
ASM_CALL Max_heal ; 058F8E/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 058F92/071CB107 // Set Condition
.word $0002 ; 058F96/0200
.word $0000 ; 058F98/0000
DATA8_058F9A:
MOV REG,VAR2 ; 058F9A/2402
ASM_CALL OR_element_with_2b ; 058F9C/0769B107 // OR element with [var]
.word $0000 ; 058FA0/0000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 058FA2/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_058FA2 ; 058FA6/C2920D
.byte $50 ; 058FA9/50
.word 32 ; 058FAA/2000
MOV REG,VAR2 ; 058FAC/2402
ASM_CALL Load_PC_Name ; 058FAE/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 058FB2/2402
ASM_CALL Sub_Draw_HP_I_think ; 058FB4/07468D07 // Draw HP?
MOV REG,VAR2 ; 058FB8/2402
ASM_CALL Sub_Draw_MP_I_think ; 058FBA/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 058FBE/2402
ASM_CALL Sub_Draw_Level ; 058FC0/07F08D07 // Sub: Draw Level
ASM_CALL Get_ID_in_slot_2b ; 058FC4/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0004 ; 058FC8/0400
MULTI_JSR #4 ; 058FCA/1204
.word DATA8_058EE1 ; 058FCC/E18E
.word DATA8_058EEB ; 058FCE/EB8E
.word DATA8_058EF5 ; 058FD0/F58E
.word DATA8_058EFF ; 058FD2/FF8E
JSL Some_Death_Check ; 058FD4/04498405
TASK DATA8_0590B6 ; 058FD8/08B690
MOV REG,VAR2 ; 058FDB/2402
ASM_CALL LoadGfx_07906F_far ; 058FDD/076B9007 // Load Graphics
MOV REG,VAR2 ; 058FE1/2402
ASM_CALL Sub_Draw_Level ; 058FE3/07F08D07 // Sub: Draw Level
AND.w Condition_Guest1,AND,#$FBFF ; 058FE7/0EC71100FFFB
L_058FED:
AND.w Condition_Guest1,AND,#$FEFF ; 058FED/0EC71100FFFE
L_058FF3:
ASM_CALL Is_Equals_1575 ; 058FF3/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_059042 ; 058FF7/0C4290
MOV REG,Game_State ; 058FFA/1FC111
MULTI_JMP #6 ; 058FFD/1106
.word DATA8_05900C ; 058FFF/0C90
.word DATA8_05900C ; 059001/0C90
.word DATA8_059027 ; 059003/2790
.word DATA8_05900C ; 059005/0C90
.word DATA8_05900C ; 059007/0C90
.word DATA8_05900C ; 059009/0C90
HALT ; 05900B/0A
DATA8_05900C:
ON_TICK CODE_0590C2 ; 05900C/09C29005
JSL Some_Death_Check ; 059010/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 059014/0735A000 // Decompression setup 2
.long Sprite_Field_Salah ; 059018/5CD20E
.long $7E8A00 ; 05901B/008A7E
WAIT #1 ; 05901E/0601
ASM_CALL RAM_Decomp_802B ; 059020/0723800E // RAM Decomp (802B)
WAIT #1 ; 059024/0601
HALT ; 059026/0A
DATA8_059027:
ON_TICK ASM_Event_Main_0A ; 059027/09BC9005
JSL Some_Death_Check ; 05902B/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 05902F/0735A000 // Decompression setup 2
.long Sprite_Battle_Salah ; 059033/6FD60E
.long $7E8A00 ; 059036/008A7E
WAIT #1 ; 059039/0601
ASM_CALL RAM_Decomp_802B ; 05903B/0723800E // RAM Decomp (802B)
WAIT #1 ; 05903F/0601
HALT ; 059041/0A
DATA8_059042:
ON_TICK CODE_0590C2 ; 059042/09C29005
MOV VAR0,#$0000 ; 059046/0F000000
ASM_CALL Get_MenuCursorCoords ; 05904A/0765AE07 // Get Menu cursor coords
AND.w Condition_Guest1,AND,#$FEFF ; 05904E/0EC71100FFFE
L_059054:
JMP DATA8_059683 ; 059054/1A8396
DATA8_059057:
MOV REG,VAR2 ; 059057/2402
ASM_CALL LoadGfx_07906F_far ; 059059/076B9007 // Load Graphics
MOV REG,VAR2 ; 05905D/2402
ASM_CALL Sub_Draw_Level ; 05905F/07F08D07 // Sub: Draw Level
WAIT #30 ; 059063/061E
ASM_CALL Decomp_Setup2_3b_3b ; 059065/0735A000 // Decompression setup 2
.long Sprite_Dead_PC ; 059069/1F8C0E
.long $7E8A00 ; 05906C/008A7E
ASM_CALL RAM_Decomp_802B ; 05906F/0723800E // RAM Decomp (802B)
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059073/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_05922A ; 059077/48950D
.byte $53 ; 05907A/53
.word 26 ; 05907B/1A00
HALT ; 05907D/0A
DATA8_05907E:
ASM_CALL Decomp_Setup2_3b_3b ; 05907E/0735A000 // Decompression setup 2
.long Sprite_Attack_Salah ; 059082/31DA0E
.long $7E8A00 ; 059085/008A7E
ASM_CALL RAM_Decomp_802B ; 059088/0723800E // RAM Decomp (802B)
ASM_CALL GetSet_SFX_1b ; 05908C/07449C00 // Get/Set Sound Effect
.byte 1 ; 059090/01
WAIT #20 ; 059091/0614
ASM_CALL Decomp_Setup2_3b_3b ; 059093/0735A000 // Decompression setup 2
.long Sprite_Battle_Salah ; 059097/6FD60E
.long $7E8A00 ; 05909A/008A7E
ASM_CALL RAM_Decomp_802B ; 05909D/0723800E // RAM Decomp (802B)
END_TASK ; 0590A1/0D
TASK DATA8_0590B6 ; 0590A2/08B690
JSR DATA8_058425 ; 0590A5/1B2584
MOV REG,VAR2 ; 0590A8/2402
ASM_CALL Condition_Check_2b ; 0590AA/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 0590AE/0100
JNE DATA8_059057 ; 0590B0/0C5790
JMP DATA8_059027 ; 0590B3/1A2790
DATA8_0590B6:
JSR Load_Color_Attr_and_Condition; 0590B6/1B1283
JMP DATA8_0590B6 ; 0590B9/1AB690
$05910A - Event 0B: Darwin
Event_Main_0B_DARWIN:
MOV VAR2,#$0003 ; 05910A/0F020300
MOV REG,VAR0 ; 05910E/2400
JNE DATA8_05914D ; 059110/0C4D91
MOV VAR0,#$0000 ; 059113/0F000000
MOV VAR1,#$0000 ; 059117/0F010000
MOV VAR3,#$0000 ; 05911B/0F030000
Set_Character_7:
ASM_CALL Set_character_ID_2b ; 05911F/0770B407 // Set character ID
.word $0007 ; 059123/0700
MOV REG,VAR2 ; 059125/2402
ASM_CALL Set_LVL ; 059127/07ABB207
ASM_CALL Sub_Get_EXP_to_next ; 05912B/077AB207 // Sub: Get EXP to next LVL
MOV REG,VAR2 ; 05912F/2402
ASM_CALL LevelJoinStats ; 059131/0707B307 // Sub: Level join stats
MOV REG,VAR2 ; 059135/2402
ASM_CALL Sub_Wipe_Spells ; 059137/07EDAB07 // Wipe Spells
MOV REG,VAR2 ; 05913B/2402
ASM_CALL GetJoinSpells ; 05913D/0708AC07 // Get Join Spells
ASM_CALL Max_heal ; 059141/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 059145/071CB107 // Set Condition
.word $0002 ; 059149/0200
.word $0000 ; 05914B/0000
DATA8_05914D:
MOV REG,VAR2 ; 05914D/2402
ASM_CALL OR_element_with_2b ; 05914F/0769B107 // OR element with [var]
.word $0000 ; 059153/0000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059155/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059155 ; 059159/E2920D
.byte $60 ; 05915C/60
.word 32 ; 05915D/2000
MOV REG,VAR2 ; 05915F/2402
ASM_CALL Load_PC_Name ; 059161/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 059165/2402
ASM_CALL Sub_Draw_HP_I_think ; 059167/07468D07 // Draw HP?
MOV REG,VAR2 ; 05916B/2402
ASM_CALL Sub_Draw_MP_I_think ; 05916D/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 059171/2402
ASM_CALL Sub_Draw_Level ; 059173/07F08D07 // Sub: Draw Level
ASM_CALL Get_ID_in_slot_2b ; 059177/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0006 ; 05917B/0600
MULTI_JSR #4 ; 05917D/1204
.word DATA8_0592A2 ; 05917F/A292
.word DATA8_0592AC ; 059181/AC92
.word DATA8_0592B6 ; 059183/B692
.word DATA8_0592C0 ; 059185/C092
JSL Some_Death_Check ; 059187/04498405
TASK DATA8_059269 ; 05918B/086992
MOV REG,VAR2 ; 05918E/2402
ASM_CALL LoadGfx_07906F_far ; 059190/076B9007 // Load Graphics
MOV REG,VAR2 ; 059194/2402
ASM_CALL Sub_Draw_Level ; 059196/07F08D07 // Sub: Draw Level
AND.w Condition_Guest2,AND,#$FBFF ; 05919A/0EC91100FFFB
L_0591A0:
AND.w Condition_Guest2,AND,#$FEFF ; 0591A0/0EC91100FFFE
L_0591A6:
ASM_CALL Is_Equals_1575 ; 0591A6/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_0591F5 ; 0591AA/0CF591
MOV REG,Game_State ; 0591AD/1FC111
MULTI_JMP #6 ; 0591B0/1106
.word DATA8_0591BF ; 0591B2/BF91
.word DATA8_0591BF ; 0591B4/BF91
.word DATA8_0591DA ; 0591B6/DA91
.word DATA8_0591BF ; 0591B8/BF91
.word DATA8_0591BF ; 0591BA/BF91
.word DATA8_0591BF ; 0591BC/BF91
HALT ; 0591BE/0A
DATA8_0591BF:
ON_TICK CODE_0592D0 ; 0591BF/09D09205
JSL Some_Death_Check ; 0591C3/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 0591C7/0735A000 // Decompression setup 2
.long Sprite_Field_Darwin ; 0591CB/F8DD0E
.long $7E8F00 ; 0591CE/008F7E
WAIT #1 ; 0591D1/0601
ASM_CALL RAM_Decomp_803C ; 0591D3/0734800E // RAM Decomp (803C)
WAIT #1 ; 0591D7/0601
HALT ; 0591D9/0A
DATA8_0591DA:
ON_TICK ASM_Event_Main_0B ; 0591DA/09CA9205
JSL Some_Death_Check ; 0591DE/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 0591E2/0735A000 // Decompression setup 2
.long Sprite_Battle_Darwin ; 0591E6/D3E10E
.long $7E8F00 ; 0591E9/008F7E
WAIT #1 ; 0591EC/0601
ASM_CALL RAM_Decomp_803C ; 0591EE/0734800E // RAM Decomp (803C)
WAIT #1 ; 0591F2/0601
HALT ; 0591F4/0A
DATA8_0591F5:
ON_TICK CODE_0592D0 ; 0591F5/09D09205
MOV VAR0,#$0000 ; 0591F9/0F000000
ASM_CALL Get_MenuCursorCoords ; 0591FD/0765AE07 // Get Menu cursor coords
AND.w Condition_Guest2,AND,#$FEFF ; 059201/0EC91100FFFE
L_059207:
JMP DATA8_059683 ; 059207/1A8396
DATA8_05920A:
MOV REG,VAR2 ; 05920A/2402
ASM_CALL LoadGfx_07906F_far ; 05920C/076B9007 // Load Graphics
MOV REG,VAR2 ; 059210/2402
ASM_CALL Sub_Draw_Level ; 059212/07F08D07 // Sub: Draw Level
WAIT #30 ; 059216/061E
ASM_CALL Decomp_Setup2_3b_3b ; 059218/0735A000 // Decompression setup 2
.long Sprite_Dead_PC ; 05921C/1F8C0E
.long $7E8F00 ; 05921F/008F7E
ASM_CALL RAM_Decomp_803C ; 059222/0734800E // RAM Decomp (803C)
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059226/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_05922A ; 05922A/48950D
.byte $63 ; 05922D/63
.word 26 ; 05922E/1A00
HALT ; 059230/0A
DATA8_059231:
ASM_CALL Decomp_Setup2_3b_3b ; 059231/0735A000 // Decompression setup 2
.long Sprite_Attack_Darwin ; 059235/18E50E
.long $7E8F00 ; 059238/008F7E
ASM_CALL RAM_Decomp_803C ; 05923B/0734800E // RAM Decomp (803C)
ASM_CALL GetSet_SFX_1b ; 05923F/07449C00 // Get/Set Sound Effect
.byte 1 ; 059243/01
WAIT #20 ; 059244/0614
ASM_CALL Decomp_Setup2_3b_3b ; 059246/0735A000 // Decompression setup 2
.long Sprite_Battle_Darwin ; 05924A/D3E10E
.long $7E8F00 ; 05924D/008F7E
ASM_CALL RAM_Decomp_803C ; 059250/0734800E // RAM Decomp (803C)
END_TASK ; 059254/0D
TASK DATA8_059269 ; 059255/086992
JSR DATA8_058425 ; 059258/1B2584
MOV REG,VAR2 ; 05925B/2402
ASM_CALL Condition_Check_2b ; 05925D/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 059261/0100
JNE DATA8_05920A ; 059263/0C0A92
JMP DATA8_0591DA ; 059266/1ADA91
DATA8_059269:
JSR Load_Color_Attr_and_Condition; 059269/1B1283
JMP DATA8_059269 ; 05926C/1A6992
Sub_Another_setup_again:
ASM_CALL Get_ID_in_slot_2b ; 05926F/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0006 ; 059273/0600
MULTI_JSR #4 ; 059275/1204
.word DATA8_0592A2 ; 059277/A292
.word DATA8_0592AC ; 059279/AC92
.word DATA8_0592B6 ; 05927B/B692
.word DATA8_0592C0 ; 05927D/C092
MOV VAR2,#$0003 ; 05927F/0F020300
MOV REG,VAR2 ; 059283/2402
ASM_CALL LoadGfx_07906F_far ; 059285/076B9007 // Load Graphics
MOV REG,VAR2 ; 059289/2402
ASM_CALL Load_PC_Name ; 05928B/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 05928F/2402
ASM_CALL Sub_Draw_HP_I_think ; 059291/07468D07 // Draw HP?
MOV REG,VAR2 ; 059295/2402
ASM_CALL Sub_Draw_MP_I_think ; 059297/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 05929B/2402
ASM_CALL Sub_Draw_Level ; 05929D/07F08D07 // Sub: Draw Level
RTL ; 0592A1/05
DATA8_0592A2:
ASM_CALL Setup_8698_3b_2b ; 0592A2/071F9D00 // 00/8698 setup
.long DATA8_0E813E ; 0592A6/3E810E
.word $0061 ; 0592A9/6100
RTS ; 0592AB/1C
DATA8_0592AC:
ASM_CALL Setup_8698_3b_2b ; 0592AC/071F9D00 // 00/8698 setup
.long DATA8_0E813E ; 0592B0/3E810E
.word $007A ; 0592B3/7A00
RTS ; 0592B5/1C
DATA8_0592B6:
ASM_CALL Setup_8698_3b_2b ; 0592B6/071F9D00 // 00/8698 setup
.long DATA8_0E813E ; 0592BA/3E810E
.word $0201 ; 0592BD/0102
RTS ; 0592BF/1C
DATA8_0592C0:
ASM_CALL Setup_8698_3b_2b ; 0592C0/071F9D00 // 00/8698 setup
.long DATA8_0E813E ; 0592C4/3E810E
.word $021A ; 0592C7/1A02
RTS ; 0592C9/1C
$059318 - Event 0C: Axs
Event_Main_0C_AXS:
MOV VAR2,#$0003 ; 059318/0F020300
MOV REG,VAR0 ; 05931C/2400
JNE DATA8_05935B ; 05931E/0C5B93
MOV VAR0,#$0000 ; 059321/0F000000
MOV VAR1,#$0000 ; 059325/0F010000
MOV VAR3,#$0000 ; 059329/0F030000
Axs_recruited:
ASM_CALL Set_character_ID_2b ; 05932D/0770B407 // Set character ID
.word $0008 ; 059331/0800
MOV REG,VAR2 ; 059333/2402
ASM_CALL Set_LVL ; 059335/07ABB207
ASM_CALL Sub_Get_EXP_to_next ; 059339/077AB207 // Sub: Get EXP to next LVL
MOV REG,VAR2 ; 05933D/2402
ASM_CALL LevelJoinStats ; 05933F/0707B307 // Sub: Level join stats
MOV REG,VAR2 ; 059343/2402
ASM_CALL Sub_Wipe_Spells ; 059345/07EDAB07 // Wipe Spells
MOV REG,VAR2 ; 059349/2402
ASM_CALL GetJoinSpells ; 05934B/0708AC07 // Get Join Spells
ASM_CALL Max_heal ; 05934F/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 059353/071CB107 // Set Condition
.word $0002 ; 059357/0200
.word $0000 ; 059359/0000
DATA8_05935B:
MOV REG,VAR2 ; 05935B/2402
ASM_CALL OR_element_with_2b ; 05935D/0769B107 // OR element with [var]
.word $0000 ; 059361/0000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059363/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059363 ; 059367/02930D
.byte $60 ; 05936A/60
.word 32 ; 05936B/2000
MOV REG,VAR2 ; 05936D/2402
ASM_CALL Load_PC_Name ; 05936F/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 059373/2402
ASM_CALL Sub_Draw_HP_I_think ; 059375/07468D07 // Draw HP?
MOV REG,VAR2 ; 059379/2402
ASM_CALL Sub_Draw_MP_I_think ; 05937B/07B08D07 // Sub: Draw MP ?
MOV REG,VAR2 ; 05937F/2402
ASM_CALL Sub_Draw_Level ; 059381/07F08D07 // Sub: Draw Level
ASM_CALL Get_ID_in_slot_2b ; 059385/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0006 ; 059389/0600
MULTI_JSR #4 ; 05938B/1204
.word DATA8_0592A2 ; 05938D/A292
.word DATA8_0592AC ; 05938F/AC92
.word DATA8_0592B6 ; 059391/B692
.word DATA8_0592C0 ; 059393/C092
JSL Some_Death_Check ; 059395/04498405
TASK DATA8_059477 ; 059399/087794
MOV REG,VAR2 ; 05939C/2402
ASM_CALL LoadGfx_07906F_far ; 05939E/076B9007 // Load Graphics
MOV REG,VAR2 ; 0593A2/2402
ASM_CALL Sub_Draw_Level ; 0593A4/07F08D07 // Sub: Draw Level
AND.w Condition_Guest2,AND,#$FBFF ; 0593A8/0EC91100FFFB
L_0593AE:
AND.w Condition_Guest2,AND,#$FEFF ; 0593AE/0EC91100FFFE
L_0593B4:
ASM_CALL Is_Equals_1575 ; 0593B4/07DDAE07 // Does Object var2 = $1575?
JNE DATA8_059403 ; 0593B8/0C0394
MOV REG,Game_State ; 0593BB/1FC111
MULTI_JMP #6 ; 0593BE/1106
.word DATA8_0593CD ; 0593C0/CD93
.word DATA8_0593CD ; 0593C2/CD93
.word DATA8_0593E8 ; 0593C4/E893
.word DATA8_0593CD ; 0593C6/CD93
.word DATA8_0593CD ; 0593C8/CD93
.word DATA8_0593CD ; 0593CA/CD93
HALT ; 0593CC/0A
DATA8_0593CD:
ON_TICK CODE_059483 ; 0593CD/09839405
JSL Some_Death_Check ; 0593D1/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 0593D5/0735A000 // Decompression setup 2
.long Sprite_Field_Axs ; 0593D9/63E80E
.long $7E8F00 ; 0593DC/008F7E
WAIT #1 ; 0593DF/0601
ASM_CALL RAM_Decomp_803C ; 0593E1/0734800E // RAM Decomp (803C)
WAIT #1 ; 0593E5/0601
HALT ; 0593E7/0A
DATA8_0593E8:
ON_TICK ASM_Event_Main_0C ; 0593E8/097D9405
JSL Some_Death_Check ; 0593EC/04498405
ASM_CALL Decomp_Setup2_3b_3b ; 0593F0/0735A000 // Decompression setup 2
.long Sprite_Battle_Axs ; 0593F4/0FEC0E
.long $7E8F00 ; 0593F7/008F7E
WAIT #1 ; 0593FA/0601
ASM_CALL RAM_Decomp_803C ; 0593FC/0734800E // RAM Decomp (803C)
WAIT #1 ; 059400/0601
HALT ; 059402/0A
DATA8_059403:
ON_TICK CODE_059483 ; 059403/09839405
MOV VAR0,#$0000 ; 059407/0F000000
ASM_CALL Get_MenuCursorCoords ; 05940B/0765AE07 // Get Menu cursor coords
AND.w Condition_Guest2,AND,#$FEFF ; 05940F/0EC91100FFFE
L_059415:
JMP DATA8_059683 ; 059415/1A8396
DATA8_059418:
MOV REG,VAR2 ; 059418/2402
ASM_CALL LoadGfx_07906F_far ; 05941A/076B9007 // Load Graphics
MOV REG,VAR2 ; 05941E/2402
ASM_CALL Sub_Draw_Level ; 059420/07F08D07 // Sub: Draw Level
WAIT #30 ; 059424/061E
ASM_CALL Decomp_Setup2_3b_3b ; 059426/0735A000 // Decompression setup 2
.long Sprite_Dead_PC ; 05942A/1F8C0E
.long $7E8F00 ; 05942D/008F7E
ASM_CALL RAM_Decomp_803C ; 059430/0734800E // RAM Decomp (803C)
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059434/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_05922A ; 059438/48950D
.byte $63 ; 05943B/63
.word 26 ; 05943C/1A00
HALT ; 05943E/0A
DATA8_05943F:
ASM_CALL Decomp_Setup2_3b_3b ; 05943F/0735A000 // Decompression setup 2
.long Sprite_Attack_Axs ; 059443/6BEF0E
.long $7E8F00 ; 059446/008F7E
ASM_CALL RAM_Decomp_803C ; 059449/0734800E // RAM Decomp (803C)
ASM_CALL GetSet_SFX_1b ; 05944D/07449C00 // Get/Set Sound Effect
.byte 1 ; 059451/01
WAIT #20 ; 059452/0614
ASM_CALL Decomp_Setup2_3b_3b ; 059454/0735A000 // Decompression setup 2
.long Sprite_Battle_Axs ; 059458/0FEC0E
.long $7E8F00 ; 05945B/008F7E
ASM_CALL RAM_Decomp_803C ; 05945E/0734800E // RAM Decomp (803C)
END_TASK ; 059462/0D
TASK DATA8_059477 ; 059463/087794
JSR DATA8_058425 ; 059466/1B2584
MOV REG,VAR2 ; 059469/2402
ASM_CALL Condition_Check_2b ; 05946B/07B0B007 // Check Condition - Returns 1 if character [A] has status [val]
.word $0001 ; 05946F/0100
JNE DATA8_059418 ; 059471/0C1894
JMP DATA8_0593E8 ; 059474/1AE893
DATA8_059477:
JSR Load_Color_Attr_and_Condition; 059477/1B1283
JMP DATA8_059477 ; 05947A/1A7794
$0594CB - Event 0D-0F: Skull card
Event_Main_0D_SKULL1:
MOV VAR0,#$0000 ; 0594CB/0F000000
MOV VAR1,#$0000 ; 0594CF/0F010000
MOV VAR2,#$0001 ; 0594D3/0F020100
MOV VAR3,#$0000 ; 0594D7/0F030000
Set_Character_ID09:
ASM_CALL Set_character_ID_2b ; 0594DB/0770B407 // Set character ID
.word $0009 ; 0594DF/0900
ASM_CALL Sub_Get_EXP_to_next ; 0594E1/077AB207 // Sub: Get EXP to next LVL
ASM_CALL LevelUp2 ; 0594E5/0735B307 // Sub: Levelup-2
MOV REG,VAR2 ; 0594E9/2402
ASM_CALL Sub_Wipe_Spells ; 0594EB/07EDAB07 // Wipe Spells
ASM_CALL Max_heal ; 0594EF/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 0594F3/071CB107 // Set Condition
.word $0002 ; 0594F7/0200
.word $0002 ; 0594F9/0200
MOV REG,VAR2 ; 0594FB/2402
ASM_CALL OR_element_with_2b ; 0594FD/0769B107 // OR element with [var]
.word $0F00 ; 059501/000F
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059503/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059503 ; 059507/0A920D
.byte $70 ; 05950A/70
.word 32 ; 05950B/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05950D/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Win_Color ; 059511/771500
.byte $73 ; 059514/73
.word 2 ; 059515/0200
ASM_CALL Get_ID_in_slot_2b ; 059517/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0002 ; 05951B/0200
MULTI_JSR #4 ; 05951D/1204
.word DATA8_0587BB ; 05951F/BB87
.word DATA8_0587C5 ; 059521/C587
.word DATA8_0587CF ; 059523/CF87
.word DATA8_0587D9 ; 059525/D987
MOV REG,VAR2 ; 059527/2402
ASM_CALL Load_PC_Name ; 059529/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 05952D/2402
ASM_CALL LoadGfx_07906F_far ; 05952F/076B9007 // Load Graphics
ASM_CALL Decomp_Setup2_3b_3b ; 059533/0735A000 // Decompression setup 2
.long Sprite_Skull_Card ; 059537/F9920E
.long $7E8500 ; 05953A/00857E
ASM_CALL RAM_Decomp_801A ; 05953D/0712800E // RAM Decomp (801A)
HALT ; 059541/0A
Tbl_Tileset_Event0D_SKULL1:
ADD_XPOS #20637,WAIT #3 ; 059542/4B9D50
ADD_BGH_VEL #85,#$5A9D,WAIT #5 ; 059545/9D559D5A
ADD_BGH_VEL #95,#$649D,WAIT #5 ; 059549/9D5F9D64
ADD_BGH_VEL #105,#$9B9D,WAIT #5 ; 05954D/9D699D9B
ADD_BGH_VEL #15,#$0000,WAIT #5 ; 059551/9D0F0000
END ; 059555/00
L_059556:
MOV VAR1,#$0000 ; 059556/0F010000
MOV VAR2,#$0002 ; 05955A/0F020200
MOV VAR3,#$0000 ; 05955E/0F030000
ASM_CALL Set_character_ID_2b ; 059562/0770B407 // Set character ID
.word $0009 ; 059566/0900
ASM_CALL Sub_Get_EXP_to_next ; 059568/077AB207 // Sub: Get EXP to next LVL
ASM_CALL LevelUp2 ; 05956C/0735B307 // Sub: Levelup-2
MOV REG,VAR2 ; 059570/2402
ASM_CALL Sub_Wipe_Spells ; 059572/07EDAB07 // Wipe Spells
ASM_CALL Max_heal ; 059576/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 05957A/071CB107 // Set Condition
.word $0002 ; 05957E/0200
.word $0002 ; 059580/0200
MOV REG,VAR2 ; 059582/2402
ASM_CALL OR_element_with_2b ; 059584/0769B107 // OR element with [var]
.word $0F00 ; 059588/000F
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05958A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059503 ; 05958E/0A920D
.byte $50 ; 059591/50
.word 32 ; 059592/2000
WAIT #2 ; 059594/0602
ASM_CALL Get_ID_in_slot_2b ; 059596/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0004 ; 05959A/0400
MULTI_JSR #4 ; 05959C/1204
.word DATA8_058EE1 ; 05959E/E18E
.word DATA8_058EEB ; 0595A0/EB8E
.word DATA8_058EF5 ; 0595A2/F58E
.word DATA8_058EFF ; 0595A4/FF8E
MOV REG,VAR2 ; 0595A6/2402
ASM_CALL Load_PC_Name ; 0595A8/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 0595AC/2402
ASM_CALL LoadGfx_07906F_far ; 0595AE/076B9007 // Load Graphics
ASM_CALL Decomp_Setup2_3b_3b ; 0595B2/0735A000 // Decompression setup 2
.long Sprite_Skull_Card ; 0595B6/F9920E
.long $7E8A00 ; 0595B9/008A7E
ASM_CALL RAM_Decomp_802B ; 0595BC/0723800E // RAM Decomp (802B)
HALT ; 0595C0/0A
Tbl_Tileset_Event0E_SKULL2:
ADD_XPOS #20637,WAIT #3 ; 0595C1/4B9D50
ADD_BGH_VEL #85,#$5A9D,WAIT #5 ; 0595C4/9D559D5A
ADD_BGH_VEL #95,#$649D,WAIT #5 ; 0595C8/9D5F9D64
ADD_BGH_VEL #105,#$9B9D,WAIT #5 ; 0595CC/9D699D9B
ADD_BGH_VEL #15,#$0000,WAIT #5 ; 0595D0/9D0F0000
END ; 0595D4/00
L_0595D5:
MOV VAR1,#$0000 ; 0595D5/0F010000
MOV VAR2,#$0003 ; 0595D9/0F020300
MOV VAR3,#$0000 ; 0595DD/0F030000
ASM_CALL Set_character_ID_2b ; 0595E1/0770B407 // Set character ID
.word $0009 ; 0595E5/0900
ASM_CALL Sub_Get_EXP_to_next ; 0595E7/077AB207 // Sub: Get EXP to next LVL
ASM_CALL LevelUp2 ; 0595EB/0735B307 // Sub: Levelup-2
MOV REG,VAR2 ; 0595EF/2402
ASM_CALL Sub_Wipe_Spells ; 0595F1/07EDAB07 // Wipe Spells
ASM_CALL Max_heal ; 0595F5/072FB907 // Max heal
ASM_CALL Set_Condition_4b ; 0595F9/071CB107 // Set Condition
.word $0002 ; 0595FD/0200
.word $0002 ; 0595FF/0200
MOV REG,VAR2 ; 059601/2402
ASM_CALL OR_element_with_2b ; 059603/0769B107 // OR element with [var]
.word $0F00 ; 059607/000F
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059609/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_059503 ; 05960D/0A920D
.byte $60 ; 059610/60
.word 32 ; 059611/2000
WAIT #2 ; 059613/0602
ASM_CALL Get_ID_in_slot_2b ; 059615/07E8B007 // Get ID in slot [val] - Returns the character ID (0-9) in given party slot (0-3)
.word $0006 ; 059619/0600
MULTI_JSR #4 ; 05961B/1204
.word DATA8_0592A2 ; 05961D/A292
.word DATA8_0592AC ; 05961F/AC92
.word DATA8_0592B6 ; 059621/B692
.word DATA8_0592C0 ; 059623/C092
MOV REG,VAR2 ; 059625/2402
ASM_CALL Load_PC_Name ; 059627/07928F07 // Load Playable Character name
MOV REG,VAR2 ; 05962B/2402
ASM_CALL LoadGfx_07906F_far ; 05962D/076B9007 // Load Graphics
ASM_CALL Decomp_Setup2_3b_3b ; 059631/0735A000 // Decompression setup 2
.long Sprite_Skull_Card ; 059635/F9920E
.long $7E8F00 ; 059638/008F7E
ASM_CALL RAM_Decomp_803C ; 05963B/0734800E // RAM Decomp (803C)
HALT ; 05963F/0A
$059650 - Battle; Damage distortion, status display
Sub_Pixellation_Damage:
ASM_CALL Is_FightingFinalBoss ; 059650/07018007 // Is Fighting Final Boss? - Returns 1 if true
JNE DATA8_059682 ; 059654/0C8296
ASM_CALL Mosaic_Clear_1b ; 059657/078A9E00 // Mosaic Clear
.byte $0F ; 05965B/0F
ASM_CALL Set_Mosaic_Size_1b ; 05965C/079D9E00 // Set Mosaic Size
.byte $02 ; 059660/02
ASM_CALL Mosaic_BGEnable_1b ; 059661/07799E00 // Mosaic BG Enable
.byte $02 ; 059665/02
START_LOOP #5 ; 059666/0105
ASM_CALL Incr_Mosaic_Size ; 059668/07B89E00 // Increase Mosaic Size
WAIT #1 ; 05966C/0601
END_LOOP ; 05966E/02
START_LOOP #5 ; 05966F/0105
ASM_CALL Decr_Mosaic_Size ; 059671/07CC9E00 // Decrease Mosaic Size
WAIT #1 ; 059675/0601
END_LOOP ; 059677/02
ASM_CALL Mosaic_Clear_1b ; 059678/078A9E00 // Mosaic Clear
.byte $02 ; 05967C/02
ASM_CALL Set_Mosaic_Size_1b ; 05967D/079D9E00 // Set Mosaic Size
.byte $00 ; 059681/00
DATA8_059682:
RTL ; 059682/05
DATA8_059683:
MOV REG,VAR2 ; 059683/2402
ASM_CALL Sub_07B9E2 ; 059685/07E2B907 // Updates a fighter's X and Y pos from a list. Battle related?
WAIT #1 ; 059689/0601
ASM_CALL Load_Sprite_1b_1b_12b ; 05968B/07AE9C00 // Load Sprite
.byte 8 ; 05968F/08
.byte 10 ; 059690/0A
.word 2 ; 059691/0200
.word 0 ; 059693/0000
.word 0 ; 059695/0000
.word 0 ; 059697/0000
.word 5 ; 059699/0500
.word 0 ; 05969B/0000
ASM_CALL Store_A_in_11B5_x_1b ; 05969D/079EAF07 // Store [val] in $11B5
.byte 5 ; 0596A1/05
ASM_CALL Load_Object_Var_2b ; 0596A2/07A1B407 // Load object var [0-3]
.word $0002 ; 0596A6/0200
ASM_CALL Get_PC_Name1_far ; 0596A8/07DCB407 // Get PC Name-1
MOV REG,VAR2 ; 0596AC/2402
ASM_CALL Get_Condition1 ; 0596AE/07298207
Status_Display:
MULTI_JMP #5 ; 0596B2/1105
.word Display_Paralyzed ; 0596B4/BE96
.word Display_Petrified ; 0596B6/C996
.word Display_Confused ; 0596B8/E996
.word Display_Asleep ; 0596BA/1697
.word Display_BattleMenu ; 0596BC/4897
Display_Paralyzed:
ASM_CALL Setup_Text_Parser_3b_1b ; 0596BE/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsParalyzed ; 0596C2/368908
.byte $00 ; 0596C5/00
JMP DATA8_059933 ; 0596C6/1A3399
Display_Petrified:
ASM_CALL Setup_Text_Parser_3b_1b ; 0596C9/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsPetrified ; 0596CD/4E8908
.byte $00 ; 0596D0/00
MOV REG,Selection_offset ; 0596D1/1F3F10
MOV VAR1,REG ; 0596D4/2301
ASM_CALL Set_attacker_target_using_var1; 0596D6/07569107
MOV REG,VAR2 ; 0596DA/2402
ASM_CALL Petrify_damage ; 0596DC/07F9B107
JEQ DATA8_059933 ; 0596E0/0B3399
JSR DATA8_058425 ; 0596E3/1B2584
JMP DATA8_059933 ; 0596E6/1A3399
Display_Confused:
ASM_CALL Setup_Text_Parser_3b_1b ; 0596E9/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsConfused ; 0596ED/668908
.byte $00 ; 0596F0/00
JSR DATA8_059942 ; 0596F1/1B4299
ASM_CALL Loop_Confused ; 0596F4/071D8C07
JEQ DATA8_059867 ; 0596F8/0B6798
ASM_CALL Sub_Get_Party_ID ; 0596FB/07069705
ASM_CALL Get_PC_name2 ; 0596FF/07FEB407
JMP DATA8_05986F ; 059703/1A6F98
Display_Asleep:
ASM_CALL Setup_Text_Parser_3b_1b ; 059716/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long IsAsleep ; 05971A/7D8908
.byte $00 ; 05971D/00
JSR DATA8_059942 ; 05971E/1B4299
ASM_CALL RNG_1b ; 059721/07BDA000 // RNG = Random Number Generator
.byte 4 ; 059725/04
JNE End_Turn_SaveResult ; 059726/0CD097
ASM_CALL Setup_Text_Parser_3b_1b ; 059729/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long HasAwakened ; 05972D/928908
.byte $00 ; 059730/00
JSR DATA8_059942 ; 059731/1B4299
MOV REG,$11BF ; 059734/1FBF11
MOV VAR0,REG ; 059737/2300
ASM_CALL Clear_Event_varX_1b ; 059739/07C99C00 // Menu Stuffs
.byte $00 ; 05973D/00
ASM_CALL Set_Condition_4b ; 05973E/071CB107 // Set Condition
.word $0002 ; 059742/0200
.word $0000 ; 059744/0000
WAIT #2 ; 059746/0602
Display_BattleMenu:
MOV REG,VAR2 ; 059748/2402
MULTI_JMP #4 ; 05974A/1104
.word RooksBattleMenu ; 05974C/5497
.word SpiritBattleMenu ; 05974E/5F97
.word Guest1BattleMenu ; 059750/6A97
.word Guest2BattleMenu ; 059752/7597
RooksBattleMenu:
ASM_CALL Setup_Text_Parser_3b_1b ; 059754/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_Battle_menu_Rooks ; 059758/E58208
.byte $00 ; 05975B/00
JMP BattleMenuLoop ; 05975C/1A7D97
SpiritBattleMenu:
ASM_CALL Setup_Text_Parser_3b_1b ; 05975F/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Spirit_Battle_menu ; 059763/308308
.byte $00 ; 059766/00
JMP BattleMenuLoop ; 059767/1A7D97
Guest1BattleMenu:
ASM_CALL Setup_Text_Parser_3b_1b ; 05976A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Guest1_Battle_menu ; 05976E/548308
.byte $00 ; 059771/00
JMP BattleMenuLoop ; 059772/1A7D97
Guest2BattleMenu:
ASM_CALL Setup_Text_Parser_3b_1b ; 059775/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Guest1_Battle_menu ; 059779/548308
.byte $00 ; 05977C/00
BattleMenuLoop:
WAIT #1 ; 05977D/0601
MOV REG,VAR2 ; 05977F/2402
MULTI_JMP #4 ; 059781/1104
.word RooksMenuCursor ; 059783/8B97
.word SpiritMenuCursor ; 059785/9497
.word GuestMenuCursor ; 059787/9D97
.word GuestMenuCursor ; 059789/9D97
RooksMenuCursor:
ASM_CALL MoveMenuCursor_2b ; 05978B/07AEAC07 // Move Menu Cursor
.word 18 ; 05978F/1200
JMP Update_Arrow_Cursor ; 059791/1AA397
SpiritMenuCursor:
ASM_CALL MoveMenuCursor_2b ; 059794/07AEAC07 // Move Menu Cursor
.word 36 ; 059798/2400
JMP Update_Arrow_Cursor ; 05979A/1AA397
GuestMenuCursor:
ASM_CALL MoveMenuCursor_2b ; 05979D/07AEAC07 // Move Menu Cursor
.word 54 ; 0597A1/3600
Update_Arrow_Cursor:
ASM_CALL SetBattleCursorPos ; 0597A3/07A1AE07
SET_ANIM #1 ; 0597A7/3001
MOV REG,#$0000 ; 0597A9/1E0000
BattleMenu_A_Loop:
ASM_CALL WasBtnPressed_2b ; 0597AC/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 0597B0/8000
JEQ BattleMenuLoop ; 0597B2/0B7D97
ASM_CALL GetSet_SFX_1b ; 0597B5/07449C00 // Get/Set Sound Effect
.byte 17 ; 0597B9/11
MOV REG,VAR0 ; 0597BA/2400
MULTI_JMP #9 ; 0597BC/1109
.word Battle_Attack ; 0597BE/FE97
.word Battle_Weapons ; 0597C0/599C
.word Battle_Cards ; 0597C2/C09C
.word Battle_Magic ; 0597C4/2E9B
.word Battle_Items ; 0597C6/4F99
.word Battle_Dummied ; 0597C8/B898
.word Battle_Defend ; 0597CA/D29C
.word Battle_Run ; 0597CC/F19C
.word Battle_Call ; 0597CE/0C9A
End_Turn_SaveResult:
MOV REG,$11BF ; 0597D0/1FBF11
MOV VAR0,REG ; 0597D3/2300
ASM_CALL Clear_Event_varX_1b ; 0597D5/07C99C00 // Menu Stuffs
.byte $00 ; 0597D9/00
MOV VAR1,#$FFFF ; 0597DA/0F01FFFF
ASM_CALL Set_1575_from_2b ; 0597DE/0739AF07 // Set $1575 from [val]
.word 1 ; 0597E2/0100
ASM_CALL Load_Object_Var_2b ; 0597E4/07A1B407 // Load object var [0-3]
.word $0002 ; 0597E8/0200
MULTI_JMP #9 ; 0597EA/1109
.word DATA8_0580CD ; 0597EC/CD80
.word DATA8_0586B4 ; 0597EE/B486
.word DATA8_0588C5 ; 0597F0/C588
.word DATA8_058A62 ; 0597F2/628A
.word ASM_058BFF_In_Battle ; 0597F4/FF8B
.word Event_Main_09_TEEFA_part_2 ; 0597F6/198E
.word DATA8_059027 ; 0597F8/2790
.word DATA8_0591DA ; 0597FA/DA91
.word DATA8_0593E8 ; 0597FC/E893
Battle_Attack:
MOV VAR1,#$0014 ; 0597FE/0F011400
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059802/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 059806/8E950D
.byte $02 ; 059809/02
.word 2 ; 05980A/0200
ASM_CALL Sub_Targeting_Prep ; 05980C/07308A07
DATA8_059810:
WAIT #1 ; 059810/0601
ASM_CALL Sub_078AA0 ; 059812/07A08A07
ASM_CALL Swap_values ; 059816/07758C07
ASM_CALL Get_enemy_ID_far ; 05981A/07189107
ASM_CALL Get_Enemy_AtkFrame_flag ; 05981E/071BB607
MULTI_JMP #4 ; 059822/1104
.word Selecting_EnemyFrame_00 ; 059824/2C98
.word Selecting_EnemyFrame_01 ; 059826/3198
.word Selecting_EnemyFrame_02 ; 059828/3698
.word Selecting_EnemyFrame_03 ; 05982A/3B98
Selecting_EnemyFrame_00:
SET_ANIM #7 ; 05982C/3007
JMP Selecting_Enemy_Button_Listen; 05982E/1A3D98
Selecting_EnemyFrame_01:
SET_ANIM #8 ; 059831/3008
JMP Selecting_Enemy_Button_Listen; 059833/1A3D98
Selecting_EnemyFrame_02:
SET_ANIM #9 ; 059836/3009
JMP Selecting_Enemy_Button_Listen; 059838/1A3D98
Selecting_EnemyFrame_03:
SET_ANIM #10 ; 05983B/300A
Selecting_Enemy_Button_Listen:
MOV REG,#$0000 ; 05983D/1E0000
ASM_CALL WasBtnPressed_2b ; 059840/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 059844/0080
JNE Attack_Cancel ; 059846/0C5898
MOV REG,#$0000 ; 059849/1E0000
ASM_CALL WasBtnPressed_2b ; 05984C/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 059850/8000
JNE Attack_Selected_Enemy ; 059852/0C6098
JMP DATA8_059810 ; 059855/1A1098
Attack_Cancel:
ASM_CALL GetSet_SFX_1b ; 059858/07449C00 // Get/Set Sound Effect
.byte 6 ; 05985C/06
JMP BattleMenuLoop ; 05985D/1A7D97
Attack_Selected_Enemy:
ASM_CALL GetSet_SFX_1b ; 059860/07449C00 // Get/Set Sound Effect
.byte 17 ; 059864/11
SET_ANIM #-1 ; 059865/30FF
DATA8_059867:
ASM_CALL Get_enemy_ID_far ; 059867/07189107
ASM_CALL Get_enemy_name ; 05986B/0769B507
DATA8_05986F:
ASM_CALL Set_attacker_target_using_var1; 05986F/07569107
ASM_CALL Call_Roll_to_hit ; 059873/078D9107
ASM_CALL Store_A_in_11B5_x_1b ; 059877/079EAF07 // Store [val] in $11B5
.byte 0 ; 05987B/00
ASM_CALL Load_Object_Var_2b ; 05987C/07A1B407 // Load object var [0-3]
.word $0002 ; 059880/0200
MULTI_JSR #9 ; 059882/1209
.word DATA8_0598F6 ; 059884/F698
.word DATA8_0598FC ; 059886/FC98
.word DATA8_059902 ; 059888/0299
.word DATA8_059908 ; 05988A/0899
.word DATA8_05990E ; 05988C/0E99
.word DATA8_059914 ; 05988E/1499
.word DATA8_05991A ; 059890/1A99
.word DATA8_059920 ; 059892/2099
.word DATA8_059926 ; 059894/2699
MOV REG,Tbl_Offset ; 059896/1FB511
JEQ Battle_Dodged ; 059899/0BBB98
ASM_CALL Setup_Deal_HP_damage ; 05989C/07378D07
ASM_CALL Store_A_in_11B5_x_1b ; 0598A0/079EAF07 // Store [val] in $11B5
.byte 0 ; 0598A4/00
ASM_CALL Battle_Is_Neither_Target_Attacker; 0598A5/07E58307
JNE DATA8_0598B5 ; 0598A9/0CB598
MOV REG,Tbl_Offset ; 0598AC/1FB511
JEQ Battle_Attacked_Alive ; 0598AF/0BEB98
JMP DATA8_0598D9 ; 0598B2/1AD998
DATA8_0598B5:
JSR DATA8_058425 ; 0598B5/1B2584
Battle_Dummied:
JMP End_Turn_SaveResult ; 0598B8/1AD097
Battle_Dodged:
ASM_CALL RNG_1b ; 0598BB/07BDA000 // RNG = Random Number Generator
.byte 2 ; 0598BF/02
JEQ DATA8_0598CE ; 0598C0/0BCE98
ASM_CALL Setup_Text_Parser_3b_1b ; 0598C3/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long X_dodged ; 0598C7/B08408
.byte $00 ; 0598CA/00
JMP DATA8_059933 ; 0598CB/1A3399
DATA8_0598CE:
ASM_CALL Setup_Text_Parser_3b_1b ; 0598CE/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long X_dodged_quickly ; 0598D2/BE8408
.byte $00 ; 0598D5/00
JMP DATA8_059933 ; 0598D6/1A3399
DATA8_0598D9:
ASM_CALL Is_FightingFinalBoss ; 0598D9/07018007 // Is Fighting Final Boss? - Returns 1 if true
JNE Battle_Attacked_Alive ; 0598DD/0CEB98
ASM_CALL Setup_Text_Parser_3b_1b ; 0598E0/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long X_damaged_defeated ; 0598E4/D48408
.byte $00 ; 0598E7/00
JMP DATA8_059933 ; 0598E8/1A3399
Battle_Attacked_Alive:
ASM_CALL Setup_Text_Parser_3b_1b ; 0598EB/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long X_suffered_damage ; 0598EF/128508
.byte $00 ; 0598F2/00
JMP DATA8_059933 ; 0598F3/1A3399
DATA8_0598F6:
TASK DATA8_05813A ; 0598F6/083A81
JMP DATA8_05992C ; 0598F9/1A2C99
DATA8_0598FC:
TASK DATA8_05874A ; 0598FC/084A87
JMP DATA8_05992C ; 0598FF/1A2C99
DATA8_059902:
TASK DATA8_05895B ; 059902/085B89
JMP DATA8_05992C ; 059905/1A2C99
DATA8_059908:
TASK DATA8_058AF8 ; 059908/08F88A
JMP DATA8_05992C ; 05990B/1A2C99
DATA8_05990E:
TASK DATA8_058C95 ; 05990E/08958C
JMP DATA8_05992C ; 059911/1A2C99
DATA8_059914:
TASK DATA8_058E70 ; 059914/08708E
JMP DATA8_05992C ; 059917/1A2C99
DATA8_05991A:
TASK DATA8_05907E ; 05991A/087E90
JMP DATA8_05992C ; 05991D/1A2C99
DATA8_059920:
TASK DATA8_059231 ; 059920/083192
JMP DATA8_05992C ; 059923/1A2C99
DATA8_059926:
TASK DATA8_05943F ; 059926/083F94
JMP DATA8_05992C ; 059929/1A2C99
DATA8_05992C:
ASM_CALL Crit_Text_Setup ; 05992C/07F9B607 // Battle: Show take that! text
JMP DATA8_059942 ; 059930/1A4299
DATA8_059933:
WAIT #1 ; 059933/0601
ASM_CALL Some_1095_check_1b ; 059935/074FBA07 // Some pause status check
.byte $00 ; 059939/00
JEQ DATA8_059933 ; 05993A/0B3399
WAIT #30 ; 05993D/061E
JMP End_Turn_SaveResult ; 05993F/1AD097
DATA8_059942:
WAIT #1 ; 059942/0601
ASM_CALL Some_1095_check_1b ; 059944/074FBA07 // Some pause status check
.byte $00 ; 059948/00
JEQ DATA8_059942 ; 059949/0B4299
WAIT #30 ; 05994C/061E
RTS ; 05994E/1C
Battle_Items:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05994F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Gray ; 059953/90950D
.byte $02 ; 059956/02
.word 2 ; 059957/0200
MOV VAR1,#$0000 ; 059959/0F010000
MOV REG,VAR1 ; 05995D/2401
ASM_CALL Sub_07885A_far ; 05995F/07568807
JNE DATA8_0599F1 ; 059963/0CF199
ASM_CALL Sub_078797 ; 059966/07978707
MULTI_JSR #4 ; 05996A/1204
.word DATA8_0599F8 ; 05996C/F899
.word DATA8_0599FD ; 05996E/FD99
.word DATA8_059A02 ; 059970/029A
.word DATA8_059A07 ; 059972/079A
ASM_CALL Sub_078944 ; 059974/07448907
ASM_CALL Setup_Text_Parser_3b_1b ; 059978/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Battle_Items_Menu ; 05997C/6C8408
.byte $00 ; 05997F/00
DATA8_059980:
WAIT #1 ; 059980/0601
SET_ANIM #3 ; 059982/3003
ASM_CALL Sub_07867D ; 059984/077D8607
JEQ DATA8_0599A7 ; 059988/0BA799
ASM_CALL Sub_078797 ; 05998B/07978707
MULTI_JSR #4 ; 05998F/1204
.word DATA8_0599F8 ; 059991/F899
.word DATA8_0599FD ; 059993/FD99
.word DATA8_059A02 ; 059995/029A
.word DATA8_059A07 ; 059997/079A
ASM_CALL Sub_078944 ; 059999/07448907
ASM_CALL Setup_Text_Parser_3b_1b ; 05999D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Battle_Items_Menu ; 0599A1/6C8408
.byte $00 ; 0599A4/00
WAIT #1 ; 0599A5/0601
DATA8_0599A7:
ASM_CALL Sub_Get_BtlSpellMenu_Pos ; 0599A7/07008807
MOV REG,#$0000 ; 0599AB/1E0000
ASM_CALL WasBtnPressed_2b ; 0599AE/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 0599B2/8000
JNE DATA8_0599C6 ; 0599B4/0CC699
MOV REG,#$0000 ; 0599B7/1E0000
ASM_CALL WasBtnPressed_2b ; 0599BA/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 0599BE/0080
JNE DATA8_0599E6 ; 0599C0/0CE699
JMP DATA8_059980 ; 0599C3/1A8099
DATA8_0599C6:
ASM_CALL GetSet_SFX_1b ; 0599C6/07449C00 // Get/Set Sound Effect
.byte 17 ; 0599CA/11
ASM_CALL Sub_0789FC ; 0599CB/07FC8907
JEQ DATA8_059980 ; 0599CF/0B8099
JSL Item_Handler ; 0599D2/0437F105
JEQ DATA8_059980 ; 0599D6/0B8099
ASM_CALL Sub_078A24 ; 0599D9/07248A07
ASM_CALL Sub_079F44 ; 0599DD/07449F07
SET_ANIM #-1 ; 0599E1/30FF
JMP End_Turn_SaveResult ; 0599E3/1AD097
DATA8_0599E6:
JSR DATA8_059A07 ; 0599E6/1B079A
DATA8_0599E9:
ASM_CALL GetSet_SFX_1b ; 0599E9/07449C00 // Get/Set Sound Effect
.byte 6 ; 0599ED/06
JMP Display_BattleMenu ; 0599EE/1A4897
DATA8_0599F1:
SET_ANIM #-1 ; 0599F1/30FF
WAIT #20 ; 0599F3/0614
JMP DATA8_0599E9 ; 0599F5/1AE999
DATA8_0599F8:
JSL DATA8_059BF9 ; 0599F8/04F99B05
RTS ; 0599FC/1C
DATA8_0599FD:
JSL DATA8_059C08 ; 0599FD/04089C05
RTS ; 059A01/1C
DATA8_059A02:
JSL DATA8_059C17 ; 059A02/04179C05
RTS ; 059A06/1C
DATA8_059A07:
JSL DATA8_059C26 ; 059A07/04269C05
RTS ; 059A0B/1C
Battle_Call:
ASM_CALL Set_11B5_7 ; 059A0C/070E9B05
SET_ANIM #-1 ; 059A10/30FF
MOV VAR1,#$0000 ; 059A12/0F010000
ASM_CALL Get_active_spirit_ID ; 059A16/07989107 // Get active spirit ID
ASM_CALL Store_A_in_11B5_x_1b ; 059A1A/079EAF07 // Store [val] in $11B5
.byte 3 ; 059A1E/03
MOV REG,#$0001 ; 059A1F/1E0100
ASM_CALL Sub_07B9E2 ; 059A22/07E2B907 // Updates a fighter's X and Y pos from a list. Battle related?
WAIT #1 ; 059A26/0601
ASM_CALL Load_Sprite_Setup_12b ; 059A28/075D9C00 // Load Sprite Setup
.word 2 ; 059A2C/0200
.word 0 ; 059A2E/0000
.word 0 ; 059A30/0000
.word 0 ; 059A32/0000
.word 5 ; 059A34/0500
.word 0 ; 059A36/0000
ASM_CALL Store_A_in_11B5_x_1b ; 059A38/079EAF07 // Store [val] in $11B5
.byte 2 ; 059A3C/02
DATA8_059A3D:
WAIT #1 ; 059A3D/0601
MOV REG,#$0000 ; 059A3F/1E0000
ASM_CALL WasBtnPressed_2b ; 059A42/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 059A46/8000
JNE DATA8_059AF8 ; 059A48/0CF89A
DATA8_059A4B:
ASM_CALL _11B1_input_stuff ; 059A4B/07BAA507
JEQ DATA8_059A3D ; 059A4F/0B3D9A
MOV REG,$11BB ; 059A52/1FBB11
ASM_CALL Spirit_check_far ; 059A55/07F7A507 // Spirit check
JNE DATA8_059A4B ; 059A59/0C4B9A
ASM_CALL Update_Spirit_HPMP ; 059A5C/078AB907 // Update Spirit HP/MP - Saves "current spirit" stats to that particular spirit's stats (The game tracks them separately)
ASM_CALL Clear_Event_1b ; 059A60/07DD9C00 // Battle related
.byte $0E ; 059A64/0E
ASM_CALL GetSet_SFX_1b ; 059A65/07449C00 // Get/Set Sound Effect
.byte 17 ; 059A69/11
WAIT #6 ; 059A6A/0606
MOV REG,$11BB ; 059A6C/1FBB11
MULTI_JSR #5 ; 059A6F/1205
.word DATA8_059AD2 ; 059A71/D29A
.word DATA8_059A7E ; 059A73/7E9A
.word DATA8_059A93 ; 059A75/939A
.word DATA8_059AA8 ; 059A77/A89A
.word DATA8_059ABD ; 059A79/BD9A
JMP DATA8_059A3D ; 059A7B/1A3D9A
DATA8_059A7E:
JSR DATA8_059AE4 ; 059A7E/1BE49A
ASM_CALL Load_Graphics__1b_12b ; 059A81/07BC9C00 // Load Graphics
.byte 14 ; 059A85/0E
.word 5 ; 059A86/0500
.word 0 ; 059A88/0000
.word 0 ; 059A8A/0000
.word 0 ; 059A8C/0000
.word 0 ; 059A8E/0000
.word 0 ; 059A90/0000
RTS ; 059A92/1C
DATA8_059A93:
JSR DATA8_059AE4 ; 059A93/1BE49A
ASM_CALL Load_Graphics__1b_12b ; 059A96/07BC9C00 // Load Graphics
.byte 14 ; 059A9A/0E
.word 6 ; 059A9B/0600
.word 0 ; 059A9D/0000
.word 0 ; 059A9F/0000
.word 0 ; 059AA1/0000
.word 0 ; 059AA3/0000
.word 0 ; 059AA5/0000
RTS ; 059AA7/1C
DATA8_059AA8:
JSR DATA8_059AE4 ; 059AA8/1BE49A
ASM_CALL Load_Graphics__1b_12b ; 059AAB/07BC9C00 // Load Graphics
.byte 14 ; 059AAF/0E
.word 7 ; 059AB0/0700
.word 0 ; 059AB2/0000
.word 0 ; 059AB4/0000
.word 0 ; 059AB6/0000
.word 0 ; 059AB8/0000
.word 0 ; 059ABA/0000
RTS ; 059ABC/1C
DATA8_059ABD:
JSR DATA8_059AE4 ; 059ABD/1BE49A
ASM_CALL Load_Graphics__1b_12b ; 059AC0/07BC9C00 // Load Graphics
.byte 14 ; 059AC4/0E
.word 8 ; 059AC5/0800
.word 0 ; 059AC7/0000
.word 0 ; 059AC9/0000
.word 0 ; 059ACB/0000
.word 0 ; 059ACD/0000
.word 0 ; 059ACF/0000
RTS ; 059AD1/1C
DATA8_059AD2:
ASM_CALL Load_Graphics__1b_12b ; 059AD2/07BC9C00 // Load Graphics
.byte 14 ; 059AD6/0E
.word 13 ; 059AD7/0D00
.word 0 ; 059AD9/0000
.word 0 ; 059ADB/0000
.word 0 ; 059ADD/0000
.word 0 ; 059ADF/0000
.word 0 ; 059AE1/0000
RTS ; 059AE3/1C
DATA8_059AE4:
MOV REG,$11BB ; 059AE4/1FBB11
ASM_CALL Sub_07A639 ; 059AE7/0739A607 // Related to spirits owned
JNE DATA8_059AF3 ; 059AEB/0CF39A
MOV VAR1,#$0000 ; 059AEE/0F010000
RTS ; 059AF2/1C
DATA8_059AF3:
MOV VAR1,#$0001 ; 059AF3/0F010100
RTS ; 059AF7/1C
DATA8_059AF8:
ASM_CALL GetSet_SFX_1b ; 059AF8/07449C00 // Get/Set Sound Effect
.byte 17 ; 059AFC/11
MOV REG,Page_Num ; 059AFD/1FB911
MOV VAR1,REG ; 059B00/2301
ASM_CALL Clear_Event_varX_1b ; 059B02/07C99C00 // Menu Stuffs
.byte $01 ; 059B06/01
ASM_CALL Sub_059B1E ; 059B07/071E9B05
JMP BattleMenuLoop ; 059B0B/1A7D97
$059B2E - Battle; Spells
Battle_Magic:
MOV REG,#$0000 ; 059B2E/1E0000
ASM_CALL IsSpellListEmpty_far ; 059B31/072A8807
JNE DATA8_059BDE ; 059B35/0CDE9B
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059B38/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Gray ; 059B3C/90950D
.byte $02 ; 059B3F/02
.word 2 ; 059B40/0200
MOV VAR1,#$0000 ; 059B42/0F010000
ASM_CALL Battle_SpellList_Arrows ; 059B46/073B8607
MULTI_JSR #4 ; 059B4A/1204
.word Battle_Magic_Arrow_LR ; 059B4C/E59B
.word Battle_Magic_Arrow_Right ; 059B4E/EA9B
.word Battle_Magic_Arrow_Left ; 059B50/EF9B
.word Battle_Magic_Arrow_None ; 059B52/F49B
ASM_CALL Sub_07886F ; 059B54/076F8807
ASM_CALL Setup_Text_Parser_3b_1b ; 059B58/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long BattleMagicMenu ; 059B5C/468408
.byte $00 ; 059B5F/00
Battle_Loop_Magic_Pick:
WAIT #1 ; 059B60/0601
SET_ANIM #3 ; 059B62/3003
ASM_CALL Sub_078521 ; 059B64/07218507
JEQ DATA8_059B87 ; 059B68/0B879B
ASM_CALL Battle_SpellList_Arrows ; 059B6B/073B8607
MULTI_JSR #4 ; 059B6F/1204
.word Battle_Magic_Arrow_LR ; 059B71/E59B
.word Battle_Magic_Arrow_Right ; 059B73/EA9B
.word Battle_Magic_Arrow_Left ; 059B75/EF9B
.word Battle_Magic_Arrow_None ; 059B77/F49B
ASM_CALL Sub_07886F ; 059B79/076F8807
ASM_CALL Setup_Text_Parser_3b_1b ; 059B7D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long BattleMagicMenu ; 059B81/468408
.byte $00 ; 059B84/00
WAIT #1 ; 059B85/0601
DATA8_059B87:
ASM_CALL Sub_Get_BtlSpellMenu_Pos ; 059B87/07008807
MOV REG,#$0000 ; 059B8B/1E0000
ASM_CALL WasBtnPressed_2b ; 059B8E/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 059B92/8000
JNE Battle_Magic_Selected ; 059B94/0CA69B
MOV REG,#$0000 ; 059B97/1E0000
ASM_CALL WasBtnPressed_2b ; 059B9A/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 059B9E/0080
JNE DATA8_059BD3 ; 059BA0/0CD39B
JMP Battle_Loop_Magic_Pick ; 059BA3/1A609B
Battle_Magic_Selected:
ASM_CALL GetSet_SFX_1b ; 059BA6/07449C00 // Get/Set Sound Effect
.byte 17 ; 059BAA/11
ASM_CALL Is_Spell_Battle_Usable ; 059BAB/07C28907
JEQ Battle_Loop_Magic_Pick ; 059BAF/0B609B
JSL DATA8_05F34B ; 059BB2/044BF305
WAIT #10 ; 059BB6/060A
MULTI_JMP #3 ; 059BB8/1103
.word Battle_Loop_Magic_Pick ; 059BBA/609B
.word Battle_Magic_Finished ; 059BBC/C09B
.word Battle_Magic ; 059BBE/2E9B
Battle_Magic_Finished:
WAIT #1 ; 059BC0/0601
MOV REG,#$0011 ; 059BC2/1E1100
ASM_CALL Find_Event_In_List ; 059BC5/0783AF07
JEQ Battle_Magic_Finished ; 059BC9/0BC09B
WAIT #20 ; 059BCC/0614
SET_ANIM #-1 ; 059BCE/30FF
JMP End_Turn_SaveResult ; 059BD0/1AD097
DATA8_059BD3:
JSR Battle_Magic_Arrow_None ; 059BD3/1BF49B
DATA8_059BD6:
ASM_CALL GetSet_SFX_1b ; 059BD6/07449C00 // Get/Set Sound Effect
.byte 6 ; 059BDA/06
JMP Display_BattleMenu ; 059BDB/1A4897
DATA8_059BDE:
SET_ANIM #-1 ; 059BDE/30FF
WAIT #20 ; 059BE0/0614
JMP DATA8_059BD6 ; 059BE2/1AD69B
Battle_Magic_Arrow_LR:
JSL DATA8_059BF9 ; 059BE5/04F99B05
RTS ; 059BE9/1C
Battle_Magic_Arrow_Right:
JSL DATA8_059C08 ; 059BEA/04089C05
RTS ; 059BEE/1C
Battle_Magic_Arrow_Left:
JSL DATA8_059C17 ; 059BEF/04179C05
RTS ; 059BF3/1C
Battle_Magic_Arrow_None:
JSL DATA8_059C26 ; 059BF4/04269C05
RTS ; 059BF8/1C
DATA8_059BF9:
ASM_CALL Transfer_Graphics_3b ; 059BF9/07079D00 // 00/8698 setup
.long Gfx_Arrow_Left ; 059BFD/3E9C05
ASM_CALL Transfer_Graphics_3b ; 059C00/07079D00 // 00/8698 setup
.long Gfx_Arrow_Right ; 059C04/359C05
RTL ; 059C07/05
DATA8_059C08:
ASM_CALL Transfer_Graphics_3b ; 059C08/07079D00 // 00/8698 setup
.long Gfx_NoArrow_Left ; 059C0C/509C05
ASM_CALL Transfer_Graphics_3b ; 059C0F/07079D00 // 00/8698 setup
.long Gfx_Arrow_Right ; 059C13/359C05
RTL ; 059C16/05
DATA8_059C17:
ASM_CALL Transfer_Graphics_3b ; 059C17/07079D00 // 00/8698 setup
.long Gfx_Arrow_Left ; 059C1B/3E9C05
ASM_CALL Transfer_Graphics_3b ; 059C1E/07079D00 // 00/8698 setup
.long Gfx_NoArrow_Right ; 059C22/479C05
RTL ; 059C25/05
DATA8_059C26:
ASM_CALL Transfer_Graphics_3b ; 059C26/07079D00 // 00/8698 setup
.long Gfx_NoArrow_Left ; 059C2A/509C05
ASM_CALL Transfer_Graphics_3b ; 059C2D/07079D00 // 00/8698 setup
.long Gfx_NoArrow_Right ; 059C31/479C05
RTL ; 059C34/05
$059C59 - Battle; Weapons, Cards, Defend, Run
Battle_Weapons:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 059C59/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Gray ; 059C5D/90950D
.byte $02 ; 059C60/02
.word 2 ; 059C61/0200
MOV VAR1,#$0000 ; 059C63/0F010000
MOV REG,VAR2 ; 059C67/2402
ASM_CALL Sub_07A33C ; 059C69/073CA307
ASM_CALL Setup_Text_Parser_3b_1b ; 059C6D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Weapons_sub_menu ; 059C71/EC8008
.byte $00 ; 059C74/00
SET_ANIM #-1 ; 059C75/30FF
DATA8_059C77:
WAIT #1 ; 059C77/0601
ASM_CALL Sub_0784EA ; 059C79/07EA8407
ASM_CALL Sub_0787D9 ; 059C7D/07D98707
SET_ANIM #5 ; 059C81/3005
MOV REG,#$0000 ; 059C83/1E0000
ASM_CALL WasBtnPressed_2b ; 059C86/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 059C8A/8000
JNE DATA8_059C9E ; 059C8C/0C9E9C
MOV REG,#$0000 ; 059C8F/1E0000
ASM_CALL WasBtnPressed_2b ; 059C92/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 059C96/0080
JNE DATA8_059CB8 ; 059C98/0CB89C
JMP DATA8_059C77 ; 059C9B/1A779C
DATA8_059C9E:
ASM_CALL GetSet_SFX_1b ; 059C9E/07449C00 // Get/Set Sound Effect
.byte 17 ; 059CA2/11
MOV REG,VAR2 ; 059CA3/2402
ASM_CALL Use_Weapon_As_Item ; 059CA5/07938407
JEQ DATA8_059C77 ; 059CA9/0B779C
JSL DATA8_05F33A ; 059CAC/043AF305
WAIT #10 ; 059CB0/060A
JEQ DATA8_059C77 ; 059CB2/0B779C
JMP End_Turn_SaveResult ; 059CB5/1AD097
DATA8_059CB8:
ASM_CALL GetSet_SFX_1b ; 059CB8/07449C00 // Get/Set Sound Effect
.byte 6 ; 059CBC/06
JMP Display_BattleMenu ; 059CBD/1A4897
Battle_Cards:
JSL Battle_Cards_Open ; 059CC0/045FF905
JEQ Battle_Cards_Back_Out ; 059CC4/0BCA9C
JMP End_Turn_SaveResult ; 059CC7/1AD097
Battle_Cards_Back_Out:
ASM_CALL GetSet_SFX_1b ; 059CCA/07449C00 // Get/Set Sound Effect
.byte 6 ; 059CCE/06
JMP Display_BattleMenu ; 059CCF/1A4897
Battle_Defend:
ASM_CALL Set_Condition_4b ; 059CD2/071CB107 // Set Condition
.word $0002 ; 059CD6/0200
.word $0100 ; 059CD8/0001
SET_ANIM #-1,WAIT #1 ; 059CDA/31FF
ASM_CALL Setup_Text_Parser_3b_1b ; 059CDC/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Text_X_is_defending ; 059CE0/C98008
.byte $00 ; 059CE3/00
DATA8_059CE4:
WAIT #1 ; 059CE4/0601
ASM_CALL Wait_For_A_Press_1b ; 059CE6/0703BA07 // Wait for A-press
.byte $00 ; 059CEA/00
JEQ DATA8_059CE4 ; 059CEB/0BE49C
JMP End_Turn_SaveResult ; 059CEE/1AD097
Battle_Run:
ASM_CALL Run_Check ; 059CF1/07FE8307
JEQ DATA8_059D09 ; 059CF5/0B099D
ASM_CALL Set_Condition_4b ; 059CF8/071CB107 // Set Condition
.word $0002 ; 059CFC/0200
.word $0400 ; 059CFE/0004
JSL Running_away ; 059D00/04199D05
DATA8_059D04:
SET_ANIM #-1,WAIT #1 ; 059D04/31FF
JMP End_Turn_SaveResult ; 059D06/1AD097
DATA8_059D09:
SET_ANIM #-1,WAIT #1 ; 059D09/31FF
Text_NO_ESCAPE:
ASM_CALL Setup_Text_Parser_3b_1b ; 059D0B/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long No_escape ; 059D0F/C38208
.byte $00 ; 059D12/00
JSR DATA8_059942 ; 059D13/1B4299
JMP DATA8_059D04 ; 059D16/1A049D
Running_away:
ASM_CALL GetSet_SFX_1b ; 059D19/07449C00 // Get/Set Sound Effect
.byte 40 ; 059D1D/28
ASM_CALL Init_Kill_Enemies_far ; 059D1E/07548101 // Init Kill Enemies
ASM_CALL Clear_Event_1b ; 059D22/07DD9C00 // Battle related
.byte $14 ; 059D26/14
ASM_CALL Clear_Event_1b ; 059D27/07DD9C00 // Battle related
.byte $16 ; 059D2B/16
ASM_CALL Clear_Event_1b ; 059D2C/07DD9C00 // Battle related
.byte $18 ; 059D30/18
ASM_CALL Clear_Event_1b ; 059D31/07DD9C00 // Battle related
.byte $1A ; 059D35/1A
ASM_CALL Clear_Event_1b ; 059D36/07DD9C00 // Battle related
.byte $1C ; 059D3A/1C
ASM_CALL Clear_Event_1b ; 059D3B/07DD9C00 // Battle related
.byte $1E ; 059D3F/1E
ASM_CALL Clear_Event_1b ; 059D40/07DD9C00 // Battle related
.byte $20 ; 059D44/20
ASM_CALL Clear_Event_1b ; 059D45/07DD9C00 // Battle related
.byte $22 ; 059D49/22
RTL ; 059D4A/05
$05F137 - Using items and spells
Item_Handler:
ASM_CALL Sub_Save_Temp_Vars ; 05F137/072ABB07
ASM_CALL LoadSaveItem ; 05F13B/07F8BA07
MULTI_JSR #17 ; 05F13F/1211
.word Use_Misc_Item ; 05F141/71F1
.word Use_Misc_Item ; 05F143/71F1
.word Use_Misc_Item ; 05F145/71F1
.word Use_Sleeping_Bag ; 05F147/75F1
.word Use_Tent ; 05F149/8BF1
.word Use_Honey ; 05F14B/A1F1
.word Use_Honey ; 05F14D/A1F1
.word Use_Honey ; 05F14F/A1F1
.word Use_Honey ; 05F151/A1F1
.word Use_HP_Honey ; 05F153/AFF1
.word Use_MP_Honey ; 05F155/C1F1
.word Use_Herbs ; 05F157/FFF1
.word Use_Medicine ; 05F159/14F2
.word Use_Silver_Flask ; 05F15B/29F2
.word Use_Gold_Flask ; 05F15D/3EF2
.word Use_Maidens_Tears ; 05F15F/8FF2
.word Use_Moon_Oil ; 05F161/80F2
ASM_CALL Store_results_in_2b ; 05F163/07D9BD07 // Store results in [var] - Saves the object's current [A] ($0CB3,y) in RAM
.word Temp_something ; 05F167/C118
ASM_CALL Sub_Load_Temp_Vars ; 05F169/076ABB07
MOV REG,Temp_something ; 05F16D/1FC118
RTL ; 05F170/05
Use_Misc_Item:
MOV REG,#$0001 ; 05F171/1E0100
RTS ; 05F174/1C
Use_Sleeping_Bag:
ASM_CALL GetSet_SFX_1b ; 05F175/07449C00 // Get/Set Sound Effect
.byte 31 ; 05F179/1F
ASM_CALL Use_Napping_Item_7b ; 05F17A/079FBC07 // Use Napping Item [HP up] [MP up] [?] [?] [?]
.word 200 ; 05F17E/C800
.word 25 ; 05F180/1900
.byte 12 ; 05F182/0C
.byte 12 ; 05F183/0C
.byte 0 ; 05F184/00
WAIT #10 ; 05F185/060A
MOV REG,#$0001 ; 05F187/1E0100
RTS ; 05F18A/1C
Use_Tent:
ASM_CALL GetSet_SFX_1b ; 05F18B/07449C00 // Get/Set Sound Effect
.byte 31 ; 05F18F/1F
ASM_CALL Use_Napping_Item_7b ; 05F190/079FBC07 // Use Napping Item [HP up] [MP up] [?] [?] [?]
.word 999 ; 05F194/E703
.word 999 ; 05F196/E703
.byte 0 ; 05F198/00
.byte 0 ; 05F199/00
.byte 1 ; 05F19A/01
WAIT #10 ; 05F19B/060A
MOV REG,#$0001 ; 05F19D/1E0100
RTS ; 05F1A0/1C
Use_Honey:
JSR Sub_F2F5 ; 05F1A1/1BF5F2
JNE DATA8_05F1A8 ; 05F1A4/0CA8F1
RTS ; 05F1A7/1C
DATA8_05F1A8:
ASM_CALL Honey_Boost_Valid_PC ; 05F1A8/07B6BB07
JMP Honey_Has_Been_Used ; 05F1AC/1ACFF1
Use_HP_Honey:
JSR Sub_F2F5 ; 05F1AF/1BF5F2
JNE Sub_Use_Honey ; 05F1B2/0CB6F1
RTS ; 05F1B5/1C
Sub_Use_Honey:
ASM_CALL Honey_Boost_Valid_PC ; 05F1B6/07B6BB07
ASM_CALL Sub_07BC51 ; 05F1BA/0751BC07
JMP Honey_Has_Been_Used ; 05F1BE/1ACFF1
Use_MP_Honey:
JSR Sub_F2F5 ; 05F1C1/1BF5F2
JNE DATA8_05F1C7 ; 05F1C4/0CC7F1
DATA8_05F1C7:
ASM_CALL Honey_Boost_Valid_PC ; 05F1C7/07B6BB07
ASM_CALL Sub_07BC78 ; 05F1CB/0778BC07
Honey_Has_Been_Used:
WAIT #1 ; 05F1CF/0601
ASM_CALL Load_Item_Name ; 05F1D1/075ABE07
ASM_CALL Setup_Text_Parser_3b_1b ; 05F1D5/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemUsed ; 05F1D9/AE8908
.byte $00 ; 05F1DC/00
WAIT #20 ; 05F1DD/0614
ASM_CALL Sub_07BD9D ; 05F1DF/079DBD07
ASM_CALL Get_Honey_Name ; 05F1E3/07FABD07 // Get Honey Name
ASM_CALL GetSet_SFX_1b ; 05F1E7/07449C00 // Get/Set Sound Effect
.byte 31 ; 05F1EB/1F
ASM_CALL Setup_Text_Parser_3b_1b ; 05F1EC/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemStatIncreased ; 05F1F0/D08908
.byte $00 ; 05F1F3/00
Loop_for_button_press:
WAIT #1 ; 05F1F4/0601
ASM_CALL Wait_For_A_Press_1b ; 05F1F6/0703BA07 // Wait for A-press
.byte $00 ; 05F1FA/00
JEQ Loop_for_button_press ; 05F1FB/0BF4F1
RTS ; 05F1FE/1C
Use_Herbs:
JSR Sub_F2F5 ; 05F1FF/1BF5F2
JNE Heal_70HP_and_change ; 05F202/0C06F2
RTS ; 05F205/1C
Heal_70HP_and_change:
ASM_CALL Heal_plus_variance_2b_1b ; 05F206/0742BC07 // Heal [val] plus variance [0...val]
.word 70 ; 05F20A/4600
.byte 12 ; 05F20C/0C
ASM_CALL Sub_07BC51 ; 05F20D/0751BC07
JMP DATA8_05F250 ; 05F211/1A50F2
Use_Medicine:
JSR Sub_F2F5 ; 05F214/1BF5F2
JNE Heal_about_200_HP ; 05F217/0C1BF2
RTS ; 05F21A/1C
Heal_about_200_HP:
ASM_CALL Heal_plus_variance_2b_1b ; 05F21B/0742BC07 // Heal [val] plus variance [0...val]
.word 200 ; 05F21F/C800
.byte 12 ; 05F221/0C
ASM_CALL Sub_07BC51 ; 05F222/0751BC07
JMP DATA8_05F250 ; 05F226/1A50F2
Use_Silver_Flask:
JSR Sub_F2F5 ; 05F229/1BF5F2
JNE DATA8_05F230 ; 05F22C/0C30F2
RTS ; 05F22F/1C
DATA8_05F230:
ASM_CALL Heal_plus_variance_2b_1b ; 05F230/0742BC07 // Heal [val] plus variance [0...val]
.word 15 ; 05F234/0F00
.byte 12 ; 05F236/0C
ASM_CALL Sub_07BC78 ; 05F237/0778BC07
JMP DATA8_05F250 ; 05F23B/1A50F2
Use_Gold_Flask:
JSR Sub_F2F5 ; 05F23E/1BF5F2
JNE DATA8_05F245 ; 05F241/0C45F2
RTS ; 05F244/1C
DATA8_05F245:
ASM_CALL Heal_plus_variance_2b_1b ; 05F245/0742BC07 // Heal [val] plus variance [0...val]
.word 40 ; 05F249/2800
.byte 12 ; 05F24B/0C
ASM_CALL Sub_07BC78 ; 05F24C/0778BC07
DATA8_05F250:
JSL DATA8_059C26 ; 05F250/04269C05
WAIT #1 ; 05F254/0601
ASM_CALL Load_Item_Name ; 05F256/075ABE07
ASM_CALL Setup_Text_Parser_3b_1b ; 05F25A/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemUsed ; 05F25E/AE8908
.byte $00 ; 05F261/00
WAIT #20 ; 05F262/0614
ASM_CALL Sub_07BD9D ; 05F264/079DBD07
ASM_CALL GetSet_SFX_1b ; 05F268/07449C00 // Get/Set Sound Effect
.byte 31 ; 05F26C/1F
ASM_CALL Setup_Text_Parser_3b_1b ; 05F26D/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemRecovered ; 05F271/F28908
.byte $00 ; 05F274/00
DATA8_05F275:
WAIT #1 ; 05F275/0601
ASM_CALL Wait_For_A_Press_1b ; 05F277/0703BA07 // Wait for A-press
.byte $00 ; 05F27B/00
JEQ DATA8_05F275 ; 05F27C/0B75F2
RTS ; 05F27F/1C
Use_Moon_Oil:
JSR Sub_F2F5 ; 05F280/1BF5F2
JNE DATA8_05F287 ; 05F283/0C87F2
RTS ; 05F286/1C
DATA8_05F287:
ASM_CALL Remove_Status_1b ; 05F287/070EBC07 // Remove Status
.byte $03 ; 05F28B/03
JMP Item_Status_Heal ; 05F28C/1A9BF2
Use_Maidens_Tears:
JSR Sub_F2F5 ; 05F28F/1BF5F2
JNE DATA8_05F296 ; 05F292/0C96F2
RTS ; 05F295/1C
DATA8_05F296:
ASM_CALL Remove_Status_1b ; 05F296/070EBC07 // Remove Status
.byte $04 ; 05F29A/04
Item_Status_Heal:
ASM_CALL GetSet_SFX_1b ; 05F29B/07449C00 // Get/Set Sound Effect
.byte 31 ; 05F29F/1F
JEQ Item_No_Effect ; 05F2A0/0BD0F2
JSL DATA8_059C26 ; 05F2A3/04269C05
ASM_CALL Load_Status_Healed ; 05F2A7/077ABE07
ASM_CALL Load_Item_Name ; 05F2AB/075ABE07
ASM_CALL Setup_Text_Parser_3b_1b ; 05F2AF/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemUsed ; 05F2B3/AE8908
.byte $00 ; 05F2B6/00
WAIT #20 ; 05F2B7/0614
ASM_CALL Sub_07BD9D ; 05F2B9/079DBD07
ASM_CALL Setup_Text_Parser_3b_1b ; 05F2BD/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemRecoveredStatus ; 05F2C1/088A08
.byte $00 ; 05F2C4/00
DATA8_05F2C5:
WAIT #1 ; 05F2C5/0601
ASM_CALL Wait_For_A_Press_1b ; 05F2C7/0703BA07 // Wait for A-press
.byte $00 ; 05F2CB/00
JEQ DATA8_05F2C5 ; 05F2CC/0BC5F2
RTS ; 05F2CF/1C
Item_No_Effect:
JSL DATA8_059C26 ; 05F2D0/04269C05
ASM_CALL Load_Item_Name ; 05F2D4/075ABE07
ASM_CALL Setup_Text_Parser_3b_1b ; 05F2D8/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemUsed ; 05F2DC/AE8908
.byte $00 ; 05F2DF/00
WAIT #20 ; 05F2E0/0614
ASM_CALL Setup_Text_Parser_3b_1b ; 05F2E2/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long ItemNoEffect ; 05F2E6/288A08
.byte $00 ; 05F2E9/00
DATA8_05F2EA:
WAIT #1 ; 05F2EA/0601
ASM_CALL Wait_For_A_Press_1b ; 05F2EC/0703BA07 // Wait for A-press
.byte $00 ; 05F2F0/00
JEQ DATA8_05F2EA ; 05F2F1/0BEAF2
RTS ; 05F2F4/1C
Sub_F2F5:
MOV VAR1,#$0000 ; 05F2F5/0F010000
WAIT #2 ; 05F2F9/0602
ASM_CALL Is_In_Battle ; 05F2FB/07AABB07
JEQ DATA8_05F307 ; 05F2FF/0B07F3
SET_ANIM #6 ; 05F302/3006
JMP DATA8_05F309 ; 05F304/1A09F3
DATA8_05F307:
SET_ANIM #7 ; 05F307/3007
DATA8_05F309:
ASM_CALL Sets_Cursor_Position ; 05F309/0770BD07
DATA8_05F30D:
WAIT #1 ; 05F30D/0601
ASM_CALL Check_Input_BA_Other ; 05F30F/0754BD07
MULTI_JMP #3 ; 05F313/1103
.word DATA8_05F30D ; 05F315/0DF3
.word DATA8_05F309 ; 05F317/09F3
.word DATA8_05F324 ; 05F319/24F3
ASM_CALL GetSet_SFX_1b ; 05F31B/07449C00 // Get/Set Sound Effect
.byte 6 ; 05F31F/06
MOV REG,#$0000 ; 05F320/1E0000
RTS ; 05F323/1C
DATA8_05F324:
ASM_CALL GetSet_SFX_1b ; 05F324/07449C00 // Get/Set Sound Effect
.byte 17 ; 05F328/11
ASM_CALL Get_Present_Party_Member ; 05F329/07B1BD07
MULTI_JMP #3 ; 05F32D/1103
.word DATA8_05F30D ; 05F32F/0DF3
.word DATA8_05F335 ; 05F331/35F3
.word DATA8_05F30D ; 05F333/0DF3
DATA8_05F335:
MOV REG,#$0001 ; 05F335/1E0100
RTS ; 05F338/1C
L_05F339:
RTS ; 05F339/1C
DATA8_05F33A:
ASM_CALL Store_results_in_2b ; 05F33A/07D9BD07 // Store results in [var] - Saves the object's current [A] ($0CB3,y) in RAM
.word Temp_something ; 05F33E/C118
ASM_CALL Sub_Save_Temp_Vars ; 05F340/072ABB07
ASM_CALL Get_Spell_Type ; 05F344/07FABE07
JMP DATA8_05F365 ; 05F348/1A65F3
DATA8_05F34B:
ASM_CALL Sub_Save_Temp_Vars ; 05F34B/072ABB07
ASM_CALL Get_Spell_ID ; 05F34F/079EBE07
ASM_CALL Get_Spell_Type ; 05F353/07FABE07
WAIT #1 ; 05F357/0601
ASM_CALL Spell_Spend_MP ; 05F359/0754BF07
JNE DATA8_05F3AE ; 05F35D/0CAEF3
MOV.w Temp_something,#$0000 ; 05F360/16C1180000
DATA8_05F365:
ASM_CALL Get_spell_targeting ; 05F365/0708BF07
JNE DATA8_05F38E ; 05F369/0C8EF3
ASM_CALL Get_spell_ID_minus_1b ; 05F36C/072DBF07 // Get spell ID - [val]
.byte 76 ; 05F370/4C
JEQ Battle_Cast_Spell ; 05F371/0B87F3
ASM_CALL Spell_Set_Atk_Range ; 05F374/0724C007
JEQ DATA8_05F381 ; 05F378/0B81F3
JSR ASM_Select_Target ; 05F37B/1B1FF4
JMP DATA8_05F384 ; 05F37E/1A84F3
DATA8_05F381:
JSR DATA8_05F3CD ; 05F381/1BCDF3
DATA8_05F384:
JEQ DATA8_05F39B ; 05F384/0B9BF3
Battle_Cast_Spell:
ASM_CALL Spell_Set_up_Effect ; 05F387/07DCBF07
JMP DATA8_05F392 ; 05F38B/1A92F3
DATA8_05F38E:
ASM_CALL Sub_07BFC0 ; 05F38E/07C0BF07
DATA8_05F392:
WAIT #1 ; 05F392/0601
JSL DATA8_05F459 ; 05F394/0459F405
MOV REG,#$0001 ; 05F398/1E0100
DATA8_05F39B:
ASM_CALL Store_results_in_2b ; 05F39B/07D9BD07 // Store results in [var] - Saves the object's current [A] ($0CB3,y) in RAM
.word Temp_something ; 05F39F/C118
ASM_CALL Sub_Load_Temp_Vars ; 05F3A1/076ABB07
MOV.w Spell_ID,#$FFFF ; 05F3A5/162711FFFF
MOV REG,Temp_something ; 05F3AA/1FC118
RTL ; 05F3AD/05
DATA8_05F3AE:
JSL DATA8_059C26 ; 05F3AE/04269C05
ASM_CALL Is_In_Battle ; 05F3B2/07AABB07
JEQ DATA8_05F3BB ; 05F3B6/0BBBF3
SET_ANIM #-1 ; 05F3B9/30FF
DATA8_05F3BB:
WAIT #1 ; 05F3BB/0601
ASM_CALL Some_1095_check_1b ; 05F3BD/074FBA07 // Some pause status check
.byte $00 ; 05F3C1/00
JEQ DATA8_05F3BB ; 05F3C2/0BBBF3
WAIT #30 ; 05F3C5/061E
MOV REG,#$0002 ; 05F3C7/1E0200
JMP DATA8_05F39B ; 05F3CA/1A9BF3
DATA8_05F3CD:
MOV VAR1,#$0000 ; 05F3CD/0F010000
WAIT #2 ; 05F3D1/0602
ASM_CALL Is_In_Battle ; 05F3D3/07AABB07
JEQ DATA8_05F3DF ; 05F3D7/0BDFF3
SET_ANIM #6 ; 05F3DA/3006
JMP DATA8_05F3E1 ; 05F3DC/1AE1F3
DATA8_05F3DF:
SET_ANIM #7 ; 05F3DF/3007
DATA8_05F3E1:
ASM_CALL Sets_Cursor_Position ; 05F3E1/0770BD07
DATA8_05F3E5:
WAIT #1 ; 05F3E5/0601
ASM_CALL Check_Input_BA_Other ; 05F3E7/0754BD07
MULTI_JMP #3 ; 05F3EB/1103
.word DATA8_05F3E5 ; 05F3ED/E5F3
.word DATA8_05F3E1 ; 05F3EF/E1F3
.word DATA8_05F3FE ; 05F3F1/FEF3
WAIT #2 ; 05F3F3/0602
ASM_CALL GetSet_SFX_1b ; 05F3F5/07449C00 // Get/Set Sound Effect
.byte 6 ; 05F3F9/06
MOV REG,#$0000 ; 05F3FA/1E0000
RTS ; 05F3FD/1C
DATA8_05F3FE:
ASM_CALL GetSet_SFX_1b ; 05F3FE/07449C00 // Get/Set Sound Effect
.byte 17 ; 05F402/11
ASM_CALL Get_Present_Party_Member ; 05F403/07B1BD07
MULTI_JMP #3 ; 05F407/1103
.word DATA8_05F3E1 ; 05F409/E1F3
.word DATA8_05F419 ; 05F40B/19F4
.word DATA8_05F412 ; 05F40D/12F4
JMP DATA8_05F419 ; 05F40F/1A19F4
DATA8_05F412:
ASM_CALL Get_spell_type_bool ; 05F412/0713BF07
JEQ DATA8_05F3E1 ; 05F416/0BE1F3
DATA8_05F419:
WAIT #1 ; 05F419/0601
MOV REG,#$0001 ; 05F41B/1E0100
RTS ; 05F41E/1C
ASM_Select_Target:
MOV VAR1,#$0014 ; 05F41F/0F011400
WAIT #2 ; 05F423/0602
ASM_CALL Sub_Targeting_Prep ; 05F425/07308A07
DATA8_05F429:
WAIT #1 ; 05F429/0601
ASM_CALL Sub_078AA0 ; 05F42B/07A08A07
ASM_CALL Swap_values ; 05F42F/07758C07
ASM_CALL Get_Enemy_Anim_Frame ; 05F433/07E8BD07
MOV REG,#$0000 ; 05F437/1E0000
ASM_CALL WasBtnPressed_2b ; 05F43A/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 05F43E/8000
JNE DATA8_05F455 ; 05F440/0C55F4
MOV REG,#$0000 ; 05F443/1E0000
ASM_CALL WasBtnPressed_2b ; 05F446/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $8000 ; 05F44A/0080
JEQ DATA8_05F429 ; 05F44C/0B29F4
WAIT #2 ; 05F44F/0602
MOV REG,#$0000 ; 05F451/1E0000
RTS ; 05F454/1C
DATA8_05F455:
MOV REG,#$0001 ; 05F455/1E0100
RTS ; 05F458/1C
DATA8_05F459:
JSL DATA8_059C26 ; 05F459/04269C05
ASM_CALL Is_In_Battle ; 05F45D/07AABB07
JEQ DATA8_05F473 ; 05F461/0B73F4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05F464/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 05F468/8E950D
.byte $02 ; 05F46B/02
.word 2 ; 05F46C/0200
SET_ANIM #-1 ; 05F46E/30FF
JMP Removing_MP_casting_spells ; 05F470/1A94F4
DATA8_05F473:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05F473/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Gray ; 05F477/90950D
.byte $02 ; 05F47A/02
.word 2 ; 05F47B/0200
JMP Removing_MP_casting_spells ; 05F47D/1A94F4
DATA8_05F480:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05F480/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Red ; 05F484/8C950D
.byte $02 ; 05F487/02
.word 2 ; 05F488/0200
MOV.w Temp_something,#$0000 ; 05F48A/16C1180000
MOV.w Temp_MP,#$0000 ; 05F48F/16C9180000
Removing_MP_casting_spells:
MOV REG,Temp_something ; 05F494/1FC118
JNE DATA8_05F4A5 ; 05F497/0CA5F4
ASM_CALL Is_Draw_Spell_Name ; 05F49A/07E1C207
ASM_CALL Update_curMP ; 05F49E/078CBF07
JMP DATA8_05F4A9 ; 05F4A2/1AA9F4
DATA8_05F4A5:
ASM_CALL Use_Spellcast_Gear ; 05F4A5/0792C207
DATA8_05F4A9:
WAIT #1 ; 05F4A9/0601
ASM_CALL Some_1095_check_1b ; 05F4AB/074FBA07 // Some pause status check
.byte $00 ; 05F4AF/00
JEQ DATA8_05F4A9 ; 05F4B0/0BA9F4
WAIT #10 ; 05F4B3/060A
Code_05F4B5:
MOV VAR1,#$0000 ; 05F4B5/0F010000
ASM_CALL Move_spell_ID_to_11B5 ; 05F4B9/07D2F505 // Spells: Move Spell ID to $11B5
JSR DATA8_05F5A7 ; 05F4BD/1BA7F5
ASM_CALL Sub_05F566 ; 05F4C0/0766F505 // Spells: Special Cases
JEQ DATA8_05F4CA ; 05F4C4/0BCAF4
JSR DATA8_05F5A7 ; 05F4C7/1BA7F5
DATA8_05F4CA:
ASM_CALL Get_spell_ID_minus_1b ; 05F4CA/072DBF07 // Get spell ID - [val]
.byte 62 ; 05F4CE/3E
JEQ DATA8_05F53E ; 05F4CF/0B3EF5
ASM_CALL Get_spell_ID_minus_1b ; 05F4D2/072DBF07 // Get spell ID - [val]
.byte 61 ; 05F4D6/3D
JNE DATA8_05F4DD ; 05F4D7/0CDDF4
JSR DATA8_05F5DF ; 05F4DA/1BDFF5
DATA8_05F4DD:
MOV.w Target,#$0000 ; 05F4DD/1623110000
START_LOOP #12 ; 05F4E2/010C
WAIT #1 ; 05F4E4/0601
ASM_CALL Sub_07C899 ; 05F4E6/0799C807
MULTI_JMP #3 ; 05F4EA/1103
.word DATA8_05F539 ; 05F4EC/39F5
.word DATA8_05F4F2 ; 05F4EE/F2F4
.word Spell_setup_subasm ; 05F4F0/1BF5
DATA8_05F4F2:
MOV VAR1,#$0001 ; 05F4F2/0F010100
ASM_CALL Load_Sprite_1b_1b_12b ; 05F4F6/07AE9C00 // Load Sprite
.byte 0 ; 05F4FA/00
.byte 12 ; 05F4FB/0C
.word 17 ; 05F4FC/1100
.word 0 ; 05F4FE/0000
.word 0 ; 05F500/0000
.word 0 ; 05F502/0000
.word 0 ; 05F504/0000
.word 0 ; 05F506/0000
ASM_CALL Store_A_in_11B5_x_1b ; 05F508/079EAF07 // Store [val] in $11B5
.byte 5 ; 05F50C/05
DATA8_05F50D:
WAIT #1 ; 05F50D/0601
ASM_CALL Is_Enemy_Attack_Done_1b ; 05F50F/076CAF07 // Is Enemy [x] Attack Done?
.byte 5 ; 05F513/05
JEQ DATA8_05F50D ; 05F514/0B0DF5
ASM_CALL Get_Spell_Status_Effect ; 05F517/07B8C807
Spell_setup_subasm:
ASM_CALL Spell_Setup ; 05F51B/072DC307
DATA8_05F51F:
WAIT #1 ; 05F51F/0601
ASM_CALL Some_1095_check_1b ; 05F521/074FBA07 // Some pause status check
.byte $00 ; 05F525/00
JEQ DATA8_05F51F ; 05F526/0B1FF5
WAIT #10 ; 05F529/060A
DATA8_05F52B:
WAIT #1 ; 05F52B/0601
MOV REG,#$0011 ; 05F52D/1E1100
ASM_CALL Find_Event_In_List ; 05F530/0783AF07
JEQ DATA8_05F52B ; 05F534/0B2BF5
WAIT #20 ; 05F537/0614
DATA8_05F539:
END_LOOP ; 05F539/02
MOV REG,#$0001 ; 05F53A/1E0100
RTL ; 05F53D/05
DATA8_05F53E:
WAIT #1 ; 05F53E/0601
ASM_CALL Runnable_Check ; 05F540/073ABF07
JNE DATA8_05F554 ; 05F544/0C54F5
ASM_CALL Setup_Text_Parser_3b_1b ; 05F547/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long No_escape_boss ; 05F54B/6C8808
.byte $00 ; 05F54E/00
WAIT #60 ; 05F54F/063C
JMP DATA8_05F562 ; 05F551/1A62F5
DATA8_05F554:
ASM_CALL Store_Bytes_At_Offset_6b ; 05F554/07F4C807 // Store Bytes at Offset - [RAM addr + [value at RAM addr] ] = [value]
.word Condition ; 05F558/C311
.word 4385 ; 05F55A/2111
.word 1024 ; 05F55C/0004
JSL Running_away ; 05F55E/04199D05
DATA8_05F562:
MOV REG,#$0001 ; 05F562/1E0100
RTL ; 05F565/05
$05F5A7 - Animate enemy attack?
DATA8_05F5A7:
ASM_CALL Load_Sprite_1b_1b_12b ; 05F5A7/07AE9C00 // Load Sprite
.byte 0 ; 05F5AB/00
.byte 12 ; 05F5AC/0C
.word 17 ; 05F5AD/1100
.word 0 ; 05F5AF/0000
.word 0 ; 05F5B1/0000
.word 0 ; 05F5B3/0000
.word 0 ; 05F5B5/0000
.word 0 ; 05F5B7/0000
ASM_CALL Store_A_in_11B5_x_1b ; 05F5B9/079EAF07 // Store [val] in $11B5
.byte 5 ; 05F5BD/05
DATA8_05F5BE:
WAIT #1 ; 05F5BE/0601
ASM_CALL Is_Enemy_Attack_Done_1b ; 05F5C0/076CAF07 // Is Enemy [x] Attack Done?
.byte 5 ; 05F5C4/05
JEQ DATA8_05F5BE ; 05F5C5/0BBEF5
MOV REG,Tbl_Offset ; 05F5C8/1FB511
ASM_CALL Store_results_in_2b ; 05F5CB/07D9BD07 // Store results in [var] - Saves the object's current [A] ($0CB3,y) in RAM
.word Spell_ID ; 05F5CF/2711
RTS ; 05F5D1/1C
$05F5DF - Ruinous Mission
DATA8_05F5DF:
WAIT #30 ; 05F5DF/061E
ASM_CALL RuinousMission_handling ; 05F5E1/070EC907
DATA8_05F5E5:
WAIT #1 ; 05F5E5/0601
ASM_CALL Some_1095_check_1b ; 05F5E7/074FBA07 // Some pause status check
.byte $00 ; 05F5EB/00
JEQ DATA8_05F5E5 ; 05F5EC/0BE5F5
WAIT #10 ; 05F5EF/060A
RTS ; 05F5F1/1C
$05F95F - Battle; Using Cards
Battle_Cards_Open:
ASM_CALL Sub_Save_Temp_Vars ; 05F95F/072ABB07
WAIT #1 ; 05F963/0601
MOV.w $11B7,#$0000 ; 05F965/16B7110000
MOV.w Page_Num,#$0000 ; 05F96A/16B9110000
DATA8_05F96F:
SET_ANIM #-1,WAIT #7 ; 05F96F/37FF
ASM_CALL Something_loading_cards ; 05F971/079AF605 // Cards: loading something
JEQ DATA8_05FA05 ; 05F975/0B05FA
ASM_CALL Sub_05F815 ; 05F978/0715F805 // Cards: Something about using cards in battle
SET_ANIM #4 ; 05F97C/3004
DATA8_05F97E:
ASM_CALL Sub_05F947 ; 05F97E/0747F905 // Cards: Involves the second card slot
MULTI_JSR #3 ; 05F982/1203
.word DATA8_05FA18 ; 05F984/18FA
.word DATA8_05FA1D ; 05F986/1DFA
.word DATA8_05FA22 ; 05F988/22FA
WAIT #1 ; 05F98A/0601
ASM_CALL Sub_05F759 ; 05F98C/0759F705 // Cards: Involves an input checker -1
MULTI_JMP #3 ; 05F990/1103
.word DATA8_05FA05 ; 05F992/05FA
.word DATA8_05F97E ; 05F994/7EF9
.word DATA8_05F97E ; 05F996/7EF9
WAIT #1 ; 05F998/0601
JSR DATA8_05FA22 ; 05F99A/1B22FA
ASM_CALL Sub_05F845 ; 05F99D/0745F805 // Cards: Related to elemental cards
JEQ DATA8_05F9D8 ; 05F9A1/0BD8F9
SET_ANIM #-1,WAIT #7 ; 05F9A4/37FF
Use_Elemental_Card:
ASM_CALL Setup_Text_Parser_3b_1b ; 05F9A6/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Use_how_many_cards ; 05F9AA/70FA05
.byte $00 ; 05F9AD/00
SET_XPOS #68 ; 05F9AE/384400
SET_YPOS #191 ; 05F9B1/40BF00
DATA8_05F9B4:
ASM_CALL Setup_Text_Parser_3b_1b ; 05F9B4/07ACA000 // Setup Text Parser - [3 bytes] Address to read text from, [val= 0 or 1] text buffer to write to
.long Use_how_many_cards ; 05F9B8/70FA05
.byte $00 ; 05F9BB/00
DATA8_05F9BC:
SET_ANIM #1 ; 05F9BC/3001
WAIT #1 ; 05F9BE/0601
ASM_CALL Sub_05F870 ; 05F9C0/0770F805 // Cards: Involves an input checker -2
MULTI_JMP #2 ; 05F9C4/1102
.word DATA8_05F96F ; 05F9C6/6FF9
.word DATA8_05F9BC ; 05F9C8/BCF9
CheckCardCount2:
ASM_CALL CheckCardCount1 ; 05F9CA/07D6F805 // Cards: Check Card Count -1
JEQ DATA8_05F9D8 ; 05F9CE/0BD8F9
SET_ANIM #-1 ; 05F9D1/30FF
WAIT #30 ; 05F9D3/061E
JMP DATA8_05F9B4 ; 05F9D5/1AB4F9
DATA8_05F9D8:
SET_ANIM #-1,WAIT #4 ; 05F9D8/34FF
UseElementalCards:
ASM_CALL GetCardEffect ; 05F9DA/07F2F505 // Cards: Get Card Effect
WAIT #1 ; 05F9DE/0601
ASM_CALL UseElementalCards_Text ; 05F9E0/0762F605 // Cards: Use Elemental Cards Text
DATA8_05F9E4:
WAIT #1 ; 05F9E4/0601
ASM_CALL Some_1095_check_1b ; 05F9E6/074FBA07 // Some pause status check
.byte $00 ; 05F9EA/00
JEQ DATA8_05F9E4 ; 05F9EB/0BE4F9
WAIT #10 ; 05F9EE/060A
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 05F9F0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 05F9F4/8E950D
.byte $02 ; 05F9F7/02
.word 2 ; 05F9F8/0200
JSL Code_05F4B5 ; 05F9FA/04B5F405
ASM_CALL Sub_05F907 ; 05F9FE/0707F905 // Cards: Involves the inventory
MOV REG,#$0001 ; 05FA02/1E0100
DATA8_05FA05:
SET_ANIM #-1,WAIT #7 ; 05FA05/37FF
ASM_CALL Store_results_in_2b ; 05FA07/07D9BD07 // Store results in [var] - Saves the object's current [A] ($0CB3,y) in RAM
.word Temp_something ; 05FA0B/C118
JSR DATA8_05FA22 ; 05FA0D/1B22FA
ASM_CALL Sub_Load_Temp_Vars ; 05FA10/076ABB07
MOV REG,Temp_something ; 05FA14/1FC118
RTL ; 05FA17/05
DATA8_05FA18:
JSL DATA8_059C08 ; 05FA18/04089C05
RTS ; 05FA1C/1C
DATA8_05FA1D:
JSL DATA8_059C17 ; 05FA1D/04179C05
RTS ; 05FA21/1C
DATA8_05FA22:
JSL DATA8_059C26 ; 05FA22/04269C05
RTS ; 05FA26/1C
$0F8001 - Event 10: Battle Animations
Event_Main_10_BATTLE_ANIMATIONS:
MOV REG,Tbl_Offset ; 0F8001/1FB511
MOV VAR2,REG ; 0F8004/2302
MOV REG,$11B7 ; 0F8006/1FB711
MOV VAR3,REG ; 0F8009/2303
ASM_CALL GetEnemyWpnLookup ; 0F800B/0707B607
ASM_CALL GetAttackAnimation ; 0F800F/07E68218 // Get Attack Animation - Takes in an attack animation 0-7 (Sword, Bite, Splash, Claw, Sting, Punch) (6=??) (7=Damaged Star)
ASM_CALL GetSet_SFX_1b ; 0F8013/07449C00 // Get/Set Sound Effect
.byte 1 ; 0F8017/01
ASM_CALL GetEnemyWpnLookup ; 0F8018/0707B607
MULTI_JMP #6 ; 0F801C/1106
.word Animation_Attack_Swords ; 0F801E/2A80
.word Animation_Attack_Bite ; 0F8020/6B80
.word Animation_Attack_Splash ; 0F8022/AC80
.word Animation_Attack_Claw ; 0F8024/DE80
.word Animation_Attack_Sting ; 0F8026/1381
.word Animation_Attack_Punch ; 0F8028/3F81
Animation_Attack_Swords:
MOV REG,Page_Num ; 0F802A/1FB911
ASM_CALL Get_Enemy_AtkFrame_flag ; 0F802D/071BB607
MULTI_JMP #4 ; 0F8031/1104
.word Anim_Sword_Small ; 0F8033/3B80
.word Anim_Sword_Medium ; 0F8035/4B80
.word Anim_Sword_Large ; 0F8037/5B80
.word Anim_Sword_Large ; 0F8039/5B80
Anim_Sword_Small:
SET_ANIM #0 ; 0F803B/3000
WAIT #8 ; 0F803D/0608
INC_ANIM WAIT #3 ; 0F803F/AB
INC_ANIM ; 0F8040/A8
WAIT #8 ; 0F8041/0608
INC_ANIM ; 0F8043/A8
WAIT #8 ; 0F8044/0608
INC_ANIM WAIT #3 ; 0F8046/AB
INC_ANIM ; 0F8047/A8
WAIT #8 ; 0F8048/0608
END ; 0F804A/00
Anim_Sword_Medium:
SET_ANIM #6 ; 0F804B/3006
WAIT #8 ; 0F804D/0608
INC_ANIM WAIT #3 ; 0F804F/AB
INC_ANIM ; 0F8050/A8
WAIT #8 ; 0F8051/0608
INC_ANIM ; 0F8053/A8
WAIT #8 ; 0F8054/0608
INC_ANIM WAIT #3 ; 0F8056/AB
INC_ANIM ; 0F8057/A8
WAIT #8 ; 0F8058/0608
END ; 0F805A/00
Anim_Sword_Large:
SET_ANIM #18 ; 0F805B/3012
WAIT #8 ; 0F805D/0608
INC_ANIM WAIT #3 ; 0F805F/AB
INC_ANIM ; 0F8060/A8
WAIT #8 ; 0F8061/0608
INC_ANIM ; 0F8063/A8
WAIT #8 ; 0F8064/0608
INC_ANIM WAIT #3 ; 0F8066/AB
INC_ANIM ; 0F8067/A8
WAIT #8 ; 0F8068/0608
END ; 0F806A/00
Animation_Attack_Bite:
MOV REG,Page_Num ; 0F806B/1FB911
ASM_CALL Get_Enemy_AtkFrame_flag ; 0F806E/071BB607
MULTI_JMP #4 ; 0F8072/1104
.word Anim_Small_Attack ; 0F8074/7C80
.word Anim_Medium_Attack ; 0F8076/8C80
.word Anim_Large_Attack ; 0F8078/9C80
.word Anim_Large_Attack ; 0F807A/9C80
Anim_Small_Attack:
SET_ANIM #24 ; 0F807C/3018
WAIT #10 ; 0F807E/060A
INC_ANIM WAIT #6 ; 0F8080/AE
INC_ANIM WAIT #4 ; 0F8081/AC
INC_ANIM ; 0F8082/A8
WAIT #12 ; 0F8083/060C
INC_ANIM ; 0F8085/A8
WAIT #6 ; 0F8086/0606
INC_ANIM ; 0F8088/A8
WAIT #12 ; 0F8089/060C
END ; 0F808B/00
Anim_Medium_Attack:
SET_ANIM #30 ; 0F808C/301E
WAIT #10 ; 0F808E/060A
INC_ANIM WAIT #6 ; 0F8090/AE
INC_ANIM WAIT #4 ; 0F8091/AC
INC_ANIM ; 0F8092/A8
WAIT #12 ; 0F8093/060C
INC_ANIM ; 0F8095/A8
WAIT #6 ; 0F8096/0606
INC_ANIM ; 0F8098/A8
WAIT #12 ; 0F8099/060C
END ; 0F809B/00
Anim_Large_Attack:
SET_ANIM #42 ; 0F809C/302A
WAIT #10 ; 0F809E/060A
INC_ANIM WAIT #6 ; 0F80A0/AE
INC_ANIM WAIT #4 ; 0F80A1/AC
INC_ANIM ; 0F80A2/A8
WAIT #12 ; 0F80A3/060C
INC_ANIM ; 0F80A5/A8
WAIT #6 ; 0F80A6/0606
INC_ANIM ; 0F80A8/A8
WAIT #12 ; 0F80A9/060C
END ; 0F80AB/00
Animation_Attack_Splash:
MOV REG,Page_Num ; 0F80AC/1FB911
ASM_CALL Get_Enemy_AtkFrame_flag ; 0F80AF/071BB607
MULTI_JMP #4 ; 0F80B3/1104
.word DATA8_0F80BD ; 0F80B5/BD80
.word DATA8_0F80C8 ; 0F80B7/C880
.word DATA8_0F80D3 ; 0F80B9/D380
.word DATA8_0F80D3 ; 0F80BB/D380
DATA8_0F80BD:
SET_ANIM #48 ; 0F80BD/3030
WAIT #16 ; 0F80BF/0610
START_LOOP #5 ; 0F80C1/0105
SET_ANIM #49,WAIT #4 ; 0F80C3/3431
INC_ANIM WAIT #4 ; 0F80C5/AC
END_LOOP ; 0F80C6/02
END ; 0F80C7/00
DATA8_0F80C8:
SET_ANIM #51 ; 0F80C8/3033
WAIT #16 ; 0F80CA/0610
START_LOOP #5 ; 0F80CC/0105
SET_ANIM #52,WAIT #4 ; 0F80CE/3434
INC_ANIM WAIT #4 ; 0F80D0/AC
END_LOOP ; 0F80D1/02
END ; 0F80D2/00
DATA8_0F80D3:
SET_ANIM #58 ; 0F80D3/303A
WAIT #16 ; 0F80D5/0610
START_LOOP #5 ; 0F80D7/0105
SET_ANIM #59,WAIT #4 ; 0F80D9/343B
INC_ANIM WAIT #4 ; 0F80DB/AC
END_LOOP ; 0F80DC/02
END ; 0F80DD/00
Animation_Attack_Claw:
MOV REG,Page_Num ; 0F80DE/1FB911
ASM_CALL Get_Enemy_AtkFrame_flag ; 0F80E1/071BB607
MULTI_JMP #4 ; 0F80E5/1104
.word DATA8_0F80EF ; 0F80E7/EF80
.word DATA8_0F80FB ; 0F80E9/FB80
.word DATA8_0F8107 ; 0F80EB/0781
.word DATA8_0F8107 ; 0F80ED/0781
DATA8_0F80EF:
SET_ANIM #61 ; 0F80EF/303D
WAIT #8 ; 0F80F1/0608
INC_ANIM WAIT #2 ; 0F80F3/AA
INC_ANIM WAIT #5 ; 0F80F4/AD
INC_ANIM WAIT #5 ; 0F80F5/AD
INC_ANIM WAIT #2 ; 0F80F6/AA
INC_ANIM ; 0F80F7/A8
WAIT #12 ; 0F80F8/060C
END ; 0F80FA/00
DATA8_0F80FB:
SET_ANIM #67 ; 0F80FB/3043
WAIT #8 ; 0F80FD/0608
INC_ANIM WAIT #2 ; 0F80FF/AA
INC_ANIM WAIT #5 ; 0F8100/AD
INC_ANIM WAIT #5 ; 0F8101/AD
INC_ANIM WAIT #2 ; 0F8102/AA
INC_ANIM ; 0F8103/A8
WAIT #12 ; 0F8104/060C
END ; 0F8106/00
DATA8_0F8107:
SET_ANIM #79 ; 0F8107/304F
WAIT #8 ; 0F8109/0608
INC_ANIM WAIT #2 ; 0F810B/AA
INC_ANIM WAIT #5 ; 0F810C/AD
INC_ANIM WAIT #5 ; 0F810D/AD
INC_ANIM WAIT #2 ; 0F810E/AA
INC_ANIM ; 0F810F/A8
WAIT #12 ; 0F8110/060C
END ; 0F8112/00
Animation_Attack_Sting:
MOV REG,Page_Num ; 0F8113/1FB911
ASM_CALL Get_Enemy_AtkFrame_flag ; 0F8116/071BB607
MULTI_JMP #4 ; 0F811A/1104
.word DATA8_0F8124 ; 0F811C/2481
.word DATA8_0F812D ; 0F811E/2D81
.word DATA8_0F8136 ; 0F8120/3681
.word DATA8_0F8136 ; 0F8122/3681
DATA8_0F8124:
SET_ANIM #85 ; 0F8124/3055
WAIT #16 ; 0F8126/0610
INC_ANIM WAIT #1 ; 0F8128/A9
INC_ANIM ; 0F8129/A8
WAIT #16 ; 0F812A/0610
END ; 0F812C/00
DATA8_0F812D:
SET_ANIM #88 ; 0F812D/3058
WAIT #16 ; 0F812F/0610
INC_ANIM WAIT #1 ; 0F8131/A9
INC_ANIM ; 0F8132/A8
WAIT #16 ; 0F8133/0610
END ; 0F8135/00
DATA8_0F8136:
SET_ANIM #94 ; 0F8136/305E
WAIT #16 ; 0F8138/0610
INC_ANIM WAIT #1 ; 0F813A/A9
INC_ANIM ; 0F813B/A8
WAIT #16 ; 0F813C/0610
END ; 0F813E/00
Animation_Attack_Punch:
MOV REG,Page_Num ; 0F813F/1FB911
ASM_CALL Get_Enemy_AtkFrame_flag ; 0F8142/071BB607
MULTI_JMP #4 ; 0F8146/1104
.word Anim_BossMusicFlag_0 ; 0F8148/5081
.word Anim_BossMusicFlag_01 ; 0F814A/5E81
.word Anim_BossMusicFlag_0203 ; 0F814C/6C81
.word Anim_BossMusicFlag_0203 ; 0F814E/6C81
Anim_BossMusicFlag_0:
SET_ANIM #97 ; 0F8150/3061
WAIT #12 ; 0F8152/060C
INC_ANIM WAIT #3 ; 0F8154/AB
INC_ANIM ; 0F8155/A8
WAIT #13 ; 0F8156/060D
INC_ANIM WAIT #5 ; 0F8158/AD
INC_ANIM WAIT #3 ; 0F8159/AB
INC_ANIM ; 0F815A/A8
WAIT #13 ; 0F815B/060D
END ; 0F815D/00
Anim_BossMusicFlag_01:
SET_ANIM #103 ; 0F815E/3067
WAIT #12 ; 0F8160/060C
INC_ANIM WAIT #3 ; 0F8162/AB
INC_ANIM ; 0F8163/A8
WAIT #13 ; 0F8164/060D
INC_ANIM WAIT #5 ; 0F8166/AD
INC_ANIM WAIT #3 ; 0F8167/AB
INC_ANIM ; 0F8168/A8
WAIT #13 ; 0F8169/060D
END ; 0F816B/00
Anim_BossMusicFlag_0203:
SET_ANIM #114 ; 0F816C/3072
WAIT #12 ; 0F816E/060C
INC_ANIM WAIT #3 ; 0F8170/AB
INC_ANIM ; 0F8171/A8
WAIT #13 ; 0F8172/060D
INC_ANIM WAIT #5 ; 0F8174/AD
INC_ANIM WAIT #3 ; 0F8175/AB
INC_ANIM ; 0F8176/A8
WAIT #13 ; 0F8177/060D
END ; 0F8179/00
$0FCB2B - Event 11: Spell Animations
Event_Main_11_SPELL_ANIMATIONS:
ASM_CALL Sub_07B9A2 ; 0FCB2B/07A2B907
MOV REG,Spell_ID ; 0FCB2F/1F2711
ASM_CALL Draw_Spellcast ; 0FCB32/07408307
MOV REG,Spell_ID ; 0FCB36/1F2711
ASM_CALL Spell_casting ; 0FCB39/07B38207
MOV REG,Spell_ID ; 0FCB3D/1F2711
MULTI_JSR #95 ; 0FCB40/125F
.word Spell_Out_Of_Range ; 0FCB42/30CF
.word Animation_Lightning ; 0FCB44/01CC
.word Animation_Lightning ; 0FCB46/01CC
.word Animation_Lightning ; 0FCB48/01CC
.word Animation_Smash ; 0FCB4A/06CC
.word Animation_Smash ; 0FCB4C/06CC
.word Animation_Smash ; 0FCB4E/06CC
.word Animation_Water ; 0FCB50/0BCC
.word Animation_Water ; 0FCB52/0BCC
.word Animation_Water ; 0FCB54/0BCC
.word Animation_Flame ; 0FCB56/10CC
.word Animation_Flame ; 0FCB58/10CC
.word Animation_Flame ; 0FCB5A/10CC
.word Animation_Attribute1 ; 0FCB5C/15CC
.word Animation_Attribute2 ; 0FCB5E/21CC
.word Animation_Attribute3 ; 0FCB60/2DCC
.word Animation_Attribute4 ; 0FCB62/39CC
.word Animation_Attribute5 ; 0FCB64/45CC
.word Animation_Attribute6 ; 0FCB66/51CC
.word Animation_Attribute7 ; 0FCB68/5DCC
.word Animation_Attribute8 ; 0FCB6A/6DCC
.word Animation_Attribute9 ; 0FCB6C/7DCC
.word Animation_Attribute10 ; 0FCB6E/8DCC
.word Animation_Attribute11 ; 0FCB70/9DCC
.word Animation_Call_Wind ; 0FCB72/B1CC
.word Animation_Call_Earth ; 0FCB74/B6CC
.word Animation_Call_Water ; 0FCB76/BBCC
.word Animation_Call_Fire ; 0FCB78/C0CC
.word Animation_Dummied ; 0FCB7A/C5CC
.word Animation_Dummied ; 0FCB7C/C5CC
.word Animation_Swirly ; 0FCB7E/C6CC
.word Animation_Swirly ; 0FCB80/C6CC
.word Animation_Swirly ; 0FCB82/C6CC
.word Animation_Swirly ; 0FCB84/C6CC
.word Animation_Swirly ; 0FCB86/C6CC
.word Animation_Swirly ; 0FCB88/C6CC
.word Animation_Swirly ; 0FCB8A/C6CC
.word Animation_Swirly ; 0FCB8C/C6CC
.word Animation_Swirly ; 0FCB8E/C6CC
.word Animation_Swirly ; 0FCB90/C6CC
.word Animation_Swirly ; 0FCB92/C6CC
.word Animation_Swirly ; 0FCB94/C6CC
.word Animation_Swirly ; 0FCB96/C6CC
.word Animation_Swirly ; 0FCB98/C6CC
.word Animation_Swirly ; 0FCB9A/C6CC
.word Animation_Swirly ; 0FCB9C/C6CC
.word Animation_Swirly ; 0FCB9E/C6CC
.word Animation_Swirly ; 0FCBA0/C6CC
.word Animation_Swirly ; 0FCBA2/C6CC
.word Animation_Swirly ; 0FCBA4/C6CC
.word Animation_Swirly ; 0FCBA6/C6CC
.word Animation_Swirly ; 0FCBA8/C6CC
.word Animation_Swirly ; 0FCBAA/C6CC
.word Animation_Swirly ; 0FCBAC/C6CC
.word Animation_Swirly ; 0FCBAE/C6CC
.word Animation_Swirly ; 0FCBB0/C6CC
.word Animation_Swirly ; 0FCBB2/C6CC
.word Animation_Swirly ; 0FCBB4/C6CC
.word Animation_Swirly ; 0FCBB6/C6CC
.word Animation_Swirly ; 0FCBB8/C6CC
.word Animation_Swirly ; 0FCBBA/C6CC
.word Animation_Swirly ; 0FCBBC/C6CC
.word Animation_Swirly ; 0FCBBE/C6CC
.word Animation_Swirly ; 0FCBC0/C6CC
.word Animation_Swirly ; 0FCBC2/C6CC
.word Animation_Swirly ; 0FCBC4/C6CC
.word Animation_Swirly ; 0FCBC6/C6CC
.word Animation_Swirly ; 0FCBC8/C6CC
.word Animation_Swirly ; 0FCBCA/C6CC
.word Animation_Swirly ; 0FCBCC/C6CC
.word Animation_Swirly ; 0FCBCE/C6CC
.word Animation_Swirly ; 0FCBD0/C6CC
.word Animation_Swirly ; 0FCBD2/C6CC
.word Animation_Swirly ; 0FCBD4/C6CC
.word Animation_Swirly ; 0FCBD6/C6CC
.word Animation_Swirly ; 0FCBD8/C6CC
.word Animation_Swirly ; 0FCBDA/C6CC
.word Animation_Swirly ; 0FCBDC/C6CC
.word Animation_Swirly ; 0FCBDE/C6CC
.word Animation_Swirly ; 0FCBE0/C6CC
.word Animation_Swirly ; 0FCBE2/C6CC
.word Animation_Swirly ; 0FCBE4/C6CC
.word Animation_Effect52 ; 0FCBE6/D6CC
.word Animation_Effect53 ; 0FCBE8/F3CC
.word Animation_Effect54 ; 0FCBEA/05CD
.word Animation_Effect55 ; 0FCBEC/29CD
.word Animation_Effect56_Cast ; 0FCBEE/48CD
.word Animation_Effect57_CallFS ; 0FCBF0/4FCD
.word Animation_Effect58_Teefa_Par; 0FCBF2/E9CD
.word Animation_CallAmulet_Fail ; 0FCBF4/70CE
.word Animation_CallAmulet_Fail ; 0FCBF6/70CE
.word Animation_Effect5B_Bird ; 0FCBF8/76CE
.word Animation_Effect5C_Bird_Fail; 0FCBFA/8FCE
.word Animation_Effect5D_Rooks_Unpet; 0FCBFC/B9CE
.word Animation_Effect5E_Ariel_Attr11; 0FCBFE/00CF
END ; 0FCC00/00
Animation_Lightning:
SET_ANIM #48,WAIT #2 ; 0FCC01/3230
JMP Event_Single_Spell_Anim ; 0FCC03/1A2BCF
Animation_Smash:
SET_ANIM #32,WAIT #2 ; 0FCC06/3220
JMP Event_Single_Spell_Anim ; 0FCC08/1A2BCF
Animation_Water:
SET_ANIM #16,WAIT #2 ; 0FCC0B/3210
JMP Event_Single_Spell_Anim ; 0FCC0D/1A2BCF
Animation_Flame:
SET_ANIM #0,WAIT #2 ; 0FCC10/3200
JMP Event_Single_Spell_Anim ; 0FCC12/1A2BCF
Animation_Attribute1:
SET_ANIM #48,WAIT #1 ; 0FCC15/3130
START_LOOP #15 ; 0FCC17/010F
ADD_ANIM #-16,WAIT #1 ; 0FCC19/B9F0
ADD_ANIM #17,WAIT #1 ; 0FCC1B/B911
END_LOOP ; 0FCC1D/02
ADD_ANIM #-16,WAIT #1 ; 0FCC1E/B9F0
RTS ; 0FCC20/1C
Animation_Attribute2:
SET_ANIM #48,WAIT #1 ; 0FCC21/3130
START_LOOP #15 ; 0FCC23/010F
ADD_ANIM #-32,WAIT #1 ; 0FCC25/B9E0
ADD_ANIM #33,WAIT #1 ; 0FCC27/B921
END_LOOP ; 0FCC29/02
ADD_ANIM #-32,WAIT #1 ; 0FCC2A/B9E0
RTS ; 0FCC2C/1C
Animation_Attribute3:
SET_ANIM #32,WAIT #1 ; 0FCC2D/3120
START_LOOP #15 ; 0FCC2F/010F
ADD_ANIM #-16,WAIT #1 ; 0FCC31/B9F0
ADD_ANIM #17,WAIT #1 ; 0FCC33/B911
END_LOOP ; 0FCC35/02
ADD_ANIM #-16,WAIT #1 ; 0FCC36/B9F0
RTS ; 0FCC38/1C
Animation_Attribute4:
SET_ANIM #48,WAIT #1 ; 0FCC39/3130
START_LOOP #15 ; 0FCC3B/010F
ADD_ANIM #-48,WAIT #1 ; 0FCC3D/B9D0
ADD_ANIM #49,WAIT #1 ; 0FCC3F/B931
END_LOOP ; 0FCC41/02
ADD_ANIM #-48,WAIT #1 ; 0FCC42/B9D0
RTS ; 0FCC44/1C
Animation_Attribute5:
SET_ANIM #32,WAIT #1 ; 0FCC45/3120
START_LOOP #15 ; 0FCC47/010F
ADD_ANIM #-32,WAIT #1 ; 0FCC49/B9E0
ADD_ANIM #33,WAIT #1 ; 0FCC4B/B921
END_LOOP ; 0FCC4D/02
ADD_ANIM #-32,WAIT #1 ; 0FCC4E/B9E0
RTS ; 0FCC50/1C
Animation_Attribute6:
SET_ANIM #16,WAIT #1 ; 0FCC51/3110
START_LOOP #15 ; 0FCC53/010F
ADD_ANIM #-16,WAIT #1 ; 0FCC55/B9F0
ADD_ANIM #17,WAIT #1 ; 0FCC57/B911
END_LOOP ; 0FCC59/02
ADD_ANIM #-16,WAIT #1 ; 0FCC5A/B9F0
RTS ; 0FCC5C/1C
Animation_Attribute7:
SET_ANIM #48,WAIT #1 ; 0FCC5D/3130
START_LOOP #15 ; 0FCC5F/010F
ADD_ANIM #-16,WAIT #1 ; 0FCC61/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCC63/B9F0
ADD_ANIM #33,WAIT #1 ; 0FCC65/B921
END_LOOP ; 0FCC67/02
ADD_ANIM #-16,WAIT #1 ; 0FCC68/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCC6A/B9F0
RTS ; 0FCC6C/1C
Animation_Attribute8:
SET_ANIM #48,WAIT #1 ; 0FCC6D/3130
START_LOOP #15 ; 0FCC6F/010F
ADD_ANIM #-16,WAIT #1 ; 0FCC71/B9F0
ADD_ANIM #-32,WAIT #1 ; 0FCC73/B9E0
ADD_ANIM #49,WAIT #1 ; 0FCC75/B931
END_LOOP ; 0FCC77/02
ADD_ANIM #-16,WAIT #1 ; 0FCC78/B9F0
ADD_ANIM #-32,WAIT #1 ; 0FCC7A/B9E0
RTS ; 0FCC7C/1C
Animation_Attribute9:
SET_ANIM #48,WAIT #1 ; 0FCC7D/3130
START_LOOP #15 ; 0FCC7F/010F
ADD_ANIM #-32,WAIT #1 ; 0FCC81/B9E0
ADD_ANIM #-16,WAIT #1 ; 0FCC83/B9F0
ADD_ANIM #49,WAIT #1 ; 0FCC85/B931
END_LOOP ; 0FCC87/02
ADD_ANIM #-16,WAIT #1 ; 0FCC88/B9F0
ADD_ANIM #-32,WAIT #1 ; 0FCC8A/B9E0
RTS ; 0FCC8C/1C
Animation_Attribute10:
SET_ANIM #32,WAIT #1 ; 0FCC8D/3120
START_LOOP #15 ; 0FCC8F/010F
ADD_ANIM #-16,WAIT #1 ; 0FCC91/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCC93/B9F0
ADD_ANIM #33,WAIT #1 ; 0FCC95/B921
END_LOOP ; 0FCC97/02
ADD_ANIM #-16,WAIT #1 ; 0FCC98/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCC9A/B9F0
RTS ; 0FCC9C/1C
Animation_Attribute11:
SET_ANIM #48,WAIT #1 ; 0FCC9D/3130
START_LOOP #15 ; 0FCC9F/010F
ADD_ANIM #-16,WAIT #1 ; 0FCCA1/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCCA3/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCCA5/B9F0
ADD_ANIM #49,WAIT #1 ; 0FCCA7/B931
END_LOOP ; 0FCCA9/02
ADD_ANIM #-16,WAIT #1 ; 0FCCAA/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCCAC/B9F0
ADD_ANIM #-16,WAIT #1 ; 0FCCAE/B9F0
RTS ; 0FCCB0/1C
Animation_Call_Wind:
SET_ANIM #48,WAIT #2 ; 0FCCB1/3230
JMP Event_Single_Spell_Anim ; 0FCCB3/1A2BCF
Animation_Call_Earth:
SET_ANIM #32,WAIT #2 ; 0FCCB6/3220
JMP Event_Single_Spell_Anim ; 0FCCB8/1A2BCF
Animation_Call_Water:
SET_ANIM #16,WAIT #2 ; 0FCCBB/3210
JMP Event_Single_Spell_Anim ; 0FCCBD/1A2BCF
Animation_Call_Fire:
SET_ANIM #0,WAIT #2 ; 0FCCC0/3200
JMP Event_Single_Spell_Anim ; 0FCCC2/1A2BCF
Animation_Dummied:
RTS ; 0FCCC5/1C
Animation_Swirly:
SET_ANIM #77,WAIT #4 ; 0FCCC6/344D
START_LOOP #7 ; 0FCCC8/0107
INC_ANIM WAIT #4 ; 0FCCCA/AC
END_LOOP ; 0FCCCB/02
SET_ANIM #85,WAIT #5 ; 0FCCCC/3555
INC_ANIM WAIT #5 ; 0FCCCE/AD
INC_ANIM WAIT #5 ; 0FCCCF/AD
INC_ANIM WAIT #5 ; 0FCCD0/AD
INC_ANIM WAIT #6 ; 0FCCD1/AE
INC_ANIM WAIT #6 ; 0FCCD2/AE
INC_ANIM WAIT #7 ; 0FCCD3/AF
INC_ANIM WAIT #7 ; 0FCCD4/AF
RTS ; 0FCCD5/1C
Animation_Effect52:
MOV VAR1,#$0000 ; 0FCCD6/0F010000
ON_TICK CODE_0FCF31 ; 0FCCDA/0931CF0F
WAIT #1 ; 0FCCDE/0601
SET_XPOS #128 ; 0FCCE0/388000
SET_YPOS #128 ; 0FCCE3/408000
SET_ZPOS #0 ; 0FCCE6/E00000
SET_ANIM #64 ; 0FCCE9/3040
WAIT #48 ; 0FCCEB/0630
INC_ANIM WAIT #3 ; 0FCCED/AB
INC_ANIM WAIT #3 ; 0FCCEE/AB
INC_ANIM ; 0FCCEF/A8
WAIT #64 ; 0FCCF0/0640
RTS ; 0FCCF2/1C
Animation_Effect53:
SET_XPOS #128 ; 0FCCF3/388000
SET_YPOS #128 ; 0FCCF6/408000
SET_ZPOS #0 ; 0FCCF9/E00000
SET_ANIM #68 ; 0FCCFC/3044
WAIT #40 ; 0FCCFE/0628
INC_ANIM WAIT #4 ; 0FCD00/AC
INC_ANIM ; 0FCD01/A8
WAIT #40 ; 0FCD02/0628
RTS ; 0FCD04/1C
Animation_Effect54:
MOV VAR1,#$0000 ; 0FCD05/0F010000
MOV VAR2,#$0000 ; 0FCD09/0F020000
ON_TICK Load_Some_Anim_Data ; 0FCD0D/09A5CF0F
WAIT #1 ; 0FCD11/0601
SET_XPOS #128 ; 0FCD13/388000
SET_YPOS #128 ; 0FCD16/408000
SET_ZPOS #0 ; 0FCD19/E00000
SET_ANIM #71 ; 0FCD1C/3047
WAIT #24 ; 0FCD1E/0618
SET_ANIM #73 ; 0FCD20/3049
WAIT #24 ; 0FCD22/0618
DEC_ANIM WAIT #3 ; 0FCD24/B3
DEC_ANIM ; 0FCD25/B0
WAIT #40 ; 0FCD26/0628
RTS ; 0FCD28/1C
Animation_Effect55:
SET_XPOS #128 ; 0FCD29/388000
SET_YPOS #128 ; 0FCD2C/408000
SET_ZPOS #0 ; 0FCD2F/E00000
SET_ANIM #75 ; 0FCD32/304B
WAIT #8 ; 0FCD34/0608
DEC_ANIM ; 0FCD36/B0
WAIT #28 ; 0FCD37/061C
INC_ANIM ; 0FCD39/A8
WAIT #16 ; 0FCD3A/0610
DEC_ANIM ; 0FCD3C/B0
WAIT #16 ; 0FCD3D/0610
INC_ANIM ; 0FCD3F/A8
WAIT #28 ; 0FCD40/061C
DEC_ANIM WAIT #3 ; 0FCD42/B3
SET_ANIM #76 ; 0FCD43/304C
WAIT #40 ; 0FCD45/0628
RTS ; 0FCD47/1C
Animation_Effect56_Cast:
START_LOOP #4 ; 0FCD48/0104
SET_ANIM #93,WAIT #2 ; 0FCD4A/325D
INC_ANIM WAIT #1 ; 0FCD4C/A9
END_LOOP ; 0FCD4D/02
RTS ; 0FCD4E/1C
Animation_Effect57_CallFS:
MOV VAR1,#$0000 ; 0FCD4F/0F010000
MOV.w Attacker,#$0004 ; 0FCD53/1621110400
ASM_CALL Sub_07B9A2 ; 0FCD58/07A2B907
MOV REG,#$0056 ; 0FCD5C/1E5600
ASM_CALL Draw_Spellcast ; 0FCD5F/07408307
MOV REG,#$0056 ; 0FCD63/1E5600
ASM_CALL Spell_casting ; 0FCD66/07B38207
JSR Animation_Effect56_Cast ; 0FCD6A/1B48CD
SET_ANIM #-1,WAIT #2 ; 0FCD6D/32FF
MOV REG,#$0055 ; 0FCD6F/1E5500
ASM_CALL Draw_Spellcast ; 0FCD72/07408307
MOV REG,#$0055 ; 0FCD76/1E5500
ASM_CALL Spell_casting ; 0FCD79/07B38207
JSR Animation_Effect55 ; 0FCD7D/1B29CD
SET_ANIM #-1,WAIT #2 ; 0FCD80/32FF
SET_XPOS #80 ; 0FCD82/385000
SET_YPOS #104 ; 0FCD85/406800
SET_ZPOS #0 ; 0FCD88/E00000
MOV REG,#$000C ; 0FCD8B/1E0C00
ASM_CALL Draw_Spellcast ; 0FCD8E/07408307
MOV REG,#$000C ; 0FCD92/1E0C00
ASM_CALL Spell_casting ; 0FCD95/07B38207
JSR Animation_Flame ; 0FCD99/1B10CC
SET_ANIM #-1,WAIT #2 ; 0FCD9C/32FF
MOV REG,#$0007 ; 0FCD9E/1E0700
ASM_CALL GetAttackAnimation ; 0FCDA1/07E68218 // Get Attack Animation - Takes in an attack animation 0-7 (Sword, Bite, Splash, Claw, Sting, Punch) (6=??) (7=Damaged Star)
ASM_CALL GetSet_SFX_1b ; 0FCDA5/07449C00 // Get/Set Sound Effect
.byte 7 ; 0FCDA9/07
SET_ANIM #95,WAIT #1 ; 0FCDAA/315F
INC_ANIM WAIT #4 ; 0FCDAC/AC
DEC_ANIM WAIT #1 ; 0FCDAD/B1
INC_ANIM WAIT #4 ; 0FCDAE/AC
SET_ANIM #-1,WAIT #1 ; 0FCDAF/31FF
MOV.w Animation_Finish_Timer,#$0032; 0FCDB1/1691103200
SET_XPOS #176 ; 0FCDB6/38B000
SET_YPOS #104 ; 0FCDB9/406800
SET_ZPOS #0 ; 0FCDBC/E00000
MOV REG,#$000C ; 0FCDBF/1E0C00
ASM_CALL Draw_Spellcast ; 0FCDC2/07408307
MOV REG,#$000C ; 0FCDC6/1E0C00
ASM_CALL Spell_casting ; 0FCDC9/07B38207
JSR Animation_Flame ; 0FCDCD/1B10CC
SET_ANIM #-1,WAIT #2 ; 0FCDD0/32FF
MOV REG,#$0007 ; 0FCDD2/1E0700
ASM_CALL GetAttackAnimation ; 0FCDD5/07E68218 // Get Attack Animation - Takes in an attack animation 0-7 (Sword, Bite, Splash, Claw, Sting, Punch) (6=??) (7=Damaged Star)
ASM_CALL GetSet_SFX_1b ; 0FCDD9/07449C00 // Get/Set Sound Effect
.byte 7 ; 0FCDDD/07
SET_ANIM #95,WAIT #1 ; 0FCDDE/315F
INC_ANIM WAIT #4 ; 0FCDE0/AC
DEC_ANIM WAIT #1 ; 0FCDE1/B1
INC_ANIM WAIT #4 ; 0FCDE2/AC
MOV.w Animation_Finish_Timer,#$0033; 0FCDE3/1691103300
RTS ; 0FCDE8/1C
Animation_Effect58_Teefa_Par:
MOV VAR1,#$0000 ; 0FCDE9/0F010000
MOV.w Attacker,#$0004 ; 0FCDED/1621110400
ASM_CALL Sub_07B9A2 ; 0FCDF2/07A2B907
MOV REG,#$0056 ; 0FCDF6/1E5600
ASM_CALL Draw_Spellcast ; 0FCDF9/07408307
MOV REG,#$0056 ; 0FCDFD/1E5600
ASM_CALL Spell_casting ; 0FCE00/07B38207
JSR Animation_Effect56_Cast ; 0FCE04/1B48CD
SET_ANIM #-1,WAIT #2 ; 0FCE07/32FF
SET_XPOS #84 ; 0FCE09/385400
SET_YPOS #104 ; 0FCE0C/406800
SET_ZPOS #0 ; 0FCE0F/E00000
MOV REG,#$0028 ; 0FCE12/1E2800
ASM_CALL Draw_Spellcast ; 0FCE15/07408307
MOV REG,#$0028 ; 0FCE19/1E2800
ASM_CALL Spell_casting ; 0FCE1C/07B38207
JSR Animation_Swirly ; 0FCE20/1BC6CC
SET_ANIM #-1,WAIT #2 ; 0FCE23/32FF
MOV REG,#$0007 ; 0FCE25/1E0700
ASM_CALL GetAttackAnimation ; 0FCE28/07E68218 // Get Attack Animation - Takes in an attack animation 0-7 (Sword, Bite, Splash, Claw, Sting, Punch) (6=??) (7=Damaged Star)
ASM_CALL GetSet_SFX_1b ; 0FCE2C/07449C00 // Get/Set Sound Effect
.byte 7 ; 0FCE30/07
SET_ANIM #95,WAIT #1 ; 0FCE31/315F
INC_ANIM WAIT #4 ; 0FCE33/AC
DEC_ANIM WAIT #1 ; 0FCE34/B1
INC_ANIM WAIT #4 ; 0FCE35/AC
SET_ANIM #-1,WAIT #1 ; 0FCE36/31FF
MOV.w Animation_Finish_Timer,#$0003; 0FCE38/1691100300
SET_XPOS #172 ; 0FCE3D/38AC00
SET_YPOS #104 ; 0FCE40/406800
SET_ZPOS #0 ; 0FCE43/E00000
MOV REG,#$0028 ; 0FCE46/1E2800
ASM_CALL Draw_Spellcast ; 0FCE49/07408307
MOV REG,#$0028 ; 0FCE4D/1E2800
ASM_CALL Spell_casting ; 0FCE50/07B38207
JSR Animation_Swirly ; 0FCE54/1BC6CC
SET_ANIM #-1,WAIT #2 ; 0FCE57/32FF
MOV REG,#$0007 ; 0FCE59/1E0700
ASM_CALL GetAttackAnimation ; 0FCE5C/07E68218 // Get Attack Animation - Takes in an attack animation 0-7 (Sword, Bite, Splash, Claw, Sting, Punch) (6=??) (7=Damaged Star)
ASM_CALL GetSet_SFX_1b ; 0FCE60/07449C00 // Get/Set Sound Effect
.byte 7 ; 0FCE64/07
SET_ANIM #95,WAIT #1 ; 0FCE65/315F
INC_ANIM WAIT #4 ; 0FCE67/AC
DEC_ANIM WAIT #1 ; 0FCE68/B1
INC_ANIM WAIT #4 ; 0FCE69/AC
MOV.w Animation_Finish_Timer,#$0004; 0FCE6A/1691100400
RTS ; 0FCE6F/1C
Animation_CallAmulet_Fail:
SET_ANIM #97,WAIT #2 ; 0FCE70/3261
JMP Event_Single_Spell_Anim ; 0FCE72/1A2BCF
Animation_Unknown_Dummy:
RTS ; 0FCE75/1C
Animation_Effect5B_Bird:
SET_XPOS #128 ; 0FCE76/388000
SET_YPOS #128 ; 0FCE79/408000
SET_ZPOS #0 ; 0FCE7C/E00000
SET_ANIM #113 ; 0FCE7F/3071
WAIT #32 ; 0FCE81/0620
START_LOOP #4 ; 0FCE83/0104
SET_ANIM #114,WAIT #5 ; 0FCE85/3572
INC_ANIM WAIT #5 ; 0FCE87/AD
END_LOOP ; 0FCE88/02
SET_ANIM #116,WAIT #5 ; 0FCE89/3574
INC_ANIM ; 0FCE8B/A8
WAIT #24 ; 0FCE8C/0618
RTS ; 0FCE8E/1C
Animation_Effect5C_Bird_Fail:
SET_XPOS #128 ; 0FCE8F/388000
SET_YPOS #128 ; 0FCE92/408000
SET_ZPOS #0 ; 0FCE95/E00000
SET_ANIM #113 ; 0FCE98/3071
WAIT #16 ; 0FCE9A/0610
START_LOOP #4 ; 0FCE9C/0104
SET_ANIM #114,WAIT #5 ; 0FCE9E/3572
INC_ANIM WAIT #5 ; 0FCEA0/AD
END_LOOP ; 0FCEA1/02
START_LOOP #3 ; 0FCEA2/0103
SET_ANIM #118 ; 0FCEA4/3076
WAIT #16 ; 0FCEA6/0610
INC_ANIM ; 0FCEA8/A8
WAIT #16 ; 0FCEA9/0610
END_LOOP ; 0FCEAB/02
SET_ANIM #118 ; 0FCEAC/3076
WAIT #16 ; 0FCEAE/0610
SET_ANIM #121,WAIT #2 ; 0FCEB0/3279
START_LOOP #6 ; 0FCEB2/0106
INC_ANIM WAIT #2 ; 0FCEB4/AA
END_LOOP ; 0FCEB5/02
SET_ANIM #120,WAIT #6 ; 0FCEB6/3678
RTS ; 0FCEB8/1C
Animation_Effect5D_Rooks_Unpet:
MOV VAR1,#$0000 ; 0FCEB9/0F010000
MOV.w Attacker,#$0000 ; 0FCEBD/1621110000
ASM_CALL Sub_07B9A2 ; 0FCEC2/07A2B907
MOV REG,#$0056 ; 0FCEC6/1E5600
ASM_CALL Draw_Spellcast ; 0FCEC9/07408307
MOV REG,#$0056 ; 0FCECD/1E5600
ASM_CALL Spell_casting ; 0FCED0/07B38207
JSR Animation_Effect56_Cast ; 0FCED4/1B48CD
SET_ANIM #-1,WAIT #2 ; 0FCED7/32FF
SET_XPOS #152 ; 0FCED9/389800
SET_YPOS #112 ; 0FCEDC/407000
SET_ZPOS #0 ; 0FCEDF/E00000
MOV REG,#$004B ; 0FCEE2/1E4B00
ASM_CALL Draw_Spellcast ; 0FCEE5/07408307
MOV REG,#$004B ; 0FCEE9/1E4B00
ASM_CALL Spell_casting ; 0FCEEC/07B38207
JSR Animation_Swirly ; 0FCEF0/1BC6CC
SET_ANIM #-1,WAIT #2 ; 0FCEF3/32FF
MOV.w Animation_Finish_Timer,#$0001; 0FCEF5/1691100100
ASM_CALL GetSet_SFX_1b ; 0FCEFA/07449C00 // Get/Set Sound Effect
.byte 31 ; 0FCEFE/1F
RTS ; 0FCEFF/1C
Animation_Effect5E_Ariel_Attr11:
MOV REG,#$0056 ; 0FCF00/1E5600
ASM_CALL Spell_casting ; 0FCF03/07B38207
WAIT #12 ; 0FCF07/060C
SET_XPOS #128 ; 0FCF09/388000
SET_YPOS #112 ; 0FCF0C/407000
SET_ZPOS #0 ; 0FCF0F/E00000
MOV REG,#$0017 ; 0FCF12/1E1700
ASM_CALL Draw_Spellcast ; 0FCF15/07408307
MOV REG,#$0017 ; 0FCF19/1E1700
ASM_CALL Spell_casting ; 0FCF1C/07B38207
JSR Animation_Attribute11 ; 0FCF20/1B9DCC
SET_ANIM #-1,WAIT #2 ; 0FCF23/32FF
MOV.w Animation_Finish_Timer,#$0001; 0FCF25/1691100100
RTS ; 0FCF2A/1C
Event_Single_Spell_Anim:
START_LOOP #15 ; 0FCF2B/010F
INC_ANIM WAIT #2 ; 0FCF2D/AA
END_LOOP ; 0FCF2E/02
RTS ; 0FCF2F/1C
Spell_Out_Of_Range:
RTS ; 0FCF30/1C
$17804D - Event 14: Opening movie
Event_Main_14_OPENING:
MOV REG,VAR0 ; 17804D/2400
MULTI_JMP #2 ; 17804F/1102
.word DATA8_178055 ; 178051/5580
.word Event_Title_Screen ; 178053/8D82
DATA8_178055:
JSR Buncha_display_shit ; 178055/1B8E91
ASM_CALL Display_Force_Blanking_far ; 178058/07778100 // Display Force Blanking
ASM_CALL Read_BGmode_1b ; 17805C/07699D00 // Read Background mode
.byte 1 ; 178060/01
ASM_CALL Set_Sprite_mode_4b ; 178061/07939D00 // Set Sprite mode - [A] [X] [OBJ size]
.byte $00 ; 178065/00
.word $6000 ; 178066/0060
.byte $00 ; 178068/00
ASM_CALL Display_brancher_6b ; 178069/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $02 ; 17806D/02
.byte $00 ; 17806E/00
.word $5000 ; 17806F/0050
.word $0C00 ; 178071/000C
ASM_CALL MainScr_Remove_1b ; 178073/07B69D00 // Main Screen remove
.byte $1F ; 178077/1F
ASM_CALL MainScr_Add_1b ; 178078/07A89D00 // Main Screen add
.byte $14 ; 17807C/14
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 17807D/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_178FF0 ; 178081/F08F17
.byte $00 ; 178084/00
.word 8 ; 178085/0800
ASM_CALL Text_Init_3b_1b ; 178087/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_178124 ; 17808B/248117
.byte 0 ; 17808E/00
ASM_CALL Text_Init_3b_1b ; 17808F/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_179073 ; 178093/739017
.byte 1 ; 178096/01
ASM_CALL Decomp80_setup_3b ; 178097/07F99C00 // Decomp80 setup
.long Compressed_data_7 ; 17809B/4F8A01
ASM_CALL Do_Stuff_far ; 17809E/07A8A000 // Do Stuff
ASM_CALL Load_Event_Text ; 1780A2/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Text_Clear_178129 ; 1780A6/298117
.byte $00 ; 1780A9/00
WAIT #5 ; 1780AA/0605
ASM_CALL Decomp80_setup_3b ; 1780AC/07F99C00 // Decomp80 setup
.long RLE_Loc_17811B ; 1780B0/1B8117
MOV.w $0522,#$0000 ; 1780B3/1622050000
SET_XPOS #200 ; 1780B8/38C800
SET_YPOS #160 ; 1780BB/40A000
SET_ANIM #1 ; 1780BE/3001
MOV VAR0,#$0001 ; 1780C0/0F000100
WAIT #1 ; 1780C4/0601
ASM_CALL Set_Display_far ; 1780C6/078B8100 // Set Display
START_LOOP #16 ; 1780CA/0110
ASM_CALL Unfade ; 1780CC/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #1 ; 1780D0/0601
END_LOOP ; 1780D2/02
ON_TICK A_press_intro_crawl ; 1780D3/096D8217
ASM_CALL Load_Event_Text ; 1780D7/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Opening_crawl ; 1780DB/2B8117
.byte $00 ; 1780DE/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 1780DF/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 1780E3/9110
.word 255 ; 1780E5/FF00
SET_ANIM #-1 ; 1780E7/30FF
MOV VAR0,#$FFFF ; 1780E9/0F00FFFF
ASM_CALL Load_Event_Text ; 1780ED/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Opening_crawl2 ; 1780F1/2B8217
.byte $00 ; 1780F4/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 1780F5/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 1780F9/9110
.word 255 ; 1780FB/FF00
WAIT #240 ; 1780FD/06F0
ASM_CALL Sub_178283 ; 1780FF/07838217
START_LOOP #16 ; 178103/0110
ASM_CALL Fade ; 178105/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #4 ; 178109/0604
END_LOOP ; 17810B/02
SET_ANIM #-1,WAIT #1 ; 17810C/31FF
ASM_CALL Load_Event_Text ; 17810E/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Text_Clear_178129 ; 178112/298117
.byte $00 ; 178115/00
WAIT #5 ; 178116/0605
JMP Event_Title_Screen ; 178118/1A8D82
$17828D - Sub: Title Screen + Stage Select
Event_Title_Screen:
MOV.w Stage_select_count,#$0000 ; 17828D/16D5180000
ASM_CALL Display_Force_Blanking_far ; 178292/07778100 // Display Force Blanking
JSL Code_00D0A9 ; 178296/04A9D000
ASM_CALL Sub_009DEA_4b ; 17829A/07EA9D00 // Some subroutine at 0189AF
.byte 0 ; 17829E/00
.byte 0 ; 17829F/00
.byte 0 ; 1782A0/00
.byte 0 ; 1782A1/00
ASM_CALL Read_BGmode_1b ; 1782A2/07699D00 // Read Background mode
.byte 1 ; 1782A6/01
ASM_CALL Display_brancher_6b ; 1782A7/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $00 ; 1782AB/00
.byte $00 ; 1782AC/00
.word $1000 ; 1782AD/0010
.word $0000 ; 1782AF/0000
ASM_CALL Display_brancher_6b ; 1782B1/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 1782B5/01
.byte $01 ; 1782B6/01
.word $3000 ; 1782B7/0030
.word $0400 ; 1782B9/0004
ASM_CALL Set_Sprite_mode_4b ; 1782BB/07939D00 // Set Sprite mode - [A] [X] [OBJ size]
.byte $00 ; 1782BF/00
.word $6000 ; 1782C0/0060
.byte $00 ; 1782C2/00
ASM_CALL Decomp80_setup_3b ; 1782C3/07F99C00 // Decomp80 setup
.long RLE_Loc_TitleScreen ; 1782C7/879D17
ASM_CALL MainScr_Remove_1b ; 1782CA/07B69D00 // Main Screen remove
.byte $1F ; 1782CE/1F
ASM_CALL MainScr_Add_1b ; 1782CF/07A89D00 // Main Screen add
.byte $13 ; 1782D3/13
ASM_CALL Mosaic_Clear_1b ; 1782D4/078A9E00 // Mosaic Clear
.byte $0F ; 1782D8/0F
BGH_DISP #1,#$0000 ; 1782D9/78010000
SET_XPOS #128 ; 1782DD/388000
SET_YPOS #74 ; 1782E0/404A00
SET_ANIM #0 ; 1782E3/3000
ASM_CALL Set_Display_far ; 1782E5/078B8100 // Set Display
START_LOOP #16 ; 1782E9/0110
ASM_CALL Unfade ; 1782EB/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #2 ; 1782EF/0602
END_LOOP ; 1782F1/02
ASM_CALL Sound_byte_1b ; 1782F2/070A9C00 // Sound byte
.byte $FF ; 1782F6/FF
Title_Screen_theme:
ASM_CALL GetSet_Music_1b ; 1782F7/073C9C00 // Get/Set Music
.byte 53 ; 1782FB/35
DATA8_1782FC:
MOV.w Temp_Is_Continuing,#$0000 ; 1782FC/16CB180000
MOV REG,#$0000 ; 178301/1E0000
MOV VAR0,REG ; 178304/2300
MOV.w $18D1,#$0000 ; 178306/16D1180000
START_LOOP #6 ; 17830B/0106
WAIT #1 ; 17830D/0601
ASM_CALL Sub_00CD55_Slow_Ass_Function; 17830F/0755CD00
END_LOOP ; 178313/02
WAIT #1 ; 178314/0601
ON_TICK Maybe_stage_select ; 178316/093F8317
HALT ; 17831A/0A
L_17831B:
SET_ANIM #0 ; 17831B/3000
ONTICK NOP ; 17831D/10
MOV REG,Temp_Is_Continuing ; 17831E/1FCB18
JEQ Event_Opening_Story ; 178321/0BD284
JSL Code_Continue_Menu ; 178324/04E4CE00
JEQ DATA8_1782FC ; 178328/0BFC82
START_LOOP #16 ; 17832B/0110
ASM_CALL Fade ; 17832D/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 178331/07199C00 // Sound stuff
.byte $F0 ; 178335/F0
WAIT #1 ; 178336/0601
END_LOOP ; 178338/02
ASM_CALL GetSet_Music_1b ; 178339/073C9C00 // Get/Set Music
.byte 0 ; 17833D/00
END ; 17833E/00
$1784D2 - Sub: Opening + Prologue
Event_Opening_Story:
START_LOOP #16 ; 1784D2/0110
ASM_CALL Fade ; 1784D4/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 1784D8/07199C00 // Sound stuff
.byte $F0 ; 1784DC/F0
WAIT #1 ; 1784DD/0601
END_LOOP ; 1784DF/02
ASM_CALL GetSet_Music_1b ; 1784E0/073C9C00 // Get/Set Music
.byte 0 ; 1784E4/00
ASM_CALL Display_Force_Blanking_far ; 1784E5/07778100 // Display Force Blanking
ASM_CALL Read_BGmode_1b ; 1784E9/07699D00 // Read Background mode
.byte 1 ; 1784ED/01
ASM_CALL Display_brancher_6b ; 1784EE/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $00 ; 1784F2/00
.byte $00 ; 1784F3/00
.word $1000 ; 1784F4/0010
.word $0000 ; 1784F6/0000
ASM_CALL Display_brancher_6b ; 1784F8/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 1784FC/01
.byte $00 ; 1784FD/00
.word $1000 ; 1784FE/0010
.word $0400 ; 178500/0004
ASM_CALL Display_brancher_6b ; 178502/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $02 ; 178506/02
.byte $00 ; 178507/00
.word $5000 ; 178508/0050
.word $0C00 ; 17850A/000C
ASM_CALL Set_Sprite_mode_4b ; 17850C/07939D00 // Set Sprite mode - [A] [X] [OBJ size]
.byte $00 ; 178510/00
.word $6000 ; 178511/0060
.byte $00 ; 178513/00
SET_ANIM #-1 ; 178514/30FF
ASM_CALL Text_Init_3b_1b ; 178516/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_17873F ; 17851A/3F8717
.byte 0 ; 17851D/00
WAIT #5 ; 17851E/0605
ASM_CALL Text_Init_3b_1b ; 178520/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_178744 ; 178524/448717
.byte 0 ; 178527/00
WAIT #5 ; 178528/0605
ASM_CALL Text_Init_3b_1b ; 17852A/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_179073 ; 17852E/739017
.byte 1 ; 178531/01
WAIT #5 ; 178532/0605
ASM_CALL Do_Stuff_far ; 178534/07A8A000 // Do Stuff
WAIT #5 ; 178538/0605
Text_CLS_Before_Intro:
ASM_CALL Load_Event_Text ; 17853A/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Text_Clear_178129 ; 17853E/298117
.byte $01 ; 178541/01
WAIT #5 ; 178542/0605
ASM_CALL Decomp80_setup_3b ; 178544/07F99C00 // Decomp80 setup
.long RLE_Loc_17BBC4 ; 178548/C4BB17
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 17854B/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_178FF0 ; 17854F/F08F17
.byte $00 ; 178552/00
.word 8 ; 178553/0800
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 178555/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_178E70 ; 178559/708E17
.byte $10 ; 17855C/10
.word 128 ; 17855D/8000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 17855F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_178EF0 ; 178563/F08E17
.byte $C0 ; 178566/C0
.word 64 ; 178567/4000
ASM_CALL Decomp80_setup_3b ; 178569/07F99C00 // Decomp80 setup
.long RLE_Loc_17873D ; 17856D/348717
ASM_CALL MainScr_Remove_1b ; 178570/07B69D00 // Main Screen remove
.byte $1F ; 178574/1F
ASM_CALL Mosaic_Clear_1b ; 178575/078A9E00 // Mosaic Clear
.byte $0F ; 178579/0F
ASM_CALL Set_Display_far ; 17857A/078B8100 // Set Display
ASM_CALL GetSet_Music_1b ; 17857E/073C9C00 // Get/Set Music
.byte 54 ; 178582/36
WAIT #1 ; 178583/0601
ASM_CALL HDMA_xfer_6b ; 178585/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $02 ; 178589/02
.byte $00 ; 17858A/00
.byte $2C ; 17858B/2C
.long HDMA_MainScreen_En ; 17858C/5C8B17
ASM_CALL HDMA_xfer_6b ; 17858F/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $03 ; 178593/03
.byte $01 ; 178594/01
.byte $30 ; 178595/30
.long HDMA_178B77 ; 178596/778B17
ASM_CALL Set_RGB_3b ; 178599/07839F00 // Set RGB -2
.byte $1F ; 17859D/1F
.byte $1F ; 17859E/1F
.byte $1F ; 17859F/1F
BGH_DISP #0,#$0000 ; 1785A0/78000000
BGV_DISP #0,#$0000 ; 1785A4/80000000
SET_BGH_VEL #0,#$0600 ; 1785A8/88000006
SET_BGV_VEL #0,#$FC00 ; 1785AC/900000FC
START_LOOP #16 ; 1785B0/0110
ASM_CALL Unfade ; 1785B2/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #2 ; 1785B6/0602
END_LOOP ; 1785B8/02
WAIT #90 ; 1785B9/065A
MOV.w Tbl_Offset,#$0000 ; 1785BB/16B5110000
Code_1785C0:
WAIT #1 ; 1785C0/0601
ASM_CALL Load_Intro_text ; 1785C2/070B8717 // Load Intro Text
DATA8_1785C6:
WAIT #1 ; 1785C6/0601
ASM_CALL Some_1095_check_1b ; 1785C8/074FBA07 // Some pause status check
.byte $00 ; 1785CC/00
JEQ DATA8_1785C6 ; 1785CD/0BC685
WAIT #1 ; 1785D0/0601
MOV REG,Tbl_Offset ; 1785D2/1FB511
MULTI_JMP #7 ; 1785D5/1107
.word Code_1785C0 ; 1785D7/C085
.word DATA8_178687 ; 1785D9/8786
.word DATA8_17868D ; 1785DB/8D86
.word DATA8_178693 ; 1785DD/9386
.word DATA8_178699 ; 1785DF/9986
.word DATA8_1786AB ; 1785E1/AB86
.word DATA8_178705 ; 1785E3/0587
WAIT #100 ; 1785E5/0664
ASM_CALL Set_RGB_3b ; 1785E7/07839F00 // Set RGB -2
.byte $00 ; 1785EB/00
.byte $00 ; 1785EC/00
.byte $00 ; 1785ED/00
START_LOOP #31 ; 1785EE/011F
ASM_CALL Add_RGB_3b ; 1785F0/07E29F00 // Add RGB
.byte $01 ; 1785F4/01
.byte $01 ; 1785F5/01
.byte $01 ; 1785F6/01
WAIT #3 ; 1785F7/0603
END_LOOP ; 1785F9/02
Text_Opening_Clear1:
ASM_CALL Load_Event_Text ; 1785FA/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Text_Clear_178129 ; 1785FE/298117
.byte $00 ; 178601/00
WAIT #1 ; 178602/0601
ASM_CALL Text_Init_3b_1b ; 178604/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_17873F ; 178608/3F8717
.byte 0 ; 17860B/00
ASM_CALL Rem_HDMA_ch_1b ; 17860C/071F9F00 // Remove HDMA channel
.byte $02 ; 178610/02
WAIT #1 ; 178611/0601
ASM_CALL Display_Force_Blanking_far ; 178613/07778100 // Display Force Blanking
ASM_CALL Text_Init_3b_1b ; 178617/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_178749 ; 17861B/498717
.byte 0 ; 17861E/00
ASM_CALL Do_Stuff_far ; 17861F/07A8A000 // Do Stuff
Text_Opening_Clear2:
ASM_CALL Load_Event_Text ; 178623/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Text_Clear_178129 ; 178627/298117
.byte $01 ; 17862A/01
WAIT #15 ; 17862B/060F
ASM_CALL Set_CGADSUB_1b ; 17862D/07709F00 // Set RGB
.byte $04 ; 178631/04
.byte $07 ; 178632/07
.byte $B6 ; 178633/B6
ADD_BGH_VEL #0,#$071F,WAIT #5 ; 178634/9D001F07
INC_ANIM ; 178638/A8
ADD_BGH_VEL #0,#$0704,WAIT #5 ; 178639/9D000407
INC_ANIM WAIT #4 ; 17863D/AC
ADD_BGV_VEL #0,#$8B27 ; 17863E/A000278B
BREAK_EQ $0600 ; 178642/170006
JSL L_818B07 ; 178645/04078B81
END ; 178649/00
L_17864A:
ASM_CALL HDMA_xfer_6b ; 17864A/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $03 ; 17864E/03
.byte $01 ; 17864F/01
.byte $30 ; 178650/30
.long HDMA_178BAB ; 178651/AB8B17
ASM_CALL Set_RGB_3b ; 178654/07839F00 // Set RGB -2
.byte $1F ; 178658/1F
.byte $1F ; 178659/1F
.byte $1F ; 17865A/1F
START_LOOP #31 ; 17865B/011F
ASM_CALL Add_RGB_3b ; 17865D/07E29F00 // Add RGB
.byte $FF ; 178661/FF
.byte $FF ; 178662/FF
.byte $FF ; 178663/FF
WAIT #3 ; 178664/0603
END_LOOP ; 178666/02
WAIT #200 ; 178667/06C8
START_LOOP #16 ; 178669/0110
Fade_to_Chapter_1:
ASM_CALL Fade ; 17866B/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #4 ; 17866F/0604
END_LOOP ; 178671/02
ASM_CALL Rem_HDMA_ch_1b ; 178672/071F9F00 // Remove HDMA channel
.byte $03 ; 178676/03
START_LOOP #128 ; 178677/0180
ASM_CALL Sound_stuff_1b ; 178679/07199C00 // Sound stuff
.byte $FE ; 17867D/FE
WAIT #1 ; 17867E/0601
END_LOOP ; 178680/02
ASM_CALL GetSet_Music_1b ; 178681/073C9C00 // Get/Set Music
.byte 0 ; 178685/00
END ; 178686/00
DATA8_178687:
TASK Event_178BAF ; 178687/08AF8B
JMP Code_1785C0 ; 17868A/1AC085
DATA8_17868D:
TASK Code_178BEF ; 17868D/08EF8B
JMP Code_1785C0 ; 178690/1AC085
DATA8_178693:
TASK Code_178C17 ; 178693/08178C
JMP Code_1785C0 ; 178696/1AC085
DATA8_178699:
UNK_TASK #1 ; 178699/1401
START_LOOP #16 ; 17869B/0110
Fade_from_Intro_crawl1:
ASM_CALL Fade ; 17869D/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #4 ; 1786A1/0604
END_LOOP ; 1786A3/02
ZERO_BG_VEL #$00 ; 1786A4/D800
WAIT #100 ; 1786A6/0664
JMP Code_1785C0 ; 1786A8/1AC085
DATA8_1786AB:
ASM_CALL Rem_HDMA_ch_1b ; 1786AB/071F9F00 // Remove HDMA channel
.byte $02 ; 1786AF/02
ASM_CALL Rem_HDMA_ch_1b ; 1786B0/071F9F00 // Remove HDMA channel
.byte $03 ; 1786B4/03
WAIT #1 ; 1786B5/0601
ASM_CALL Display_Force_Blanking_far ; 1786B7/07778100 // Display Force Blanking
ASM_CALL Decomp80_setup_3b ; 1786BB/07F99C00 // Decomp80 setup
.long RLE_loc_Intro_Galneon1 ; 1786BF/E5BB17
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1786C2/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_178F30 ; 1786C6/308F17
.byte $20 ; 1786C9/20
.word 64 ; 1786CA/4000
ASM_CALL HDMA_xfer_6b ; 1786CC/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $02 ; 1786D0/02
.byte $00 ; 1786D1/00
.byte $2C ; 1786D2/2C
.long HDMA_178B6E ; 1786D3/6E8B17
ASM_CALL HDMA_xfer_6b ; 1786D6/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $03 ; 1786DA/03
.byte $01 ; 1786DB/01
.byte $30 ; 1786DC/30
.long HDMA_178B9E ; 1786DD/9E8B17
ASM_CALL Set_RGB_3b ; 1786E0/07839F00 // Set RGB -2
.byte $1F ; 1786E4/1F
.byte $1F ; 1786E5/1F
.byte $1F ; 1786E6/1F
WAIT #1 ; 1786E7/0601
ASM_CALL Set_Display_far ; 1786E9/078B8100 // Set Display
START_LOOP #16 ; 1786ED/0110
ASM_CALL Unfade ; 1786EF/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #1 ; 1786F3/0601
END_LOOP ; 1786F5/02
START_LOOP #31 ; 1786F6/011F
ASM_CALL Add_RGB_3b ; 1786F8/07E29F00 // Add RGB
.byte $FF ; 1786FC/FF
.byte $FF ; 1786FD/FF
.byte $FF ; 1786FE/FF
WAIT #3 ; 1786FF/0603
END_LOOP ; 178701/02
JMP Code_1785C0 ; 178702/1AC085
DATA8_178705:
TASK DATA8_178C35 ; 178705/08358C
JMP Code_1785C0 ; 178708/1AC085
$178BAF - Sub: Opening movie graphics loading
Event_178BAF:
MOV.w Weather_fx,#$0000 ; 178BAF/16CF180000
DATA8_178BB4:
JSR DATA8_178BBE ; 178BB4/1BBE8B
ASM_CALL Sub_Intro_weather ; 178BB7/07CF8B17 // Sub: Intro Weather-1
JMP DATA8_178BB4 ; 178BBB/1AB48B
DATA8_178BBE:
ASM_CALL Load_Sprite_Setup_12b ; 178BBE/075D9C00 // Load Sprite Setup
.word 21 ; 178BC2/1500
.word 0 ; 178BC4/0000
.word 0 ; 178BC6/0000
.word 0 ; 178BC8/0000
.word 0 ; 178BCA/0000
.word 0 ; 178BCC/0000
RTS ; 178BCE/1C
$178BEF - Event 15: Intro weather; etc
Code_178BEF:
START_LOOP #31 ; 178BEF/011F
ASM_CALL Add_RGB_3b ; 178BF1/07E29F00 // Add RGB
.byte $FF ; 178BF5/FF
.byte $FF ; 178BF6/FF
.byte $FF ; 178BF7/FF
WAIT #3 ; 178BF8/0603
END_LOOP ; 178BFA/02
ASM_CALL HDMA_xfer_6b ; 178BFB/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $02 ; 178BFF/02
.byte $00 ; 178C00/00
.byte $2C ; 178C01/2C
.long HDMA_178B65 ; 178C02/658B17
ASM_CALL HDMA_xfer_6b ; 178C05/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $03 ; 178C09/03
.byte $01 ; 178C0A/01
.byte $30 ; 178C0B/30
.long HDMA_178B84 ; 178C0C/848B17
ASM_CALL Set_RGB_3b ; 178C0F/07839F00 // Set RGB -2
.byte $1F ; 178C13/1F
.byte $1F ; 178C14/1F
.byte $1F ; 178C15/1F
END_TASK ; 178C16/0D
Code_178C17:
START_LOOP #31 ; 178C17/011F
ASM_CALL Add_RGB_3b ; 178C19/07E29F00 // Add RGB
.byte $FF ; 178C1D/FF
.byte $FF ; 178C1E/FF
.byte $FF ; 178C1F/FF
WAIT #3 ; 178C20/0603
END_LOOP ; 178C22/02
ASM_CALL Rem_HDMA_ch_1b ; 178C23/071F9F00 // Remove HDMA channel
.byte $03 ; 178C27/03
ASM_CALL Set_CGADSUB_1b ; 178C28/07709F00 // Set RGB
.byte $02 ; 178C2C/02
.byte $07 ; 178C2D/07
.byte $83 ; 178C2E/83
ADD_BGH_VEL #0,#$0000,WAIT #7 ; 178C2F/9F000000
END ; 178C33/00
L_178C34:
END_TASK ; 178C34/0D
DATA8_178C35:
ZERO_BG_VEL #$01 ; 178C35/D801
SET_BGV_VEL #1,#$0040 ; 178C37/90014000
START_LOOP #48 ; 178C3B/0130
WAIT #8 ; 178C3D/0608
END_LOOP ; 178C3F/02
ZERO_BG_VEL #$01 ; 178C40/D801
END_TASK ; 178C42/0D
Event_Main_15:
WAIT #1 ; 178C43/0601
ASM_CALL Sub_Intro_weather2 ; 178C45/076E8C17 // Sub: Intro Weather-2
JEQ DATA8_178C56 ; 178C49/0B568C
START_LOOP #2 ; 178C4C/0102
SET_ANIM #2,WAIT #5 ; 178C4E/3502
SET_ANIM #4 ; 178C50/3004
WAIT #8 ; 178C52/0608
END_LOOP ; 178C54/02
END ; 178C55/00
DATA8_178C56:
SET_ANIM #2,WAIT #2 ; 178C56/3202
SET_ANIM #4,WAIT #4 ; 178C58/3404
WAIT #8 ; 178C5A/0608
SET_ANIM #2 ; 178C5C/3002
WAIT #9 ; 178C5E/0609
SET_ANIM #4,WAIT #5 ; 178C60/3504
SET_ANIM #-1 ; 178C62/30FF
WAIT #30 ; 178C64/061E
SET_ANIM #1,WAIT #5 ; 178C66/3501
DEC_ANIM WAIT #5 ; 178C68/B5
SET_ANIM #3 ; 178C69/3003
WAIT #9 ; 178C6B/0609
END ; 178C6D/00
$178F70 - Sub: Chapter splash screen
Code_178F70:
JSR DATA8_178F89 ; 178F70/1B898F
ASM_CALL Set_Display_far ; 178F73/078B8100 // Set Display
START_LOOP #16 ; 178F77/0110
ASM_CALL Unfade ; 178F79/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #1 ; 178F7D/0601
END_LOOP ; 178F7F/02
New_chapter:
ASM_CALL GetSet_Music_1b ; 178F80/073C9C00 // Get/Set Music
.byte 56 ; 178F84/38
JSR Game_breaking_FF ; 178F85/1B3890
RTL ; 178F88/05
DATA8_178F89:
ASM_CALL Display_Force_Blanking_far ; 178F89/07778100 // Display Force Blanking
ASM_CALL Read_BGmode_1b ; 178F8D/07699D00 // Read Background mode
.byte 1 ; 178F91/01
ASM_CALL Display_brancher_6b ; 178F92/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 178F96/01
.byte $00 ; 178F97/00
.word $3000 ; 178F98/0030
.word $0400 ; 178F9A/0004
ASM_CALL Display_brancher_6b ; 178F9C/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $02 ; 178FA0/02
.byte $00 ; 178FA1/00
.word $5000 ; 178FA2/0050
.word $0C00 ; 178FA4/000C
ASM_CALL MainScr_Remove_1b ; 178FA6/07B69D00 // Main Screen remove
.byte $1F ; 178FAA/1F
ASM_CALL MainScr_Add_1b ; 178FAB/07A89D00 // Main Screen add
.byte $06 ; 178FAF/06
ASM_CALL Decomp80_setup_3b ; 178FB0/07F99C00 // Decomp80 setup
.long RLE_Loc_Chapter_Splash ; 178FB4/18E617
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 178FB7/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_178FF0 ; 178FBB/F08F17
.byte $00 ; 178FBE/00
.word 8 ; 178FBF/0800
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 178FC1/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_178FF8 ; 178FC5/F88F17
.byte $20 ; 178FC8/20
.word 32 ; 178FC9/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 178FCB/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_179018 ; 178FCF/189017
.byte $30 ; 178FD2/30
.word 32 ; 178FD3/2000
ASM_CALL Text_Init_3b_1b ; 178FD5/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_17906E ; 178FD9/6E9017
.byte 0 ; 178FDC/00
ASM_CALL Text_Init_3b_1b ; 178FDD/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_179073 ; 178FE1/739017
.byte 1 ; 178FE4/01
ASM_CALL Do_Stuff_far ; 178FE5/07A8A000 // Do Stuff
ASM_CALL Chapter_splash_text ; 178FE9/07789017
WAIT #5 ; 178FED/0605
RTS ; 178FEF/1C
$179038 - Sub: Wait to clear chapter splash
Game_breaking_FF:
ASM_CALL Sound_byte_1b ; 179038/070A9C00 // Sound byte
.byte $FF ; 17903C/FF
Chapter_splash:
WAIT #1 ; 17903D/0601
MOV REG,#$0000 ; 17903F/1E0000
ASM_CALL WasBtnPressed_2b ; 179042/070FA000 // Was Button Pressed? - Checks $31 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $1080 ; 179046/8010
JEQ Chapter_splash ; 179048/0B3D90
Clear_the_Chapter_splash:
START_LOOP #16 ; 17904B/0110
ASM_CALL Fade ; 17904D/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 179051/07199C00 // Sound stuff
.byte $F0 ; 179055/F0
WAIT #1 ; 179056/0601
END_LOOP ; 179058/02
ASM_CALL GetSet_Music_1b ; 179059/073C9C00 // Get/Set Music
.byte 0 ; 17905D/00
ASM_CALL Display_Force_Blanking_far ; 17905E/07778100 // Display Force Blanking
ASM_CALL MainScr_Remove_1b ; 179062/07B69D00 // Main Screen remove
.byte $1F ; 179066/1F
MOV.b Main_scr_Winmask,#$00 ; 179067/132E2100
WAIT #1 ; 17906B/0601
RTS ; 17906D/1C
$18849C - Event 16: Treasure Chests
Event_Main_16_TREASURES:
MOV.w Subscreen_On,#$0000 ; 18849C/16EB180000
MOV.w $18ED,#$FFFF ; 1884A1/16ED18FFFF
ON_TICK _18EX_stuff ; 1884A6/09FC8418
SET_XPOS #384 ; 1884AA/388001
ASM_CALL Treasure_Opened_Bool ; 1884AD/07468518 // Treasure Opened?
JEQ DATA8_1884B9 ; 1884B1/0BB984
SET_ANIM #2 ; 1884B4/3002
JMP DATA8_1884BB ; 1884B6/1ABB84
DATA8_1884B9:
SET_ANIM #0 ; 1884B9/3000
DATA8_1884BB:
ASM_CALL Decomp80_setup_3b ; 1884BB/07F99C00 // Decomp80 setup
.long RLE_Loc_18_84E9 ; 1884BF/E98418
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1884C2/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _1884C6_data ; 1884C6/558A18
.byte $90 ; 1884C9/90
.word 32 ; 1884CA/2000
Code_1884CC:
ASM_CALL Sub_18851A ; 1884CC/071A8518
MULTI_JSR #3 ; 1884D0/1203
.word DATA8_1884DD ; 1884D2/DD84
.word DATA8_1884E4 ; 1884D4/E484
.word DATA8_1884E8 ; 1884D6/E884
WAIT #1 ; 1884D8/0601
JMP Code_1884CC ; 1884DA/1ACC84
DATA8_1884DD:
SET_XPOS #128 ; 1884DD/388000
SET_YPOS #120 ; 1884E0/407800
RTS ; 1884E3/1C
DATA8_1884E4:
SET_XPOS #384 ; 1884E4/388001
RTS ; 1884E7/1C
$1884F2 - Sub: Some orphaned treasure chest code
Code_1884F2:
ON_TICK _18EX_stuff ; 1884F2/09FC8418
SET_ANIM #1,WAIT #7 ; 1884F6/3701
INC_ANIM ; 1884F8/A8
JMP Code_1884CC ; 1884F9/1ACC84
$18968B - Event 12: Main Story
Event_Main_12_STORY:
MOV REG,VAR0 ; 18968B/2400
MULTI_JMP #29 ; 18968D/111D
.word ASM_Ch01_start ; 18968F/CC96
.word ASM_Ch1_Teefa ; 189691/9597
.word ASM_Leave_Galia ; 189693/4398
.word ASM_Crystal_Sword ; 189695/5D98
.word ASM_Ch2_Salah ; 189697/02A0
.word ASM_Ch2_The_Man ; 189699/B7A1
.word ASM_Ch2_Darwin_Join ; 18969B/69A3
.word ASM_Ch2_Darwin_leaves ; 18969D/30A4
.word ASM_Reinoll_Event ; 18969F/C3A4
.word ASM_Ch3_Start ; 1896A1/80AA
.word ASM_Ch3_Axs ; 1896A3/D9AB
.word ASM_Ch3_Marid ; 1896A5/16AD
.word ASM_Lava_Room ; 1896A7/51AD
.word ASM_Ch4_Axs ; 1896A9/54B2
.word ASM_Darah ; 1896AB/51B4
.word ASM_Closed_Sesame ; 1896AD/FEB4
.word ASM_Ch4_Salah ; 1896AF/37B5
.word ASM_Open_Sesame ; 1896B1/33B6
.word ASM_Darah_Barah ; 1896B3/53B7
.word ASM_A_Trap ; 1896B5/9DB8
.word ASM_Ch4_Darwin ; 1896B7/43BB
.word ASM_Vs_Teefa ; 1896B9/C4BB
.word ASM_Galneon_Door ; 1896BB/26BD
.word ASM_Ch5_TeefaDarwin ; 1896BD/26C2
.word ASM_Vs_Karul ; 1896BF/73C3
.word ASM_Vs_Galneon ; 1896C1/46C4
.word ASM_Vs_Guardians ; 1896C3/6DC5
.word ASM_Vs_Tiamat ; 1896C5/EDC6
.word ASM_Final_Door ; 1896C7/40C8
HALT ; 1896C9/0A
$1896CC - STORY 00: Ch01 Rooks intro
ASM_Ch01_start:
ASM_CALL Sound_byte_1b ; 1896CC/070A9C00 // Sound byte
.byte $FF ; 1896D0/FF
ASM_CALL GetSet_Music_1b ; 1896D1/073C9C00 // Get/Set Music
.byte 71 ; 1896D5/47
JSR Sub_LoadSomething ; 1896D6/1B4DD4
WAIT #1 ; 1896D9/0601
Text_SCRIPT001:
ASM_CALL Load_Event_Text ; 1896DB/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_001 ; 1896DF/10A00C
.byte $00 ; 1896E2/00
TASK Sub_Some_Town_Anim ; 1896E3/081B97
START_LOOP #16 ; 1896E6/0110
ASM_CALL Unfade ; 1896E8/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 1896EC/0603
END_LOOP ; 1896EE/02
JSR Wait_for_A_press ; 1896EF/1BC3D4
JSR Some_sub ; 1896F2/1B5CD4
ASM_CALL Entering_Town ; 1896F5/0757B303 // Entering Town
ASM_CALL Town_loading ; 1896F9/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 1896FD/07FDB303 // More Town Loading
MOV VAR0,#$0002 ; 189701/0F000200
JSR Sub_FadeIn ; 189705/1B35D4
JSR Sub_Turn_off_sound ; 189708/1BF6D3
ASM_CALL GetSet_Music_1b ; 18970B/073C9C00 // Get/Set Music
.byte 89 ; 18970F/59
MOV.w $1901,#$0000 ; 189710/1601190000
MOV.w Game_State,#$0000 ; 189715/16C1110000
END ; 18971A/00
Sub_Some_Town_Anim:
SET_XPOS #72 ; 18971B/384800
SET_YPOS #124 ; 18971E/407C00
SET_ZPOS #-32768 ; 189721/E00080
DATA8_189724:
WAIT #1 ; 189724/0601
ASM_CALL Ch1_Town ; 189726/07329718 // Ch01 Town
JNE DATA8_189724 ; 18972A/0C2497
INC_ANIM WAIT #4 ; 18972D/AC
DEC_ANIM WAIT #5 ; 18972E/B5
JMP DATA8_189724 ; 18972F/1A2497
$189795 - STORY 01: Ch01 Ariel/Teefa intro
ASM_Ch1_Teefa:
MOV REG,VAR1 ; 189795/2401
MULTI_JMP #2 ; 189797/1102
.word DATA8_189835 ; 189799/3598
.word DATA8_189838 ; 18979B/3898
JSR Sub_LoadSomething ; 18979D/1B4DD4
Text_SCRIPT002:
ASM_CALL Load_Event_Text ; 1897A0/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_002 ; 1897A4/3AA20C
.byte $00 ; 1897A7/00
TASK Sub_Some_Town_Anim ; 1897A8/081B97
ASM_CALL Zero_18FD ; 1897AB/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 1897AF/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc_Ariel ; 1897B3/018014
.word 1024 ; 1897B6/0004
JSR Make_Animation_Loop1 ; 1897B8/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1897BB/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Ariel ; 1897BF/6B8A19
.byte $90 ; 1897C2/90
.word 64 ; 1897C3/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1897C5/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Teefa ; 1897C9/B28A19
.byte $B0 ; 1897CC/B0
.word 64 ; 1897CD/4000
JSR Wait_for_A_press ; 1897CF/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 1897D2/07AE9C00 // Load Sprite
.byte 8 ; 1897D6/08
.byte 36 ; 1897D7/24
.word 18 ; 1897D8/1200
.word 88 ; 1897DA/5800
.word 65500 ; 1897DC/DCFF
.word 1 ; 1897DE/0100
.word 1 ; 1897E0/0100
.word 1 ; 1897E2/0100
Text_SCRIPT003:
ASM_CALL Load_Event_Text ; 1897E4/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_003 ; 1897E8/7AA20C
.byte $00 ; 1897EB/00
JSR Wait_for_A_press ; 1897EC/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 1897EF/07AE9C00 // Load Sprite
.byte 8 ; 1897F3/08
.byte 36 ; 1897F4/24
.word 18 ; 1897F5/1200
.word 88 ; 1897F7/5800
.word 65500 ; 1897F9/DCFF
.word 2 ; 1897FB/0200
.word 1 ; 1897FD/0100
.word 2 ; 1897FF/0200
WAIT #90 ; 189801/065A
Text_SCRIPT004:
ASM_CALL Load_Event_Text ; 189803/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_004 ; 189807/F9A30C
.byte $00 ; 18980A/00
JSR Wait_for_A_press ; 18980B/1BC3D4
Join_TeefaCh01:
ASM_CALL GetSet_Music_1b ; 18980E/073C9C00 // Get/Set Music
.byte 86 ; 189812/56
WAIT #240 ; 189813/06F0
WAIT #200 ; 189815/06C8
ASM_CALL GetSet_Music_1b ; 189817/073C9C00 // Get/Set Music
.byte 89 ; 18981B/59
ASM_CALL Check_Party ; 18981C/07D9D418 // Check party
JSR Teefa_joins ; 189820/1B83D2
MOV.w ShowCompass,#$0001 ; 189823/167B150100
ASM_CALL Transfer_Graphics_3b ; 189828/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 18982C/74B601
MOV.w $1901,#$0000 ; 18982F/1601190000
END ; 189834/00
DATA8_189835:
SET_ANIM #46 ; 189835/302E
HALT ; 189837/0A
DATA8_189838:
SET_ANIM #50 ; 189838/3032
SET_XVEL #-512 ; 18983A/5800FE
WAIT #32 ; 18983D/0620
ZERO_VEL ; 18983F/D0
HALT ; 189840/0A
$189843 - STORY 02: Ch01 Leaving Galia
ASM_Leave_Galia:
MOV.w $1901,#$0000 ; 189843/1601190000
END ; 189848/00
$18985D - STORY 03: Ch01 Crystal Sword room
ASM_Crystal_Sword:
MOV REG,VAR1 ; 18985D/2401
Scenes_Ch1_End:
MULTI_JMP #7 ; 18985F/1107
.word Ch1_End_pt1 ; 189861/4B9C
.word Ch1_End_pt2 ; 189863/0C9E
.word Ch1_End_pt3 ; 189865/219E
.word Ch1_End_pt4 ; 189867/C99D
.word Ch1_End_pt5 ; 189869/969D
.word Ch1_End_pt6 ; 18986B/6D9D
.word Ch1_End_pt7 ; 18986D/419D
ASM_CALL GetSet_SFX_1b ; 18986F/07449C00 // Get/Set Sound Effect
.byte 7 ; 189873/07
JSR Sub_Sting_Flash ; 189874/1B80D4
JSR Sub_LoadSomething ; 189877/1B4DD4
Text_SCRIPT005:
ASM_CALL Load_Event_Text ; 18987A/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_005 ; 18987E/A6A70C
.byte $00 ; 189881/00
TASK Sub_Some_Town_Anim ; 189882/081B97
JSR Wait_for_A_press ; 189885/1BC3D4
Enter_Crystal_Room:
ASM_CALL GetSet_SFX_1b ; 189888/07449C00 // Get/Set Sound Effect
.byte 45 ; 18988C/2D
MOV VAR0,#$0002 ; 18988D/0F000200
JSR SetB6_FadeOut ; 189891/1B16D4
ASM_CALL Display_brancher_6b ; 189894/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 189898/01
.byte $00 ; 189899/00
.word $3000 ; 18989A/0030
.word $0400 ; 18989C/0004
JSR DATA8_18D389 ; 18989E/1B89D3
ASM_CALL Zero_18FD ; 1898A1/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 1898A5/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc_Crystal_Room1 ; 1898A9/128014
.word 1024 ; 1898AC/0004
JSR Make_Animation_Loop1 ; 1898AE/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1898B1/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _1898B5_data ; 1898B5/DB9B18
.byte $20 ; 1898B8/20
.word 32 ; 1898B9/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1898BB/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _1898BF_data ; 1898BF/FB9B18
.byte $E0 ; 1898C2/E0
.word 32 ; 1898C3/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1898C5/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _1898C9_data ; 1898C9/7B9B18
.byte $D0 ; 1898CC/D0
.word 32 ; 1898CD/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1898CF/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 1898D3/9B9B18
.byte $90 ; 1898D6/90
.word 64 ; 1898D7/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1898D9/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _1898DD_data ; 1898DD/BB9B18
.byte $C0 ; 1898E0/C0
.word 32 ; 1898E1/2000
ASM_CALL Load_Sprite_1b_1b_12b ; 1898E3/07AE9C00 // Load Sprite
.byte 8 ; 1898E7/08
.byte 36 ; 1898E8/24
.word 18 ; 1898E9/1200
.word 100 ; 1898EB/6400
.word 65516 ; 1898ED/ECFF
.word 1 ; 1898EF/0100
.word 3 ; 1898F1/0300
.word 2 ; 1898F3/0200
ASM_CALL Load_Sprite_1b_1b_12b ; 1898F5/07AE9C00 // Load Sprite
.byte 8 ; 1898F9/08
.byte 36 ; 1898FA/24
.word 18 ; 1898FB/1200
.word 12 ; 1898FD/0C00
.word 65516 ; 1898FF/ECFF
.word 1 ; 189901/0100
.word 3 ; 189903/0300
.word 3 ; 189905/0300
JSR Sub_Turn_off_sound ; 189907/1BF6D3
ASM_CALL GetSet_Music_1b ; 18990A/073C9C00 // Get/Set Music
.byte 69 ; 18990E/45
JSR Sub_FadeIn ; 18990F/1B35D4
ASM_CALL Load_Sprite_1b_1b_12b ; 189912/07AE9C00 // Load Sprite
.byte 8 ; 189916/08
.byte 36 ; 189917/24
.word 18 ; 189918/1200
.word 128 ; 18991A/8000
.word 64 ; 18991C/4000
.word 2 ; 18991E/0200
.word 3 ; 189920/0300
.word 1 ; 189922/0100
JSR Sub_LoadSomething ; 189924/1B4DD4
Text_SCRIPT006:
ASM_CALL Load_Event_Text ; 189927/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_006 ; 18992B/3BA80C
.byte $00 ; 18992E/00
JSR Wait_for_A_press ; 18992F/1BC3D4
Fake_Battle_Ch1:
JSR Sub_Mock_Battle ; 189932/1BA4D4
Text_SCRIPT007:
ASM_CALL Load_Event_Text ; 189935/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_007 ; 189939/ADA80C
.byte $00 ; 18993C/00
Loop_1091_is_2:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18993D/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189941/9110
.word 2 ; 189943/0200
MOV.w Spell_ID,#$0058 ; 189945/1627115800
ASM_CALL Load_Sprite_Setup_12b ; 18994A/075D9C00 // Load Sprite Setup
.word 17 ; 18994E/1100
.word 0 ; 189950/0000
.word 0 ; 189952/0000
.word 0 ; 189954/0000
.word 0 ; 189956/0000
.word 0 ; 189958/0000
Loop_1091_is_3:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18995A/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18995E/9110
.word 3 ; 189960/0300
WAIT #1 ; 189962/0601
Text_SCRIPT008:
ASM_CALL Load_Event_Text ; 189964/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_008 ; 189968/F8A80C
.byte $00 ; 18996B/00
Loop_1091_is_4:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18996C/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189970/9110
.word 4 ; 189972/0400
WAIT #1 ; 189974/0601
Text_SCRIPT009:
ASM_CALL Load_Event_Text ; 189976/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_009 ; 18997A/16A90C
.byte $00 ; 18997D/00
WAIT #90 ; 18997E/065A
Text_SCRIPT010:
ASM_CALL Load_Event_Text ; 189980/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_010 ; 189984/33A90C
.byte $00 ; 189987/00
ASM_CALL GetSet_Music_1b ; 189988/073C9C00 // Get/Set Music
.byte 85 ; 18998C/55
JSR Wait_for_A_press ; 18998D/1BC3D4
JSR Sub_Turn_off_sound ; 189990/1BF6D3
JSR Sub_Mock_Battle_end ; 189993/1BB1D4
ASM_CALL Load_Event_Text ; 189996/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long MACRO_119 ; 18999A/CBF70C
.byte $00 ; 18999D/00
WAIT #40 ; 18999E/0628
ASM_CALL GetSet_Music_1b ; 1899A0/073C9C00 // Get/Set Music
.byte 66 ; 1899A4/42
ASM_CALL Compressed_Setup_3b_2b ; 1899A5/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc_Trickery_Ch1 ; 1899A9/538014
.word 1024 ; 1899AC/0004
JSR Make_Animation_Loop1 ; 1899AE/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 1899B1/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Teefa ; 1899B5/B28A19
.byte $B0 ; 1899B8/B0
.word 64 ; 1899B9/4000
JSR Teefa_leaves ; 1899BB/1BA2D2
WAIT #30 ; 1899BE/061E
ASM_CALL Load_Sprite_1b_1b_12b ; 1899C0/07AE9C00 // Load Sprite
.byte 8 ; 1899C4/08
.byte 36 ; 1899C5/24
.word 18 ; 1899C6/1200
.word 104 ; 1899C8/6800
.word 65516 ; 1899CA/ECFF
.word 1 ; 1899CC/0100
.word 3 ; 1899CE/0300
.word 4 ; 1899D0/0400
WAIT #40 ; 1899D2/0628
Text_SCRIPT011:
ASM_CALL Load_Event_Text ; 1899D4/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_011 ; 1899D8/53A90C
.byte $00 ; 1899DB/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 1899DC/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 1899E0/9110
.word 11 ; 1899E2/0B00
MOV VAR0,#$0000 ; 1899E4/0F000000
START_LOOP #4 ; 1899E8/0104
Transfer_Bytes_Weirdly:
ASM_CALL Confusing_RAM_Xfer_3b_4b ; 1899EA/0762A100 // Confusing RAM transfer - [Source], [Destination ($420+2*[val])], [Size], [Comparison value], [0-3: Load from var0 | var1 | var2 | var3]
.long _1899EE_data ; 1899EE/1B9C18
.byte 33 ; 1899F1/21
.byte 6 ; 1899F2/06
.byte 4 ; 1899F3/04
.byte 0 ; 1899F4/00
WAIT #4 ; 1899F5/0604
END_LOOP ; 1899F7/02
Text_SCRIPT012:
ASM_CALL Load_Event_Text ; 1899F8/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_012 ; 1899FC/82A90C
.byte $00 ; 1899FF/00
JSR Wait_for_A_press ; 189A00/1BC3D4
ASM_CALL Compressed_Setup_3b_2b ; 189A03/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc_LetMeExplain_Ch1 ; 189A07/5C8014
.word 1024 ; 189A0A/0004
JSR Make_Animation_Loop1 ; 189A0C/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 189A0F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Ariel ; 189A13/6B8A19
.byte $90 ; 189A16/90
.word 64 ; 189A17/4000
Text_SCRIPT013:
ASM_CALL Load_Event_Text ; 189A19/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_013 ; 189A1D/39AA0C
.byte $00 ; 189A20/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189A21/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189A25/9110
.word 12 ; 189A27/0C00
ASM_CALL Load_Sprite_1b_1b_12b ; 189A29/07AE9C00 // Load Sprite
.byte 8 ; 189A2D/08
.byte 36 ; 189A2E/24
.word 18 ; 189A2F/1200
.word 8 ; 189A31/0800
.word 65516 ; 189A33/ECFF
.word 1 ; 189A35/0100
.word 3 ; 189A37/0300
.word 5 ; 189A39/0500
JSR Wait_for_A_press ; 189A3B/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 189A3E/07AE9C00 // Load Sprite
.byte 8 ; 189A42/08
.byte 36 ; 189A43/24
.word 18 ; 189A44/1200
.word 0 ; 189A46/0000
.word 0 ; 189A48/0000
.word 0 ; 189A4A/0000
.word 3 ; 189A4C/0300
.word 7 ; 189A4E/0700
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189A50/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189A54/9110
.word 100 ; 189A56/6400
JSR Sub_Mock_Battle ; 189A58/1BA4D4
Text_SCRIPT016:
ASM_CALL Load_Event_Text ; 189A5B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_016 ; 189A5F/08AF0C
.byte $00 ; 189A62/00
JSR Wait_for_A_press ; 189A63/1BC3D4
Text_SCRIPT017:
ASM_CALL Load_Event_Text ; 189A66/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_017 ; 189A6A/25AF0C
.byte $00 ; 189A6D/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189A6E/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189A72/9110
.word 20 ; 189A74/1400
Rooks_Paralyzed:
ASM_CALL GetSet_SFX_1b ; 189A76/07449C00 // Get/Set Sound Effect
.byte 7 ; 189A7A/07
JSR Sub_Sting_Flash ; 189A7B/1B80D4
JSR Wait_for_A_press ; 189A7E/1BC3D4
Transfer_2_bytes:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 189A81/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Red ; 189A85/8C950D
.byte $02 ; 189A88/02
.word 2 ; 189A89/0200
MOV.w Animation_Finish_Timer,#$0028; 189A8B/1691102800
ASM_CALL Compressed_Setup_3b_2b ; 189A90/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148065 ; 189A94/658014
.word 1024 ; 189A97/0004
JSR Make_Animation_Loop1 ; 189A99/1BB9D4
MOV VAR3,#$0002 ; 189A9C/0F030200
WAIT #60 ; 189AA0/063C
DATA8_189AA2:
ASM_CALL BeatUp_end_check ; 189AA2/07369E18 // Beat up End Check
JNE Finished_Beating_Rooks ; 189AA6/0CCE9A
ASM_CALL ArielTeefa_Attack_Text ; 189AA9/07699E18 // Ariel/Teefa Attack Text
WAIT #20 ; 189AAD/0614
ASM_CALL GetSet_SFX_1b ; 189AAF/07449C00 // Get/Set Sound Effect
.byte 1 ; 189AB3/01
WAIT #60 ; 189AB4/063C
ASM_CALL Beaten_Up_Attack ; 189AB6/07309F18 // Beaten Up Attack
MOV REG,VAR2 ; 189ABA/2402
JEQ DATA8_189AC9 ; 189ABC/0BC99A
WAIT #60 ; 189ABF/063C
ASM_CALL Load_Event_Text ; 189AC1/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long Wind_Spirit_break ; 189AC5/139F18
.byte $00 ; 189AC8/00
DATA8_189AC9:
WAIT #60 ; 189AC9/063C
JMP DATA8_189AA2 ; 189ACB/1AA29A
Finished_Beating_Rooks:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 189ACE/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 189AD2/8E950D
.byte $02 ; 189AD5/02
.word 2 ; 189AD6/0200
ASM_CALL Compressed_Setup_3b_2b ; 189AD8/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc14_189ADC ; 189ADC/6E8014
.word 1024 ; 189ADF/0004
JSR Make_Animation_Loop1 ; 189AE1/1BB9D4
Text_SCRIPT018:
ASM_CALL Load_Event_Text ; 189AE4/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_018 ; 189AE8/0DB00C
.byte $00 ; 189AEB/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189AEC/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189AF0/9110
.word 41 ; 189AF2/2900
ASM_CALL Load_Sprite_1b_1b_12b ; 189AF4/07AE9C00 // Load Sprite
.byte 8 ; 189AF8/08
.byte 36 ; 189AF9/24
.word 18 ; 189AFA/1200
.word 0 ; 189AFC/0000
.word 0 ; 189AFE/0000
.word 0 ; 189B00/0000
.word 3 ; 189B02/0300
.word 6 ; 189B04/0600
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189B06/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189B0A/9110
.word 42 ; 189B0C/2A00
MOV.w Spell_ID,#$0057 ; 189B0E/1627115700
ASM_CALL Load_Sprite_Setup_12b ; 189B13/075D9C00 // Load Sprite Setup
.word 17 ; 189B17/1100
.word 0 ; 189B19/0000
.word 0 ; 189B1B/0000
.word 0 ; 189B1D/0000
.word 0 ; 189B1F/0000
.word 0 ; 189B21/0000
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189B23/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189B27/9110
.word 50 ; 189B29/3200
Text_SCRIPT019:
ASM_CALL Load_Event_Text ; 189B2B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_019 ; 189B2F/9EB00C
.byte $00 ; 189B32/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189B33/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189B37/9110
.word 51 ; 189B39/3300
Text_SCRIPT020:
ASM_CALL Load_Event_Text ; 189B3B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_020 ; 189B3F/C9B00C
.byte $00 ; 189B42/00
JSR Wait_for_A_press ; 189B43/1BC3D4
Rooks_fainting:
START_LOOP #2 ; 189B46/0102
START_LOOP #10 ; 189B48/010A
ASM_CALL Fade ; 189B4A/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #6 ; 189B4E/0606
END_LOOP ; 189B50/02
START_LOOP #8 ; 189B51/0108
ASM_CALL Unfade ; 189B53/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 189B57/0603
END_LOOP ; 189B59/02
END_LOOP ; 189B5A/02
START_LOOP #16 ; 189B5B/0110
ASM_CALL Fade ; 189B5D/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 189B61/07199C00 // Sound stuff
.byte $F0 ; 189B65/F0
WAIT #6 ; 189B66/0606
END_LOOP ; 189B68/02
ASM_CALL GetSet_Music_1b ; 189B69/073C9C00 // Get/Set Music
.byte 0 ; 189B6D/00
ASM_CALL Check_Party ; 189B6E/07D9D418 // Check party
JSR Sub_Mock_Battle_end ; 189B72/1BB1D4
MOV.w $1901,#$0000 ; 189B75/1601190000
END ; 189B7A/00
$189C4B - Sub: Ch01 end parts 1, 6
Ch1_End_pt1:
TASK DMA_transfer ; 189C4B/089E9C
SET_XPOS #128 ; 189C4E/388000
SET_YPOS #64 ; 189C51/404000
DATA8_189C54:
JSR CrystalSword_anims ; 189C54/1B889C
ASM_CALL RAM_minus_val_2b_2b ; 189C57/076FA000 // (RAM) minus (val)
.word Animation_Finish_Timer ; 189C5B/9110
.word 10 ; 189C5D/0A00
JNE DATA8_189C54 ; 189C5F/0C549C
ASM_CALL GetSet_SFX_1b ; 189C62/07449C00 // Get/Set Sound Effect
.byte 16 ; 189C66/10
SET_YVEL #64 ; 189C67/604000
START_LOOP #2 ; 189C6A/0102
JSR CrystalSword_anims ; 189C6C/1B889C
END_LOOP ; 189C6F/02
ZERO_VEL ; 189C70/D0
JSR CrystalSword_anims ; 189C71/1B889C
DEC_ANIM ; 189C74/B0
SET_XVEL #256 ; 189C75/580001
WAIT #32 ; 189C78/0620
ZERO_VEL ; 189C7A/D0
SET_ANIM #-1 ; 189C7B/30FF
ASM_CALL GetSet_SFX_1b ; 189C7D/07449C00 // Get/Set Sound Effect
.byte 10 ; 189C81/0A
MOV.w Animation_Finish_Timer,#$000B; 189C82/1691100B00
END ; 189C87/00
CrystalSword_anims:
SET_ANIM #86 ; 189C88/3056
WAIT #10 ; 189C8A/060A
INC_ANIM ; 189C8C/A8
WAIT #8 ; 189C8D/0608
INC_ANIM WAIT #6 ; 189C8F/AE
INC_ANIM ; 189C90/A8
WAIT #8 ; 189C91/0608
INC_ANIM ; 189C93/A8
WAIT #10 ; 189C94/060A
DEC_ANIM ; 189C96/B0
WAIT #8 ; 189C97/0608
DEC_ANIM WAIT #6 ; 189C99/B6
DEC_ANIM ; 189C9A/B0
WAIT #8 ; 189C9B/0608
RTS ; 189C9D/1C
DMA_transfer:
ASM_CALL HDMA_xfer_6b ; 189C9E/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $07 ; 189CA2/07
.byte $01 ; 189CA3/01
.byte $26 ; 189CA4/26
.long _189CA5_DMA ; 189CA5/349D18
MOV.b $1893,#$32 ; 189CA8/13931832
WAIT #1 ; 189CAC/0601
ASM_CALL Color_Setup ; 189CAE/077C9F18 // Color Setup
RGB_loop:
ASM_CALL Set_RGB_3b ; 189CB2/07839F00 // Set RGB -2
.byte $00 ; 189CB6/00
.byte $00 ; 189CB7/00
.byte $0E ; 189CB8/0E
WAIT #2 ; 189CB9/0602
ASM_CALL Set_RGB_3b ; 189CBB/07839F00 // Set RGB -2
.byte $00 ; 189CBF/00
.byte $00 ; 189CC0/00
.byte $1F ; 189CC1/1F
WAIT #2 ; 189CC2/0602
ASM_CALL RAM_minus_val_2b_2b ; 189CC4/076FA000 // (RAM) minus (val)
.word Animation_Finish_Timer ; 189CC8/9110
.word 10 ; 189CCA/0A00
JNE RGB_loop ; 189CCC/0CB29C
START_LOOP #10 ; 189CCF/010A
ASM_CALL Set_RGB_3b ; 189CD1/07839F00 // Set RGB -2
.byte $00 ; 189CD5/00
.byte $00 ; 189CD6/00
.byte $10 ; 189CD7/10
WAIT #2 ; 189CD8/0602
ASM_CALL Set_RGB_3b ; 189CDA/07839F00 // Set RGB -2
.byte $00 ; 189CDE/00
.byte $00 ; 189CDF/00
.byte $1A ; 189CE0/1A
WAIT #2 ; 189CE1/0602
END_LOOP ; 189CE3/02
START_LOOP #10 ; 189CE4/010A
ASM_CALL Set_RGB_3b ; 189CE6/07839F00 // Set RGB -2
.byte $00 ; 189CEA/00
.byte $00 ; 189CEB/00
.byte $0C ; 189CEC/0C
WAIT #2 ; 189CED/0602
ASM_CALL Set_RGB_3b ; 189CEF/07839F00 // Set RGB -2
.byte $00 ; 189CF3/00
.byte $00 ; 189CF4/00
.byte $14 ; 189CF5/14
WAIT #2 ; 189CF6/0602
END_LOOP ; 189CF8/02
START_LOOP #10 ; 189CF9/010A
ASM_CALL Set_RGB_3b ; 189CFB/07839F00 // Set RGB -2
.byte $00 ; 189CFF/00
.byte $00 ; 189D00/00
.byte $08 ; 189D01/08
WAIT #2 ; 189D02/0602
ASM_CALL Set_RGB_3b ; 189D04/07839F00 // Set RGB -2
.byte $00 ; 189D08/00
.byte $00 ; 189D09/00
.byte $0E ; 189D0A/0E
WAIT #2 ; 189D0B/0602
END_LOOP ; 189D0D/02
START_LOOP #10 ; 189D0E/010A
ASM_CALL Set_RGB_3b ; 189D10/07839F00 // Set RGB -2
.byte $00 ; 189D14/00
.byte $00 ; 189D15/00
.byte $04 ; 189D16/04
WAIT #2 ; 189D17/0602
ASM_CALL Set_RGB_3b ; 189D19/07839F00 // Set RGB -2
.byte $00 ; 189D1D/00
.byte $00 ; 189D1E/00
.byte $08 ; 189D1F/08
WAIT #2 ; 189D20/0602
END_LOOP ; 189D22/02
ASM_CALL Set_RGB_3b ; 189D23/07839F00 // Set RGB -2
.byte $00 ; 189D27/00
.byte $00 ; 189D28/00
.byte $00 ; 189D29/00
ASM_CALL Rem_HDMA_ch_1b ; 189D2A/071F9F00 // Remove HDMA channel
.byte $07 ; 189D2E/07
ASM_CALL Zero_WinMask_stuff ; 189D2F/07909F18 // Zero Winmask stuff
END_TASK ; 189D33/0D
_189CA5_DMA:
ADD_YVEL #-28306,WAIT #5 ; 189D34/756E91
BGV_DISP #112,#$738F,WAIT #4 ; 189D37/84708F73
SET_BGH_VEL #120,#$FF87,WAIT #4 ; 189D3B/8C7887FF
END ; 189D3F/00
L_189D40:
END ; 189D40/00
Ch1_End_pt7:
MOV VAR0,#$0000 ; 189D41/0F000000
DATA8_189D45:
WAIT #1 ; 189D45/0601
ASM_CALL Get_YN_Answer ; 189D47/079B9F18 // Ariel Yes/No Question
MULTI_JMP #2 ; 189D4B/1102
.word DATA8_189D45 ; 189D4D/459D
.word Text_SCRIPT014 ; 189D4F/5C9D
Text_SCRIPT015:
ASM_CALL Load_Event_Text ; 189D51/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_015 ; 189D55/F1AD0C
.byte $00 ; 189D58/00
JMP DATA8_189D64 ; 189D59/1A649D
Text_SCRIPT014:
ASM_CALL Load_Event_Text ; 189D5C/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_014 ; 189D60/4FAD0C
.byte $00 ; 189D63/00
DATA8_189D64:
JSR Wait_for_A_press ; 189D64/1BC3D4
MOV.w Animation_Finish_Timer,#$0064; 189D67/1691106400
END ; 189D6C/00
Ch1_End_pt6:
ASM_CALL Setup_07AX_vals ; 189D6D/07729D18 // Related to setting slot 3's position (maybe for Teefa leaving the party in Ch 1?)
HALT ; 189D71/0A
$189D96 - Sub: Ch01 end part 5
Ch1_End_pt5:
SET_ANIM #47 ; 189D96/302F
WAIT #1 ; 189D98/0601
ASM_CALL CODE_189DB5 ; 189D9A/07B59D18 // Finish timer checks - Compares $1091 to two values
MULTI_JMP #2 ; 189D9E/1102
.word DATA8_189DA7 ; 189DA0/A79D
.word DATA8_189DF2 ; 189DA2/F29D
JMP Ch1_End_pt5 ; 189DA4/1A969D
DATA8_189DA7:
WAIT #20 ; 189DA7/0614
SET_ANIM #48 ; 189DA9/3030
WAIT #20 ; 189DAB/0614
MOV.w Animation_Finish_Timer,#$0000; 189DAD/1691100000
JMP Ch1_End_pt5 ; 189DB2/1A969D
$189DC9 - Sub: Ch01 end part 4
Ch1_End_pt4:
SET_ANIM #51 ; 189DC9/3033
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189DCB/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189DCF/9110
.word 40 ; 189DD1/2800
DATA8_189DD3:
SET_ANIM #52 ; 189DD3/3034
WAIT #1 ; 189DD5/0601
ASM_CALL Sub_189DF8 ; 189DD7/07F89D18
MULTI_JMP #2 ; 189DDB/1102
.word DATA8_189DE4 ; 189DDD/E49D
.word DATA8_189DF2 ; 189DDF/F29D
JMP DATA8_189DD3 ; 189DE1/1AD39D
DATA8_189DE4:
WAIT #20 ; 189DE4/0614
SET_ANIM #53 ; 189DE6/3035
WAIT #20 ; 189DE8/0614
MOV.w Animation_Finish_Timer,#$0000; 189DEA/1691100000
JMP DATA8_189DD3 ; 189DEF/1AD39D
DATA8_189DF2:
ASM_CALL GetSet_SFX_1b ; 189DF2/07449C00 // Get/Set Sound Effect
.byte 40 ; 189DF6/28
END ; 189DF7/00
$189E0C - Sub: Ch01 end parts 2, 3
Ch1_End_pt2:
SET_ANIM #63 ; 189E0C/303F
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189E0E/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189E12/9110
.word 1 ; 189E14/0100
SET_ANIM #64 ; 189E16/3040
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189E18/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189E1C/9110
.word 4 ; 189E1E/0400
END ; 189E20/00
Ch1_End_pt3:
SET_ANIM #59 ; 189E21/303B
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189E23/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189E27/9110
.word 1 ; 189E29/0100
SET_ANIM #60 ; 189E2B/303C
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 189E2D/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 189E31/9110
.word 3 ; 189E33/0300
END ; 189E35/00
$18A002 - STORY 04: Ch02 Salah/Axs intro
ASM_Ch2_Salah:
MOV REG,VAR1 ; 18A002/2401
MULTI_JMP #2 ; 18A004/1102
.word Event_04_Anim01_Enter_Salah ; 18A006/89A1
.word Event_04_Anim02_Enter_Axs ; 18A008/92A1
MOV.b $1893,#$B6 ; 18A00A/139318B6
ASM_CALL Set_RGB_3b ; 18A00E/07839F00 // Set RGB -2
.byte $1F ; 18A012/1F
.byte $1F ; 18A013/1F
.byte $1F ; 18A014/1F
START_LOOP #16 ; 18A015/0110
ASM_CALL Unfade ; 18A017/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 18A01B/0603
END_LOOP ; 18A01D/02
ASM_CALL Display_brancher_6b ; 18A01E/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18A022/01
.byte $00 ; 18A023/00
.word $3000 ; 18A024/0030
.word $0400 ; 18A026/0004
BGH_DISP #1,#$0000 ; 18A028/78010000
BGV_DISP #1,#$FFF0 ; 18A02C/8001F0FF
ASM_CALL Zero_18FD ; 18A030/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18A034/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148077 ; 18A038/778014
.word 1024 ; 18A03B/0004
JSR Make_Animation_Loop1 ; 18A03D/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18A040/0735A000 // Decompression setup 2
.long _18A044_Decomp_data ; 18A044/51A118
.long $000460 ; 18A047/600400
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A04A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 18A04E/9B9B18
.byte $90 ; 18A051/90
.word 64 ; 18A052/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A054/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C5A4_data ; 18A058/31A118
.byte $D0 ; 18A05B/D0
.word 32 ; 18A05C/2000
ASM_CALL Sound_byte_1b ; 18A05E/070A9C00 // Sound byte
.byte $FF ; 18A062/FF
The_Legend_Ch2_start:
ASM_CALL GetSet_Music_1b ; 18A063/073C9C00 // Get/Set Music
.byte 64 ; 18A067/40
MOV VAR0,#$0002 ; 18A068/0F000200
START_LOOP #2 ; 18A06C/0102
START_LOOP #10 ; 18A06E/010A
ASM_CALL Add_RGB_3b ; 18A070/07E29F00 // Add RGB
.byte $FE ; 18A074/FE
.byte $FE ; 18A075/FE
.byte $FE ; 18A076/FE
WAIT #6 ; 18A077/0606
END_LOOP ; 18A079/02
START_LOOP #6 ; 18A07A/0106
ASM_CALL Add_RGB_3b ; 18A07C/07E29F00 // Add RGB
.byte $02 ; 18A080/02
.byte $02 ; 18A081/02
.byte $02 ; 18A082/02
WAIT #3 ; 18A083/0603
END_LOOP ; 18A085/02
END_LOOP ; 18A086/02
START_LOOP #8 ; 18A087/0108
ASM_CALL Add_RGB_3b ; 18A089/07E29F00 // Add RGB
.byte $FE ; 18A08D/FE
.byte $FE ; 18A08E/FE
.byte $FE ; 18A08F/FE
WAIT #6 ; 18A090/0606
END_LOOP ; 18A092/02
ASM_CALL Set_Win1_3b ; 18A093/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18A097/00
.word $C434 ; 18A098/34C4
ASM_CALL Set_WindowMask_4b ; 18A09A/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18A09E/10
.byte $00 ; 18A09F/00
.byte $00 ; 18A0A0/00
.byte $03 ; 18A0A1/03
ASM_CALL Load_Sprite_1b_1b_12b ; 18A0A2/07AE9C00 // Load Sprite
.byte 8 ; 18A0A6/08
.byte 36 ; 18A0A7/24
.word 18 ; 18A0A8/1200
.word 224 ; 18A0AA/E000
.word 112 ; 18A0AC/7000
.word 1 ; 18A0AE/0100
.word 4 ; 18A0B0/0400
.word 1 ; 18A0B2/0100
WAIT #60 ; 18A0B4/063C
JSR Sub_LoadSomething ; 18A0B6/1B4DD4
Text_SCRIPT021:
ASM_CALL Load_Event_Text ; 18A0B9/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_021 ; 18A0BD/9CB10C
.byte $00 ; 18A0C0/00
TASK Sub_Some_Town_Anim ; 18A0C1/081B97
JSR Wait_for_A_press ; 18A0C4/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18A0C7/07AE9C00 // Load Sprite
.byte 8 ; 18A0CB/08
.byte 36 ; 18A0CC/24
.word 18 ; 18A0CD/1200
.word 136 ; 18A0CF/8800
.word 65524 ; 18A0D1/F4FF
.word 1 ; 18A0D3/0100
.word 4 ; 18A0D5/0400
.word 2 ; 18A0D7/0200
WAIT #60 ; 18A0D9/063C
ASM_CALL Clear_Winmask_Lo ; 18A0DB/0744D518 // Clear window mask lo
Text_SCRIPT022:
ASM_CALL Load_Event_Text ; 18A0DF/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_022 ; 18A0E3/98B20C
.byte $00 ; 18A0E6/00
JSR Wait_for_A_press ; 18A0E7/1BC3D4
Ch2_Salah_joins:
ASM_CALL GetSet_Music_1b ; 18A0EA/073C9C00 // Get/Set Music
.byte 86 ; 18A0EE/56
WAIT #240 ; 18A0EF/06F0
WAIT #200 ; 18A0F1/06C8
ASM_CALL GetSet_Music_1b ; 18A0F3/073C9C00 // Get/Set Music
.byte 89 ; 18A0F7/59
ASM_CALL Check_Party ; 18A0F8/07D9D418 // Check party
JSR Salah_joins ; 18A0FC/1BC1D2
JSR Some_sub ; 18A0FF/1B5CD4
MOV VAR0,#$0002 ; 18A102/0F000200
JSR SetB6_FadeOut ; 18A106/1B16D4
BGV_DISP #1,#$0000 ; 18A109/80010000
ASM_CALL Entering_Town ; 18A10D/0757B303 // Entering Town
MOV.w Town_Direction,#$0300 ; 18A111/167F180003
MOV.w Town_Selection,#$0004 ; 18A116/1681180400
ASM_CALL Town_loading ; 18A11B/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 18A11F/07FDB303 // More Town Loading
JSR Sub_FadeIn ; 18A123/1B35D4
MOV.w $1901,#$0000 ; 18A126/1601190000
MOV.w Game_State,#$0000 ; 18A12B/16C1110000
END ; 18A130/00
$18A189 - Sub: Ch02 start animations (enter Salah/Axs)
Event_04_Anim01_Enter_Salah:
SET_ANIM #66 ; 18A189/3042
SET_XVEL #-1024 ; 18A18B/5800FC
WAIT #32 ; 18A18E/0620
ZERO_VEL ; 18A190/D0
HALT ; 18A191/0A
Event_04_Anim02_Enter_Axs:
SET_ANIM #58 ; 18A192/303A
SET_XVEL #-256 ; 18A194/5800FF
WAIT #48 ; 18A197/0630
ZERO_VEL ; 18A199/D0
HALT ; 18A19A/0A
$18A1B7 - STORY 05: Ch02 Darwin intro
ASM_Ch2_The_Man:
MOV REG,VAR1 ; 18A1B7/2401
MULTI_JMP #3 ; 18A1B9/1103
.word Ch2_Darwin_1 ; 18A1BB/F0A2
.word Ch2_Darwin_2 ; 18A1BD/1EA3
.word Ch2_Darwin_3 ; 18A1BF/35A3
Ch2_Darwin_Start:
MOV.w Animation_Finish_Timer,#$0000; 18A1C1/1691100000
ASM_CALL GetSet_SFX_1b ; 18A1C6/07449C00 // Get/Set Sound Effect
.byte 1 ; 18A1CA/01
WAIT #40 ; 18A1CB/0628
ASM_CALL GetSet_SFX_1b ; 18A1CD/07449C00 // Get/Set Sound Effect
.byte 7 ; 18A1D1/07
WAIT #40 ; 18A1D2/0628
JSR Sub_LoadSomething ; 18A1D4/1B4DD4
Text_SCRIPT023:
ASM_CALL Load_Event_Text ; 18A1D7/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_023 ; 18A1DB/6CB90C
.byte $00 ; 18A1DE/00
TASK Sub_Some_Town_Anim ; 18A1DF/081B97
JSR Wait_for_A_press ; 18A1E2/1BC3D4
ASM_CALL Zero_18FD ; 18A1E5/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
Load_TheMan_Gfx:
ASM_CALL Compressed_Setup_3b_2b ; 18A1E9/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1480A8 ; 18A1ED/A88014
.word 1024 ; 18A1F0/0004
JSR Make_Animation_Loop1 ; 18A1F2/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A1F5/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C72E_data ; 18A1F9/B0A218
.byte $90 ; 18A1FC/90
.word 64 ; 18A1FD/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A1FF/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Gurgeon ; 18A203/7B8219
.byte $D0 ; 18A206/D0
.word 32 ; 18A207/2000
ASM_CALL GetSet_SFX_1b ; 18A209/07449C00 // Get/Set Sound Effect
.byte 25 ; 18A20D/19
WAIT #40 ; 18A20E/0628
ASM_CALL GetSet_SFX_1b ; 18A210/07449C00 // Get/Set Sound Effect
.byte 29 ; 18A214/1D
WAIT #40 ; 18A215/0628
ASM_CALL GetSet_SFX_1b ; 18A217/07449C00 // Get/Set Sound Effect
.byte 7 ; 18A21B/07
WAIT #40 ; 18A21C/0628
MOV REG,#$0003 ; 18A21E/1E0300
JSR Dungeon_loop ; 18A221/1B92D3
ASM_CALL GetSet_Music_1b ; 18A224/073C9C00 // Get/Set Music
.byte 79 ; 18A228/4F
ASM_CALL Load_Sprite_1b_1b_12b ; 18A229/07AE9C00 // Load Sprite
.byte 8 ; 18A22D/08
.byte 36 ; 18A22E/24
.word 18 ; 18A22F/1200
.word 56 ; 18A231/3800
.word 4 ; 18A233/0400
.word 0 ; 18A235/0000
.word 5 ; 18A237/0500
.word 1 ; 18A239/0100
ASM_CALL Load_Sprite_1b_1b_12b ; 18A23B/07AE9C00 // Load Sprite
.byte 8 ; 18A23F/08
.byte 36 ; 18A240/24
.word 18 ; 18A241/1200
.word 24 ; 18A243/1800
.word 65500 ; 18A245/DCFF
.word 1 ; 18A247/0100
.word 5 ; 18A249/0500
.word 2 ; 18A24B/0200
ASM_CALL Load_Sprite_1b_1b_12b ; 18A24D/07AE9C00 // Load Sprite
.byte 8 ; 18A251/08
.byte 36 ; 18A252/24
.word 18 ; 18A253/1200
.word 88 ; 18A255/5800
.word 65500 ; 18A257/DCFF
.word 1 ; 18A259/0100
.word 5 ; 18A25B/0500
.word 3 ; 18A25D/0300
WAIT #120 ; 18A25F/0678
Text_SCRIPT024:
ASM_CALL Load_Event_Text ; 18A261/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_024 ; 18A265/90B90C
.byte $00 ; 18A268/00
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A269/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A26D/9110
.word 1 ; 18A26F/0100
JSR Battle_Poses_On ; 18A271/1BA9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A274/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Yellow ; 18A278/8E950D
.byte $02 ; 18A27B/02
.word 2 ; 18A27C/0200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A27E/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A282/9110
.word 13 ; 18A284/0D00
ASM_CALL GetSet_Music_1b ; 18A286/073C9C00 // Get/Set Music
.byte 85 ; 18A28A/55
JSR Wait_for_A_press ; 18A28B/1BC3D4
JSR Sub_Turn_off_sound ; 18A28E/1BF6D3
JSR Sub_Mock_Battle_end ; 18A291/1BB1D4
ASM_CALL Sub_Default_BGM ; 18A294/0720A503 // Sub: Default Dungeon BGM
Text_SCRIPT025:
ASM_CALL Load_Event_Text ; 18A298/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_025 ; 18A29C/0BBB0C
.byte $00 ; 18A29F/00
JSR Wait_for_A_press ; 18A2A0/1BC3D4
ASM_CALL Check_Party ; 18A2A3/07D9D418 // Check party
JSR Some_sub ; 18A2A7/1B5CD4
MOV.w $1901,#$0000 ; 18A2AA/1601190000
End_TheMan_scene:
END ; 18A2AF/00
$18A2F0 - Sub: Ch02 Darwin animations
Ch2_Darwin_1:
SET_ANIM #73 ; 18A2F0/3049
START_LOOP #2 ; 18A2F2/0102
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A2F4/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A2F8/9110
.word 2 ; 18A2FA/0200
MOV.w Animation_Finish_Timer,#$0000; 18A2FC/1691100000
ASM_CALL GetSet_SFX_1b ; 18A301/07449C00 // Get/Set Sound Effect
.byte 1 ; 18A305/01
SET_ANIM #74 ; 18A306/304A
WAIT #20 ; 18A308/0614
SET_ANIM #73 ; 18A30A/3049
END_LOOP ; 18A30C/02
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A30D/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A311/9110
.word 20 ; 18A313/1400
ADD_YPOS #-16 ; 18A315/50F0FF
SET_ANIM #70 ; 18A318/3046
JSR Wait_for_A_press ; 18A31A/1BC3D4
END ; 18A31D/00
Ch2_Darwin_2:
TASK DATA8_18A343 ; 18A31E/0843A3
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A321/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A325/9110
.word 11 ; 18A327/0B00
Darwin_KOs_Chimera:
UNK_TASK #1 ; 18A329/1401
JSL Sub_Enemy_death_anim ; 18A32B/04248F02
ASM_CALL GetSet_SFX_1b ; 18A32F/07449C00 // Get/Set Sound Effect
.byte 47 ; 18A333/2F
END ; 18A334/00
Ch2_Darwin_3:
TASK DATA8_18A343 ; 18A335/0843A3
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A338/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A33C/9110
.word 12 ; 18A33E/0C00
JMP Darwin_KOs_Chimera ; 18A340/1A29A3
DATA8_18A343:
SET_ANIMPTR Tbl_Tileset_Event21_GURGEON ; 18A343/1D638709
Animation_Loop:
SET_ANIM #6 ; 18A347/3006
WAIT #52 ; 18A349/0634
SET_ANIM #4 ; 18A34B/3004
WAIT #11 ; 18A34D/060B
INC_ANIM ; 18A34F/A8
WAIT #9 ; 18A350/0609
JMP Animation_Loop ; 18A352/1A47A3
$18A369 - STORY 06: Ch02 Darwin joins
ASM_Ch2_Darwin_Join:
MOV REG,VAR1 ; 18A369/2401
MULTI_JMP #2 ; 18A36B/1102
.word Ch2_DarwinJoin_1 ; 18A36D/EDA3
.word Ch2_DarwinJoin_2 ; 18A36F/F0A3
ASM_CALL Zero_18FD ; 18A371/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18A375/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1480A8 ; 18A379/A88014
.word 1024 ; 18A37C/0004
JSR Make_Animation_Loop1 ; 18A37E/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A381/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C72E_data ; 18A385/B0A218
.byte $90 ; 18A388/90
.word 64 ; 18A389/4000
ASM_CALL Load_Sprite_1b_1b_12b ; 18A38B/07AE9C00 // Load Sprite
.byte 8 ; 18A38F/08
.byte 36 ; 18A390/24
.word 18 ; 18A391/1200
.word 128 ; 18A393/8000
.word 112 ; 18A395/7000
.word 0 ; 18A397/0000
.word 6 ; 18A399/0600
.word 1 ; 18A39B/0100
JSR Sub_LoadSomething ; 18A39D/1B4DD4
Text_SCRIPT026:
ASM_CALL Load_Event_Text ; 18A3A0/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_026 ; 18A3A4/38BC0C
.byte $00 ; 18A3A7/00
TASK Sub_Some_Town_Anim ; 18A3A8/081B97
JSR Wait_for_A_press ; 18A3AB/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18A3AE/07AE9C00 // Load Sprite
.byte 8 ; 18A3B2/08
.byte 36 ; 18A3B3/24
.word 18 ; 18A3B4/1200
.word 0 ; 18A3B6/0000
.word 0 ; 18A3B8/0000
.word 0 ; 18A3BA/0000
.word 6 ; 18A3BC/0600
.word 2 ; 18A3BE/0200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A3C0/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A3C4/9110
.word 100 ; 18A3C6/6400
Text_SCRIPT029:
ASM_CALL Load_Event_Text ; 18A3C8/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_029 ; 18A3CC/52BE0C
.byte $00 ; 18A3CF/00
ASM_CALL GetSet_Music_1b ; 18A3D0/073C9C00 // Get/Set Music
.byte 86 ; 18A3D4/56
WAIT #240 ; 18A3D5/06F0
WAIT #200 ; 18A3D7/06C8
ASM_CALL Check_Party ; 18A3D9/07D9D418 // Check party
JSR Darwin_joins ; 18A3DD/1B3DD3
ASM_CALL Sub_Default_BGM ; 18A3E0/0720A503 // Sub: Default Dungeon BGM
JSR Some_sub ; 18A3E4/1B5CD4
MOV.w $1901,#$0000 ; 18A3E7/1601190000
END ; 18A3EC/00
Ch2_DarwinJoin_1:
SET_ANIM #70 ; 18A3ED/3046
HALT ; 18A3EF/0A
Ch2_DarwinJoin_2:
MOV VAR0,#$0000 ; 18A3F0/0F000000
Loop_Ch2_Darwin_YN:
WAIT #1 ; 18A3F4/0601
ASM_CALL Get_YN_Answer ; 18A3F6/079B9F18 // Ariel Yes/No Question
MULTI_JMP #2 ; 18A3FA/1102
.word Loop_Ch2_Darwin_YN ; 18A3FC/F4A3
.word Text_SCRIPT027 ; 18A3FE/0BA4
Text_SCRIPT028:
ASM_CALL Load_Event_Text ; 18A400/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_028 ; 18A404/92BD0C
.byte $00 ; 18A407/00
JMP DATA8_18A413 ; 18A408/1A13A4
Text_SCRIPT027:
ASM_CALL Load_Event_Text ; 18A40B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_027 ; 18A40F/63BD0C
.byte $00 ; 18A412/00
DATA8_18A413:
JSR Wait_for_A_press ; 18A413/1BC3D4
MOV.w Animation_Finish_Timer,#$0064; 18A416/1691106400
END ; 18A41B/00
$18A430 - STORY 07: Ch02 Darwin leaves
ASM_Ch2_Darwin_leaves:
MOV REG,VAR1 ; 18A430/2401
MULTI_JMP #1 ; 18A432/1101
.word Ch2_Darwin_leaves_1 ; 18A434/ACA4
ASM_CALL Zero_18FD ; 18A436/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18A43A/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1480A8 ; 18A43E/A88014
.word 1024 ; 18A441/0004
JSR Make_Animation_Loop1 ; 18A443/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A446/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C72E_data ; 18A44A/B0A218
.byte $90 ; 18A44D/90
.word 64 ; 18A44E/4000
JSR Sub_LoadSomething ; 18A450/1B4DD4
Text_SCRIPT030:
ASM_CALL Load_Event_Text ; 18A453/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_030 ; 18A457/6FBE0C
.byte $00 ; 18A45A/00
JSR Fanfare_and_Refresh_Music ; 18A45B/1B7BD3
Text_SCRIPT031:
ASM_CALL Load_Event_Text ; 18A45E/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_031 ; 18A462/9CBE0C
.byte $00 ; 18A465/00
TASK Sub_Some_Town_Anim ; 18A466/081B97
JSR Wait_for_A_press ; 18A469/1BC3D4
JSR Darwin_leaves ; 18A46C/1B5CD3
WAIT #30 ; 18A46F/061E
ASM_CALL Load_Sprite_1b_1b_12b ; 18A471/07AE9C00 // Load Sprite
.byte 8 ; 18A475/08
.byte 36 ; 18A476/24
.word 18 ; 18A477/1200
.word 56 ; 18A479/3800
.word 65524 ; 18A47B/F4FF
.word 0 ; 18A47D/0000
.word 7 ; 18A47F/0700
.word 1 ; 18A481/0100
WAIT #40 ; 18A483/0628
Text_SCRIPT032:
ASM_CALL Load_Event_Text ; 18A485/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_032 ; 18A489/39BF0C
.byte $00 ; 18A48C/00
JSR Wait_for_A_press ; 18A48D/1BC3D4
Get_Fire_Spirit:
MOV REG,#$0004 ; 18A490/1E0400
ASM_CALL Get_New_Spirit_far ; 18A493/070C8D07
JSR Sub_Turn_off_sound ; 18A497/1BF6D3
ASM_CALL GetSet_Music_1b ; 18A49A/073C9C00 // Get/Set Music
.byte 74 ; 18A49E/4A
JSR Some_sub ; 18A49F/1B5CD4
ASM_CALL Check_Party ; 18A4A2/07D9D418 // Check party
MOV.w $1901,#$0000 ; 18A4A6/1601190000
END ; 18A4AB/00
Ch2_Darwin_leaves_1:
SET_ANIM #70 ; 18A4AC/3046
HALT ; 18A4AE/0A
$18A4C3 - STORY 08: Ch02 Reinoll visit
ASM_Reinoll_Event:
MOV REG,VAR1 ; 18A4C3/2401
MULTI_JMP #5 ; 18A4C5/1105
.word Event_Reinoll1 ; 18A4C7/07AA
.word Event_Reinoll2 ; 18A4C9/0AAA
.word Event_Reinoll3 ; 18A4CB/17AA
.word Event_Reinoll4 ; 18A4CD/24AA
.word Event_Reinoll5 ; 18A4CF/48AA
MOV.w $0420,#$0000 ; 18A4D1/1620040000
MOV VAR0,#$0002 ; 18A4D6/0F000200
JSR DATA8_18D40F ; 18A4DA/1B0FD4
ASM_CALL Clear_Event_1b ; 18A4DD/07DD9C00 // Battle related
.byte $08 ; 18A4E1/08
ASM_CALL Display_brancher_6b ; 18A4E2/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18A4E6/01
.byte $01 ; 18A4E7/01
.word $3000 ; 18A4E8/0030
.word $0400 ; 18A4EA/0004
JSR DATA8_18D389 ; 18A4EC/1B89D3
JSR DATA8_18A7E3 ; 18A4EF/1BE3A7
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A4F2/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A4F6_data ; 18A4F6/39A818
.byte $C0 ; 18A4F9/C0
.word 32 ; 18A4FA/2000
WAIT #40 ; 18A4FC/0628
JSR DATA8_18D42E ; 18A4FE/1B2ED4
JSR Sub_LoadSomething ; 18A501/1B4DD4
Text_SCRIPT033:
ASM_CALL Load_Event_Text ; 18A504/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_033 ; 18A508/C3BF0C
.byte $00 ; 18A50B/00
TASK Sub_Some_Town_Anim ; 18A50C/081B97
JSR Wait_for_A_press ; 18A50F/1BC3D4
JSR Sub_Turn_off_sound ; 18A512/1BF6D3
Reinolls_theme:
ASM_CALL GetSet_Music_1b ; 18A515/073C9C00 // Get/Set Music
.byte 62 ; 18A519/3E
ASM_CALL Load_Sprite_1b_1b_12b ; 18A51A/07AE9C00 // Load Sprite
.byte 8 ; 18A51E/08
.byte 36 ; 18A51F/24
.word 18 ; 18A520/1200
.word 56 ; 18A522/3800
.word 65524 ; 18A524/F4FF
.word 1 ; 18A526/0100
.word 8 ; 18A528/0800
.word 1 ; 18A52A/0100
WAIT #60 ; 18A52C/063C
Text_SCRIPT034:
ASM_CALL Load_Event_Text ; 18A52E/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_034 ; 18A532/0AC00C
.byte $00 ; 18A535/00
JSR Wait_for_A_press ; 18A536/1BC3D4
ASM_CALL Check_Party ; 18A539/07D9D418 // Check party
WAIT #40 ; 18A53D/0628
JSR SetB6_FadeOut ; 18A53F/1B16D4
JSR Unzip_Lots_of_Gfx ; 18A542/1BFEA7
JSR Sub_FadeIn ; 18A545/1B35D4
Text_SCRIPT035:
ASM_CALL Load_Event_Text_NoClear ; 18A548/07D2D418 // Read text opcodes (no clear) - Reads from [addr] to buffer #[var] (0 or 1), does not set $108F Portrait_offset to FFFF
.long SCRIPT_035 ; 18A54C/2EC20C
.byte $00 ; 18A54F/00
JSR Wait_for_A_press ; 18A550/1BC3D4
JSR Sub_Turn_off_sound ; 18A553/1BF6D3
ASM_CALL GetSet_Music_1b ; 18A556/073C9C00 // Get/Set Music
.byte 64 ; 18A55A/40
JSL Sub_Disable_HDMA ; 18A55B/04F18901
WAIT #8 ; 18A55F/0608
ASM_CALL Setup_Reinoll_Scene ; 18A561/0753AA18 // Set up Reinoll Scene
Draw_Spirits_Rei:
ASM_CALL HDMA_xfer_6b ; 18A565/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $07 ; 18A569/07
.byte $01 ; 18A56A/01
.byte $26 ; 18A56B/26
.long _18CA79_DMA ; 18A56C/2CA818
ASM_CALL Color_Add_Select_2b ; 18A56F/073C9F00 // Color Add Select
.word $0233 ; 18A573/3302
MOV VAR0,#$0001 ; 18A575/0F000100
JSR Sub_FadeOut ; 18A579/1B1AD4
Hide_Rooks_and_co:
ASM_CALL Set_WindowMask_4b ; 18A57C/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $05 ; 18A580/05
.byte $03 ; 18A581/03
.byte $03 ; 18A582/03
.byte $30 ; 18A583/30
Load_compressed_data:
ASM_CALL Compressed_Setup_3b_2b ; 18A584/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc_Seven_McGuffins ; 18A588/348114
.word 1024 ; 18A58B/0004
JSR Make_Animation_Loop1 ; 18A58D/1BB9D4
Load_Card_Palette_Data:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A590/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A594_data ; 18A594/27A918
.byte $10 ; 18A597/10
.word 64 ; 18A598/4000
Load_Treasure_Shimmer_Palette:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A59A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A59E_data ; 18A59E/87A918
.byte $F0 ; 18A5A1/F0
.word 32 ; 18A5A2/2000
MOV.w Portrait_offset,#$00FF ; 18A5A4/168F10FF00
SET_XPOS #0 ; 18A5A9/380000
SET_YPOS #0 ; 18A5AC/400000
Load_Four_Cards_Shine:
ASM_CALL Load_Sprite_1b_1b_12b ; 18A5AF/07AE9C00 // Load Sprite
.byte 8 ; 18A5B3/08
.byte 36 ; 18A5B4/24
.word 18 ; 18A5B5/1200
.word 128 ; 18A5B7/8000
.word 115 ; 18A5B9/7300
.word 0 ; 18A5BB/0000
.word 8 ; 18A5BD/0800
.word 2 ; 18A5BF/0200
ASM_CALL Load_Sprite_1b_1b_12b ; 18A5C1/07AE9C00 // Load Sprite
.byte 8 ; 18A5C5/08
.byte 36 ; 18A5C6/24
.word 18 ; 18A5C7/1200
.word 176 ; 18A5C9/B000
.word 83 ; 18A5CB/5300
.word 0 ; 18A5CD/0000
.word 8 ; 18A5CF/0800
.word 2 ; 18A5D1/0200
ASM_CALL Load_Sprite_1b_1b_12b ; 18A5D3/07AE9C00 // Load Sprite
.byte 8 ; 18A5D7/08
.byte 36 ; 18A5D8/24
.word 18 ; 18A5D9/1200
.word 128 ; 18A5DB/8000
.word 43 ; 18A5DD/2B00
.word 0 ; 18A5DF/0000
.word 8 ; 18A5E1/0800
.word 2 ; 18A5E3/0200
ASM_CALL Load_Sprite_1b_1b_12b ; 18A5E5/07AE9C00 // Load Sprite
.byte 8 ; 18A5E9/08
.byte 36 ; 18A5EA/24
.word 18 ; 18A5EB/1200
.word 80 ; 18A5ED/5000
.word 83 ; 18A5EF/5300
.word 0 ; 18A5F1/0000
.word 8 ; 18A5F3/0800
.word 2 ; 18A5F5/0200
WAIT #60 ; 18A5F7/063C
JSR Sub_Shiny_Treasures ; 18A5F9/1B39D4
Text_SCRIPT036:
ASM_CALL Load_Event_Text_NoClear ; 18A5FC/07D2D418 // Read text opcodes (no clear) - Reads from [addr] to buffer #[var] (0 or 1), does not set $108F Portrait_offset to FFFF
.long SCRIPT_036 ; 18A600/61C30C
.byte $00 ; 18A603/00
JSR Wait_for_A_press ; 18A604/1BC3D4
JSR Sub_FadeOut ; 18A607/1B1AD4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A60A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A60E_data ; 18A60E/67A918
.byte $30 ; 18A611/30
.word 32 ; 18A612/2000
BGH_DISP #1,#$0100 ; 18A614/78010001
ASM_CALL Check_Party ; 18A618/07D9D418 // Check party
Load_3_Treasures_Shine:
ASM_CALL Load_Sprite_1b_1b_12b ; 18A61C/07AE9C00 // Load Sprite
.byte 8 ; 18A620/08
.byte 36 ; 18A621/24
.word 18 ; 18A622/1200
.word 72 ; 18A624/4800
.word 87 ; 18A626/5700
.word 0 ; 18A628/0000
.word 8 ; 18A62A/0800
.word 3 ; 18A62C/0300
ASM_CALL Load_Sprite_1b_1b_12b ; 18A62E/07AE9C00 // Load Sprite
.byte 8 ; 18A632/08
.byte 36 ; 18A633/24
.word 18 ; 18A634/1200
.word 128 ; 18A636/8000
.word 87 ; 18A638/5700
.word 0 ; 18A63A/0000
.word 8 ; 18A63C/0800
.word 3 ; 18A63E/0300
ASM_CALL Load_Sprite_1b_1b_12b ; 18A640/07AE9C00 // Load Sprite
.byte 8 ; 18A644/08
.byte 36 ; 18A645/24
.word 18 ; 18A646/1200
.word 184 ; 18A648/B800
.word 87 ; 18A64A/5700
.word 0 ; 18A64C/0000
.word 8 ; 18A64E/0800
.word 3 ; 18A650/0300
JSR Sub_Shiny_Treasures ; 18A652/1B39D4
Text_SCRIPT037:
ASM_CALL Load_Event_Text_NoClear ; 18A655/07D2D418 // Read text opcodes (no clear) - Reads from [addr] to buffer #[var] (0 or 1), does not set $108F Portrait_offset to FFFF
.long SCRIPT_037 ; 18A659/A6C30C
.byte $00 ; 18A65C/00
JSR Wait_for_A_press ; 18A65D/1BC3D4
JSR Sub_FadeOut ; 18A660/1B1AD4
ASM_CALL Check_Party ; 18A663/07D9D418 // Check party
JSR Unzip_Lots_of_Gfx ; 18A667/1BFEA7
BGH_DISP #1,#$0000 ; 18A66A/78010000
ASM_CALL Clear_Winmask_Lo ; 18A66E/0744D518 // Clear window mask lo
JSR Sub_Shiny_Treasures ; 18A672/1B39D4
ASM_CALL Rem_HDMA_ch_1b ; 18A675/071F9F00 // Remove HDMA channel
.byte $07 ; 18A679/07
JSL Sub_Transfer_stuff ; 18A67A/04CD8901
Text_SCRIPT038:
ASM_CALL Load_Event_Text_NoClear ; 18A67E/07D2D418 // Read text opcodes (no clear) - Reads from [addr] to buffer #[var] (0 or 1), does not set $108F Portrait_offset to FFFF
.long SCRIPT_038 ; 18A682/4BC40C
.byte $00 ; 18A685/00
JSR Wait_for_A_press ; 18A686/1BC3D4
TASK DATA8_18A7D8 ; 18A689/08D8A7
Pen_Drop_SFX:
ASM_CALL GetSet_SFX_1b ; 18A68C/07449C00 // Get/Set Sound Effect
.byte 39 ; 18A690/27
WAIT #90 ; 18A691/065A
Text_SCRIPT039:
ASM_CALL Load_Event_Text_NoClear ; 18A693/07D2D418 // Read text opcodes (no clear) - Reads from [addr] to buffer #[var] (0 or 1), does not set $108F Portrait_offset to FFFF
.long SCRIPT_039 ; 18A697/24C60C
.byte $00 ; 18A69A/00
JSR Wait_for_A_press ; 18A69B/1BC3D4
JSR Salah_leaves ; 18A69E/1BE0D2
WAIT #50 ; 18A6A1/0632
Text_SCRIPT040:
ASM_CALL Load_Event_Text_NoClear ; 18A6A3/07D2D418 // Read text opcodes (no clear) - Reads from [addr] to buffer #[var] (0 or 1), does not set $108F Portrait_offset to FFFF
.long SCRIPT_040 ; 18A6A7/6FC60C
.byte $00 ; 18A6AA/00
JSR Wait_for_A_press ; 18A6AB/1BC3D4
UNK_TASK #1 ; 18A6AE/1401
ASM_CALL GetSet_Music_1b ; 18A6B0/073C9C00 // Get/Set Music
.byte 50 ; 18A6B4/32
WAIT #1 ; 18A6B5/0601
ASM_CALL Sound_byte_1b ; 18A6B7/070A9C00 // Sound byte
.byte $FF ; 18A6BB/FF
WAIT #1 ; 18A6BC/0601
ASM_CALL GetSet_Music_1b ; 18A6BE/073C9C00 // Get/Set Music
.byte 70 ; 18A6C2/46
JSR SetB6_FadeOut ; 18A6C3/1B16D4
ASM_CALL Compressed_Setup_3b_2b ; 18A6C6/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long $148103 ; 18A6CA/038114
.word 1024 ; 18A6CD/0004
JSR Make_Animation_Loop1 ; 18A6CF/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18A6D2/0735A000 // Decompression setup 2
.long _18A6D6_decomp_data ; 18A6D6/ECA818
.long $000460 ; 18A6D9/600400
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A6DC/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Ariel ; 18A6E0/6B8A19
.byte $90 ; 18A6E3/90
.word 64 ; 18A6E4/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A6E6/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A6EA_data ; 18A6EA/A7A918
.byte $B0 ; 18A6ED/B0
.word 32 ; 18A6EE/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A6F0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A6F4_data ; 18A6F4/C7A918
.byte $C0 ; 18A6F7/C0
.word 64 ; 18A6F8/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A6FA/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Fighter ; 18A6FE/BF8619
.byte $E0 ; 18A701/E0
.word 32 ; 18A702/2000
MOV.w Portrait_offset,#$00FF ; 18A704/168F10FF00
SET_XPOS #72 ; 18A709/384800
SET_YPOS #124 ; 18A70C/407C00
ASM_CALL Load_Sprite_1b_1b_12b ; 18A70F/07AE9C00 // Load Sprite
.byte 8 ; 18A713/08
.byte 36 ; 18A714/24
.word 18 ; 18A715/1200
.word 24 ; 18A717/1800
.word 65500 ; 18A719/DCFF
.word 10 ; 18A71B/0A00
.word 8 ; 18A71D/0800
.word 4 ; 18A71F/0400
BGV_DISP #1,#$0010 ; 18A721/80011000
JSR Sub_FadeIn ; 18A725/1B35D4
WAIT #60 ; 18A728/063C
MOV.w Animation_Finish_Timer,#$0001; 18A72A/1691100100
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18A72F/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18A733/9110
.word 101 ; 18A735/6500
Text_SCRIPT041:
ASM_CALL Load_Event_Text ; 18A737/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_041 ; 18A73B/08C70C
.byte $00 ; 18A73E/00
JSR Wait_for_A_press ; 18A73F/1BC3D4
ASM_CALL GetSet_SFX_1b ; 18A742/07449C00 // Get/Set Sound Effect
.byte 40 ; 18A746/28
ASM_CALL Check_Party ; 18A747/07D9D418 // Check party
Text_SCRIPT042:
ASM_CALL Load_Event_Text ; 18A74B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_042 ; 18A74F/99C70C
.byte $00 ; 18A752/00
JSR Wait_for_A_press ; 18A753/1BC3D4
JSR SetB6_FadeOut ; 18A756/1B16D4
BGV_DISP #1,#$0000 ; 18A759/80010000
JSR DATA8_18A7E3 ; 18A75D/1BE3A7
ASM_CALL Compressed_Setup_3b_2b ; 18A760/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc_unk04 ; 18A764/558114
.word 1024 ; 18A767/0004
JSR Make_Animation_Loop1 ; 18A769/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A76C/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Zerel ; 18A770/018419
.byte $90 ; 18A773/90
.word 32 ; 18A774/2000
ASM_CALL Load_Sprite_1b_1b_12b ; 18A776/07AE9C00 // Load Sprite
.byte 8 ; 18A77A/08
.byte 36 ; 18A77B/24
.word 18 ; 18A77C/1200
.word 75 ; 18A77E/4B00
.word 65520 ; 18A780/F0FF
.word 1 ; 18A782/0100
.word 8 ; 18A784/0800
.word 5 ; 18A786/0500
JSR Sub_FadeIn ; 18A788/1B35D4
Text_SCRIPT043:
ASM_CALL Load_Event_Text ; 18A78B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_043 ; 18A78F/ADC70C
.byte $00 ; 18A792/00
JSR Wait_for_A_press ; 18A793/1BC3D4
ASM_CALL Check_Party ; 18A796/07D9D418 // Check party
UNK_TASK #1 ; 18A79A/1401
SET_ANIM #-1 ; 18A79C/30FF
MOV.w $18E1,#$0008 ; 18A79E/16E1180800
ASM_Zerel_fight:
ASM_CALL Check_map_tile_value ; 18A7A3/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18A7A7/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18A7AB/1BD4D3
JSR Sub_Event_Battle ; 18A7AE/1BC3D3
JSR Sub_Sauza_2 ; 18A7B1/1BE0D3
WAIT #45 ; 18A7B4/062D
Text_SCRIPT047:
ASM_CALL Load_Event_Text ; 18A7B6/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_047 ; 18A7BA/9AC80C
.byte $00 ; 18A7BD/00
TASK Sub_Some_Town_Anim ; 18A7BE/081B97
JSR Wait_for_A_press ; 18A7C1/1BC3D4
START_LOOP #16 ; 18A7C4/0110
ASM_CALL Fade ; 18A7C6/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 18A7CA/07199C00 // Sound stuff
.byte $F0 ; 18A7CE/F0
WAIT #6 ; 18A7CF/0606
END_LOOP ; 18A7D1/02
MOV.w $1901,#$0000 ; 18A7D2/1601190000
END ; 18A7D7/00
DATA8_18A7D8:
START_LOOP #255 ; 18A7D8/01FF
ASM_CALL Sound_stuff_1b ; 18A7DA/07199C00 // Sound stuff
.byte $FF ; 18A7DE/FF
WAIT #4 ; 18A7DF/0604
END_LOOP ; 18A7E1/02
HALT ; 18A7E2/0A
DATA8_18A7E3:
ASM_CALL Zero_18FD ; 18A7E3/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18A7E7/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long $1480D1 ; 18A7EB/D18014
.word 1024 ; 18A7EE/0004
JSR Make_Animation_Loop1 ; 18A7F0/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18A7F3/0735A000 // Decompression setup 2
.long _18A7F7_decomp_data ; 18A7F7/79A818
.long $000460 ; 18A7FA/600400
RTS ; 18A7FD/1C
Unzip_Lots_of_Gfx:
ASM_CALL Compressed_Setup_3b_2b ; 18A7FE/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1480EA ; 18A802/EA8014
.word 1024 ; 18A805/0004
JSR Make_Animation_Loop1 ; 18A807/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18A80A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A80E_data ; 18A80E/59A818
.byte $C0 ; 18A811/C0
.word 32 ; 18A812/2000
ASM_CALL Decomp_Setup2_3b_3b ; 18A814/0735A000 // Decompression setup 2
.long _18A818_decomp_data ; 18A818/ACA818
.long $000460 ; 18A81B/600400
MOV.w Portrait_offset,#$0019 ; 18A81E/168F101900
SET_XPOS #128 ; 18A823/388000
SET_YPOS #100 ; 18A826/406400
WAIT #60 ; 18A829/063C
RTS ; 18A82B/1C
$18AA07 - Sub: Ch02 Reinoll animations
Event_Reinoll1:
SET_ANIM #75 ; 18AA07/304B
HALT ; 18AA09/0A
Event_Reinoll2:
SET_ANIM #92,WAIT #1 ; 18AA0A/315C
START_LOOP #5 ; 18AA0C/0105
INC_ANIM WAIT #1 ; 18AA0E/A9
END_LOOP ; 18AA0F/02
SET_ANIM #-1 ; 18AA10/30FF
WAIT #50 ; 18AA12/0632
JMP Event_Reinoll2 ; 18AA14/1A0AAA
Event_Reinoll3:
SET_ANIM #99,WAIT #1 ; 18AA17/3163
INC_ANIM WAIT #1 ; 18AA19/A9
INC_ANIM WAIT #2 ; 18AA1A/AA
INC_ANIM WAIT #2 ; 18AA1B/AA
INC_ANIM WAIT #1 ; 18AA1C/A9
SET_ANIM #-1 ; 18AA1D/30FF
WAIT #30 ; 18AA1F/061E
JMP Event_Reinoll3 ; 18AA21/1A17AA
Event_Reinoll4:
SET_ANIM #105 ; 18AA24/3069
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18AA26/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18AA2A/9110
.word 1 ; 18AA2C/0100
ASM_CALL GetSet_SFX_1b ; 18AA2E/07449C00 // Get/Set Sound Effect
.byte 18 ; 18AA32/12
INC_ANIM WAIT #4 ; 18AA33/AC
INC_ANIM WAIT #4 ; 18AA34/AC
INC_ANIM WAIT #4 ; 18AA35/AC
WAIT #10 ; 18AA36/060A
SET_XPOS #125 ; 18AA38/387D00
SET_YPOS #105 ; 18AA3B/406900
SET_ANIM #104 ; 18AA3E/3068
WAIT #60 ; 18AA40/063C
MOV.w Animation_Finish_Timer,#$0065; 18AA42/1691106500
HALT ; 18AA47/0A
Event_Reinoll5:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18AA48/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18AA4C/9110
.word 2 ; 18AA4E/0200
SET_ANIM #76 ; 18AA50/304C
HALT ; 18AA52/0A
$18AA80 - STORY 09: Ch03 Axs's house
ASM_Ch3_Start:
MOV REG,VAR1 ; 18AA80/2401
MULTI_JMP #1 ; 18AA82/1101
.word DATA8_18ABA0 ; 18AA84/A0AB
MOV.b $1893,#$B6 ; 18AA86/139318B6
ASM_CALL Set_RGB_3b ; 18AA8A/07839F00 // Set RGB -2
.byte $1F ; 18AA8E/1F
.byte $1F ; 18AA8F/1F
.byte $1F ; 18AA90/1F
START_LOOP #16 ; 18AA91/0110
ASM_CALL Unfade ; 18AA93/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 18AA97/0603
END_LOOP ; 18AA99/02
ASM_CALL Display_brancher_6b ; 18AA9A/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18AA9E/01
.byte $00 ; 18AA9F/00
.word $3000 ; 18AAA0/0030
.word $0400 ; 18AAA2/0004
ASM_CALL Set_Win1_3b ; 18AAA4/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AAA8/00
.word $C43C ; 18AAA9/3CC4
ASM_CALL Set_WindowMask_4b ; 18AAAB/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18AAAF/10
.byte $00 ; 18AAB0/00
.byte $00 ; 18AAB1/00
.byte $03 ; 18AAB2/03
ASM_CALL Zero_18FD ; 18AAB3/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18AAB7/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_loc_unk05 ; 18AABB/5E8114
.word 1024 ; 18AABE/0004
JSR Make_Animation_Loop1 ; 18AAC0/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18AAC3/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18AAC7_data ; 18AAC7/80AB18
.byte $90 ; 18AACA/90
.word 32 ; 18AACB/2000
ASM_CALL Decomp_Setup2_3b_3b ; 18AACD/0735A000 // Decompression setup 2
.long _18A044_Decomp_data ; 18AAD1/51A118
.long $000460 ; 18AAD4/600400
ASM_CALL Load_Sprite_1b_1b_12b ; 18AAD7/07AE9C00 // Load Sprite
.byte 8 ; 18AADB/08
.byte 36 ; 18AADC/24
.word 18 ; 18AADD/1200
.word 32 ; 18AADF/2000
.word 112 ; 18AAE1/7000
.word 0 ; 18AAE3/0000
.word 9 ; 18AAE5/0900
.word 1 ; 18AAE7/0100
ASM_CALL Sound_byte_1b ; 18AAE9/070A9C00 // Sound byte
.byte $FF ; 18AAED/FF
Axs_House_TheLegend:
ASM_CALL GetSet_Music_1b ; 18AAEE/073C9C00 // Get/Set Music
.byte 64 ; 18AAF2/40
MOV VAR0,#$0002 ; 18AAF3/0F000200
JSR Sub_FadeIn ; 18AAF7/1B35D4
WAIT #60 ; 18AAFA/063C
JSR Sub_LoadSomething ; 18AAFC/1B4DD4
Text_SCRIPT048:
ASM_CALL Load_Event_Text ; 18AAFF/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_048 ; 18AB03/BAC80C
.byte $00 ; 18AB06/00
TASK Sub_Some_Town_Anim ; 18AB07/081B97
JSR Wait_for_A_press ; 18AB0A/1BC3D4
Looking_For_Letter:
SET_BGH_VEL #1,#$FF00 ; 18AB0D/880100FF
WAIT #80 ; 18AB11/0650
ZERO_BG_VEL #$01 ; 18AB13/D801
WAIT #30 ; 18AB15/061E
SET_BGH_VEL #1,#$0100 ; 18AB17/88010001
WAIT #40 ; 18AB1B/0628
ZERO_BG_VEL #$01 ; 18AB1D/D801
Text_SCRIPT049:
ASM_CALL Load_Event_Text ; 18AB1F/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_049 ; 18AB23/0DC90C
.byte $00 ; 18AB26/00
JSR Wait_for_A_press ; 18AB27/1BC3D4
SET_BGH_VEL #1,#$FF00 ; 18AB2A/880100FF
WAIT #40 ; 18AB2E/0628
ZERO_BG_VEL #$01 ; 18AB30/D801
ASM_CALL Clear_Winmask_Lo ; 18AB32/0744D518 // Clear window mask lo
WAIT #20 ; 18AB36/0614
MOV.w Animation_Finish_Timer,#$0001; 18AB38/1691100100
WAIT #40 ; 18AB3D/0628
Text_SCRIPT050:
ASM_CALL Load_Event_Text ; 18AB3F/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_050 ; 18AB43/47C90C
.byte $00 ; 18AB46/00
JSR Wait_for_A_press ; 18AB47/1BC3D4
JSR Some_sub ; 18AB4A/1B5CD4
JSR SetB6_FadeOut ; 18AB4D/1B16D4
ASM_CALL Clear_Winmask_Lo ; 18AB50/0744D518 // Clear window mask lo
ASM_CALL Entering_Town ; 18AB54/0757B303 // Entering Town
MOV.w Town_Direction,#$0300 ; 18AB58/167F180003
MOV.w Town_Selection,#$0004 ; 18AB5D/1681180400
ASM_CALL Town_loading ; 18AB62/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 18AB66/07FDB303 // More Town Loading
JSR Sub_FadeIn ; 18AB6A/1B35D4
JSR Sub_Turn_off_sound ; 18AB6D/1BF6D3
ASM_CALL GetSet_Music_1b ; 18AB70/073C9C00 // Get/Set Music
.byte 89 ; 18AB74/59
MOV.w $1901,#$0000 ; 18AB75/1601190000
MOV.w Game_State,#$0000 ; 18AB7A/16C1110000
END ; 18AB7F/00
$18ABA0 - Sub: Ch03 Axs's house (animation)
DATA8_18ABA0:
SET_ANIM #109 ; 18ABA0/306D
ANIM_2 #$01 ; 18ABA2/2101
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18ABA4/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18ABA8/9110
.word 1 ; 18ABAA/0100
INC_ANIM ; 18ABAC/A8
ANIM_3 ; 18ABAD/22
SET_XPOS #72 ; 18ABAE/384800
SET_YPOS #130 ; 18ABB1/408200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18ABB4/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18ABB8/9110
.word 2 ; 18ABBA/0200
END ; 18ABBC/00
$18ABD9 - STORY 0A: Ch03 Axs is stoned
ASM_Ch3_Axs:
MOV REG,VAR1 ; 18ABD9/2401
MULTI_JMP #1 ; 18ABDB/1101
.word Code_Axs_Stoned_Anim ; 18ABDD/FFAC
ASM_CALL Zero_18FD ; 18ABDF/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18ABE3/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_Loc_Stoned_Axs1 ; 18ABE7/778114
.word 1024 ; 18ABEA/0004
JSR Make_Animation_Loop1 ; 18ABEC/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18ABEF/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 18ABF3/9B9B18
.byte $90 ; 18ABF6/90
.word 64 ; 18ABF7/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18ABF9/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18ABFD_data ; 18ABFD/87AC18
.byte $A5 ; 18AC00/A5
.word 20 ; 18AC01/1400
Draw_Stoned_Axs:
ASM_CALL Load_Sprite_1b_1b_12b ; 18AC03/07AE9C00 // Load Sprite
.byte 8 ; 18AC07/08
.byte 36 ; 18AC08/24
.word 18 ; 18AC09/1200
.word 152 ; 18AC0B/9800
.word 112 ; 18AC0D/7000
.word 0 ; 18AC0F/0000
.word 10 ; 18AC11/0A00
.word 1 ; 18AC13/0100
WAIT #40 ; 18AC15/0628
JSR Sub_LoadSomething ; 18AC17/1B4DD4
Text_SCRIPT051:
ASM_CALL Load_Event_Text ; 18AC1A/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_051 ; 18AC1E/C5C90C
.byte $00 ; 18AC21/00
TASK Sub_Some_Town_Anim ; 18AC22/081B97
JSR Wait_for_A_press ; 18AC25/1BC3D4
MOV.w Spell_ID,#$005D ; 18AC28/1627115D00
ASM_CALL Load_Sprite_Setup_12b ; 18AC2D/075D9C00 // Load Sprite Setup
.word 17 ; 18AC31/1100
.word 0 ; 18AC33/0000
.word 0 ; 18AC35/0000
.word 0 ; 18AC37/0000
.word 0 ; 18AC39/0000
.word 0 ; 18AC3B/0000
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18AC3D/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18AC41/9110
.word 1 ; 18AC43/0100
MOV VAR1,#$0000 ; 18AC45/0F010000
START_LOOP #5 ; 18AC49/0105
ASM_CALL Confusing_RAM_Xfer_3b_4b ; 18AC4B/0762A100 // Confusing RAM transfer - [Source], [Destination ($420+2*[val])], [Size], [Comparison value], [0-3: Load from var0 | var1 | var2 | var3]
.long _18AC4F_data ; 18AC4F/9BAC18
.byte 165 ; 18AC52/A5
.byte 10 ; 18AC53/0A
.byte 5 ; 18AC54/05
.byte 1 ; 18AC55/01
WAIT #16 ; 18AC56/0610
END_LOOP ; 18AC58/02
WAIT #40 ; 18AC59/0628
Text_SCRIPT052:
ASM_CALL Load_Event_Text ; 18AC5B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_052 ; 18AC5F/FFC90C
.byte $00 ; 18AC62/00
JSR Wait_for_A_press ; 18AC63/1BC3D4
ASM_CALL GetSet_Music_1b ; 18AC66/073C9C00 // Get/Set Music
.byte 86 ; 18AC6A/56
WAIT #240 ; 18AC6B/06F0
WAIT #200 ; 18AC6D/06C8
ASM_CALL Check_Party ; 18AC6F/07D9D418 // Check party
ASM_CALL Sub_Default_BGM ; 18AC73/0720A503 // Sub: Default Dungeon BGM
JSR Sub_Axs_joins_Ch3 ; 18AC77/1BFFD2
ASM_CALL Check_Party ; 18AC7A/07D9D418 // Check party
JSR Some_sub ; 18AC7E/1B5CD4
MOV.w $1901,#$0000 ; 18AC81/1601190000
END ; 18AC86/00
$18ACFF - Sub: Ch03 Axs stone animation
Code_Axs_Stoned_Anim:
SET_ANIM #58 ; 18ACFF/303A
HALT ; 18AD01/0A
$18AD16 - STORY 0B: Ch03 Getting Marid
ASM_Ch3_Marid:
JSR Sub_LoadSomething ; 18AD16/1B4DD4
Text_SCRIPT053:
ASM_CALL Load_Event_Text ; 18AD19/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_053 ; 18AD1D/85CB0C
.byte $00 ; 18AD20/00
TASK Sub_Some_Town_Anim ; 18AD21/081B97
JSR Wait_for_A_press ; 18AD24/1BC3D4
JSR Fanfare_and_Refresh_Music ; 18AD27/1B7BD3
Text_SCRIPT054:
ASM_CALL Load_Event_Text ; 18AD2A/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_054 ; 18AD2E/49CC0C
.byte $00 ; 18AD31/00
JSR Wait_for_A_press ; 18AD32/1BC3D4
Get_Water_Spirit:
MOV REG,#$0003 ; 18AD35/1E0300
ASM_CALL Get_New_Spirit_far ; 18AD38/070C8D07
JSR Some_sub ; 18AD3C/1B5CD4
MOV.w $1901,#$0000 ; 18AD3F/1601190000
END ; 18AD44/00
$18AD51 - STORY 0C: Ch03 The Lava Room
ASM_Lava_Room:
MOV REG,VAR1 ; 18AD51/2401
MULTI_JMP #8 ; 18AD53/1108
.word Event_Lava1 ; 18AD55/42B1
.word Event_Lava2 ; 18AD57/F6B1
.word Event_Lava3 ; 18AD59/08B2
.word Event_Lava4 ; 18AD5B/1BB2
.word Event_Lava5 ; 18AD5D/2EB2
.word Event_Lava6 ; 18AD5F/3BB2
.word Event_Lava7 ; 18AD61/3EB2
.word Event_Lava8 ; 18AD63/43B2
ASM_CALL GetSet_SFX_1b ; 18AD65/07449C00 // Get/Set Sound Effect
.byte 45 ; 18AD69/2D
MOV VAR0,#$0002 ; 18AD6A/0F000200
JSR SetB6_FadeOut ; 18AD6E/1B16D4
ASM_CALL MainScr_Remove_1b ; 18AD71/07B69D00 // Main Screen remove
.byte $02 ; 18AD75/02
ASM_CALL Set_Win1_3b ; 18AD76/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AD7A/00
.word $C43C ; 18AD7B/3CC4
ASM_CALL Set_WindowMask_4b ; 18AD7D/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18AD81/10
.byte $00 ; 18AD82/00
.byte $00 ; 18AD83/00
.byte $83 ; 18AD84/83
ASM_CALL Display_brancher_6b ; 18AD85/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18AD89/01
.byte $01 ; 18AD8A/01
.word $3000 ; 18AD8B/0030
.word $0400 ; 18AD8D/0004
BGH_DISP #1,#$0080 ; 18AD8F/78018000
ASM_CALL Zero_18FD ; 18AD93/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
Gfx_LavaRoom:
ASM_CALL Compressed_Setup_3b_2b ; 18AD97/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_Loc_LavaRoom ; 18AD9B/888114
.word 1024 ; 18AD9E/0004
Decompress_stuff:
JSR Make_Animation_Loop1 ; 18ADA0/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18ADA3/0735A000 // Decompression setup 2
.long _18ADA7_data ; 18ADA7/ECAF18
.long $000440 ; 18ADAA/400400
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18ADAD/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Ariel ; 18ADB1/6B8A19
.byte $90 ; 18ADB4/90
.word 64 ; 18ADB5/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18ADB7/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 18ADBB/9B9B18
.byte $B0 ; 18ADBE/B0
.word 64 ; 18ADBF/4000
ON_TICK Move_Lots_of_Data ; 18ADC1/094DB018
ASM_CALL MainScr_Add_1b ; 18ADC5/07A89D00 // Main Screen add
.byte $02 ; 18ADC9/02
JSR Sub_Turn_off_sound ; 18ADCA/1BF6D3
ASM_CALL GetSet_Music_1b ; 18ADCD/073C9C00 // Get/Set Music
.byte 69 ; 18ADD1/45
JSR Sub_FadeIn ; 18ADD2/1B35D4
JSR Sub_LoadSomething ; 18ADD5/1B4DD4
Text_SCRIPT055:
ASM_CALL Load_Event_Text ; 18ADD8/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_055 ; 18ADDC/45CD0C
.byte $00 ; 18ADDF/00
TASK Sub_Some_Town_Anim ; 18ADE0/081B97
JSR Wait_for_A_press ; 18ADE3/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18ADE6/07AE9C00 // Load Sprite
.byte 8 ; 18ADEA/08
.byte 36 ; 18ADEB/24
.word 18 ; 18ADEC/1200
.word 65464 ; 18ADEE/B8FF
.word 65476 ; 18ADF0/C4FF
.word 0 ; 18ADF2/0000
.word 12 ; 18ADF4/0C00
.word 1 ; 18ADF6/0100
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18ADF8/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A6EA_data ; 18ADFC/A7A918
.byte $D0 ; 18ADFF/D0
.word 32 ; 18AE00/2000
LavaRoom_Looking_Around:
SET_BGH_VEL #1,#$FF00 ; 18AE02/880100FF
WAIT #80 ; 18AE06/0650
ZERO_BG_VEL #$01 ; 18AE08/D801
WAIT #20 ; 18AE0A/0614
SET_BGH_VEL #1,#$FC00 ; 18AE0C/880100FC
WAIT #12 ; 18AE10/060C
ZERO_BG_VEL #$01 ; 18AE12/D801
ASM_CALL Set_Win1_3b ; 18AE14/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AE18/00
.word $CC34 ; 18AE19/34CC
Text_SCRIPT056:
ASM_CALL Load_Event_Text ; 18AE1B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_056 ; 18AE1F/C0CD0C
.byte $00 ; 18AE22/00
JSR Wait_for_A_press ; 18AE23/1BC3D4
JSR Sub_Turn_off_sound ; 18AE26/1BF6D3
ASM_CALL GetSet_Music_1b ; 18AE29/073C9C00 // Get/Set Music
.byte 70 ; 18AE2D/46
Text_SCRIPT057:
ASM_CALL Load_Event_Text ; 18AE2E/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_057 ; 18AE32/D5CD0C
.byte $00 ; 18AE35/00
JSR Wait_for_A_press ; 18AE36/1BC3D4
JSR Sub_Unequip_Axs ; 18AE39/1B1ED3
ASM_CALL Load_Sprite_1b_1b_12b ; 18AE3C/07AE9C00 // Load Sprite
.byte 8 ; 18AE40/08
.byte 36 ; 18AE41/24
.word 18 ; 18AE42/1200
.word 280 ; 18AE44/1801
.word 65508 ; 18AE46/E4FF
.word 0 ; 18AE48/0000
.word 12 ; 18AE4A/0C00
.word 2 ; 18AE4C/0200
ASM_CALL Set_Win1_3b ; 18AE4E/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AE52/00
.word $C43C ; 18AE53/3CC4
LavaRoom_Anims2:
SET_BGH_VEL #1,#$0800 ; 18AE55/88010008
WAIT #26 ; 18AE59/061A
ZERO_BG_VEL #$01 ; 18AE5B/D801
WAIT #20 ; 18AE5D/0614
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18AE5F/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Fighter ; 18AE63/BF8619
.byte $E0 ; 18AE66/E0
.word 32 ; 18AE67/2000
LavaRoom_Load_2_sprites:
ASM_CALL Load_Sprite_1b_1b_12b ; 18AE69/07AE9C00 // Load Sprite
.byte 8 ; 18AE6D/08
.byte 36 ; 18AE6E/24
.word 18 ; 18AE6F/1200
.word 72 ; 18AE71/4800
.word 65516 ; 18AE73/ECFF
.word 1 ; 18AE75/0100
.word 12 ; 18AE77/0C00
.word 3 ; 18AE79/0300
ASM_CALL Load_Sprite_1b_1b_12b ; 18AE7B/07AE9C00 // Load Sprite
.byte 8 ; 18AE7F/08
.byte 36 ; 18AE80/24
.word 18 ; 18AE81/1200
.word 72 ; 18AE83/4800
.word 65516 ; 18AE85/ECFF
.word 1 ; 18AE87/0100
.word 12 ; 18AE89/0C00
.word 4 ; 18AE8B/0400
WAIT #60 ; 18AE8D/063C
ASM_CALL Set_Win1_3b ; 18AE8F/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AE93/00
.word $CC34 ; 18AE94/34CC
Text_SCRIPT058:
ASM_CALL Load_Event_Text ; 18AE96/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_058 ; 18AE9A/03CE0C
.byte $00 ; 18AE9D/00
JSR Wait_for_A_press ; 18AE9E/1BC3D4
MOV.w Animation_Finish_Timer,#$0001; 18AEA1/1691100100
ASM_CALL Load_Sprite_1b_1b_12b ; 18AEA6/07AE9C00 // Load Sprite
.byte 8 ; 18AEAA/08
.byte 36 ; 18AEAB/24
.word 18 ; 18AEAC/1200
.word 65424 ; 18AEAE/90FF
.word 65508 ; 18AEB0/E4FF
.word 0 ; 18AEB2/0000
.word 12 ; 18AEB4/0C00
.word 5 ; 18AEB6/0500
ASM_CALL Set_Win1_3b ; 18AEB8/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AEBC/00
.word $C43C ; 18AEBD/3CC4
LavaRoom_Anims3:
SET_BGH_VEL #1,#$F800 ; 18AEBF/880100F8
WAIT #26 ; 18AEC3/061A
ZERO_BG_VEL #$01 ; 18AEC5/D801
ASM_CALL Set_Win1_3b ; 18AEC7/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AECB/00
.word $CC34 ; 18AECC/34CC
Text_SCRIPT059:
ASM_CALL Load_Event_Text ; 18AECE/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_059 ; 18AED2/EDCE0C
.byte $00 ; 18AED5/00
JSR Wait_for_A_press ; 18AED6/1BC3D4
ASM_CALL Set_Win1_3b ; 18AED9/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AEDD/00
.word $C43C ; 18AEDE/3CC4
LavaRoom_Anims_4:
SET_BGH_VEL #1,#$0800 ; 18AEE0/88010008
WAIT #26 ; 18AEE4/061A
ZERO_BG_VEL #$01 ; 18AEE6/D801
MOV.w Animation_Finish_Timer,#$0002; 18AEE8/1691100200
WAIT #20 ; 18AEED/0614
ASM_CALL Set_Win1_3b ; 18AEEF/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AEF3/00
.word $CC34 ; 18AEF4/34CC
Text_SCRIPT060:
ASM_CALL Load_Event_Text ; 18AEF6/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_060 ; 18AEFA/2ACF0C
.byte $00 ; 18AEFD/00
JSR Wait_for_A_press ; 18AEFE/1BC3D4
WAIT #40 ; 18AF01/0628
ASM_CALL Zero_18FD ; 18AF03/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18AF07/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1481C1 ; 18AF0B/C18114
.word 1024 ; 18AF0E/0004
JSR Make_Animation_Loop1 ; 18AF10/1BB9D4
Transfer_Sauza_Gfx:
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18AF13/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18AF17_data ; 18AF17/E68619
.byte $C0 ; 18AF1A/C0
.word 64 ; 18AF1B/4000
Load_Sauza_Gfx:
ASM_CALL Load_Sprite_1b_1b_12b ; 18AF1D/07AE9C00 // Load Sprite
.byte 8 ; 18AF21/08
.byte 36 ; 18AF22/24
.word 18 ; 18AF23/1200
.word 48 ; 18AF25/3000
.word 65508 ; 18AF27/E4FF
.word 65535 ; 18AF29/FFFF
.word 12 ; 18AF2B/0C00
.word 6 ; 18AF2D/0600
WAIT #60 ; 18AF2F/063C
Text_SCRIPT061:
ASM_CALL Load_Event_Text ; 18AF31/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_061 ; 18AF35/90D10C
.byte $00 ; 18AF38/00
JSR Wait_for_A_press ; 18AF39/1BC3D4
ASM_CALL Clear_Winmask_Lo ; 18AF3C/0744D518 // Clear window mask lo
ASM_CALL Check_Party ; 18AF40/07D9D418 // Check party
UNK_TASK #1 ; 18AF44/1401
SET_ANIM #-1 ; 18AF46/30FF
MOV.w $18E1,#$0007 ; 18AF48/16E1180700
ASM_Sauza_fight:
ASM_CALL Check_map_tile_value ; 18AF4D/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18AF51/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18AF55/1BD4D3
JSR Sub_Event_Battle ; 18AF58/1BC3D3
JSR Sub_Sauza_2 ; 18AF5B/1BE0D3
WAIT #45 ; 18AF5E/062D
ASM_CALL Zero_18FD ; 18AF60/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18AF64/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_Loc_PostSauza ; 18AF68/CA8114
.word 1024 ; 18AF6B/0004
JSR Make_Animation_Loop1 ; 18AF6D/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18AF70/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 18AF74/9B9B18
.byte $B0 ; 18AF77/B0
.word 64 ; 18AF78/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18AF7A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18A6EA_data ; 18AF7E/A7A918
.byte $D0 ; 18AF81/D0
.word 32 ; 18AF82/2000
ASM_CALL Load_Sprite_1b_1b_12b ; 18AF84/07AE9C00 // Load Sprite
.byte 8 ; 18AF88/08
.byte 36 ; 18AF89/24
.word 18 ; 18AF8A/1200
.word 65424 ; 18AF8C/90FF
.word 65508 ; 18AF8E/E4FF
.word 0 ; 18AF90/0000
.word 12 ; 18AF92/0C00
.word 7 ; 18AF94/0700
ASM_CALL Load_Sprite_1b_1b_12b ; 18AF96/07AE9C00 // Load Sprite
.byte 8 ; 18AF9A/08
.byte 36 ; 18AF9B/24
.word 18 ; 18AF9C/1200
.word 65384 ; 18AF9E/68FF
.word 65508 ; 18AFA0/E4FF
.word 0 ; 18AFA2/0000
.word 12 ; 18AFA4/0C00
.word 8 ; 18AFA6/0800
ASM_CALL Set_WindowMask_4b ; 18AFA8/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18AFAC/10
.byte $00 ; 18AFAD/00
.byte $00 ; 18AFAE/00
.byte $83 ; 18AFAF/83
ASM_CALL Set_Win1_3b ; 18AFB0/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AFB4/00
.word $C43C ; 18AFB5/3CC4
SET_BGH_VEL #1,#$F800 ; 18AFB7/880100F8
WAIT #26 ; 18AFBB/061A
ZERO_BG_VEL #$01 ; 18AFBD/D801
ASM_CALL Set_Win1_3b ; 18AFBF/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18AFC3/00
.word $CC34 ; 18AFC4/34CC
Text_SCRIPT062:
ASM_CALL Load_Event_Text ; 18AFC6/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_062 ; 18AFCA/1CD20C
.byte $00 ; 18AFCD/00
TASK Sub_Some_Town_Anim ; 18AFCE/081B97
JSR Wait_for_A_press ; 18AFD1/1BC3D4
START_LOOP #16 ; 18AFD4/0110
ASM_CALL Fade ; 18AFD6/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 18AFDA/07199C00 // Sound stuff
.byte $F0 ; 18AFDE/F0
WAIT #6 ; 18AFDF/0606
END_LOOP ; 18AFE1/02
ASM_CALL Check_Party ; 18AFE2/07D9D418 // Check party
MOV.w $1901,#$0000 ; 18AFE6/1601190000
End_Chapter_3:
END ; 18AFEB/00
$18B142 - Sub: Ch03 Lava Subroutine 1
Event_Lava1:
TASK DATA8_18B16C ; 18B142/086CB1
ANIM_2 #$01 ; 18B145/2101
SET_ANIM #67 ; 18B147/3043
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B149/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B14D/9110
.word 1 ; 18B14F/0100
UNK_TASK #1 ; 18B151/1401
ASM_CALL Rem_HDMA_ch_1b ; 18B153/071F9F00 // Remove HDMA channel
.byte $07 ; 18B157/07
ONTICK NOP ; 18B158/10
ASM_CALL Set_Win1_3b ; 18B159/074CD518 // Set Window 1 [$2126 offset][val]
.byte 1 ; 18B15D/01
.word $00FF ; 18B15E/FF00
SET_YPOS #96 ; 18B160/406000
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B163/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B167/9110
.word 2 ; 18B169/0200
END ; 18B16B/00
DATA8_18B16C:
MOV.b Color_window,#$10 ; 18B16C/13302110
MOV.b $1893,#$32 ; 18B170/13931832
ON_TICK Zeros_190X_vars ; 18B174/09A5B118
ASM_CALL Set_RGB_3b ; 18B178/07839F00 // Set RGB -2
.byte $14 ; 18B17C/14
.byte $14 ; 18B17D/14
.byte $14 ; 18B17E/14
Transfer_7b:
ASM_CALL HDMA_xfer_6b ; 18B17F/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $07 ; 18B183/07
.byte $41 ; 18B184/41
.byte $28 ; 18B185/28
.long _18B186_data ; 18B186/9EB118
DATA8_18B189:
WAIT #2 ; 18B189/0602
ASM_CALL Set_RGB_3b ; 18B18B/07839F00 // Set RGB -2
.byte $00 ; 18B18F/00
.byte $0E ; 18B190/0E
.byte $00 ; 18B191/00
WAIT #2 ; 18B192/0602
ASM_CALL Set_RGB_3b ; 18B194/07839F00 // Set RGB -2
.byte $00 ; 18B198/00
.byte $1F ; 18B199/1F
.byte $00 ; 18B19A/00
JMP DATA8_18B189 ; 18B19B/1A89B1
$18B1F6 - Sub: Ch03 Lava Subroutine 2-8
Event_Lava2:
ANIM_2 #$01 ; 18B1F6/2101
SET_ANIM #46 ; 18B1F8/302E
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B1FA/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B1FE/9110
.word 3 ; 18B200/0300
ASM_CALL GetSet_SFX_1b ; 18B202/07449C00 // Get/Set Sound Effect
.byte 40 ; 18B206/28
END ; 18B207/00
Event_Lava3:
ANIM_2 #$01 ; 18B208/2101
SET_ANIM #111 ; 18B20A/306F
SET_XVEL #-1024 ; 18B20C/5800FC
WAIT #8 ; 18B20F/0608
ZERO_VEL ; 18B211/D0
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B212/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B216/9110
.word 3 ; 18B218/0300
END ; 18B21A/00
Event_Lava4:
ANIM_2 #$01 ; 18B21B/2101
SET_ANIM #111 ; 18B21D/306F
SET_XVEL #1024 ; 18B21F/580004
WAIT #8 ; 18B222/0608
ZERO_VEL ; 18B224/D0
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B225/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B229/9110
.word 3 ; 18B22B/0300
END ; 18B22D/00
Event_Lava5:
ANIM_2 #$01 ; 18B22E/2101
SET_ANIM #61 ; 18B230/303D
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B232/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B236/9110
.word 2 ; 18B238/0200
END ; 18B23A/00
Event_Lava6:
SET_ANIM #77 ; 18B23B/304D
HALT ; 18B23D/0A
Event_Lava7:
ANIM_2 #$01 ; 18B23E/2101
SET_ANIM #61 ; 18B240/303D
HALT ; 18B242/0A
Event_Lava8:
ANIM_2 #$01 ; 18B243/2101
SET_ANIM #67 ; 18B245/3043
HALT ; 18B247/0A
$18B254 - STORY 0D: Ch04 Axs talking
ASM_Ch4_Axs:
MOV REG,VAR1 ; 18B254/2401
MULTI_JMP #2 ; 18B256/1102
.word Code_18B405 ; 18B258/05B4
.word DATA8_18B413 ; 18B25A/13B4
MOV.b $1893,#$B6 ; 18B25C/139318B6
ASM_CALL Set_RGB_3b ; 18B260/07839F00 // Set RGB -2
.byte $1F ; 18B264/1F
.byte $1F ; 18B265/1F
.byte $1F ; 18B266/1F
START_LOOP #16 ; 18B267/0110
ASM_CALL Unfade ; 18B269/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 18B26D/0603
END_LOOP ; 18B26F/02
ASM_CALL Display_brancher_6b ; 18B270/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18B274/01
.byte $00 ; 18B275/00
.word $3000 ; 18B276/0030
.word $0400 ; 18B278/0004
JSR DATA8_18D389 ; 18B27A/1B89D3
ASM_CALL Set_Win1_3b ; 18B27D/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18B281/00
.word $C434 ; 18B282/34C4
ASM_CALL Set_WindowMask_4b ; 18B284/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18B288/10
.byte $00 ; 18B289/00
.byte $00 ; 18B28A/00
.byte $03 ; 18B28B/03
ASM_CALL Zero_18FD ; 18B28C/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18B290/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_Loc_Stoned_Axs2 ; 18B294/E38114
.word 1024 ; 18B297/0004
JSR Make_Animation_Loop1 ; 18B299/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B29C/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18B3A5 ; 18B2A0/A5B318
.byte $10 ; 18B2A3/10
.word 96 ; 18B2A4/6000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B2A6/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 18B2AA/9B9B18
.byte $90 ; 18B2AD/90
.word 64 ; 18B2AE/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B2B0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18B385 ; 18B2B4/85B318
.byte $E0 ; 18B2B7/E0
.word 32 ; 18B2B8/2000
ASM_CALL Sound_byte_1b ; 18B2BA/070A9C00 // Sound byte
.byte $FF ; 18B2BE/FF
ASM_CALL GetSet_Music_1b ; 18B2BF/073C9C00 // Get/Set Music
.byte 64 ; 18B2C3/40
ASM_CALL MainScr_Remove_1b ; 18B2C4/07B69D00 // Main Screen remove
.byte $04 ; 18B2C8/04
MOV.w $0420,#$0000 ; 18B2C9/1620040000
MOV VAR0,#$0002 ; 18B2CE/0F000200
JSR Sub_FadeIn ; 18B2D2/1B35D4
WAIT #60 ; 18B2D5/063C
ASM_CALL Load_Sprite_1b_1b_12b ; 18B2D7/07AE9C00 // Load Sprite
.byte 8 ; 18B2DB/08
.byte 36 ; 18B2DC/24
.word 18 ; 18B2DD/1200
.word 224 ; 18B2DF/E000
.word 112 ; 18B2E1/7000
.word 0 ; 18B2E3/0000
.word 13 ; 18B2E5/0D00
.word 1 ; 18B2E7/0100
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B2E9/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B2ED/9110
.word 1 ; 18B2EF/0100
JSR Sub_LoadSomething ; 18B2F1/1B4DD4
Text_SCRIPT063:
ASM_CALL Load_Event_Text ; 18B2F4/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_063 ; 18B2F8/BED20C
.byte $00 ; 18B2FB/00
TASK Sub_Some_Town_Anim ; 18B2FC/081B97
JSR Wait_for_A_press ; 18B2FF/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18B302/07AE9C00 // Load Sprite
.byte 8 ; 18B306/08
.byte 36 ; 18B307/24
.word 18 ; 18B308/1200
.word 152 ; 18B30A/9800
.word 65524 ; 18B30C/F4FF
.word 0 ; 18B30E/0000
.word 13 ; 18B310/0D00
.word 2 ; 18B312/0200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B314/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B318/9110
.word 2 ; 18B31A/0200
Text_SCRIPT064:
ASM_CALL Load_Event_Text ; 18B31C/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_064 ; 18B320/01D30C
.byte $00 ; 18B323/00
JSR Wait_for_A_press ; 18B324/1BC3D4
WAIT #30 ; 18B327/061E
MOV.w Animation_Finish_Timer,#$0003; 18B329/1691100300
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B32E/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B332/9110
.word 4 ; 18B334/0400
Text_SCRIPT065:
ASM_CALL Load_Event_Text ; 18B336/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_065 ; 18B33A/FDD30C
.byte $00 ; 18B33D/00
JSR Wait_for_A_press ; 18B33E/1BC3D4
ASM_CALL Check_Party ; 18B341/07D9D418 // Check party
WAIT #30 ; 18B345/061E
JSR Sub_Axs_joins_Ch3 ; 18B347/1BFFD2
JSR Some_sub ; 18B34A/1B5CD4
JSR SetB6_FadeOut ; 18B34D/1B16D4
ASM_CALL Clear_Winmask_Lo ; 18B350/0744D518 // Clear window mask lo
ASM_CALL Entering_Town ; 18B354/0757B303 // Entering Town
MOV.w Town_Direction,#$0110 ; 18B358/167F181001
MOV.w Town_Selection,#$0005 ; 18B35D/1681180500
ASM_CALL Town_loading ; 18B362/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 18B366/07FDB303 // More Town Loading
ASM_CALL MainScr_Add_1b ; 18B36A/07A89D00 // Main Screen add
.byte $04 ; 18B36E/04
JSR Sub_FadeIn ; 18B36F/1B35D4
JSR Sub_Turn_off_sound ; 18B372/1BF6D3
ASM_CALL GetSet_Music_1b ; 18B375/073C9C00 // Get/Set Music
.byte 89 ; 18B379/59
MOV.w $1901,#$0000 ; 18B37A/1601190000
MOV.w Game_State,#$0000 ; 18B37F/16C1110000
End_Ch4_intro:
END ; 18B384/00
$18B405 - Sub: Ch04 Icorina house animations
Code_18B405:
SET_ANIM #58 ; 18B405/303A
SET_XVEL #-256 ; 18B407/5800FF
WAIT #96 ; 18B40A/0660
ZERO_VEL ; 18B40C/D0
MOV.w Animation_Finish_Timer,#$0001; 18B40D/1691100100
HALT ; 18B412/0A
DATA8_18B413:
SET_ANIM #78 ; 18B413/304E
SET_XVEL #-256 ; 18B415/5800FF
WAIT #56 ; 18B418/0638
ZERO_VEL ; 18B41A/D0
WAIT #30 ; 18B41B/061E
MOV.w Animation_Finish_Timer,#$0002; 18B41D/1691100200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B422/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B426/9110
.word 3 ; 18B428/0300
SET_XVEL #256 ; 18B42A/580001
WAIT #72 ; 18B42D/0648
MOV.w Animation_Finish_Timer,#$0004; 18B42F/1691100400
END ; 18B434/00
$18B451 - STORY 0E: Vs Darah
ASM_Darah:
MOV REG,VAR1 ; 18B451/2401
MULTI_JMP #1 ; 18B453/1101
.word DATA8_18B4DA ; 18B455/DAB4
ASM_CALL Zero_18FD ; 18B457/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18B45B/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_Loc_Darah1 ; 18B45F/0C8214
.word 1024 ; 18B462/0004
JSR Make_Animation_Loop1 ; 18B464/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B467/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Darah ; 18B46B/9D8919
.byte $90 ; 18B46E/90
.word 96 ; 18B46F/6000
JSR Sub_LoadSomething ; 18B471/1B4DD4
Text_SCRIPT066:
ASM_CALL Load_Event_Text ; 18B474/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_066 ; 18B478/0AD60C
.byte $00 ; 18B47B/00
TASK Sub_Some_Town_Anim ; 18B47C/081B97
JSR Wait_for_A_press ; 18B47F/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18B482/07AE9C00 // Load Sprite
.byte 8 ; 18B486/08
.byte 36 ; 18B487/24
.word 18 ; 18B488/1200
.word 56 ; 18B48A/3800
.word 65524 ; 18B48C/F4FF
.word 0 ; 18B48E/0000
.word 14 ; 18B490/0E00
.word 1 ; 18B492/0100
WAIT #60 ; 18B494/063C
Text_SCRIPT067:
ASM_CALL Load_Event_Text ; 18B496/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_067 ; 18B49A/77D60C
.byte $00 ; 18B49D/00
JSR Wait_for_A_press ; 18B49E/1BC3D4
ASM_CALL Check_Party ; 18B4A1/07D9D418 // Check party
UNK_TASK #1 ; 18B4A5/1401
SET_ANIM #-1 ; 18B4A7/30FF
MOV.w $18E1,#$0009 ; 18B4A9/16E1180900
ASM_CALL Check_map_tile_value ; 18B4AE/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18B4B2/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18B4B6/1BD4D3
JSR Sub_Event_Battle ; 18B4B9/1BC3D3
JSR Sub_Sauza_2 ; 18B4BC/1BE0D3
Text_SCRIPT068:
ASM_CALL Load_Event_Text ; 18B4BF/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_068 ; 18B4C3/CBD60C
.byte $00 ; 18B4C6/00
JSR Fanfare_and_Refresh_Music ; 18B4C7/1B7BD3
Earth_Spirit_Get1:
MOV REG,#$0002 ; 18B4CA/1E0200
ASM_CALL Get_New_Spirit_far ; 18B4CD/070C8D07
JSR Some_sub ; 18B4D1/1B5CD4
MOV.w $1901,#$0000 ; 18B4D4/1601190000
END ; 18B4D9/00
DATA8_18B4DA:
SET_ANIM #79 ; 18B4DA/304F
HALT ; 18B4DC/0A
$18B4FE - STORY 0F: The door is closed
ASM_Closed_Sesame:
JSR Sub_LoadSomething ; 18B4FE/1B4DD4
Text_SCRIPT069:
ASM_CALL Load_Event_Text ; 18B501/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_069 ; 18B505/F9D60C
.byte $00 ; 18B508/00
TASK Sub_Some_Town_Anim ; 18B509/081B97
JSR Wait_for_A_press ; 18B50C/1BC3D4
JSR Some_sub ; 18B50F/1B5CD4
MOV.w $1901,#$0000 ; 18B512/1601190000
END ; 18B517/00
$18B537 - STORY 10: Salah awakens
ASM_Ch4_Salah:
MOV REG,VAR1 ; 18B537/2401
MULTI_JMP #2 ; 18B539/1102
.word DATA8_18B604 ; 18B53B/04B6
.word DATA8_18B60F ; 18B53D/0FB6
MOV VAR0,#$0002 ; 18B53F/0F000200
JSR SetB6_FadeOut ; 18B543/1B16D4
ASM_CALL Display_brancher_6b ; 18B546/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18B54A/01
.byte $00 ; 18B54B/00
.word $3000 ; 18B54C/0030
.word $0400 ; 18B54E/0004
JSR DATA8_18D389 ; 18B550/1B89D3
ASM_CALL Zero_18FD ; 18B553/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18B557/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148215 ; 18B55B/158214
.word 1024 ; 18B55E/0004
JSR Make_Animation_Loop1 ; 18B560/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B563/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18B3A5 ; 18B567/A5B318
.byte $10 ; 18B56A/10
.word 96 ; 18B56B/6000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B56D/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C5A4_data ; 18B571/31A118
.byte $D0 ; 18B574/D0
.word 32 ; 18B575/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B577/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18B385 ; 18B57B/85B318
.byte $E0 ; 18B57E/E0
.word 32 ; 18B57F/2000
ASM_CALL Load_Sprite_1b_1b_12b ; 18B581/07AE9C00 // Load Sprite
.byte 8 ; 18B585/08
.byte 36 ; 18B586/24
.word 18 ; 18B587/1200
.word 104 ; 18B589/6800
.word 112 ; 18B58B/7000
.word 0 ; 18B58D/0000
.word 16 ; 18B58F/1000
.word 1 ; 18B591/0100
ASM_CALL Load_Sprite_1b_1b_12b ; 18B593/07AE9C00 // Load Sprite
.byte 8 ; 18B597/08
.byte 36 ; 18B598/24
.word 18 ; 18B599/1200
.word 152 ; 18B59B/9800
.word 112 ; 18B59D/7000
.word 0 ; 18B59F/0000
.word 16 ; 18B5A1/1000
.word 2 ; 18B5A3/0200
ASM_CALL MainScr_Remove_1b ; 18B5A5/07B69D00 // Main Screen remove
.byte $04 ; 18B5A9/04
MOV.w $0420,#$0000 ; 18B5AA/1620040000
JSR Sub_Turn_off_sound ; 18B5AF/1BF6D3
ASM_CALL GetSet_Music_1b ; 18B5B2/073C9C00 // Get/Set Music
.byte 71 ; 18B5B6/47
JSR Sub_FadeIn ; 18B5B7/1B35D4
JSR Sub_LoadSomething ; 18B5BA/1B4DD4
Text_SCRIPT070:
ASM_CALL Load_Event_Text ; 18B5BD/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_070 ; 18B5C1/85D70C
.byte $00 ; 18B5C4/00
TASK Sub_Some_Town_Anim ; 18B5C5/081B97
JSR Wait_for_A_press ; 18B5C8/1BC3D4
JSR Some_sub ; 18B5CB/1B5CD4
JSR Salah_joins ; 18B5CE/1BC1D2
JSR SetB6_FadeOut ; 18B5D1/1B16D4
ASM_CALL Check_Party ; 18B5D4/07D9D418 // Check party
ASM_CALL Entering_Town ; 18B5D8/0757B303 // Entering Town
MOV.w Town_Direction,#$0110 ; 18B5DC/167F181001
MOV.w Town_Selection,#$0005 ; 18B5E1/1681180500
ASM_CALL Town_loading ; 18B5E6/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 18B5EA/07FDB303 // More Town Loading
ASM_CALL MainScr_Add_1b ; 18B5EE/07A89D00 // Main Screen add
.byte $04 ; 18B5F2/04
JSR Sub_Turn_off_sound ; 18B5F3/1BF6D3
ASM_CALL GetSet_Music_1b ; 18B5F6/073C9C00 // Get/Set Music
.byte 89 ; 18B5FA/59
JSR Sub_FadeIn ; 18B5FB/1B35D4
MOV.w $1901,#$0000 ; 18B5FE/1601190000
END ; 18B603/00
DATA8_18B604:
SET_ANIM #66 ; 18B604/3042
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B606/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B60A/9110
.word 255 ; 18B60C/FF00
END ; 18B60E/00
DATA8_18B60F:
SET_ANIM #78 ; 18B60F/304E
HALT ; 18B611/0A
$18B633 - STORY 11: The door is open
ASM_Open_Sesame:
MOV REG,VAR1 ; 18B633/2401
MULTI_JMP #1 ; 18B635/1101
.word DATA8_18B720 ; 18B637/20B7
ASM_CALL Zero_18FD ; 18B639/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18B63D/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_14823E ; 18B641/3E8214
.word 1024 ; 18B644/0004
JSR Make_Animation_Loop1 ; 18B646/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B649/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C5A4_data ; 18B64D/31A118
.byte $D0 ; 18B650/D0
.word 32 ; 18B651/2000
JSR Sub_LoadSomething ; 18B653/1B4DD4
Text_SCRIPT071:
ASM_CALL Load_Event_Text ; 18B656/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_071 ; 18B65A/17D90C
.byte $00 ; 18B65D/00
TASK Sub_Some_Town_Anim ; 18B65E/081B97
JSR Wait_for_A_press ; 18B661/1BC3D4
ASM_CALL GetSet_Music_1b ; 18B664/073C9C00 // Get/Set Music
.byte 69 ; 18B668/45
Text_SCRIPT072:
ASM_CALL Load_Event_Text ; 18B669/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_072 ; 18B66D/79D90C
.byte $00 ; 18B670/00
JSR Wait_for_A_press ; 18B671/1BC3D4
ASM_CALL Clear_Event_1b ; 18B674/07DD9C00 // Battle related
.byte $10 ; 18B678/10
ASM_CALL Load_Graphics__1b_12b ; 18B679/07BC9C00 // Load Graphics
.byte 16 ; 18B67D/10
.word 14 ; 18B67E/0E00
.word 0 ; 18B680/0000
.word 0 ; 18B682/0000
.word 0 ; 18B684/0000
.word 0 ; 18B686/0000
.word 0 ; 18B688/0000
WAIT #40 ; 18B68A/0628
ASM_CALL Load_Sprite_1b_1b_12b ; 18B68C/07AE9C00 // Load Sprite
.byte 8 ; 18B690/08
.byte 36 ; 18B691/24
.word 18 ; 18B692/1200
.word 56 ; 18B694/3800
.word 65524 ; 18B696/F4FF
.word 0 ; 18B698/0000
.word 17 ; 18B69A/1100
.word 1 ; 18B69C/0100
WAIT #30 ; 18B69E/061E
Text_SCRIPT073:
ASM_CALL Load_Event_Text ; 18B6A0/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_073 ; 18B6A4/E3D90C
.byte $00 ; 18B6A7/00
JSR Wait_for_A_press ; 18B6A8/1BC3D4
JSR Sub_Sting_Flash ; 18B6AB/1B80D4
WAIT #90 ; 18B6AE/065A
Text_MACRO119:
ASM_CALL Load_Event_Text ; 18B6B0/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long MACRO_119 ; 18B6B4/CBF70C
.byte $00 ; 18B6B7/00
MOV.w Animation_Finish_Timer,#$0001; 18B6B8/1691100100
WAIT #60 ; 18B6BD/063C
MOV.b $1893,#$02 ; 18B6BF/13931802
ASM_CALL Set_RGB_3b ; 18B6C3/07839F00 // Set RGB -2
.byte $00 ; 18B6C7/00
.byte $00 ; 18B6C8/00
.byte $00 ; 18B6C9/00
START_LOOP #8 ; 18B6CA/0108
START_LOOP #4 ; 18B6CC/0104
ASM_CALL Add_RGB_3b ; 18B6CE/07E29F00 // Add RGB
.byte $06 ; 18B6D2/06
.byte $03 ; 18B6D3/03
.byte $01 ; 18B6D4/01
WAIT #1 ; 18B6D5/0601
END_LOOP ; 18B6D7/02
START_LOOP #4 ; 18B6D8/0104
ASM_CALL Add_RGB_3b ; 18B6DA/07E29F00 // Add RGB
.byte $FA ; 18B6DE/FA
.byte $FD ; 18B6DF/FD
.byte $FF ; 18B6E0/FF
WAIT #1 ; 18B6E1/0601
END_LOOP ; 18B6E3/02
END_LOOP ; 18B6E4/02
WAIT #60 ; 18B6E5/063C
Text_SCRIPT074:
ASM_CALL Load_Event_Text ; 18B6E7/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_074 ; 18B6EB/10DA0C
.byte $00 ; 18B6EE/00
JSR Wait_for_A_press ; 18B6EF/1BC3D4
ASM_CALL Check_Party ; 18B6F2/07D9D418 // Check party
WAIT #30 ; 18B6F6/061E
ASM_CALL Clear_Event_1b ; 18B6F8/07DD9C00 // Battle related
.byte $10 ; 18B6FC/10
ASM_CALL Load_Graphics__1b_12b ; 18B6FD/07BC9C00 // Load Graphics
.byte 16 ; 18B701/10
.word 10 ; 18B702/0A00
.word 0 ; 18B704/0000
.word 0 ; 18B706/0000
.word 0 ; 18B708/0000
.word 0 ; 18B70A/0000
.word 0 ; 18B70C/0000
WAIT #30 ; 18B70E/061E
JSR Sub_Turn_off_sound ; 18B710/1BF6D3
ASM_CALL Sub_Default_BGM ; 18B713/0720A503 // Sub: Default Dungeon BGM
JSR Some_sub ; 18B717/1B5CD4
MOV.w $1901,#$0000 ; 18B71A/1601190000
END ; 18B71F/00
DATA8_18B720:
SET_ANIM #66 ; 18B720/3042
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B722/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B726/9110
.word 1 ; 18B728/0100
SET_ANIM #68 ; 18B72A/3044
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B72C/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B730/9110
.word 2 ; 18B732/0200
SET_ANIM #66 ; 18B734/3042
HALT ; 18B736/0A
$18B753 - STORY 12: Vs Darah & Barah
ASM_Darah_Barah:
MOV REG,VAR1 ; 18B753/2401
MULTI_JMP #2 ; 18B755/1102
.word Code_18B847 ; 18B757/47B8
.word DATA8_18B869 ; 18B759/69B8
ASM_CALL Zero_18FD ; 18B75B/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18B75F/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148257 ; 18B763/578214
.word 1024 ; 18B766/0004
JSR Make_Animation_Loop1 ; 18B768/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B76B/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Darah ; 18B76F/9D8919
.byte $90 ; 18B772/90
.word 96 ; 18B773/6000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B775/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18B827 ; 18B779/27B818
.byte $C0 ; 18B77C/C0
.word 32 ; 18B77D/2000
ASM_CALL Check_Active_Spirit_1b ; 18B77F/07CFAA07 // Check Active Spirit (returns 0 if given spirit is active) (ie 2=Dao)
.byte 2 ; 18B783/02
JEQ DATA8_18B79D ; 18B784/0B9DB7
ASM_CALL Clear_Event_1b ; 18B787/07DD9C00 // Battle related
.byte $0E ; 18B78B/0E
ASM_CALL Load_Graphics__1b_12b ; 18B78C/07BC9C00 // Load Graphics
.byte 14 ; 18B790/0E
.word 13 ; 18B791/0D00
.word 0 ; 18B793/0000
.word 0 ; 18B795/0000
.word 0 ; 18B797/0000
.word 0 ; 18B799/0000
.word 0 ; 18B79B/0000
DATA8_18B79D:
OR.w Spirits_NotOwned,OR,#$0002 ; 18B79D/0EA713010200
L_18B7A3:
ASM_CALL Load_Sprite_1b_1b_12b ; 18B7A3/07AE9C00 // Load Sprite
.byte 8 ; 18B7A7/08
.byte 36 ; 18B7A8/24
.word 18 ; 18B7A9/1200
.word 160 ; 18B7AB/A000
.word 112 ; 18B7AD/7000
.word 0 ; 18B7AF/0000
.word 18 ; 18B7B1/1200
.word 1 ; 18B7B3/0100
JSR Sub_LoadSomething ; 18B7B5/1B4DD4
Text_SCRIPT075:
ASM_CALL Load_Event_Text ; 18B7B8/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_075 ; 18B7BC/78DA0C
.byte $00 ; 18B7BF/00
TASK Sub_Some_Town_Anim ; 18B7C0/081B97
JSR Wait_for_A_press ; 18B7C3/1BC3D4
WAIT #30 ; 18B7C6/061E
MOV.w Animation_Finish_Timer,#$0001; 18B7C8/1691100100
WAIT #120 ; 18B7CD/0678
ASM_CALL Load_Sprite_1b_1b_12b ; 18B7CF/07AE9C00 // Load Sprite
.byte 8 ; 18B7D3/08
.byte 36 ; 18B7D4/24
.word 18 ; 18B7D5/1200
.word 24 ; 18B7D7/1800
.word 65524 ; 18B7D9/F4FF
.word 0 ; 18B7DB/0000
.word 18 ; 18B7DD/1200
.word 2 ; 18B7DF/0200
WAIT #120 ; 18B7E1/0678
Text_SCRIPT076:
ASM_CALL Load_Event_Text ; 18B7E3/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_076 ; 18B7E7/C1DA0C
.byte $00 ; 18B7EA/00
JSR Wait_for_A_press ; 18B7EB/1BC3D4
ASM_CALL Check_Party ; 18B7EE/07D9D418 // Check party
UNK_TASK #1 ; 18B7F2/1401
SET_ANIM #-1 ; 18B7F4/30FF
MOV.w $18E1,#$000A ; 18B7F6/16E1180A00
ASM_CALL Check_map_tile_value ; 18B7FB/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18B7FF/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18B803/1BD4D3
JSR Sub_Event_Battle ; 18B806/1BC3D3
JSR Sub_Sauza_2 ; 18B809/1BE0D3
Text_SCRIPT077:
ASM_CALL Load_Event_Text ; 18B80C/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_077 ; 18B810/F9DA0C
.byte $00 ; 18B813/00
JSR Fanfare_and_Refresh_Music ; 18B814/1B7BD3
Earth_Spirit_Get2:
MOV REG,#$0002 ; 18B817/1E0200
ASM_CALL Get_New_Spirit_far ; 18B81A/070C8D07
JSR Some_sub ; 18B81E/1B5CD4
MOV.w $1901,#$0000 ; 18B821/1601190000
End_Dao2_Event:
END ; 18B826/00
$18B847 - Sub: Ch04 Dao 2 animations
Code_18B847:
SET_ANIM #112 ; 18B847/3070
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B849/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B84D/9110
.word 1 ; 18B84F/0100
START_LOOP #10 ; 18B851/010A
SET_ANIM #80,WAIT #1 ; 18B853/3150
SET_ANIM #112,WAIT #2 ; 18B855/3270
END_LOOP ; 18B857/02
START_LOOP #10 ; 18B858/010A
SET_ANIM #80,WAIT #1 ; 18B85A/3150
SET_ANIM #112,WAIT #1 ; 18B85C/3170
END_LOOP ; 18B85E/02
START_LOOP #10 ; 18B85F/010A
SET_ANIM #80,WAIT #2 ; 18B861/3250
SET_ANIM #112,WAIT #1 ; 18B863/3170
END_LOOP ; 18B865/02
SET_ANIM #80 ; 18B866/3050
HALT ; 18B868/0A
DATA8_18B869:
START_LOOP #10 ; 18B869/010A
SET_ANIM #79,WAIT #1 ; 18B86B/314F
SET_ANIM #-1,WAIT #2 ; 18B86D/32FF
END_LOOP ; 18B86F/02
START_LOOP #10 ; 18B870/010A
SET_ANIM #79,WAIT #1 ; 18B872/314F
SET_ANIM #-1,WAIT #1 ; 18B874/31FF
END_LOOP ; 18B876/02
START_LOOP #10 ; 18B877/010A
SET_ANIM #79,WAIT #2 ; 18B879/324F
SET_ANIM #-1,WAIT #1 ; 18B87B/31FF
END_LOOP ; 18B87D/02
SET_ANIM #79 ; 18B87E/304F
HALT ; 18B880/0A
$18B89D - STORY 13: If it's a trap...
ASM_A_Trap:
MOV REG,VAR1 ; 18B89D/2401
MULTI_JMP #3 ; 18B89F/1103
.word Code_Post_Ariel_Ch4 ; 18B8A1/F8BA
.word DATA8_18BB06 ; 18B8A3/06BB
.word DATA8_18BB11 ; 18B8A5/11BB
WAIT #30 ; 18B8A7/061E
JSR Sub_LoadSomething ; 18B8A9/1B4DD4
Text_SCRIPT078:
ASM_CALL Load_Event_Text ; 18B8AC/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_078 ; 18B8B0/27DB0C
.byte $00 ; 18B8B3/00
TASK Sub_Some_Town_Anim ; 18B8B4/081B97
JSR Wait_for_A_press ; 18B8B7/1BC3D4
ASM_CALL RAM_minus_val_2b_2b ; 18B8BA/076FA000 // (RAM) minus (val)
.word Map_Compass ; 18B8BE/FB16
.word 2 ; 18B8C0/0200
JEQ DATA8_18B8CE ; 18B8C2/0BCEB8
MOV REG,#$0001 ; 18B8C5/1E0100
JSR Dungeon_loop ; 18B8C8/1B92D3
JMP Text_SCRIPT079 ; 18B8CB/1AD4B8
DATA8_18B8CE:
MOV REG,#$0003 ; 18B8CE/1E0300
JSR Dungeon_loop ; 18B8D1/1B92D3
Text_SCRIPT079:
ASM_CALL Load_Event_Text ; 18B8D4/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_079 ; 18B8D8/50DB0C
.byte $00 ; 18B8DB/00
JSR Wait_for_A_press ; 18B8DC/1BC3D4
ASM_CALL GetSet_SFX_1b ; 18B8DF/07449C00 // Get/Set Sound Effect
.byte 45 ; 18B8E3/2D
MOV VAR0,#$0002 ; 18B8E4/0F000200
JSR SetB6_FadeOut ; 18B8E8/1B16D4
ASM_CALL Set_Win1_3b ; 18B8EB/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18B8EF/00
.word $C434 ; 18B8F0/34C4
ASM_CALL Set_WindowMask_4b ; 18B8F2/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18B8F6/10
.byte $00 ; 18B8F7/00
.byte $00 ; 18B8F8/00
.byte $03 ; 18B8F9/03
ASM_CALL Display_brancher_6b ; 18B8FA/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18B8FE/01
.byte $01 ; 18B8FF/01
.word $3000 ; 18B900/0030
.word $0400 ; 18B902/0004
JSR DATA8_18D389 ; 18B904/1B89D3
ASM_CALL Zero_18FD ; 18B907/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18B90B/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148268 ; 18B90F/688214
.word 1024 ; 18B912/0004
JSR Make_Animation_Loop1 ; 18B914/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B917/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18BA58 ; 18B91B/58BA18
.byte $10 ; 18B91E/10
.word 96 ; 18B91F/6000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B921/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Ariel ; 18B925/6B8A19
.byte $90 ; 18B928/90
.word 64 ; 18B929/4000
JSR Sub_Turn_off_sound ; 18B92B/1BF6D3
ASM_CALL GetSet_Music_1b ; 18B92E/073C9C00 // Get/Set Music
.byte 63 ; 18B932/3F
JSR Sub_FadeIn ; 18B933/1B35D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18B936/07AE9C00 // Load Sprite
.byte 8 ; 18B93A/08
.byte 36 ; 18B93B/24
.word 18 ; 18B93C/1200
.word 152 ; 18B93E/9800
.word 65524 ; 18B940/F4FF
.word 0 ; 18B942/0000
.word 19 ; 18B944/1300
.word 1 ; 18B946/0100
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18B948/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18B94C/9110
.word 2 ; 18B94E/0200
ASM_CALL Clear_Winmask_Lo ; 18B950/0744D518 // Clear window mask lo
Text_SCRIPT080:
ASM_CALL Load_Event_Text ; 18B954/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_080 ; 18B958/D3DB0C
.byte $00 ; 18B95B/00
JSR Wait_for_A_press ; 18B95C/1BC3D4
JSR Salah_leaves ; 18B95F/1BE0D2
JSR Sub_Unequip_Axs ; 18B962/1B1ED3
Text_SCRIPT081:
ASM_CALL Load_Event_Text ; 18B965/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_081 ; 18B969/17DF0C
.byte $00 ; 18B96C/00
JSR Wait_for_A_press ; 18B96D/1BC3D4
ASM_CALL Check_Party ; 18B970/07D9D418 // Check party
UNK_TASK #1 ; 18B974/1401
SET_ANIM #-1 ; 18B976/30FF
MOV.w $18E1,#$000B ; 18B978/16E1180B00
ASM_CALL Check_map_tile_value ; 18B97D/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18B981/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18B985/1BD4D3
JSR Sub_Event_Battle ; 18B988/1BC3D3
JSR Sub_Sauza_2 ; 18B98B/1BE0D3
WAIT #30 ; 18B98E/061E
ASM_CALL Zero_18FD ; 18B990/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18B994/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148281 ; 18B998/818214
.word 1024 ; 18B99B/0004
JSR Make_Animation_Loop1 ; 18B99D/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B9A0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18BAB8 ; 18B9A4/B8BA18
.byte $D0 ; 18B9A7/D0
.word 64 ; 18B9A8/4000
ASM_CALL Load_Sprite_1b_1b_12b ; 18B9AA/07AE9C00 // Load Sprite
.byte 8 ; 18B9AE/08
.byte 36 ; 18B9AF/24
.word 18 ; 18B9B0/1200
.word 56 ; 18B9B2/3800
.word 65524 ; 18B9B4/F4FF
.word 0 ; 18B9B6/0000
.word 19 ; 18B9B8/1300
.word 2 ; 18B9BA/0200
Text_SCRIPT082:
ASM_CALL Load_Event_Text ; 18B9BC/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_082 ; 18B9C0/37DF0C
.byte $00 ; 18B9C3/00
TASK Sub_Some_Town_Anim ; 18B9C4/081B97
JSR Wait_for_A_press ; 18B9C7/1BC3D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18B9CA/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Text_Color_Red ; 18B9CE/8C950D
.byte $02 ; 18B9D1/02
.word 2 ; 18B9D2/0200
MOV.w Spell_ID,#$005E ; 18B9D4/1627115E00
ASM_CALL Load_Sprite_Setup_12b ; 18B9D9/075D9C00 // Load Sprite Setup
.word 17 ; 18B9DD/1100
.word 0 ; 18B9DF/0000
.word 0 ; 18B9E1/0000
.word 0 ; 18B9E3/0000
.word 0 ; 18B9E5/0000
.word 0 ; 18B9E7/0000
WAIT #120 ; 18B9E9/0678
Text_SCRIPT083:
ASM_CALL Load_Event_Text ; 18B9EB/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_083 ; 18B9EF/73E00C
.byte $00 ; 18B9F2/00
JSR Wait_for_A_press ; 18B9F3/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18B9F6/07AE9C00 // Load Sprite
.byte 8 ; 18B9FA/08
.byte 36 ; 18B9FB/24
.word 18 ; 18B9FC/1200
.word 56 ; 18B9FE/3800
.word 65380 ; 18BA00/64FF
.word 0 ; 18BA02/0000
.word 19 ; 18BA04/1300
.word 3 ; 18BA06/0300
JSR Sub_Turn_off_sound ; 18BA08/1BF6D3
ASM_CALL GetSet_Music_1b ; 18BA0B/073C9C00 // Get/Set Music
.byte 70 ; 18BA0F/46
Text_SCRIPT084:
ASM_CALL Load_Event_Text ; 18BA10/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_084 ; 18BA14/E9E00C
.byte $00 ; 18BA17/00
JSR Wait_for_A_press ; 18BA18/1BC3D4
MOV.w Animation_Finish_Timer,#$0066; 18BA1B/1691106600
WAIT #60 ; 18BA20/063C
Text_SCRIPT085:
ASM_CALL Load_Event_Text ; 18BA22/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_085 ; 18BA26/FCE20C
.byte $00 ; 18BA29/00
JSR Wait_for_A_press ; 18BA2A/1BC3D4
ASM_CALL GetSet_SFX_1b ; 18BA2D/07449C00 // Get/Set Sound Effect
.byte 40 ; 18BA31/28
MOV VAR0,#$0001 ; 18BA32/0F000100
JSR SetB6_FadeOut ; 18BA36/1B16D4
ASM_CALL Sub_038007 ; 18BA39/07078003
ASM_CALL Map_stuff_and_vblank ; 18BA3D/073F8803 // Map stuff and vblank
ASM_CALL Sub_03887A ; 18BA41/077A8803 // Sub: Involved in uncompressing the dungeon graphics
JSR Sub_Turn_off_sound ; 18BA45/1BF6D3
ASM_CALL Sub_Default_BGM ; 18BA48/0720A503 // Sub: Default Dungeon BGM
JSR Sub_FadeIn ; 18BA4C/1B35D4
JSR Some_sub ; 18BA4F/1B5CD4
MOV.w $1901,#$0000 ; 18BA52/1601190000
END ; 18BA57/00
$18BAF8 - Sub: Ch04 Ariel animations
Code_Post_Ariel_Ch4:
SET_ANIM #46 ; 18BAF8/302E
SET_XVEL #-256 ; 18BAFA/5800FF
WAIT #96 ; 18BAFD/0660
ZERO_VEL ; 18BAFF/D0
MOV.w Animation_Finish_Timer,#$0002; 18BB00/1691100200
HALT ; 18BB05/0A
DATA8_18BB06:
SET_ANIM #49 ; 18BB06/3031
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18BB08/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18BB0C/9110
.word 1 ; 18BB0E/0100
END ; 18BB10/00
DATA8_18BB11:
SET_ANIM #81 ; 18BB11/3051
SET_YVEL #2048 ; 18BB13/600008
WAIT #18 ; 18BB16/0612
ZERO_VEL ; 18BB18/D0
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18BB19/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18BB1D/9110
.word 102 ; 18BB1F/6600
SET_YVEL #-2048 ; 18BB21/6000F8
WAIT #18 ; 18BB24/0612
END ; 18BB26/00
$18BB43 - STORY 14: Darwin joins
ASM_Ch4_Darwin:
MOV REG,VAR1 ; 18BB43/2401
MULTI_JMP #1 ; 18BB45/1101
.word DATA8_18BBA5 ; 18BB47/A5BB
ASM_CALL Zero_18FD ; 18BB49/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18BB4D/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148292 ; 18BB51/928214
.word 1024 ; 18BB54/0004
JSR Make_Animation_Loop1 ; 18BB56/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18BB59/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C72E_data ; 18BB5D/B0A218
.byte $90 ; 18BB60/90
.word 64 ; 18BB61/4000
ASM_CALL Load_Sprite_1b_1b_12b ; 18BB63/07AE9C00 // Load Sprite
.byte 8 ; 18BB67/08
.byte 36 ; 18BB68/24
.word 18 ; 18BB69/1200
.word 128 ; 18BB6B/8000
.word 112 ; 18BB6D/7000
.word 0 ; 18BB6F/0000
.word 20 ; 18BB71/1400
.word 1 ; 18BB73/0100
WAIT #40 ; 18BB75/0628
JSR Sub_LoadSomething ; 18BB77/1B4DD4
Text_SCRIPT086:
ASM_CALL Load_Event_Text ; 18BB7A/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_086 ; 18BB7E/98E30C
.byte $00 ; 18BB81/00
TASK Sub_Some_Town_Anim ; 18BB82/081B97
JSR Wait_for_A_press ; 18BB85/1BC3D4
ASM_CALL GetSet_Music_1b ; 18BB88/073C9C00 // Get/Set Music
.byte 86 ; 18BB8C/56
WAIT #240 ; 18BB8D/06F0
WAIT #200 ; 18BB8F/06C8
ASM_CALL Check_Party ; 18BB91/07D9D418 // Check party
ASM_CALL Sub_Default_BGM ; 18BB95/0720A503 // Sub: Default Dungeon BGM
JSR Darwin_joins ; 18BB99/1B3DD3
JSR Some_sub ; 18BB9C/1B5CD4
MOV.w $1901,#$0000 ; 18BB9F/1601190000
END ; 18BBA4/00
DATA8_18BBA5:
SET_ANIM #70 ; 18BBA5/3046
HALT ; 18BBA7/0A
$18BBC4 - STORY 15: Vs Teefa
ASM_Vs_Teefa:
MOV REG,VAR1 ; 18BBC4/2401
MULTI_JMP #4 ; 18BBC6/1104
.word DATA8_18BCE1 ; 18BBC8/E1BC
.word DATA8_18BCF1 ; 18BBCA/F1BC
.word DATA8_18BCF4 ; 18BBCC/F4BC
.word DATA8_18BCF7 ; 18BBCE/F7BC
ASM_CALL Zero_18FD ; 18BBD0/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18BBD4/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1482B3 ; 18BBD8/B38214
.word 1024 ; 18BBDB/0004
JSR Make_Animation_Loop1 ; 18BBDD/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18BBE0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Teefa ; 18BBE4/B28A19
.byte $B0 ; 18BBE7/B0
.word 64 ; 18BBE8/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18BBEA/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18BAB8 ; 18BBEE/B8BA18
.byte $D0 ; 18BBF1/D0
.word 64 ; 18BBF2/4000
ASM_CALL Load_Sprite_1b_1b_12b ; 18BBF4/07AE9C00 // Load Sprite
.byte 8 ; 18BBF8/08
.byte 36 ; 18BBF9/24
.word 18 ; 18BBFA/1200
.word 176 ; 18BBFC/B000
.word 112 ; 18BBFE/7000
.word 0 ; 18BC00/0000
.word 21 ; 18BC02/1500
.word 1 ; 18BC04/0100
ASM_CALL Load_Sprite_1b_1b_12b ; 18BC06/07AE9C00 // Load Sprite
.byte 8 ; 18BC0A/08
.byte 36 ; 18BC0B/24
.word 18 ; 18BC0C/1200
.word 128 ; 18BC0E/8000
.word 112 ; 18BC10/7000
.word 0 ; 18BC12/0000
.word 21 ; 18BC14/1500
.word 2 ; 18BC16/0200
WAIT #40 ; 18BC18/0628
JSR Sub_LoadSomething ; 18BC1A/1B4DD4
Text_SCRIPT087:
ASM_CALL Load_Event_Text ; 18BC1D/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_087 ; 18BC21/25E40C
.byte $00 ; 18BC24/00
TASK Sub_Some_Town_Anim ; 18BC25/081B97
JSR Wait_for_A_press ; 18BC28/1BC3D4
WAIT #30 ; 18BC2B/061E
MOV.w Animation_Finish_Timer,#$0066; 18BC2D/1691106600
WAIT #30 ; 18BC32/061E
Text_SCRIPT088:
ASM_CALL Load_Event_Text ; 18BC34/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_088 ; 18BC38/9CE50C
.byte $00 ; 18BC3B/00
JSR Wait_for_A_press ; 18BC3C/1BC3D4
ASM_CALL Check_Party ; 18BC3F/07D9D418 // Check party
UNK_TASK #1 ; 18BC43/1401
SET_ANIM #-1 ; 18BC45/30FF
MOV.w $18E1,#$000C ; 18BC47/16E1180C00
Teefa_Boss_Fight:
ASM_CALL Check_map_tile_value ; 18BC4C/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18BC50/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18BC54/1BD4D3
JSR Sub_Event_Battle ; 18BC57/1BC3D3
JSR Sub_Sauza_2 ; 18BC5A/1BE0D3
ASM_CALL Compressed_Setup_3b_2b ; 18BC5D/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1482C4 ; 18BC61/C48214
.word 1024 ; 18BC64/0004
JSR Make_Animation_Loop1 ; 18BC66/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18BC69/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C72E_data ; 18BC6D/B0A218
.byte $90 ; 18BC70/90
.word 64 ; 18BC71/4000
WAIT #30 ; 18BC73/061E
ASM_CALL Load_Sprite_1b_1b_12b ; 18BC75/07AE9C00 // Load Sprite
.byte 8 ; 18BC79/08
.byte 36 ; 18BC7A/24
.word 18 ; 18BC7B/1200
.word 56 ; 18BC7D/3800
.word 65524 ; 18BC7F/F4FF
.word 0 ; 18BC81/0000
.word 21 ; 18BC83/1500
.word 3 ; 18BC85/0300
JSR Sub_Turn_off_sound ; 18BC87/1BF6D3
ASM_CALL GetSet_Music_1b ; 18BC8A/073C9C00 // Get/Set Music
.byte 69 ; 18BC8E/45
WAIT #40 ; 18BC8F/0628
SET_ANIM #4 ; 18BC91/3004
WAIT #20 ; 18BC93/0614
SET_ANIM #56,WAIT #4 ; 18BC95/3438
SET_ANIM #54 ; 18BC97/3036
WAIT #20 ; 18BC99/0614
Text_SCRIPT089:
ASM_CALL Load_Event_Text ; 18BC9B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_089 ; 18BC9F/2DE60C
.byte $00 ; 18BCA2/00
TASK Sub_Some_Town_Anim ; 18BCA3/081B97
JSR Wait_for_A_press ; 18BCA6/1BC3D4
WAIT #30 ; 18BCA9/061E
JSR Darwin_leaves ; 18BCAB/1B5CD3
ASM_CALL Load_Sprite_1b_1b_12b ; 18BCAE/07AE9C00 // Load Sprite
.byte 8 ; 18BCB2/08
.byte 36 ; 18BCB3/24
.word 18 ; 18BCB4/1200
.word 80 ; 18BCB6/5000
.word 65524 ; 18BCB8/F4FF
.word 0 ; 18BCBA/0000
.word 21 ; 18BCBC/1500
.word 4 ; 18BCBE/0400
WAIT #30 ; 18BCC0/061E
Text_SCRIPT090:
ASM_CALL Load_Event_Text ; 18BCC2/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_090 ; 18BCC6/E6E60C
.byte $00 ; 18BCC9/00
JSR Wait_for_A_press ; 18BCCA/1BC3D4
JSR Sub_Turn_off_sound ; 18BCCD/1BF6D3
ASM_CALL Sub_Default_BGM ; 18BCD0/0720A503 // Sub: Default Dungeon BGM
ASM_CALL Check_Party ; 18BCD4/07D9D418 // Check party
JSR Some_sub ; 18BCD8/1B5CD4
MOV.w $1901,#$0000 ; 18BCDB/1601190000
END ; 18BCE0/00
DATA8_18BCE1:
SET_ANIM #81 ; 18BCE1/3051
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18BCE3/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18BCE7/9110
.word 102 ; 18BCE9/6600
SET_YVEL #-2048 ; 18BCEB/6000F8
WAIT #18 ; 18BCEE/0612
END ; 18BCF0/00
DATA8_18BCF1:
SET_ANIM #50 ; 18BCF1/3032
HALT ; 18BCF3/0A
DATA8_18BCF4:
SET_ANIM #55 ; 18BCF4/3037
HALT ; 18BCF6/0A
DATA8_18BCF7:
SET_ANIM #70 ; 18BCF7/3046
HALT ; 18BCF9/0A
$18BD26 - STORY 16: Galneon monologue
ASM_Galneon_Door:
MOV REG,VAR1 ; 18BD26/2401
MULTI_JMP #3 ; 18BD28/1103
.word Code_18C0D1 ; 18BD2A/D1C0
.word DATA8_18C0DC ; 18BD2C/DCC0
.word Roll_for_Door_SFX ; 18BD2E/B3C1
ASM_CALL GetSet_SFX_1b ; 18BD30/07449C00 // Get/Set Sound Effect
.byte 45 ; 18BD34/2D
MOV VAR0,#$0002 ; 18BD35/0F000200
JSR SetB6_FadeOut ; 18BD39/1B16D4
ASM_CALL Display_brancher_6b ; 18BD3C/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18BD40/01
.byte $00 ; 18BD41/00
.word $3000 ; 18BD42/0030
.word $0400 ; 18BD44/0004
JSR DATA8_18D389 ; 18BD46/1B89D3
ASM_CALL Zero_18FD ; 18BD49/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18BD4D/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_1482E5 ; 18BD51/E58214
.word 1024 ; 18BD54/0004
JSR Make_Animation_Loop1 ; 18BD56/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18BD59/0735A000 // Decompression setup 2
.long RLE_Post_Lightning ; 18BD5D/E6BE18
.long $000440 ; 18BD60/400400
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18BD63/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 18BD67/9B9B18
.byte $90 ; 18BD6A/90
.word 64 ; 18BD6B/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18BD6D/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18BAB8 ; 18BD71/B8BA18
.byte $D0 ; 18BD74/D0
.word 64 ; 18BD75/4000
ASM_CALL Load_Sprite_1b_1b_12b ; 18BD77/07AE9C00 // Load Sprite
.byte 8 ; 18BD7B/08
.byte 36 ; 18BD7C/24
.word 18 ; 18BD7D/1200
.word 128 ; 18BD7F/8000
.word 112 ; 18BD81/7000
.word 0 ; 18BD83/0000
.word 22 ; 18BD85/1600
.word 1 ; 18BD87/0100
JSR Sub_Turn_off_sound ; 18BD89/1BF6D3
ASM_CALL GetSet_Music_1b ; 18BD8C/073C9C00 // Get/Set Music
.byte 66 ; 18BD90/42
JSR Sub_FadeIn ; 18BD91/1B35D4
WAIT #30 ; 18BD94/061E
JSR Sub_LoadSomething ; 18BD96/1B4DD4
Text_SCRIPT091:
ASM_CALL Load_Event_Text ; 18BD99/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_091 ; 18BD9D/80E70C
.byte $00 ; 18BDA0/00
TASK Sub_Some_Town_Anim ; 18BDA1/081B97
JSR Wait_for_A_press ; 18BDA4/1BC3D4
JSR Sub_Axs_joins_Ch3 ; 18BDA7/1BFFD2
JSR Salah_joins ; 18BDAA/1BC1D2
WAIT #40 ; 18BDAD/0628
Text_SCRIPT092:
ASM_CALL Load_Event_Text ; 18BDAF/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_092 ; 18BDB3/AEE80C
.byte $00 ; 18BDB6/00
JSR Wait_for_A_press ; 18BDB7/1BC3D4
JSR Sub_Turn_off_sound ; 18BDBA/1BF6D3
ASM_CALL GetSet_Music_1b ; 18BDBD/073C9C00 // Get/Set Music
.byte 58 ; 18BDC1/3A
JSL Sub_Disable_HDMA ; 18BDC2/04F18901
WAIT #1 ; 18BDC6/0601
TASK Code_18C04D ; 18BDC8/084DC0
WAIT #240 ; 18BDCB/06F0
WAIT #240 ; 18BDCD/06F0
Text_SCRIPT093:
ASM_CALL Load_Event_Text ; 18BDCF/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_093 ; 18BDD3/8BE90C
.byte $00 ; 18BDD6/00
JSR Wait_for_A_press ; 18BDD7/1BC3D4
JSR Sub_Unequip_Axs ; 18BDDA/1B1ED3
UNK_TASK #1 ; 18BDDD/1401
ASM_CALL Rem_HDMA_ch_1b ; 18BDDF/071F9F00 // Remove HDMA channel
.byte $07 ; 18BDE3/07
JSL Sub_Transfer_stuff ; 18BDE4/04CD8901
WAIT #1 ; 18BDE8/0601
MOV.b $1893,#$B6 ; 18BDEA/139318B6
MOV.b Color_window,#$00 ; 18BDEE/13302100
ASM_CALL Set_RGB_3b ; 18BDF2/07839F00 // Set RGB -2
.byte $1F ; 18BDF6/1F
.byte $1F ; 18BDF7/1F
.byte $1F ; 18BDF8/1F
WAIT #1 ; 18BDF9/0601
ASM_CALL GetSet_SFX_1b ; 18BDFB/07449C00 // Get/Set Sound Effect
.byte 40 ; 18BDFF/28
ASM_CALL Check_Party ; 18BE00/07D9D418 // Check party
ASM_CALL Sub_038007 ; 18BE04/07078003
ASM_CALL Map_stuff_and_vblank ; 18BE08/073F8803 // Map stuff and vblank
ASM_CALL Sub_03887A ; 18BE0C/077A8803 // Sub: Involved in uncompressing the dungeon graphics
JSR Sub_FadeIn ; 18BE10/1B35D4
Text_SCRIPT094:
ASM_CALL Load_Event_Text ; 18BE13/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_094 ; 18BE17/B8E90C
.byte $00 ; 18BE1A/00
JSR Wait_for_A_press ; 18BE1B/1BC3D4
WAIT #120 ; 18BE1E/0678
TASK Code_18BFBE_loop ; 18BE20/08BEBF
ASM_CALL GetSet_SFX_1b ; 18BE23/07449C00 // Get/Set Sound Effect
.byte 11 ; 18BE27/0B
WAIT #1 ; 18BE28/0601
ASM_CALL GetSet_SFX_1b ; 18BE2A/07449C00 // Get/Set Sound Effect
.byte 12 ; 18BE2E/0C
WAIT #240 ; 18BE2F/06F0
WAIT #80 ; 18BE31/0650
JSL Sub_Disable_HDMA ; 18BE33/04F18901
WAIT #1 ; 18BE37/0601
MOV.b Color_math,#$37 ; 18BE39/13312137
START_LOOP #31 ; 18BE3D/011F
ASM_CALL Add_RGB_3b ; 18BE3F/07E29F00 // Add RGB
.byte $01 ; 18BE43/01
.byte $01 ; 18BE44/01
.byte $01 ; 18BE45/01
WAIT #2 ; 18BE46/0602
END_LOOP ; 18BE48/02
UNK_TASK #1 ; 18BE49/1401
UNK_TASK #1 ; 18BE4B/1401
ASM_CALL Display_brancher_6b ; 18BE4D/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18BE51/01
.byte $00 ; 18BE52/00
.word $3000 ; 18BE53/0030
.word $0400 ; 18BE55/0004
JSR DATA8_18D389 ; 18BE57/1B89D3
ASM_CALL Compressed_Setup_3b_2b ; 18BE5A/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148306 ; 18BE5E/068314
.word 1024 ; 18BE61/0004
JSR Make_Animation_Loop1 ; 18BE63/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18BE66/0735A000 // Decompression setup 2
.long RLE_18CC36_data ; 18BE6A/43BF18
.long $000440 ; 18BE6D/400400
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18BE70/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18BF9E ; 18BE74/9EBF18
.byte $C0 ; 18BE77/C0
.word 32 ; 18BE78/2000
ASM_CALL MainScr_Remove_1b ; 18BE7A/07B69D00 // Main Screen remove
.byte $0D ; 18BE7E/0D
WAIT #60 ; 18BE7F/063C
START_LOOP #31 ; 18BE81/011F
ASM_CALL Add_RGB_3b ; 18BE83/07E29F00 // Add RGB
.byte $FF ; 18BE87/FF
.byte $FF ; 18BE88/FF
.byte $FF ; 18BE89/FF
WAIT #2 ; 18BE8A/0602
END_LOOP ; 18BE8C/02
WAIT #60 ; 18BE8D/063C
ASM_CALL Load_Sprite_1b_1b_12b ; 18BE8F/07AE9C00 // Load Sprite
.byte 8 ; 18BE93/08
.byte 36 ; 18BE94/24
.word 18 ; 18BE95/1200
.word 56 ; 18BE97/3800
.word 65476 ; 18BE99/C4FF
.word 0 ; 18BE9B/0000
.word 22 ; 18BE9D/1600
.word 2 ; 18BE9F/0200
Lightning_Scene:
START_LOOP #16 ; 18BEA1/0110
ASM_CALL Random_loopvar ; 18BEA3/07BFC018 // Random loopvar - Adds [0...45]+15 to an object's wait timer
ASM_CALL Load_Sprite_1b_1b_12b ; 18BEA7/07AE9C00 // Load Sprite
.byte 8 ; 18BEAB/08
.byte 36 ; 18BEAC/24
.word 18 ; 18BEAD/1200
.word 8 ; 18BEAF/0800
.word 65484 ; 18BEB1/CCFF
.word 0 ; 18BEB3/0000
.word 22 ; 18BEB5/1600
.word 3 ; 18BEB7/0300
END_LOOP ; 18BEB9/02
START_LOOP #31 ; 18BEBA/011F
ASM_CALL Add_RGB_3b ; 18BEBC/07E29F00 // Add RGB
.byte $01 ; 18BEC0/01
.byte $01 ; 18BEC1/01
.byte $01 ; 18BEC2/01
WAIT #2 ; 18BEC3/0602
END_LOOP ; 18BEC5/02
WAIT #60 ; 18BEC6/063C
ASM_CALL MainScr_Remove_1b ; 18BEC8/07B69D00 // Main Screen remove
.byte $1F ; 18BECC/1F
START_LOOP #31 ; 18BECD/011F
ASM_CALL Add_RGB_3b ; 18BECF/07E29F00 // Add RGB
.byte $FF ; 18BED3/FF
.byte $FF ; 18BED4/FF
.byte $FF ; 18BED5/FF
WAIT #2 ; 18BED6/0602
END_LOOP ; 18BED8/02
JSR Sub_Turn_off_sound ; 18BED9/1BF6D3
ASM_CALL Check_Party ; 18BEDC/07D9D418 // Check party
MOV.w $1901,#$0000 ; 18BEE0/1601190000
END ; 18BEE5/00
$18BFBE - Sub: Ch04 Some loop
Code_18BFBE_loop:
MOV VAR2,#$0000 ; 18BFBE/0F020000
START_LOOP #12 ; 18BFC2/010C
ASM_CALL Sub_18BFCE ; 18BFC4/07CEBF18 // Some object variable manipulation
WAIT #2 ; 18BFC8/0602
END_LOOP ; 18BFCA/02
JMP Code_18BFBE_loop ; 18BFCB/1ABEBF
$18C04D - Sub: Ch04 More graphics 01
Code_18C04D:
ASM_CALL Set_RGB_3b ; 18C04D/07839F00 // Set RGB -2
.byte $E8 ; 18C051/E8
.byte $F4 ; 18C052/F4
.byte $00 ; 18C053/00
ASM_CALL Set_WindowMask_4b ; 18C054/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $00 ; 18C058/00
.byte $00 ; 18C059/00
.byte $00 ; 18C05A/00
.byte $80 ; 18C05B/80
MOV.b Color_window,#$10 ; 18C05C/13302110
MOV.b Color_math,#$22 ; 18C060/13312122
ASM_CALL HDMA_xfer_6b ; 18C064/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $07 ; 18C068/07
.byte $01 ; 18C069/01
.byte $28 ; 18C06A/28
.long HDMA_18C0A2 ; 18C06B/A2C018
START_LOOP #48 ; 18C06E/0130
ASM_CALL Add_RGB_3b ; 18C070/07E29F00 // Add RGB
.byte $01 ; 18C074/01
.byte $01 ; 18C075/01
.byte $00 ; 18C076/00
START_LOOP #2 ; 18C077/0102
WAIT #2 ; 18C079/0602
ASM_CALL Add_RGB_3b ; 18C07B/07E29F00 // Add RGB
.byte $0C ; 18C07F/0C
.byte $0C ; 18C080/0C
.byte $00 ; 18C081/00
WAIT #2 ; 18C082/0602
ASM_CALL Add_RGB_3b ; 18C084/07E29F00 // Add RGB
.byte $F4 ; 18C088/F4
.byte $F4 ; 18C089/F4
.byte $00 ; 18C08A/00
END_LOOP ; 18C08B/02
END_LOOP ; 18C08C/02
DATA8_18C08D:
WAIT #2 ; 18C08D/0602
ASM_CALL Add_RGB_3b ; 18C08F/07E29F00 // Add RGB
.byte $0C ; 18C093/0C
.byte $0C ; 18C094/0C
.byte $00 ; 18C095/00
WAIT #2 ; 18C096/0602
ASM_CALL Add_RGB_3b ; 18C098/07E29F00 // Add RGB
.byte $F4 ; 18C09C/F4
.byte $F4 ; 18C09D/F4
.byte $00 ; 18C09E/00
JMP DATA8_18C08D ; 18C09F/1A8DC0
$18C0D1 - Sub: Ch04 More graphics 02
Code_18C0D1:
SET_ANIM #81 ; 18C0D1/3051
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18C0D3/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18C0D7/9110
.word 102 ; 18C0D9/6600
END ; 18C0DB/00
DATA8_18C0DC:
SET_ANIM #113,WAIT #7 ; 18C0DC/3771
INC_ANIM WAIT #4 ; 18C0DE/AC
INC_ANIM ; 18C0DF/A8
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C0E0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18C0F7 ; 18C0E4/F7C018
.byte $11 ; 18C0E7/11
.word 94 ; 18C0E8/5E00
WAIT #6 ; 18C0EA/0606
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C0EC/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18C155 ; 18C0F0/55C118
.byte $11 ; 18C0F3/11
.word 94 ; 18C0F4/5E00
HALT ; 18C0F6/0A
$18C1B3 - Sub: Ch04 RNG Door Sfx (why...?)
Roll_for_Door_SFX:
ASM_CALL Weird_RNG_Rolls ; 18C1B3/07D5C118 // Weird RNG rolls - Calls 1d6, 1d6, 1d2 and does object stuff
MULTI_JMP #2 ; 18C1B7/1102
.word DATA8_18C1BD ; 18C1B9/BDC1
.word DATA8_18C1C9 ; 18C1BB/C9C1
DATA8_18C1BD:
ASM_CALL GetSet_SFX_1b ; 18C1BD/07449C00 // Get/Set Sound Effect
.byte 14 ; 18C1C1/0E
SET_ANIM #116,WAIT #2 ; 18C1C2/3274
INC_ANIM WAIT #3 ; 18C1C4/AB
INC_ANIM ; 18C1C5/A8
WAIT #9 ; 18C1C6/0609
END ; 18C1C8/00
DATA8_18C1C9:
ASM_CALL GetSet_SFX_1b ; 18C1C9/07449C00 // Get/Set Sound Effect
.byte 15 ; 18C1CD/0F
SET_ANIM #119,WAIT #2 ; 18C1CE/3277
INC_ANIM WAIT #3 ; 18C1D0/AB
INC_ANIM ; 18C1D1/A8
WAIT #9 ; 18C1D2/0609
END ; 18C1D4/00
$18C226 - STORY 17: Darwin/Teefa yapping
ASM_Ch5_TeefaDarwin:
MOV REG,VAR1 ; 18C226/2401
MULTI_JMP #2 ; 18C228/1102
.word Code_18C33B ; 18C22A/3BC3
.word Code_18C349 ; 18C22C/49C3
JSR Salah_leaves ; 18C22E/1BE0D2
MOV.b $1893,#$B6 ; 18C231/139318B6
ASM_CALL Set_RGB_3b ; 18C235/07839F00 // Set RGB -2
.byte $1F ; 18C239/1F
.byte $1F ; 18C23A/1F
.byte $1F ; 18C23B/1F
START_LOOP #16 ; 18C23C/0110
ASM_CALL Unfade ; 18C23E/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #3 ; 18C242/0603
END_LOOP ; 18C244/02
ASM_CALL Display_brancher_6b ; 18C245/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18C249/01
.byte $00 ; 18C24A/00
.word $3000 ; 18C24B/0030
.word $0400 ; 18C24D/0004
ASM_CALL Set_Win1_3b ; 18C24F/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18C253/00
.word $C434 ; 18C254/34C4
ASM_CALL Set_WindowMask_4b ; 18C256/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18C25A/10
.byte $00 ; 18C25B/00
.byte $00 ; 18C25C/00
.byte $03 ; 18C25D/03
ASM_CALL Zero_18FD ; 18C25E/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18C262/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_14831F ; 18C266/1F8314
.word 1024 ; 18C269/0004
JSR Make_Animation_Loop1 ; 18C26B/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C26E/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18B3A5 ; 18C272/A5B318
.byte $10 ; 18C275/10
.word 96 ; 18C276/6000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C278/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Teefa ; 18C27C/B28A19
.byte $B0 ; 18C27F/B0
.word 64 ; 18C280/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C282/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C72E_data ; 18C286/B0A218
.byte $90 ; 18C289/90
.word 64 ; 18C28A/4000
ASM_CALL Sound_byte_1b ; 18C28C/070A9C00 // Sound byte
.byte $FF ; 18C290/FF
ASM_CALL GetSet_Music_1b ; 18C291/073C9C00 // Get/Set Music
.byte 64 ; 18C295/40
MOV VAR0,#$0002 ; 18C296/0F000200
JSR Sub_FadeIn ; 18C29A/1B35D4
WAIT #60 ; 18C29D/063C
ASM_CALL Load_Sprite_1b_1b_12b ; 18C29F/07AE9C00 // Load Sprite
.byte 8 ; 18C2A3/08
.byte 36 ; 18C2A4/24
.word 18 ; 18C2A5/1200
.word 224 ; 18C2A7/E000
.word 112 ; 18C2A9/7000
.word 0 ; 18C2AB/0000
.word 23 ; 18C2AD/1700
.word 1 ; 18C2AF/0100
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18C2B1/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18C2B5/9110
.word 1 ; 18C2B7/0100
JSR Sub_LoadSomething ; 18C2B9/1B4DD4
Text_SCRIPT095:
ASM_CALL Load_Event_Text ; 18C2BC/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_095 ; 18C2C0/C8E90C
.byte $00 ; 18C2C3/00
TASK Sub_Some_Town_Anim ; 18C2C4/081B97
JSR Wait_for_A_press ; 18C2C7/1BC3D4
ASM_CALL Set_Win1_3b ; 18C2CA/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18C2CE/00
.word $C43C ; 18C2CF/3CC4
ASM_CALL Load_Sprite_1b_1b_12b ; 18C2D1/07AE9C00 // Load Sprite
.byte 8 ; 18C2D5/08
.byte 36 ; 18C2D6/24
.word 18 ; 18C2D7/1200
.word 65496 ; 18C2D9/D8FF
.word 65524 ; 18C2DB/F4FF
.word 0 ; 18C2DD/0000
.word 23 ; 18C2DF/1700
.word 2 ; 18C2E1/0200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18C2E3/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18C2E7/9110
.word 2 ; 18C2E9/0200
ASM_CALL Set_Win1_3b ; 18C2EB/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18C2EF/00
.word $C434 ; 18C2F0/34C4
Text_SCRIPT096:
ASM_CALL Load_Event_Text ; 18C2F2/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_096 ; 18C2F6/90EB0C
.byte $00 ; 18C2F9/00
JSR Wait_for_A_press ; 18C2FA/1BC3D4
JSR Some_sub ; 18C2FD/1B5CD4
ASM_CALL Check_Party ; 18C300/07D9D418 // Check party
ASM_CALL Clear_Winmask_Lo ; 18C304/0744D518 // Clear window mask lo
JSR Darwin_joins ; 18C308/1B3DD3
JSR Teefa_joins ; 18C30B/1B83D2
MOV VAR0,#$0002 ; 18C30E/0F000200
JSR SetB6_FadeOut ; 18C312/1B16D4
BGV_DISP #1,#$0000 ; 18C315/80010000
ASM_CALL Entering_Town ; 18C319/0757B303 // Entering Town
ASM_CALL Town_loading ; 18C31D/0779B303 // Town Loading
ASM_CALL More_Town_Loading ; 18C321/07FDB303 // More Town Loading
JSR Sub_FadeIn ; 18C325/1B35D4
JSR Sub_Turn_off_sound ; 18C328/1BF6D3
ASM_CALL GetSet_Music_1b ; 18C32B/073C9C00 // Get/Set Music
.byte 89 ; 18C32F/59
MOV.w $1901,#$0000 ; 18C330/1601190000
MOV.w Game_State,#$0000 ; 18C335/16C1110000
END ; 18C33A/00
Code_18C33B:
SET_ANIM #50 ; 18C33B/3032
SET_XVEL #-256 ; 18C33D/5800FF
WAIT #64 ; 18C340/0640
ZERO_VEL ; 18C342/D0
MOV.w Animation_Finish_Timer,#$0001; 18C343/1691100100
HALT ; 18C348/0A
Code_18C349:
SET_ANIM #70 ; 18C349/3046
SET_XVEL #256 ; 18C34B/580001
WAIT #64 ; 18C34E/0640
ZERO_VEL ; 18C350/D0
MOV.w Animation_Finish_Timer,#$0002; 18C351/1691100200
HALT ; 18C356/0A
$18C373 - STORY 18: Vs Karul
ASM_Vs_Karul:
MOV REG,VAR1 ; 18C373/2401
MULTI_JMP #1 ; 18C375/1101
.word Sub_Karul_macro ; 18C377/1FC4
ASM_CALL Zero_18FD ; 18C379/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18C37D/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long $148358 ; 18C381/588314
.word 1024 ; 18C384/0004
JSR Make_Animation_Loop1 ; 18C386/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C389/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Karul ; 18C38D/428D19
.byte $90 ; 18C390/90
.word 64 ; 18C391/4000
ASM_CALL Load_Sprite_1b_1b_12b ; 18C393/07AE9C00 // Load Sprite
.byte 8 ; 18C397/08
.byte 36 ; 18C398/24
.word 18 ; 18C399/1200
.word 128 ; 18C39B/8000
.word 112 ; 18C39D/7000
.word 0 ; 18C39F/0000
.word 24 ; 18C3A1/1800
.word 1 ; 18C3A3/0100
WAIT #40 ; 18C3A5/0628
JSR Sub_LoadSomething ; 18C3A7/1B4DD4
Text_SCRIPT097:
ASM_CALL Load_Event_Text ; 18C3AA/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_097 ; 18C3AE/89ED0C
.byte $00 ; 18C3B1/00
TASK Sub_Some_Town_Anim ; 18C3B2/081B97
JSR Wait_for_A_press ; 18C3B5/1BC3D4
MOV.w Animation_Finish_Timer,#$0001; 18C3B8/1691100100
MOV REG,#$0000 ; 18C3BD/1E0000
JSR Dungeon_loop ; 18C3C0/1B92D3
Text_SCRIPT098:
ASM_CALL Load_Event_Text ; 18C3C3/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_098 ; 18C3C7/CCEE0C
.byte $00 ; 18C3CA/00
JSR Wait_for_A_press ; 18C3CB/1BC3D4
START_LOOP #2 ; 18C3CE/0102
MOV REG,#$0001 ; 18C3D0/1E0100
JSR Dungeon_loop ; 18C3D3/1B92D3
END_LOOP ; 18C3D6/02
UNK_TASK #1 ; 18C3D7/1401
SET_ANIM #-1 ; 18C3D9/30FF
MOV.w $18E1,#$0008 ; 18C3DB/16E1180800
ASM_CALL Check_map_tile_value ; 18C3E0/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18C3E4/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18C3E8/1BD4D3
JSR Sub_Event_Battle ; 18C3EB/1BC3D3
JSR Sub_Sauza_2 ; 18C3EE/1BE0D3
WAIT #30 ; 18C3F1/061E
Text_SCRIPT099:
ASM_CALL Load_Event_Text ; 18C3F3/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_099 ; 18C3F7/0EEF0C
.byte $00 ; 18C3FA/00
TASK Sub_Some_Town_Anim ; 18C3FB/081B97
JSR Wait_for_A_press ; 18C3FE/1BC3D4
JSR Fanfare_and_Refresh_Music ; 18C401/1B7BD3
ASM_CALL AddNewItem_3b ; 18C404/0727AB07
START_LOOP #13 ; 18C408/010D
END ; 18C40A/00
Text_SCRIPT100:
ASM_CALL Load_Event_Text ; 18C40B/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_100 ; 18C40F/39EF0C
.byte $00 ; 18C412/00
JSR Wait_for_A_press ; 18C413/1BC3D4
JSR Some_sub ; 18C416/1B5CD4
MOV.w $1901,#$0000 ; 18C419/1601190000
END ; 18C41E/00
Sub_Karul_macro:
SET_ANIM #85 ; 18C41F/3055
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18C421/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18C425/9110
.word 1 ; 18C427/0100
END ; 18C429/00
$18C446 - STORY 19: Vs Galneon
ASM_Vs_Galneon:
MOV REG,VAR1 ; 18C446/2401
MULTI_JMP #2 ; 18C448/1102
.word DATA8_18C52F ; 18C44A/2FC5
.word DATA8_18C532 ; 18C44C/32C5
ASM_CALL Zero_18FD ; 18C44E/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18C452/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long $148361 ; 18C456/618314
.word 1024 ; 18C459/0004
JSR Make_Animation_Loop1 ; 18C45B/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C45E/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Galneon ; 18C462/898D19
.byte $C0 ; 18C465/C0
.word 96 ; 18C466/6000
ASM_CALL Load_Sprite_1b_1b_12b ; 18C468/07AE9C00 // Load Sprite
.byte 8 ; 18C46C/08
.byte 36 ; 18C46D/24
.word 18 ; 18C46E/1200
.word 128 ; 18C470/8000
.word 112 ; 18C472/7000
.word 0 ; 18C474/0000
.word 25 ; 18C476/1900
.word 1 ; 18C478/0100
WAIT #40 ; 18C47A/0628
JSR Sub_LoadSomething ; 18C47C/1B4DD4
Read_SCRIPT101:
ASM_CALL Load_Event_Text ; 18C47F/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_101 ; 18C483/DBEF0C
.byte $00 ; 18C486/00
TASK Sub_Some_Town_Anim ; 18C487/081B97
JSR Wait_for_A_press ; 18C48A/1BC3D4
ASM_CALL Check_Party ; 18C48D/07D9D418 // Check party
UNK_TASK #1 ; 18C491/1401
SET_ANIM #-1 ; 18C493/30FF
MOV.w $18E1,#$0009 ; 18C495/16E1180900
Galneon1_fight:
ASM_CALL Check_map_tile_value ; 18C49A/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18C49E/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18C4A2/1BD4D3
JSR Sub_Event_Battle ; 18C4A5/1BC3D3
JSR Sub_Sauza_2 ; 18C4A8/1BE0D3
ASM_CALL Load_Sprite_1b_1b_12b ; 18C4AB/07AE9C00 // Load Sprite
.byte 8 ; 18C4AF/08
.byte 36 ; 18C4B0/24
.word 18 ; 18C4B1/1200
.word 56 ; 18C4B3/3800
.word 65524 ; 18C4B5/F4FF
.word 0 ; 18C4B7/0000
.word 25 ; 18C4B9/1900
.word 2 ; 18C4BB/0200
WAIT #30 ; 18C4BD/061E
Text_SCRIPT102:
ASM_CALL Load_Event_Text ; 18C4BF/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_102 ; 18C4C3/E7F00C
.byte $00 ; 18C4C6/00
JSR Fanfare_and_Refresh_Music ; 18C4C7/1B7BD3
ASM_CALL AddNewItem_3b ; 18C4CA/0727AB07
END ; 18C4CE/00
L_18C4CF:
MULTI_JMP #0 ; 18C4CF/1100
Text_SCRIPT103:
ASM_CALL Load_Event_Text ; 18C4D1/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_103 ; 18C4D5/14F10C
.byte $00 ; 18C4D8/00
TASK Sub_Some_Town_Anim ; 18C4D9/081B97
JSR Wait_for_A_press ; 18C4DC/1BC3D4
MOV.w Animation_Finish_Timer,#$0001; 18C4DF/1691100100
WAIT #90 ; 18C4E4/065A
ASM_CALL Check_Party ; 18C4E6/07D9D418 // Check party
UNK_TASK #1 ; 18C4EA/1401
SET_ANIM #-1 ; 18C4EC/30FF
MOV.w $18E1,#$000A ; 18C4EE/16E1180A00
ASM_CALL Check_map_tile_value ; 18C4F3/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18C4F7/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18C4FB/1BD4D3
JSR Sub_Event_Battle ; 18C4FE/1BC3D3
JSR Sub_Sauza_2 ; 18C501/1BE0D3
WAIT #30 ; 18C504/061E
Text_SCRIPT104:
ASM_CALL Load_Event_Text ; 18C506/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_104 ; 18C50A/BBF10C
.byte $00 ; 18C50D/00
JSR Fanfare_and_Refresh_Music ; 18C50E/1B7BD3
ASM_CALL AddNewItem_3b ; 18C511/0727AB07
START_LOOP #14 ; 18C515/010E
END ; 18C517/00
Text_SCRIPT105:
ASM_CALL Load_Event_Text ; 18C518/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_105 ; 18C51C/E5F10C
.byte $00 ; 18C51F/00
TASK Sub_Some_Town_Anim ; 18C520/081B97
JSR Wait_for_A_press ; 18C523/1BC3D4
JSR Some_sub ; 18C526/1B5CD4
MOV.w $1901,#$0000 ; 18C529/1601190000
END ; 18C52E/00
DATA8_18C52F:
SET_ANIM #82 ; 18C52F/3052
HALT ; 18C531/0A
DATA8_18C532:
SET_ANIM #83 ; 18C532/3053
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18C534/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18C538/9110
.word 1 ; 18C53A/0100
START_LOOP #10 ; 18C53C/010A
SET_ANIM #83,WAIT #2 ; 18C53E/3253
SET_ANIM #-1,WAIT #1 ; 18C540/31FF
END_LOOP ; 18C542/02
START_LOOP #10 ; 18C543/010A
SET_ANIM #83,WAIT #1 ; 18C545/3153
SET_ANIM #-1,WAIT #1 ; 18C547/31FF
END_LOOP ; 18C549/02
DATA8_18C54A:
SET_ANIM #83,WAIT #1 ; 18C54A/3153
SET_ANIM #-1,WAIT #2 ; 18C54C/32FF
JMP DATA8_18C54A ; 18C54E/1A4AC5
$18C56D - STORY 1A: Vs Red/Blue Guardians
ASM_Vs_Guardians:
MOV REG,VAR1 ; 18C56D/2401
MULTI_JMP #4 ; 18C56F/1104
.word Code_18C6A5 ; 18C571/A5C6
.word DATA8_18C6B2 ; 18C573/B2C6
.word DATA8_18C6BF ; 18C575/BFC6
.word DATA8_18C6C8 ; 18C577/C8C6
Screen_flash:
JSR Screen_Flash ; 18C579/1B9FD3
ASM_CALL Zero_18FD ; 18C57C/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18C580/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_14836A ; 18C584/6A8314
.word 1024 ; 18C587/0004
JSR Make_Animation_Loop1 ; 18C589/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C58C/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_RedBlue_Guardians ; 18C590/65C618
.byte $D0 ; 18C593/D0
.word 64 ; 18C594/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C596/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C59A_data ; 18C59A/9B9B18
.byte $90 ; 18C59D/90
.word 64 ; 18C59E/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C5A0/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C5A4_data ; 18C5A4/31A118
.byte $B0 ; 18C5A7/B0
.word 32 ; 18C5A8/2000
ASM_CALL Load_Sprite_1b_1b_12b ; 18C5AA/07AE9C00 // Load Sprite
.byte 8 ; 18C5AE/08
.byte 36 ; 18C5AF/24
.word 18 ; 18C5B0/1200
.word 96 ; 18C5B2/6000
.word 96 ; 18C5B4/6000
.word 2 ; 18C5B6/0200
.word 26 ; 18C5B8/1A00
.word 1 ; 18C5BA/0100
ASM_CALL Load_Sprite_1b_1b_12b ; 18C5BC/07AE9C00 // Load Sprite
.byte 8 ; 18C5C0/08
.byte 36 ; 18C5C1/24
.word 18 ; 18C5C2/1200
.word 160 ; 18C5C4/A000
.word 96 ; 18C5C6/6000
.word 2 ; 18C5C8/0200
.word 26 ; 18C5CA/1A00
.word 2 ; 18C5CC/0200
JSR Battle_Poses_On ; 18C5CE/1BA9D4
ASM_CALL GetSet_Music_1b ; 18C5D1/073C9C00 // Get/Set Music
.byte 80 ; 18C5D5/50
JSR Sub_LoadSomething ; 18C5D6/1B4DD4
Text_SCRIPT106:
ASM_CALL Load_Event_Text ; 18C5D9/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_106 ; 18C5DD/5EF20C
.byte $00 ; 18C5E0/00
TASK Sub_Some_Town_Anim ; 18C5E1/081B97
JSR Wait_for_A_press ; 18C5E4/1BC3D4
ASM_CALL Set_Win1_3b ; 18C5E7/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18C5EB/00
.word $C43C ; 18C5EC/3CC4
ASM_CALL Set_WindowMask_4b ; 18C5EE/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18C5F2/10
.byte $00 ; 18C5F3/00
.byte $00 ; 18C5F4/00
.byte $03 ; 18C5F5/03
WAIT #1 ; 18C5F6/0601
Draw_Salah_Axs_entrance:
ASM_CALL Load_Sprite_1b_1b_12b ; 18C5F8/07AE9C00 // Load Sprite
.byte 8 ; 18C5FC/08
.byte 36 ; 18C5FD/24
.word 18 ; 18C5FE/1200
.word 65480 ; 18C600/C8FF
.word 3 ; 18C602/0300
.word 1 ; 18C604/0100
.word 26 ; 18C606/1A00
.word 3 ; 18C608/0300
ASM_CALL Load_Sprite_1b_1b_12b ; 18C60A/07AE9C00 // Load Sprite
.byte 8 ; 18C60E/08
.byte 36 ; 18C60F/24
.word 18 ; 18C610/1200
.word 168 ; 18C612/A800
.word 3 ; 18C614/0300
.word 1 ; 18C616/0100
.word 26 ; 18C618/1A00
.word 4 ; 18C61A/0400
WAIT #90 ; 18C61C/065A
ASM_CALL Clear_Winmask_Lo ; 18C61E/0744D518 // Clear window mask lo
Text_SCRIPT107:
ASM_CALL Load_Event_Text ; 18C622/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_107 ; 18C626/A8F20C
.byte $00 ; 18C629/00
JSR Wait_for_A_press ; 18C62A/1BC3D4
JSR Some_sub ; 18C62D/1B5CD4
ASM_CALL Check_Party ; 18C630/07D9D418 // Check party
MOV REG,Map_Compass ; 18C634/1FFB16
JEQ DATA8_18C643 ; 18C637/0B43C6
START_LOOP #2 ; 18C63A/0102
MOV REG,#$0001 ; 18C63C/1E0100
JSR Dungeon_loop ; 18C63F/1B92D3
END_LOOP ; 18C642/02
DATA8_18C643:
MOV REG,#$0000 ; 18C643/1E0000
JSR Dungeon_loop ; 18C646/1B92D3
MOV REG,#$0001 ; 18C649/1E0100
JSR Dungeon_loop ; 18C64C/1B92D3
MOV REG,#$0000 ; 18C64F/1E0000
JSR Dungeon_loop ; 18C652/1B92D3
JSR Sub_Turn_off_sound ; 18C655/1BF6D3
ASM_CALL Sub_Default_BGM ; 18C658/0720A503 // Sub: Default Dungeon BGM
JSR Sub_Mock_Battle_end ; 18C65C/1BB1D4
MOV.w $1901,#$0000 ; 18C65F/1601190000
END ; 18C664/00
$18C6A5 - Sub: Ch05 Guardian animations
Code_18C6A5:
SET_ANIM #122 ; 18C6A5/307A
WAIT #86 ; 18C6A7/0656
INC_ANIM ; 18C6A9/A8
WAIT #32 ; 18C6AA/0620
INC_ANIM ; 18C6AC/A8
WAIT #9 ; 18C6AD/0609
JMP Code_18C6A5 ; 18C6AF/1AA5C6
DATA8_18C6B2:
SET_ANIM #125 ; 18C6B2/307D
WAIT #86 ; 18C6B4/0656
INC_ANIM ; 18C6B6/A8
WAIT #32 ; 18C6B7/0620
INC_ANIM ; 18C6B9/A8
WAIT #9 ; 18C6BA/0609
JMP DATA8_18C6B2 ; 18C6BC/1AB2C6
DATA8_18C6BF:
SET_ANIM #62 ; 18C6BF/303E
SET_XVEL #2048 ; 18C6C1/580008
WAIT #18 ; 18C6C4/0612
ZERO_VEL ; 18C6C6/D0
HALT ; 18C6C7/0A
DATA8_18C6C8:
SET_ANIM #69 ; 18C6C8/3045
SET_XVEL #-2048 ; 18C6CA/5800F8
WAIT #18 ; 18C6CD/0612
ZERO_VEL ; 18C6CF/D0
HALT ; 18C6D0/0A
$18C6ED - STORY 1B: Vs Tiamat
ASM_Vs_Tiamat:
MOV REG,VAR1 ; 18C6ED/2401
MULTI_JMP #3 ; 18C6EF/1103
.word After_Final_Darwin ; 18C6F1/F5C7
.word DATA8_18C802 ; 18C6F3/02C8
.word DATA8_18C80B ; 18C6F5/0BC8
MOV REG,#$0001 ; 18C6F7/1E0100
JSR Dungeon_loop ; 18C6FA/1B92D3
MOV REG,#$0001 ; 18C6FD/1E0100
JSR Dungeon_loop ; 18C700/1B92D3
JSR Screen_Flash ; 18C703/1B9FD3
ASM_CALL Zero_18FD ; 18C706/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18C70A/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148393 ; 18C70E/938314
.word 1024 ; 18C711/0004
JSR Make_Animation_Loop1 ; 18C713/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C716/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Tiamat_Event ; 18C71A/D5C718
.byte $E0 ; 18C71D/E0
.word 32 ; 18C71E/2000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C720/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Teefa ; 18C724/B28A19
.byte $B0 ; 18C727/B0
.word 64 ; 18C728/4000
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C72A/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18C72E_data ; 18C72E/B0A218
.byte $90 ; 18C731/90
.word 64 ; 18C732/4000
ASM_CALL Load_Sprite_1b_1b_12b ; 18C734/07AE9C00 // Load Sprite
.byte 8 ; 18C738/08
.byte 36 ; 18C739/24
.word 18 ; 18C73A/1200
.word 128 ; 18C73C/8000
.word 112 ; 18C73E/7000
.word 2 ; 18C740/0200
.word 27 ; 18C742/1B00
.word 1 ; 18C744/0100
JSR Battle_Poses_On ; 18C746/1BA9D4
ASM_CALL GetSet_Music_1b ; 18C749/073C9C00 // Get/Set Music
.byte 80 ; 18C74D/50
JSR Sub_LoadSomething ; 18C74E/1B4DD4
Text_SCRIPT108:
ASM_CALL Load_Event_Text ; 18C751/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_108 ; 18C755/87F30C
.byte $00 ; 18C758/00
TASK Sub_Some_Town_Anim ; 18C759/081B97
JSR Wait_for_A_press ; 18C75C/1BC3D4
ASM_CALL Set_Win1_3b ; 18C75F/074CD518 // Set Window 1 [$2126 offset][val]
.byte 0 ; 18C763/00
.word $C43C ; 18C764/3CC4
ASM_CALL Set_WindowMask_4b ; 18C766/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $10 ; 18C76A/10
.byte $00 ; 18C76B/00
.byte $00 ; 18C76C/00
.byte $03 ; 18C76D/03
JSR Darwin_leaves ; 18C76E/1B5CD3
JSR Teefa_leaves ; 18C771/1BA2D2
ASM_CALL Load_Sprite_1b_1b_12b ; 18C774/07AE9C00 // Load Sprite
.byte 8 ; 18C778/08
.byte 36 ; 18C779/24
.word 18 ; 18C77A/1200
.word 168 ; 18C77C/A800
.word 3 ; 18C77E/0300
.word 1 ; 18C780/0100
.word 27 ; 18C782/1B00
.word 2 ; 18C784/0200
ASM_CALL Load_Sprite_1b_1b_12b ; 18C786/07AE9C00 // Load Sprite
.byte 8 ; 18C78A/08
.byte 36 ; 18C78B/24
.word 18 ; 18C78C/1200
.word 65480 ; 18C78E/C8FF
.word 3 ; 18C790/0300
.word 1 ; 18C792/0100
.word 27 ; 18C794/1B00
.word 3 ; 18C796/0300
WAIT #60 ; 18C798/063C
ASM_CALL Clear_Winmask_Lo ; 18C79A/0744D518 // Clear window mask lo
Text_SCRIPT109:
ASM_CALL Load_Event_Text ; 18C79E/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_109 ; 18C7A2/9CF40C
.byte $00 ; 18C7A5/00
JSR Wait_for_A_press ; 18C7A6/1BC3D4
JSR Some_sub ; 18C7A9/1B5CD4
ASM_CALL Check_Party ; 18C7AC/07D9D418 // Check party
MOV REG,Map_Compass ; 18C7B0/1FFB16
JNE DATA8_18C7BF ; 18C7B3/0CBFC7
START_LOOP #2 ; 18C7B6/0102
MOV REG,#$0001 ; 18C7B8/1E0100
JSR Dungeon_loop ; 18C7BB/1B92D3
END_LOOP ; 18C7BE/02
DATA8_18C7BF:
MOV REG,#$0000 ; 18C7BF/1E0000
JSR Dungeon_loop ; 18C7C2/1B92D3
JSR Sub_Turn_off_sound ; 18C7C5/1BF6D3
ASM_CALL Sub_Default_BGM ; 18C7C8/0720A503 // Sub: Default Dungeon BGM
JSR Sub_Mock_Battle_end ; 18C7CC/1BB1D4
MOV.w $1901,#$0000 ; 18C7CF/1601190000
END ; 18C7D4/00
$18C7F5 - Sub: Ch05 Darwin/Teefa leaving?
After_Final_Darwin:
SET_ANIM #-128 ; 18C7F5/3080
WAIT #12 ; 18C7F7/060C
INC_ANIM ; 18C7F9/A8
WAIT #14 ; 18C7FA/060E
INC_ANIM ; 18C7FC/A8
WAIT #15 ; 18C7FD/060F
JMP After_Final_Darwin ; 18C7FF/1AF5C7
DATA8_18C802:
SET_ANIM #73 ; 18C802/3049
SET_XVEL #-2048 ; 18C804/5800F8
WAIT #10 ; 18C807/060A
ZERO_VEL ; 18C809/D0
HALT ; 18C80A/0A
DATA8_18C80B:
SET_ANIM #57 ; 18C80B/3039
SET_XVEL #2048 ; 18C80D/580008
WAIT #10 ; 18C810/060A
ZERO_VEL ; 18C812/D0
HALT ; 18C813/0A
$18C840 - STORY 1C: Vs Rimsala (Final Door)
ASM_Final_Door:
MOV REG,VAR1 ; 18C840/2401
MULTI_JMP #10 ; 18C842/110A
.word Final_Door1 ; 18C844/62CE
.word Final_Door1 ; 18C846/62CE
.word Final_Door2 ; 18C848/6CCE
.word Final_Door3 ; 18C84A/96CE
.word Final_Door4 ; 18C84C/C0CE
.word Final_Door5 ; 18C84E/EACE
.word Final_Door6 ; 18C850/14CF
.word Final_Door7 ; 18C852/5ACF
.word Final_Door8 ; 18C854/64CF
.word Final_Door9 ; 18C856/98CF
ASM_CALL GetSet_SFX_1b ; 18C858/07449C00 // Get/Set Sound Effect
.byte 45 ; 18C85C/2D
Loop_FadeToBlack:
START_LOOP #16 ; 18C85D/0110
ASM_CALL Fade ; 18C85F/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #4 ; 18C863/0604
END_LOOP ; 18C865/02
JSL Sub_Disable_HDMA ; 18C866/04F18901
ASM_CALL HDMA_xfer_6b ; 18C86A/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $07 ; 18C86E/07
.byte $40 ; 18C86F/40
.byte $2C ; 18C870/2C
.long HDMA_18CD0A ; 18C871/0ACD18
WAIT #1 ; 18C874/0601
ASM_CALL MainScr_Remove_1b ; 18C876/07B69D00 // Main Screen remove
.byte $14 ; 18C87A/14
ASM_CALL SubScr_Add_1b ; 18C87B/07C69D00 // Sub Screen add
.byte $10 ; 18C87F/10
MOV.b Color_window,#$02 ; 18C880/13302102
MOV.b Color_math,#$42 ; 18C884/13312142
ASM_CALL Display_brancher_6b ; 18C888/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18C88C/01
.byte $00 ; 18C88D/00
.word $3000 ; 18C88E/0030
.word $0400 ; 18C890/0004
JSR DATA8_18D389 ; 18C892/1B89D3
ASM_CALL Zero_18FD ; 18C895/07218318 // Zero $18FD. (Why is this a SUBROUTINE it's not that difficult!!!)
ASM_CALL Compressed_Setup_3b_2b ; 18C899/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long $1483C4 ; 18C89D/C48314
.word 1024 ; 18C8A0/0004
JSR Make_Animation_Loop1 ; 18C8A2/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18C8A5/0735A000 // Decompression setup 2
.long RLE_Post_Lightning ; 18C8A9/E6BE18
.long $000440 ; 18C8AC/400400
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18C8AF/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Rimsala1 ; 18C8B3/578E19
.byte $C0 ; 18C8B6/C0
.word 96 ; 18C8B7/6000
ASM_CALL Load_Sprite_1b_1b_12b ; 18C8B9/07AE9C00 // Load Sprite
.byte 8 ; 18C8BD/08
.byte 36 ; 18C8BE/24
.word 18 ; 18C8BF/1200
.word 128 ; 18C8C1/8000
.word 80 ; 18C8C3/5000
.word 0 ; 18C8C5/0000
.word 28 ; 18C8C7/1C00
.word 1 ; 18C8C9/0100
JSR Sub_Turn_off_sound ; 18C8CB/1BF6D3
Play_SealedRimsala_Theme:
ASM_CALL GetSet_Music_1b ; 18C8CE/073C9C00 // Get/Set Music
.byte 61 ; 18C8D2/3D
Loop_Unfade:
START_LOOP #16 ; 18C8D3/0110
ASM_CALL Unfade ; 18C8D5/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #4 ; 18C8D9/0604
END_LOOP ; 18C8DB/02
WAIT #30 ; 18C8DC/061E
JSR Sub_LoadSomething ; 18C8DE/1B4DD4
Text_SCRIPT110:
ASM_CALL Load_Event_Text ; 18C8E1/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_110 ; 18C8E5/B5F40C
.byte $00 ; 18C8E8/00
TASK Sub_Some_Town_Anim ; 18C8E9/081B97
JSR Wait_for_A_press ; 18C8EC/1BC3D4
TASK Event_Rimsala_Brain_Burn ; 18C8EF/0815CD
WAIT #90 ; 18C8F2/065A
Text_SCRIPT111:
ASM_CALL Load_Event_Text ; 18C8F4/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_111 ; 18C8F8/DFF40C
.byte $00 ; 18C8FB/00
JSR Wait_for_A_press ; 18C8FC/1BC3D4
UNK_TASK #1 ; 18C8FF/1401
WAIT #1 ; 18C901/0601
Egg_Awakens_SFX:
ASM_CALL GetSet_SFX_1b ; 18C903/07449C00 // Get/Set Sound Effect
.byte 21 ; 18C907/15
START_LOOP #40 ; 18C908/0128
MOV.b Color_math,#$42 ; 18C90A/13312142
WAIT #2 ; 18C90E/0602
MOV.b Color_math,#$02 ; 18C910/13312102
WAIT #2 ; 18C914/0602
END_LOOP ; 18C916/02
ASM_CALL GetSet_SFX_1b ; 18C917/07449C00 // Get/Set Sound Effect
.byte 22 ; 18C91B/16
MOV.b Color_window,#$00 ; 18C91C/13302100
MOV.b Color_math,#$32 ; 18C920/13312132
ASM_CALL MainScr_Add_1b ; 18C924/07A89D00 // Main Screen add
.byte $10 ; 18C928/10
ASM_CALL SubScr_Remove_1b ; 18C929/07D79D00 // Sub Screen remove
.byte $1F ; 18C92D/1F
ASM_CALL Set_RGB_3b ; 18C92E/07839F00 // Set RGB -2
.byte $1F ; 18C932/1F
.byte $1F ; 18C933/1F
.byte $1F ; 18C934/1F
Loop_ThirtyOne_Times:
START_LOOP #31 ; 18C935/011F
ASM_CALL Add_RGB_3b ; 18C937/07E29F00 // Add RGB
.byte $FF ; 18C93B/FF
.byte $FF ; 18C93C/FF
.byte $FF ; 18C93D/FF
WAIT #3 ; 18C93E/0603
END_LOOP ; 18C940/02
ASM_CALL Check_Party ; 18C941/07D9D418 // Check party
UNK_TASK #1 ; 18C945/1401
SET_XPOS #128 ; 18C947/388000
SET_YPOS #80 ; 18C94A/405000
SET_ZPOS #-16 ; 18C94D/E0F0FF
SET_ANIM #-125 ; 18C950/3083
MOV.w $18E1,#$000B ; 18C952/16E1180B00
ASM_CALL Check_map_tile_value ; 18C957/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
Roll_Encounter_Rimsala1:
ASM_CALL Roll_encounter ; 18C95B/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18C95F/1BD4D3
JSR Sub_Event_Battle ; 18C962/1BC3D3
JSR Sub_Sauza_2 ; 18C965/1BE0D3
ASM_CALL Load_Sprite_1b_1b_12b ; 18C968/07AE9C00 // Load Sprite
.byte 8 ; 18C96C/08
.byte 36 ; 18C96D/24
.word 18 ; 18C96E/1200
.word 0 ; 18C970/0000
.word 0 ; 18C972/0000
.word 1 ; 18C974/0100
.word 28 ; 18C976/1C00
.word 2 ; 18C978/0200
WAIT #1 ; 18C97A/0601
SET_ANIM #-1 ; 18C97C/30FF
Attempted_Rimsala_Seal:
JSR FinalFight_CompressedData ; 18C97E/1B59CD
ASM_CALL GetSet_SFX_1b ; 18C981/07449C00 // Get/Set Sound Effect
.byte 9 ; 18C985/09
MOV.b Color_math,#$10 ; 18C986/13312110
START_LOOP #8 ; 18C98A/0108
ASM_CALL Add_RGB_3b ; 18C98C/07E29F00 // Add RGB
.byte $04 ; 18C990/04
.byte $04 ; 18C991/04
.byte $04 ; 18C992/04
WAIT #1 ; 18C993/0601
END_LOOP ; 18C995/02
START_LOOP #8 ; 18C996/0108
ASM_CALL Add_RGB_3b ; 18C998/07E29F00 // Add RGB
.byte $FC ; 18C99C/FC
.byte $FC ; 18C99D/FC
.byte $FC ; 18C99E/FC
WAIT #1 ; 18C99F/0601
END_LOOP ; 18C9A1/02
WAIT #40 ; 18C9A2/0628
Text_SCRIPT113:
ASM_CALL Load_Event_Text ; 18C9A4/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_113 ; 18C9A8/5FF60C
.byte $00 ; 18C9AB/00
JSR Wait_for_A_press ; 18C9AC/1BC3D4
WAIT #30 ; 18C9AF/061E
JSR Sub_Turn_off_sound ; 18C9B1/1BF6D3
ASM_CALL GetSet_Music_1b ; 18C9B4/073C9C00 // Get/Set Music
.byte 65 ; 18C9B8/41
_420_blaze_it:
MOV.w $0420,#$0000 ; 18C9B9/1620040000
MOV.b Color_math,#$32 ; 18C9BE/13312132
ASM_CALL Set_RGB_3b ; 18C9C2/07839F00 // Set RGB -2
.byte $00 ; 18C9C6/00
.byte $00 ; 18C9C7/00
.byte $00 ; 18C9C8/00
Cool_NestedLoop:
START_LOOP #4 ; 18C9C9/0104
START_LOOP #8 ; 18C9CB/0108
ASM_CALL Add_RGB_3b ; 18C9CD/07E29F00 // Add RGB
.byte $04 ; 18C9D1/04
.byte $04 ; 18C9D2/04
.byte $04 ; 18C9D3/04
WAIT #1 ; 18C9D4/0601
END_LOOP ; 18C9D6/02
START_LOOP #32 ; 18C9D7/0120
ASM_CALL Add_RGB_3b ; 18C9D9/07E29F00 // Add RGB
.byte $FF ; 18C9DD/FF
.byte $FF ; 18C9DE/FF
.byte $FF ; 18C9DF/FF
WAIT #2 ; 18C9E0/0602
END_LOOP ; 18C9E2/02
END_LOOP ; 18C9E3/02
MOV.b Color_math,#$37 ; 18C9E4/13312137
START_LOOP #8 ; 18C9E8/0108
ASM_CALL Add_RGB_3b ; 18C9EA/07E29F00 // Add RGB
.byte $04 ; 18C9EE/04
.byte $04 ; 18C9EF/04
.byte $04 ; 18C9F0/04
WAIT #1 ; 18C9F1/0601
END_LOOP ; 18C9F3/02
ASM_CALL Check_Party ; 18C9F4/07D9D418 // Check party
ASM_CALL Display_brancher_6b ; 18C9F8/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18C9FC/01
.byte $03 ; 18C9FD/03
.word $3000 ; 18C9FE/0030
.word $6000 ; 18CA00/0060
ASM_CALL Compressed_Setup_3b_2b ; 18CA02/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long $1483E6 ; 18CA06/E68314
.word 1024 ; 18CA09/0004
JSR Make_Animation_Loop1 ; 18CA0B/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18CA0E/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_Rimsala2 ; 18CA12/BE8E19
.byte $10 ; 18CA15/10
.word 96 ; 18CA16/6000
ASM_CALL Load_Sprite_1b_1b_12b ; 18CA18/07AE9C00 // Load Sprite
.byte 8 ; 18CA1C/08
.byte 36 ; 18CA1D/24
.word 18 ; 18CA1E/1200
.word 0 ; 18CA20/0000
.word 0 ; 18CA22/0000
.word 1 ; 18CA24/0100
.word 28 ; 18CA26/1C00
.word 7 ; 18CA28/0700
WAIT #1 ; 18CA2A/0601
START_LOOP #32 ; 18CA2C/0120
ASM_CALL Add_RGB_3b ; 18CA2E/07E29F00 // Add RGB
.byte $FF ; 18CA32/FF
.byte $FF ; 18CA33/FF
.byte $FF ; 18CA34/FF
WAIT #4 ; 18CA35/0604
END_LOOP ; 18CA37/02
Play_TheGoddess:
ASM_CALL GetSet_Music_1b ; 18CA38/073C9C00 // Get/Set Music
.byte 82 ; 18CA3C/52
WAIT #90 ; 18CA3D/065A
Text_SCRIPT114:
ASM_CALL Load_Event_Text ; 18CA3F/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_114 ; 18CA43/80F60C
.byte $00 ; 18CA46/00
JSR Wait_for_A_press ; 18CA47/1BC3D4
WAIT #30 ; 18CA4A/061E
Text_SCRIPT115:
ASM_CALL Load_Event_Text ; 18CA4C/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_115 ; 18CA50/B1F60C
.byte $00 ; 18CA53/00
WAIT #20 ; 18CA54/0614
ASM_CALL GetSet_SFX_1b ; 18CA56/07449C00 // Get/Set Sound Effect
.byte 1 ; 18CA5A/01
MOV.w Animation_Finish_Timer,#$0001; 18CA5B/1691100100
WAIT #60 ; 18CA60/063C
Rooks_KO:
ASM_CALL Rooks_gets_KTFOd ; 18CA62/0744CE18 // Rooks knocked down to 1 HP
WAIT #120 ; 18CA66/0678
Text_SCRIPT116:
ASM_CALL Load_Event_Text ; 18CA68/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_116 ; 18CA6C/CCF60C
.byte $00 ; 18CA6F/00
WAIT #60 ; 18CA70/063C
ASM_CALL HDMA_xfer_6b ; 18CA72/07E09E00 // HDMA transfer - [0-7 = HDMA channel] [transfer pattern - (0 = 1b) (1-2 = 2b) (3-4 = 4b)], [PPU register $21xx] [Read/write address]
.byte $06 ; 18CA76/06
.byte $01 ; 18CA77/01
.byte $26 ; 18CA78/26
.long _18CA79_DMA ; 18CA79/2CA818
ASM_CALL Set_WindowMask_4b ; 18CA7C/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $00 ; 18CA80/00
.byte $00 ; 18CA81/00
.byte $00 ; 18CA82/00
.byte $30 ; 18CA83/30
MOV.b Color_window,#$10 ; 18CA84/13302110
MOV.b Color_math,#$BF ; 18CA88/133121BF
WAIT #1 ; 18CA8C/0601
START_LOOP #32 ; 18CA8E/0120
ASM_CALL Add_RGB_3b ; 18CA90/07E29F00 // Add RGB
.byte $01 ; 18CA94/01
.byte $01 ; 18CA95/01
.byte $01 ; 18CA96/01
WAIT #6 ; 18CA97/0606
END_LOOP ; 18CA99/02
JSR Sub_Turn_off_sound ; 18CA9A/1BF6D3
ASM_CALL GetSet_Music_1b ; 18CA9D/073C9C00 // Get/Set Music
.byte 72 ; 18CAA1/48
Text_SCRIPT117:
ASM_CALL Load_Event_Text ; 18CAA2/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_117 ; 18CAA6/03F70C
.byte $00 ; 18CAA9/00
JSR Wait_for_A_press ; 18CAAA/1BC3D4
WAIT #30 ; 18CAAD/061E
ASM_CALL Compressed_Setup_3b_2b ; 18CAAF/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_Loc_Somewhere_in_Darkness; 18CAB3/F78314
.word 1024 ; 18CAB6/0004
JSR Make_Animation_Loop1 ; 18CAB8/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18CABB/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long _18CABF_data ; 18CABF/8ACC18
.byte $C0 ; 18CAC2/C0
.word 128 ; 18CAC3/8000
ASM_CALL Set_WindowMask_4b ; 18CAC5/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $07 ; 18CAC9/07
.byte $33 ; 18CACA/33
.byte $03 ; 18CACB/03
.byte $30 ; 18CACC/30
ASM_CALL Load_Sprite_1b_1b_12b ; 18CACD/07AE9C00 // Load Sprite
.byte 8 ; 18CAD1/08
.byte 36 ; 18CAD2/24
.word 18 ; 18CAD3/1200
.word 8 ; 18CAD5/0800
.word 65500 ; 18CAD7/DCFF
.word 1 ; 18CAD9/0100
.word 28 ; 18CADB/1C00
.word 8 ; 18CADD/0800
ASM_CALL Load_Sprite_1b_1b_12b ; 18CADF/07AE9C00 // Load Sprite
.byte 8 ; 18CAE3/08
.byte 36 ; 18CAE4/24
.word 18 ; 18CAE5/1200
.word 56 ; 18CAE7/3800
.word 65500 ; 18CAE9/DCFF
.word 0 ; 18CAEB/0000
.word 28 ; 18CAED/1C00
.word 9 ; 18CAEF/0900
ASM_CALL Load_Sprite_1b_1b_12b ; 18CAF1/07AE9C00 // Load Sprite
.byte 8 ; 18CAF5/08
.byte 36 ; 18CAF6/24
.word 18 ; 18CAF7/1200
.word 104 ; 18CAF9/6800
.word 65500 ; 18CAFB/DCFF
.word 1 ; 18CAFD/0100
.word 28 ; 18CAFF/1C00
.word 10 ; 18CB01/0A00
START_LOOP #32 ; 18CB03/0120
ASM_CALL Add_RGB_3b ; 18CB05/07E29F00 // Add RGB
.byte $FF ; 18CB09/FF
.byte $FF ; 18CB0A/FF
.byte $FF ; 18CB0B/FF
WAIT #4 ; 18CB0C/0604
END_LOOP ; 18CB0E/02
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18CB0F/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18CB13/9110
.word 2 ; 18CB15/0200
MOV.b Color_math,#$30 ; 18CB17/13312130
START_LOOP #4 ; 18CB1B/0104
ASM_CALL Add_RGB_3b ; 18CB1D/07E29F00 // Add RGB
.byte $08 ; 18CB21/08
.byte $08 ; 18CB22/08
.byte $08 ; 18CB23/08
WAIT #1 ; 18CB24/0601
END_LOOP ; 18CB26/02
ASM_CALL Compressed_Setup_3b_2b ; 18CB27/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long $148400 ; 18CB2B/008414
.word 1024 ; 18CB2E/0004
JSR Make_Animation_Loop1 ; 18CB30/1BB9D4
MOV.w Animation_Finish_Timer,#$0003; 18CB33/1691100300
START_LOOP #16 ; 18CB38/0110
ASM_CALL Add_RGB_3b ; 18CB3A/07E29F00 // Add RGB
.byte $FE ; 18CB3E/FE
.byte $FE ; 18CB3F/FE
.byte $FE ; 18CB40/FE
WAIT #1 ; 18CB41/0601
END_LOOP ; 18CB43/02
WAIT #180 ; 18CB44/06B4
MOV.b Color_math,#$B0 ; 18CB46/133121B0
START_LOOP #32 ; 18CB4A/0120
ASM_CALL Add_RGB_3b ; 18CB4C/07E29F00 // Add RGB
.byte $01 ; 18CB50/01
.byte $01 ; 18CB51/01
.byte $01 ; 18CB52/01
WAIT #6 ; 18CB53/0606
END_LOOP ; 18CB55/02
MOV.w Animation_Finish_Timer,#$0004; 18CB56/1691100400
MOV.w EqWeapon,#$000F ; 18CB5B/1683120F00
Final_Boss__full__heal:
ASM_CALL Full_Heal_Rooks_Spirits ; 18CB60/070DCE18 // Full Heal Rooks/Spirits - Heals the spirits using the current spirit's max HP/MP
ASM_CALL Set_WindowMask_4b ; 18CB64/071DD518 // Set window mask [Main screen][BG 1/2][BG 3/4][OBJ color]
.byte $00 ; 18CB68/00
.byte $00 ; 18CB69/00
.byte $00 ; 18CB6A/00
.byte $30 ; 18CB6B/30
MOV.b Color_math,#$BF ; 18CB6C/133121BF
WAIT #1 ; 18CB70/0601
START_LOOP #32 ; 18CB72/0120
ASM_CALL Add_RGB_3b ; 18CB74/07E29F00 // Add RGB
.byte $FF ; 18CB78/FF
.byte $FF ; 18CB79/FF
.byte $FF ; 18CB7A/FF
WAIT #6 ; 18CB7B/0606
END_LOOP ; 18CB7D/02
ASM_CALL Rem_HDMA_ch_1b ; 18CB7E/071F9F00 // Remove HDMA channel
.byte $06 ; 18CB82/06
ASM_CALL Clear_Winmask_Lo ; 18CB83/0744D518 // Clear window mask lo
ASM_CALL Check_Party ; 18CB87/07D9D418 // Check party
UNK_TASK #1 ; 18CB8B/1401
SET_ANIM #-1 ; 18CB8D/30FF
MOV.w $18E1,#$000C ; 18CB8F/16E1180C00
Final_Battle:
ASM_CALL Check_map_tile_value ; 18CB94/070B8018 // Check map tile value (Returns 0=no encounter, 1-3=encounter)
ASM_CALL Roll_encounter ; 18CB98/07108218 // Roll RNG for Random Encounter
JSR Sub_Sauza_1 ; 18CB9C/1BD4D3
JSR Sub_Event_Battle ; 18CB9F/1BC3D3
ASM_CALL Unknown_setup ; 18CBA2/07E59C00 // Unknown setup
JSR Sub_Sauza_2 ; 18CBA6/1BE0D3
JSR FinalFight_CompressedData ; 18CBA9/1B59CD
UNK_TASK #1 ; 18CBAC/1401
ASM_CALL GetSet_Music_1b ; 18CBAE/073C9C00 // Get/Set Music
.byte 59 ; 18CBB2/3B
MOV.b Color_math,#$A5 ; 18CBB3/133121A5
START_LOOP #32 ; 18CBB7/0120
ASM_CALL Add_RGB_3b ; 18CBB9/07E29F00 // Add RGB
.byte $01 ; 18CBBD/01
.byte $01 ; 18CBBE/01
.byte $01 ; 18CBBF/01
WAIT #1 ; 18CBC0/0601
END_LOOP ; 18CBC2/02
ASM_CALL Rem_HDMA_ch_1b ; 18CBC3/071F9F00 // Remove HDMA channel
.byte $07 ; 18CBC7/07
ASM_CALL MainScr_Remove_1b ; 18CBC8/07B69D00 // Main Screen remove
.byte $05 ; 18CBCC/05
ASM_CALL Display_brancher_6b ; 18CBCD/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $00 ; 18CBD1/00
.byte $01 ; 18CBD2/01
.word $7000 ; 18CBD3/0070
.word $0400 ; 18CBD5/0004
ASM_CALL Compressed_Setup_3b_2b ; 18CBD7/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148409 ; 18CBDB/098414
.word 1024 ; 18CBDE/0004
JSR Make_Animation_Loop1 ; 18CBE0/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18CBE3/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18CBE7_Rimsala ; 18CBE7/6ACC18
.byte $40 ; 18CBEA/40
.word 32 ; 18CBEB/2000
ASM_CALL Set_RGB_3b ; 18CBED/07839F00 // Set RGB -2
.byte $00 ; 18CBF1/00
.byte $00 ; 18CBF2/00
.byte $00 ; 18CBF3/00
WAIT #1 ; 18CBF4/0601
TASK DATA8_18CD3E ; 18CBF6/083ECD
WAIT #90 ; 18CBF9/065A
TASK DATA8_18CD1F ; 18CBFB/081FCD
WAIT #240 ; 18CBFE/06F0
WAIT #240 ; 18CC00/06F0
START_LOOP #16 ; 18CC02/0110
ASM_CALL Fade ; 18CC04/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #4 ; 18CC08/0604
END_LOOP ; 18CC0A/02
UNK_TASK #1 ; 18CC0B/1401
ASM_CALL Set_RGB_3b ; 18CC0D/07839F00 // Set RGB -2
.byte $00 ; 18CC11/00
.byte $00 ; 18CC12/00
.byte $00 ; 18CC13/00
ASM_CALL MainScr_Remove_1b ; 18CC14/07B69D00 // Main Screen remove
.byte $11 ; 18CC18/11
ASM_CALL Display_brancher_6b ; 18CC19/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18CC1D/01
.byte $00 ; 18CC1E/00
.word $3000 ; 18CC1F/0030
.word $0000 ; 18CC21/0000
JSR DATA8_18D389 ; 18CC23/1B89D3
ASM_CALL Compressed_Setup_3b_2b ; 18CC26/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long DATA8_148422 ; 18CC2A/228414
.word 1024 ; 18CC2D/0004
JSR Make_Animation_Loop1 ; 18CC2F/1BB9D4
ASM_CALL Decomp_Setup2_3b_3b ; 18CC32/0735A000 // Decompression setup 2
.long RLE_18CC36_data ; 18CC36/43BF18
.long $000440 ; 18CC39/400400
WAIT #1 ; 18CC3C/0601
JSR Sub_Turn_off_sound ; 18CC3E/1BF6D3
ASM_CALL GetSet_Music_1b ; 18CC41/073C9C00 // Get/Set Music
.byte 60 ; 18CC45/3C
START_LOOP #16 ; 18CC46/0110
ASM_CALL Unfade ; 18CC48/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #4 ; 18CC4C/0604
END_LOOP ; 18CC4E/02
WAIT #240 ; 18CC4F/06F0
WAIT #120 ; 18CC51/0678
START_LOOP #16 ; 18CC53/0110
ASM_CALL Fade ; 18CC55/07DBA000 // Fade (Decrease lighting by 1/16)
ASM_CALL Sound_stuff_1b ; 18CC59/07199C00 // Sound stuff
.byte $F0 ; 18CC5D/F0
WAIT #4 ; 18CC5E/0604
END_LOOP ; 18CC60/02
ASM_CALL Check_Party ; 18CC61/07D9D418 // Check party
UNK_TASK #1 ; 18CC65/1401
JMP Maybe_Rimsala_beat ; 18CC67/1AA2CF
$18CD15 - Sub: Ch05 Rimsala brain burn
Event_Rimsala_Brain_Burn:
ASM_CALL GetSet_SFX_1b ; 18CD15/07449C00 // Get/Set Sound Effect
.byte 38 ; 18CD19/26
WAIT #24 ; 18CD1A/0618
JMP Event_Rimsala_Brain_Burn ; 18CD1C/1A15CD
DATA8_18CD1F:
MOV.b Color_math,#$02 ; 18CD1F/13312102
DATA8_18CD23:
START_LOOP #16 ; 18CD23/0110
ASM_CALL Add_RGB_3b ; 18CD25/07E29F00 // Add RGB
.byte $02 ; 18CD29/02
.byte $02 ; 18CD2A/02
.byte $02 ; 18CD2B/02
WAIT #1 ; 18CD2C/0601
END_LOOP ; 18CD2E/02
START_LOOP #4 ; 18CD2F/0104
ASM_CALL Add_RGB_3b ; 18CD31/07E29F00 // Add RGB
.byte $F8 ; 18CD35/F8
.byte $F8 ; 18CD36/F8
.byte $F8 ; 18CD37/F8
WAIT #1 ; 18CD38/0601
END_LOOP ; 18CD3A/02
JMP DATA8_18CD23 ; 18CD3B/1A23CD
DATA8_18CD3E:
ASM_CALL MainScr_Add_1b ; 18CD3E/07A89D00 // Main Screen add
.byte $01 ; 18CD42/01
BGH_DISP #0,#$0000 ; 18CD43/78000000
WAIT #3 ; 18CD47/0603
BGH_DISP #0,#$0100 ; 18CD49/78000001
WAIT #3 ; 18CD4D/0603
ASM_CALL MainScr_Remove_1b ; 18CD4F/07B69D00 // Main Screen remove
.byte $01 ; 18CD53/01
WAIT #3 ; 18CD54/0603
JMP DATA8_18CD3E ; 18CD56/1A3ECD
FinalFight_CompressedData:
ASM_CALL Compressed_Setup_3b_2b ; 18CD59/07F7D418 // Compressed Setup (Loads a pointer to data and calls 188325)
.long RLE_Loc_Final_Fight ; 18CD5D/DD8314
.word 1024 ; 18CD60/0004
JSR Make_Animation_Loop1 ; 18CD62/1BB9D4
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18CD65/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18CD69 ; 18CD69/CDCD18
.byte $90 ; 18CD6C/90
.word 64 ; 18CD6D/4000
Text_SCRIPT112:
ASM_CALL Load_Event_Text ; 18CD6F/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long SCRIPT_112 ; 18CD73/A6F50C
.byte $00 ; 18CD76/00
TASK Sub_Some_Town_Anim ; 18CD77/081B97
JSR Wait_for_A_press ; 18CD7A/1BC3D4
ASM_CALL Load_Sprite_1b_1b_12b ; 18CD7D/07AE9C00 // Load Sprite
.byte 8 ; 18CD81/08
.byte 36 ; 18CD82/24
.word 18 ; 18CD83/1200
.word 112 ; 18CD85/7000
.word 12 ; 18CD87/0C00
.word 0 ; 18CD89/0000
.word 28 ; 18CD8B/1C00
.word 3 ; 18CD8D/0300
ASM_CALL Load_Sprite_1b_1b_12b ; 18CD8F/07AE9C00 // Load Sprite
.byte 8 ; 18CD93/08
.byte 36 ; 18CD94/24
.word 18 ; 18CD95/1200
.word 112 ; 18CD97/7000
.word 65452 ; 18CD99/ACFF
.word 0 ; 18CD9B/0000
.word 28 ; 18CD9D/1C00
.word 4 ; 18CD9F/0400
ASM_CALL Load_Sprite_1b_1b_12b ; 18CDA1/07AE9C00 // Load Sprite
.byte 8 ; 18CDA5/08
.byte 36 ; 18CDA6/24
.word 18 ; 18CDA7/1200
.word 0 ; 18CDA9/0000
.word 12 ; 18CDAB/0C00
.word 0 ; 18CDAD/0000
.word 28 ; 18CDAF/1C00
.word 5 ; 18CDB1/0500
ASM_CALL Load_Sprite_1b_1b_12b ; 18CDB3/07AE9C00 // Load Sprite
.byte 8 ; 18CDB7/08
.byte 36 ; 18CDB8/24
.word 18 ; 18CDB9/1200
.word 0 ; 18CDBB/0000
.word 65452 ; 18CDBD/ACFF
.word 0 ; 18CDBF/0000
.word 28 ; 18CDC1/1C00
.word 6 ; 18CDC3/0600
ASM_CALL GetSet_SFX_1b ; 18CDC5/07449C00 // Get/Set Sound Effect
.byte 8 ; 18CDC9/08
WAIT #20 ; 18CDCA/0614
RTS ; 18CDCC/1C
$18CE62 - Sub: Ch05 Final door 1-9, winning, setup epilogue
Final_Door1:
SET_ANIM #-125 ; 18CE62/3083
WAIT #21 ; 18CE64/0615
INC_ANIM ; 18CE66/A8
WAIT #20 ; 18CE67/0614
JMP Final_Door1 ; 18CE69/1A62CE
Final_Door2:
SET_ANIM #-123,WAIT #1 ; 18CE6C/3185
ADD_XPOS #-17 ; 18CE6E/48EFFF
ADD_YPOS #-17 ; 18CE71/50EFFF
INC_ANIM WAIT #1 ; 18CE74/A9
ADD_XPOS #-11 ; 18CE75/48F5FF
ADD_YPOS #-11,WAIT #1 ; 18CE78/51F5FF
ADD_XPOS #-10 ; 18CE7B/48F6FF
ADD_YPOS #-10 ; 18CE7E/50F6FF
INC_ANIM WAIT #1 ; 18CE81/A9
ADD_XPOS #-6 ; 18CE82/48FAFF
ADD_YPOS #-6,WAIT #1 ; 18CE85/51FAFF
ADD_XPOS #-6 ; 18CE88/48FAFF
ADD_YPOS #-6 ; 18CE8B/50FAFF
INC_ANIM WAIT #2 ; 18CE8E/AA
ADD_XPOS #-4 ; 18CE8F/48FCFF
ADD_YPOS #-4,WAIT #1 ; 18CE92/51FCFF
END ; 18CE95/00
Final_Door3:
SET_ANIM #-119,WAIT #1 ; 18CE96/3189
ADD_XPOS #-17 ; 18CE98/48EFFF
ADD_YPOS #17 ; 18CE9B/501100
INC_ANIM WAIT #1 ; 18CE9E/A9
ADD_XPOS #-11 ; 18CE9F/48F5FF
ADD_YPOS #11,WAIT #1 ; 18CEA2/510B00
ADD_XPOS #-10 ; 18CEA5/48F6FF
ADD_YPOS #10 ; 18CEA8/500A00
INC_ANIM WAIT #2 ; 18CEAB/AA
ADD_XPOS #-6 ; 18CEAC/48FAFF
ADD_YPOS #6,WAIT #1 ; 18CEAF/510600
ADD_XPOS #-6 ; 18CEB2/48FAFF
ADD_YPOS #6 ; 18CEB5/500600
INC_ANIM WAIT #2 ; 18CEB8/AA
ADD_XPOS #-4 ; 18CEB9/48FCFF
ADD_YPOS #4,WAIT #1 ; 18CEBC/510400
END ; 18CEBF/00
Final_Door4:
SET_ANIM #-115,WAIT #1 ; 18CEC0/318D
ADD_XPOS #17 ; 18CEC2/481100
ADD_YPOS #-17 ; 18CEC5/50EFFF
INC_ANIM WAIT #1 ; 18CEC8/A9
ADD_XPOS #11 ; 18CEC9/480B00
ADD_YPOS #-11,WAIT #1 ; 18CECC/51F5FF
ADD_XPOS #10 ; 18CECF/480A00
ADD_YPOS #-10 ; 18CED2/50F6FF
INC_ANIM WAIT #2 ; 18CED5/AA
ADD_XPOS #6 ; 18CED6/480600
ADD_YPOS #-6,WAIT #1 ; 18CED9/51FAFF
ADD_XPOS #6 ; 18CEDC/480600
ADD_YPOS #-6 ; 18CEDF/50FAFF
INC_ANIM WAIT #2 ; 18CEE2/AA
ADD_XPOS #4 ; 18CEE3/480400
ADD_YPOS #-4,WAIT #1 ; 18CEE6/51FCFF
END ; 18CEE9/00
Final_Door5:
SET_ANIM #-111,WAIT #1 ; 18CEEA/3191
ADD_XPOS #17 ; 18CEEC/481100
ADD_YPOS #17 ; 18CEEF/501100
INC_ANIM WAIT #1 ; 18CEF2/A9
ADD_XPOS #11 ; 18CEF3/480B00
ADD_YPOS #11,WAIT #1 ; 18CEF6/510B00
ADD_XPOS #10 ; 18CEF9/480A00
ADD_YPOS #10 ; 18CEFC/500A00
INC_ANIM WAIT #2 ; 18CEFF/AA
ADD_XPOS #6 ; 18CF00/480600
ADD_YPOS #6,WAIT #1 ; 18CF03/510600
ADD_XPOS #6 ; 18CF06/480600
ADD_YPOS #6 ; 18CF09/500600
INC_ANIM WAIT #2 ; 18CF0C/AA
ADD_XPOS #4 ; 18CF0D/480400
ADD_YPOS #4,WAIT #1 ; 18CF10/510400
END ; 18CF13/00
Final_Door6:
TASK DATA8_18CF47 ; 18CF14/0847CF
DATA8_18CF17:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18CF17/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18CF1B/9110
.word 1 ; 18CF1D/0100
MOV.w Animation_Finish_Timer,#$0000; 18CF1F/1691100000
ASM_CALL GetSet_SFX_1b ; 18CF24/07449C00 // Get/Set Sound Effect
.byte 23 ; 18CF28/17
UNK_TASK #1 ; 18CF29/1401
TASK DATA8_18CF31 ; 18CF2B/0831CF
JMP DATA8_18CF17 ; 18CF2E/1A17CF
DATA8_18CF31:
BGV_DISP #1,#$0100 ; 18CF31/80010001
BGH_DISP #1,#$0000 ; 18CF35/78010000
WAIT #8 ; 18CF39/0608
BGH_DISP #1,#$0100 ; 18CF3B/78010001
WAIT #24 ; 18CF3F/0618
BGH_DISP #1,#$0000 ; 18CF41/78010000
WAIT #8 ; 18CF45/0608
DATA8_18CF47:
BGV_DISP #1,#$0000 ; 18CF47/80010000
BGH_DISP #1,#$0000 ; 18CF4B/78010000
WAIT #32 ; 18CF4F/0620
BGH_DISP #1,#$0100 ; 18CF51/78010001
WAIT #32 ; 18CF55/0620
JMP DATA8_18CF47 ; 18CF57/1A47CF
Final_Door7:
SET_ANIM #-107 ; 18CF5A/3095
WAIT #240 ; 18CF5C/06F0
SET_XVEL #64 ; 18CF5E/584000
WAIT #192 ; 18CF61/06C0
END ; 18CF63/00
Final_Door8:
SET_ANIM #-106 ; 18CF64/3096
WAIT #240 ; 18CF66/06F0
SFX_Rimsala_sealed:
ASM_CALL GetSet_SFX_1b ; 18CF68/07449C00 // Get/Set Sound Effect
.byte 41 ; 18CF6C/29
WAIT #192 ; 18CF6D/06C0
WAIT #30 ; 18CF6F/061E
MOV.w Animation_Finish_Timer,#$0002; 18CF71/1691100200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18CF76/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18CF7A/9110
.word 3 ; 18CF7C/0300
SET_ANIM #-104 ; 18CF7E/3098
WAIT #60 ; 18CF80/063C
INC_ANIM WAIT #2 ; 18CF82/AA
START_LOOP #6 ; 18CF83/0106
INC_ANIM WAIT #2 ; 18CF85/AA
END_LOOP ; 18CF86/02
SET_ANIM #-95,WAIT #1 ; 18CF87/31A1
DEC_ANIM WAIT #1 ; 18CF89/B1
INC_ANIM WAIT #1 ; 18CF8A/A9
SET_ANIM #-97,WAIT #2 ; 18CF8B/329F
SET_ANIM #-104 ; 18CF8D/3098
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18CF8F/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18CF93/9110
.word 4 ; 18CF95/0400
END ; 18CF97/00
Final_Door9:
SET_ANIM #-105 ; 18CF98/3097
WAIT #240 ; 18CF9A/06F0
SET_XVEL #-64 ; 18CF9C/58C0FF
WAIT #192 ; 18CF9F/06C0
END ; 18CFA1/00
Maybe_Rimsala_beat:
WAIT #120 ; 18CFA2/0678
ASM_CALL Display_Force_Blanking_far ; 18CFA4/07778100 // Display Force Blanking
ASM_CALL Display_brancher_6b ; 18CFA8/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $02 ; 18CFAC/02
.byte $00 ; 18CFAD/00
.word $5000 ; 18CFAE/0050
.word $0C00 ; 18CFB0/000C
ASM_CALL MainScr_Remove_1b ; 18CFB2/07B69D00 // Main Screen remove
.byte $1F ; 18CFB6/1F
ASM_CALL MainScr_Add_1b ; 18CFB7/07A89D00 // Main Screen add
.byte $04 ; 18CFBB/04
ASM_CALL Gfx_GetPalette_3b_1b_2b ; 18CFBC/0740A100 // Gfx: Get Palette - [Source addr] [Destination RAM ($0420 + 2*[val])] [# bytes to transfer]
.long Palette_18D011 ; 18CFC0/11D018
.byte $00 ; 18CFC3/00
.word 8 ; 18CFC4/0800
ASM_CALL Text_Init_3b_1b ; 18CFC6/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_18D007 ; 18CFCA/07D018
.byte 0 ; 18CFCD/00
ASM_CALL Text_Init_3b_1b ; 18CFCE/0797A000 // Text Init - [Location of 5b temp text values], [0-1: $109B or $109B+28 - which text array to use]
.long Text_Init_18D00C ; 18CFD2/0CD018
.byte 1 ; 18CFD5/01
Set_up_display:
ASM_CALL Do_Stuff_far ; 18CFD6/07A8A000 // Do Stuff
ASM_CALL Set_Display_far ; 18CFDA/078B8100 // Set Display
MOV VAR0,#$0000 ; 18CFDE/0F000000
START_LOOP #7 ; 18CFE2/0107
Setup_Epilogue:
ASM_CALL Epilogue_text_setup ; 18CFE4/0719D018 // Epilogue text setup
ADD VAR0,ADD,#1 ; 18CFE8/1500020100
WAIT #5 ; 18CFED/0605
START_LOOP #16 ; 18CFEF/0110
ASM_CALL Unfade ; 18CFF1/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #6 ; 18CFF5/0606
END_LOOP ; 18CFF7/02
WAIT VAR1 ; 18CFF8/2501
START_LOOP #16 ; 18CFFA/0110
ASM_CALL Fade ; 18CFFC/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #6 ; 18D000/0606
END_LOOP ; 18D002/02
WAIT #90 ; 18D003/065A
END_LOOP ; 18D005/02
END ; 18D006/00
$18D283 - Join/Leave Subroutines, Event Battles
Teefa_joins:
ASM_CALL Clear_Event_1b ; 18D283/07DD9C00 // Battle related
.byte $10 ; 18D287/10
ASM_CALL Unequip_character ; 18D288/076EAC07
ONTICK NOP ; 18D28C/10
END ; 18D28D/00
L_18D28E:
ASM_CALL Load_Graphics__1b_12b ; 18D28E/07BC9C00 // Load Graphics
.byte 16 ; 18D292/10
.word 9 ; 18D293/0900
.word 0 ; 18D295/0000
.word 0 ; 18D297/0000
.word 0 ; 18D299/0000
.word 0 ; 18D29B/0000
.word 0 ; 18D29D/0000
WAIT #30 ; 18D29F/061E
RTS ; 18D2A1/1C
Teefa_leaves:
ASM_CALL Clear_Event_1b ; 18D2A2/07DD9C00 // Battle related
.byte $10 ; 18D2A6/10
ASM_CALL Unequip_character ; 18D2A7/076EAC07
ONTICK NOP ; 18D2AB/10
END ; 18D2AC/00
L_18D2AD:
ASM_CALL Load_Graphics__1b_12b ; 18D2AD/07BC9C00 // Load Graphics
.byte 16 ; 18D2B1/10
.word 14 ; 18D2B2/0E00
.word 0 ; 18D2B4/0000
.word 0 ; 18D2B6/0000
.word 0 ; 18D2B8/0000
.word 0 ; 18D2BA/0000
.word 0 ; 18D2BC/0000
WAIT #30 ; 18D2BE/061E
RTS ; 18D2C0/1C
Salah_joins:
ASM_CALL Clear_Event_1b ; 18D2C1/07DD9C00 // Battle related
.byte $10 ; 18D2C5/10
ASM_CALL Unequip_character ; 18D2C6/076EAC07
ONTICK NOP ; 18D2CA/10
END ; 18D2CB/00
L_18D2CC:
ASM_CALL Load_Graphics__1b_12b ; 18D2CC/07BC9C00 // Load Graphics
.byte 16 ; 18D2D0/10
.word 10 ; 18D2D1/0A00
.word 0 ; 18D2D3/0000
.word 0 ; 18D2D5/0000
.word 0 ; 18D2D7/0000
.word 0 ; 18D2D9/0000
.word 0 ; 18D2DB/0000
WAIT #30 ; 18D2DD/061E
RTS ; 18D2DF/1C
Salah_leaves:
ASM_CALL Clear_Event_1b ; 18D2E0/07DD9C00 // Battle related
.byte $10 ; 18D2E4/10
ASM_CALL Unequip_character ; 18D2E5/076EAC07
ONTICK NOP ; 18D2E9/10
END ; 18D2EA/00
L_18D2EB:
ASM_CALL Load_Graphics__1b_12b ; 18D2EB/07BC9C00 // Load Graphics
.byte 16 ; 18D2EF/10
.word 14 ; 18D2F0/0E00
.word 0 ; 18D2F2/0000
.word 0 ; 18D2F4/0000
.word 0 ; 18D2F6/0000
.word 0 ; 18D2F8/0000
.word 0 ; 18D2FA/0000
WAIT #30 ; 18D2FC/061E
RTS ; 18D2FE/1C
Sub_Axs_joins_Ch3:
ASM_CALL Clear_Event_1b ; 18D2FF/07DD9C00 // Battle related
.byte $12 ; 18D303/12
ASM_CALL Unequip_character ; 18D304/076EAC07
MULTI_JSR #0 ; 18D308/1200
ASM_CALL Load_Graphics__1b_12b ; 18D30A/07BC9C00 // Load Graphics
.byte 18 ; 18D30E/12
.word 12 ; 18D30F/0C00
.word 0 ; 18D311/0000
.word 0 ; 18D313/0000
.word 0 ; 18D315/0000
.word 0 ; 18D317/0000
.word 0 ; 18D319/0000
WAIT #30 ; 18D31B/061E
RTS ; 18D31D/1C
Sub_Unequip_Axs:
ASM_CALL Clear_Event_1b ; 18D31E/07DD9C00 // Battle related
.byte $12 ; 18D322/12
ASM_CALL Unequip_character ; 18D323/076EAC07
MULTI_JSR #0 ; 18D327/1200
Sub_Axs_leaves:
ASM_CALL Load_Graphics__1b_12b ; 18D329/07BC9C00 // Load Graphics
.byte 18 ; 18D32D/12
.word 15 ; 18D32E/0F00
.word 0 ; 18D330/0000
.word 0 ; 18D332/0000
.word 0 ; 18D334/0000
.word 0 ; 18D336/0000
.word 0 ; 18D338/0000
WAIT #30 ; 18D33A/061E
RTS ; 18D33C/1C
Darwin_joins:
ASM_CALL Clear_Event_1b ; 18D33D/07DD9C00 // Battle related
.byte $12 ; 18D341/12
ASM_CALL Unequip_character ; 18D342/076EAC07
MULTI_JSR #0 ; 18D346/1200
ASM_CALL Load_Graphics__1b_12b ; 18D348/07BC9C00 // Load Graphics
.byte 18 ; 18D34C/12
.word 11 ; 18D34D/0B00
.word 0 ; 18D34F/0000
.word 0 ; 18D351/0000
.word 0 ; 18D353/0000
.word 0 ; 18D355/0000
.word 0 ; 18D357/0000
WAIT #30 ; 18D359/061E
RTS ; 18D35B/1C
Darwin_leaves:
ASM_CALL Clear_Event_1b ; 18D35C/07DD9C00 // Battle related
.byte $12 ; 18D360/12
ASM_CALL Unequip_character ; 18D361/076EAC07
MULTI_JSR #0 ; 18D365/1200
ASM_CALL Load_Graphics__1b_12b ; 18D367/07BC9C00 // Load Graphics
.byte 18 ; 18D36B/12
.word 15 ; 18D36C/0F00
.word 0 ; 18D36E/0000
.word 0 ; 18D370/0000
.word 0 ; 18D372/0000
.word 0 ; 18D374/0000
.word 0 ; 18D376/0000
WAIT #30 ; 18D378/061E
RTS ; 18D37A/1C
Fanfare_and_Refresh_Music:
ASM_CALL GetSet_Music_1b ; 18D37B/073C9C00 // Get/Set Music
.byte 84 ; 18D37F/54
WAIT #240 ; 18D380/06F0
WAIT #80 ; 18D382/0650
ASM_CALL Sub_Default_BGM ; 18D384/0720A503 // Sub: Default Dungeon BGM
RTS ; 18D388/1C
DATA8_18D389:
BGH_DISP #1,#$0000 ; 18D389/78010000
BGV_DISP #1,#$0000 ; 18D38D/80010000
RTS ; 18D391/1C
Dungeon_loop:
ASM_CALL Sub_038761 ; 18D392/07618703
WAIT #1 ; 18D396/0601
ASM_CALL Map_stuff_and_vblank ; 18D398/073F8803 // Map stuff and vblank
WAIT #1 ; 18D39C/0601
RTS ; 18D39E/1C
Screen_Flash:
MOV.b $1893,#$06 ; 18D39F/13931806
ASM_CALL Set_RGB_3b ; 18D3A3/07839F00 // Set RGB -2
.byte $00 ; 18D3A7/00
.byte $00 ; 18D3A8/00
.byte $00 ; 18D3A9/00
START_LOOP #8 ; 18D3AA/0108
ASM_CALL Add_RGB_3b ; 18D3AC/07E29F00 // Add RGB
.byte $04 ; 18D3B0/04
.byte $04 ; 18D3B1/04
.byte $04 ; 18D3B2/04
WAIT #1 ; 18D3B3/0601
END_LOOP ; 18D3B5/02
START_LOOP #8 ; 18D3B6/0108
ASM_CALL Add_RGB_3b ; 18D3B8/07E29F00 // Add RGB
.byte $FC ; 18D3BC/FC
.byte $FC ; 18D3BD/FC
.byte $FC ; 18D3BE/FC
WAIT #1 ; 18D3BF/0601
END_LOOP ; 18D3C1/02
RTS ; 18D3C2/1C
Sub_Event_Battle:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18D3C3/0751A000 // Loop til (RAM) is (val)
.word Game_State ; 18D3C7/C111
.word 2 ; 18D3C9/0200
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18D3CB/0751A000 // Loop til (RAM) is (val)
.word Game_State ; 18D3CF/C111
.word 0 ; 18D3D1/0000
RTS ; 18D3D3/1C
Sub_Sauza_1:
MOV.w $1901,#$0000 ; 18D3D4/1601190000
OR.w Story_Progress,OR,#$8000 ; 18D3D9/0EFF18010080
L_18D3DF:
RTS ; 18D3DF/1C
Sub_Sauza_2:
AND.w Story_Progress,AND,#$7FFF ; 18D3E0/0EFF1800FF7F
L_18D3E6:
MOV.w $1901,#$0001 ; 18D3E6/1601190100
Text_MACRO118:
ASM_CALL Load_Event_Text ; 18D3EB/07CCD418 // Read text opcodes - Reads from [addr] to buffer #[var] (0 or 1)
.long MACRO_118 ; 18D3EF/C2F70C
.byte $00 ; 18D3F2/00
WAIT #10 ; 18D3F3/060A
RTS ; 18D3F5/1C
Sub_Turn_off_sound:
START_LOOP #32 ; 18D3F6/0120
ASM_CALL Sound_stuff_1b ; 18D3F8/07199C00 // Sound stuff
.byte $F8 ; 18D3FC/F8
WAIT #1 ; 18D3FD/0601
END_LOOP ; 18D3FF/02
ASM_CALL GetSet_Music_1b ; 18D400/073C9C00 // Get/Set Music
.byte 0 ; 18D404/00
WAIT #1 ; 18D405/0601
ASM_CALL Sound_byte_1b ; 18D407/070A9C00 // Sound byte
.byte $FF ; 18D40B/FF
WAIT #1 ; 18D40C/0601
RTS ; 18D40E/1C
DATA8_18D40F:
MOV.b $1893,#$36 ; 18D40F/13931836
JMP Sub_FadeOut ; 18D413/1A1AD4
SetB6_FadeOut:
MOV.b $1893,#$B6 ; 18D416/139318B6
Sub_FadeOut:
ASM_CALL Set_RGB_3b ; 18D41A/07839F00 // Set RGB -2
.byte $00 ; 18D41E/00
.byte $00 ; 18D41F/00
.byte $00 ; 18D420/00
START_LOOP #31 ; 18D421/011F
ASM_CALL Add_RGB_3b ; 18D423/07E29F00 // Add RGB
.byte $01 ; 18D427/01
.byte $01 ; 18D428/01
.byte $01 ; 18D429/01
WAIT VAR0 ; 18D42A/2500
END_LOOP ; 18D42C/02
RTS ; 18D42D/1C
DATA8_18D42E:
MOV.b $1893,#$36 ; 18D42E/13931836
JMP Sub_Shiny_Treasures ; 18D432/1A39D4
Sub_FadeIn:
MOV.b $1893,#$B6 ; 18D435/139318B6
Sub_Shiny_Treasures:
ASM_CALL Set_RGB_3b ; 18D439/07839F00 // Set RGB -2
.byte $1F ; 18D43D/1F
.byte $1F ; 18D43E/1F
.byte $1F ; 18D43F/1F
START_LOOP #31 ; 18D440/011F
ASM_CALL Add_RGB_3b ; 18D442/07E29F00 // Add RGB
.byte $FF ; 18D446/FF
.byte $FF ; 18D447/FF
.byte $FF ; 18D448/FF
WAIT VAR0 ; 18D449/2500
END_LOOP ; 18D44B/02
RTS ; 18D44C/1C
Sub_LoadSomething:
MOV.w ShowCompass,#$0000 ; 18D44D/167B150000
WAIT #1 ; 18D452/0601
ASM_CALL Transfer_Graphics_3b ; 18D454/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_Menu ; 18D458/2FB501
RTS ; 18D45B/1C
Some_sub:
WAIT #5 ; 18D45C/0605
MOV.w ShowCompass,#$0001 ; 18D45E/167B150100
Unknown_join:
ASM_CALL Load_Graphics__1b_12b ; 18D463/07BC9C00 // Load Graphics
.byte 4 ; 18D467/04
.word 19 ; 18D468/1300
.word 0 ; 18D46A/0000
.word 0 ; 18D46C/0000
.word 0 ; 18D46E/0000
.word 0 ; 18D470/0000
.word 0 ; 18D472/0000
WAIT #2 ; 18D474/0602
ASM_CALL Transfer_Graphics_3b ; 18D476/07079D00 // 00/8698 setup
.long _9D07_data_Dungeon_NotMenu ; 18D47A/74B601
WAIT #5 ; 18D47D/0605
RTS ; 18D47F/1C
Sub_Sting_Flash:
MOV.b $1893,#$22 ; 18D480/13931822
ASM_CALL Set_RGB_3b ; 18D484/07839F00 // Set RGB -2
.byte $00 ; 18D488/00
.byte $00 ; 18D489/00
.byte $00 ; 18D48A/00
START_LOOP #4 ; 18D48B/0104
ASM_CALL Add_RGB_3b ; 18D48D/07E29F00 // Add RGB
.byte $03 ; 18D491/03
.byte $06 ; 18D492/06
.byte $01 ; 18D493/01
WAIT #1 ; 18D494/0601
END_LOOP ; 18D496/02
START_LOOP #4 ; 18D497/0104
ASM_CALL Add_RGB_3b ; 18D499/07E29F00 // Add RGB
.byte $FD ; 18D49D/FD
.byte $FA ; 18D49E/FA
.byte $FF ; 18D49F/FF
WAIT #1 ; 18D4A0/0601
END_LOOP ; 18D4A2/02
RTS ; 18D4A3/1C
Sub_Mock_Battle:
ASM_CALL GetSet_Music_1b ; 18D4A4/073C9C00 // Get/Set Music
.byte 79 ; 18D4A8/4F
Battle_Poses_On:
MOV.w Game_State,#$0002 ; 18D4A9/16C1110200
WAIT #8 ; 18D4AE/0608
RTS ; 18D4B0/1C
Sub_Mock_Battle_end:
MOV.w Game_State,#$0000 ; 18D4B1/16C1110000
WAIT #8 ; 18D4B6/0608
RTS ; 18D4B8/1C
Make_Animation_Loop1:
WAIT #1 ; 18D4B9/0601
ASM_CALL Make_Animation_Loop2 ; 18D4BB/0712D518 // Make animation loop 2
JEQ Make_Animation_Loop1 ; 18D4BF/0BB9D4
RTS ; 18D4C2/1C
Wait_for_A_press:
ASM_CALL Loop_til_RAM_is_val_2b_2b ; 18D4C3/0751A000 // Loop til (RAM) is (val)
.word Animation_Finish_Timer ; 18D4C7/9110
.word 255 ; 18D4C9/FF00
RTS ; 18D4CB/1C
$18D55F - Travelling subroutine
Travel_subasm:
START_LOOP #16 ; 18D55F/0110
ASM_CALL Fade ; 18D561/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #1 ; 18D565/0601
END_LOOP ; 18D567/02
JSL Sub_Disable_HDMA ; 18D568/04F18901
WAIT #1 ; 18D56C/0601
ASM_CALL Display_Force_Blanking_far ; 18D56E/07778100 // Display Force Blanking
ASM_CALL Set_Sprite_mode_4b ; 18D572/07939D00 // Set Sprite mode - [A] [X] [OBJ size]
.byte $00 ; 18D576/00
.word $6000 ; 18D577/0060
.byte $00 ; 18D579/00
ASM_CALL Read_BGmode_1b ; 18D57A/07699D00 // Read Background mode
.byte 1 ; 18D57E/01
Setup_BG1:
ASM_CALL Display_brancher_6b ; 18D57F/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $00 ; 18D583/00
.byte $03 ; 18D584/03
.word $1000 ; 18D585/0010
.word $3000 ; 18D587/0030
Setup_BG2:
ASM_CALL Display_brancher_6b ; 18D589/076F9D00 // Display brancher - [0-3: Call $822B, 826A, 82A7, 82E6] [A] [X] [Y]
.byte $01 ; 18D58D/01
.byte $03 ; 18D58E/03
.word $1000 ; 18D58F/0010
.word $4000 ; 18D591/0040
ASM_CALL MainScr_Remove_1b ; 18D593/07B69D00 // Main Screen remove
.byte $1F ; 18D597/1F
ASM_CALL MainScr_Add_1b ; 18D598/07A89D00 // Main Screen add
.byte $13 ; 18D59C/13
ASM_CALL Decomp80_setup_3b ; 18D59D/07F99C00 // Decomp80 setup
.long Travel_Decomp80 ; 18D5A1/66D618
Chapter_based_shit:
ASM_CALL Xfer_shit ; 18D5A4/07D7D618 // Transfer shit
MOV.w $1913,#$0003 ; 18D5A8/1613190300
Chibis_load:
ASM_CALL Chibi_travel_load ; 18D5AD/073DD818 // Chibi travel load
World_map_position:
ASM_CALL World_map_Posi ; 18D5B1/07A8D618 // World Map reposition - moves the map so the characters are centered on it
ASM_CALL Set_Display_far ; 18D5B5/078B8100 // Set Display
JSR SPC_stuff ; 18D5B9/1B4DD6
ASM_CALL GetSet_Music_1b ; 18D5BC/073C9C00 // Get/Set Music
.byte 73 ; 18D5C0/49
WAIT #1 ; 18D5C1/0601
MOV.w Compass_Subdirection,#$0000 ; 18D5C3/167D150000
START_LOOP #16 ; 18D5C8/0110
ASM_CALL Unfade ; 18D5CA/07CBA000 // Unfade (Increase lighting by 1/16)
WAIT #2 ; 18D5CE/0602
END_LOOP ; 18D5D0/02
Walking_sfx_stuff:
TASK Walking_sfx ; 18D5D1/083FD6
Some_stuff:
TASK Travel_sprite_data ; 18D5D4/0802D6
Travel_loop:
WAIT #1 ; 18D5D7/0601
MOV REG,#$0000 ; 18D5D9/1E0000
ASM_CALL WasBtnPressedX_2b ; 18D5DC/0722A000 // Was Button Pressed? 2 - Checks $21 to see if [val] buttons were pressed, returns nonzero if true. Bit order: (BYsS ^v<>)(AXLR____) i.e. 8000 = B button, 4000 = Y button, 0300 = Left+Right button, 0080 = A button
.word $0080 ; 18D5E0/8000
JNE Travel_fadeout ; 18D5E2/0CEDD5
MOV REG,$1913 ; 18D5E5/1F1319
JNE Travel_loop ; 18D5E8/0CD7D5
WAIT #30 ; 18D5EB/061E
Travel_fadeout:
UNK_TASK #1 ; 18D5ED/1401
UNK_TASK #1 ; 18D5EF/1401
ASM_CALL CODE_18D68F ; 18D5F1/078FD618 // Remove Event 17 - Ends overworld travel event
START_LOOP #16 ; 18D5F5/0110
ASM_CALL Fade ; 18D5F7/07DBA000 // Fade (Decrease lighting by 1/16)
WAIT #2 ; 18D5FB/0602
END_LOOP ; 18D5FD/02
JSR SPC_stuff ; 18D5FE/1B4DD6
RTL ; 18D601/05
Travel_sprite_data:
WAIT #5 ; 18D602/0605
ASM_CALL Load_Sprite_1b_1b_12b ; 18D604/07AE9C00 // Load Sprite
.byte 8 ; 18D608/08
.byte 36 ; 18D609/24
.word 23 ; 18D60A/1700
.word 0 ; 18D60C/0000
.word 0 ; 18D60E/0000
.word 0 ; 18D610/0000
.word 0 ; 18D612/0000
.word 0 ; 18D614/0000
WAIT #64 ; 18D616/0640
ASM_CALL Load_Sprite_1b_1b_12b ; 18D618/07AE9C00 // Load Sprite
.byte 8 ; 18D61C/08
.byte 36 ; 18D61D/24
.word 23 ; 18D61E/1700
.word 0 ; 18D620/0000
.word 0 ; 18D622/0000
.word 1 ; 18D624/0100
.word 8 ; 18D626/0800
.word 0 ; 18D628/0000
WAIT #64 ; 18D62A/0640
ASM_CALL Load_Sprite_1b_1b_12b ; 18D62C/07AE9C00 // Load Sprite
.byte 8 ; 18D630/08
.byte 36 ; 18D631/24
.word 23 ; 18D632/1700
.word 0 ; 18D634/0000
.word 0 ; 18D636/0000
.word 2 ; 18D638/0200
.word 16 ; 18D63A/1000
.word 0 ; 18D63C/0000
HALT ; 18D63E/0A
Walking_sfx:
ASM_CALL GetSet_SFX_1b ; 18D63F/07449C00 // Get/Set Sound Effect
.byte 46 ; 18D643/2E
WAIT #15 ; 18D644/060F
MOV REG,$1913 ; 18D646/1F1319
JNE Walking_sfx ; 18D649/0C3FD6
HALT ; 18D64C/0A
SPC_stuff:
START_LOOP #32 ; 18D64D/0120
ASM_CALL Sound_stuff_1b ; 18D64F/07199C00 // Sound stuff
.byte $F8 ; 18D653/F8
WAIT #1 ; 18D654/0601
END_LOOP ; 18D656/02
ASM_CALL GetSet_Music_1b ; 18D657/073C9C00 // Get/Set Music
.byte 0 ; 18D65B/00
WAIT #1 ; 18D65C/0601
ASM_CALL Sound_byte_1b ; 18D65E/070A9C00 // Sound byte
.byte $FF ; 18D662/FF
WAIT #1 ; 18D663/0601
RTS ; 18D665/1C
$18D9D9 - Event 17: Overworld
Event_Main_17_OVERWORLD:
TASK DATA8_18D9E7 ; 18D9D9/08E7D9
ASM_CALL Sub_Get_Worldmap_Vars ; 18D9DC/07F0D918 // Get World Map vars
ADD.w $1913,ADD,#-1 ; 18D9E0/0E131902FFFF
L_18D9E6:
END ; 18D9E6/00
DATA8_18D9E7:
WAIT #10 ; 18D9E7/060A
INC_ANIM ; 18D9E9/A8
WAIT #10 ; 18D9EA/060A
DEC_ANIM ; 18D9EC/B0
JMP DATA8_18D9E7 ; 18D9ED/1AE7D9