diff options
author | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-05-18 14:19:10 -0400 |
---|---|---|
committer | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-05-18 14:19:10 -0400 |
commit | 24c01b09bb2b617812bd826d1cf9ab5e3ec6a023 (patch) | |
tree | 07d2ed81b23de081f2003d9f8d50170344dd5ada /scripts/mansion4.asm | |
parent | 4e4e72d02a5a202daea3a73363d2a4c3ba34e724 (diff) |
Pull map scripts out of main.asm
Diffstat (limited to 'scripts/mansion4.asm')
-rwxr-xr-x | scripts/mansion4.asm | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/scripts/mansion4.asm b/scripts/mansion4.asm new file mode 100755 index 00000000..78082ced --- /dev/null +++ b/scripts/mansion4.asm @@ -0,0 +1,132 @@ +Mansion4Script: ; 523b9 (14:63b9) + call Mansion4Script_523cf + call EnableAutoTextBoxDrawing + ld hl, Mansion4TrainerHeader0 + ld de, Mansion4ScriptPointers + ld a, [W_MANSION4CURSCRIPT] + call ExecuteCurMapScriptInTable + ld [W_MANSION4CURSCRIPT], a + ret + +Mansion4Script_523cf: ; 523cf (14:63cf) + ld hl, $d126 + bit 5, [hl] + res 5, [hl] + ret z + ld a, [$d796] + bit 0, a + jr nz, .asm_523ff + ld a, $e + ld bc, $80d + call Mansion2Script_5202f + ld a, $e + ld bc, $b06 + call Mansion2Script_5202f + ld a, $5f + ld bc, $304 + call Mansion2Script_5202f + ld a, $54 + ld bc, $808 + call Mansion2Script_5202f + ret +.asm_523ff + ld a, $2d + ld bc, $80d + call Mansion2Script_5202f + ld a, $5f + ld bc, $b06 + call Mansion2Script_5202f + ld a, $e + ld bc, $304 + call Mansion2Script_5202f + ld a, $e + ld bc, $808 + call Mansion2Script_5202f + ret + +Func_52420: ; 52420 (14:6420) + ld a, [$c109] + cp $4 + ret nz + xor a + ld [H_CURRENTPRESSEDBUTTONS], a + ld a, $9 + ld [H_DOWNARROWBLINKCNT2], a ; $ff8c + jp DisplayTextID + +Mansion4ScriptPointers: ; 52430 (14:6430) + dw CheckFightingMapTrainers + dw Func_324c + dw EndTrainerBattle + +Mansion4TextPointers: ; 52436 (14:6436) + dw Mansion4Text1 + dw Mansion4Text2 + dw Predef5CText + dw Predef5CText + dw Predef5CText + dw Predef5CText + dw Mansion4Text7 + dw Predef5CText + dw Mansion3Text6 + +Mansion4TrainerHeaders: ; 52448 (14:6448) +Mansion4TrainerHeader0: ; 52448 (14:6448) + db $1 ; flag's bit + db ($0 << 4) ; trainer's view range + dw $d84b ; flag's byte + dw Mansion4BattleText1 ; 0x6475 TextBeforeBattle + dw Mansion4AfterBattleText1 ; 0x647f TextAfterBattle + dw Mansion4EndBattleText1 ; 0x647a TextEndBattle + dw Mansion4EndBattleText1 ; 0x647a TextEndBattle + +Mansion4TrainerHeader2: ; 52454 (14:6454) + db $2 ; flag's bit + db ($3 << 4) ; trainer's view range + dw $d84b ; flag's byte + dw Mansion4BattleText2 ; 0x6484 TextBeforeBattle + dw Mansion4AfterBattleText2 ; 0x648e TextAfterBattle + dw Mansion4EndBattleText2 ; 0x6489 TextEndBattle + dw Mansion4EndBattleText2 ; 0x6489 TextEndBattle + + db $ff + +Mansion4Text1: ; 52461 (14:6461) + db $08 ; asm + ld hl, Mansion4TrainerHeader0 + call TalkToTrainer + jp TextScriptEnd + +Mansion4Text2: ; 5246b (14:646b) + db $08 ; asm + ld hl, Mansion4TrainerHeader2 + call TalkToTrainer + jp TextScriptEnd + +Mansion4BattleText1: ; 52475 (14:6475) + TX_FAR _Mansion4BattleText1 + db "@" + +Mansion4EndBattleText1: ; 5247a (14:647a) + TX_FAR _Mansion4EndBattleText1 + db "@" + +Mansion4AfterBattleText1: ; 5247f (14:647f) + TX_FAR _Mansion4AfterBattleText1 + db "@" + +Mansion4BattleText2: ; 52484 (14:6484) + TX_FAR _Mansion4BattleText2 + db "@" + +Mansion4EndBattleText2: ; 52489 (14:6489) + TX_FAR _Mansion4EndBattleText2 + db "@" + +Mansion4AfterBattleText2: ; 5248e (14:648e) + TX_FAR _Mansion4AfterBattleText2 + db "@" + +Mansion4Text7: ; 52493 (14:6493) + TX_FAR _Mansion4Text7 + db "@" |