From f4a31b3e0b7ca89e14c4e3836f3d3ad15f38e5ce Mon Sep 17 00:00:00 2001 From: "U-Daniel-PC\\Daniel" Date: Fri, 3 Jul 2015 14:38:12 -0500 Subject: Rename/organize part 2 of 4 rename functions, clean up address/wram comments, other misc only broken up so that all changes are viewable on github --- scripts/silphco3.asm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'scripts/silphco3.asm') diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 7b0c67c1..13eb9e84 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -13,7 +13,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_59fa8 ; $5fa8 + ld hl, DataTable_59fa8 call SilphCo2Script_59d43 call SilphCo3Script_59fad ld a, [wd828] @@ -65,19 +65,19 @@ SilphCo3TrainerHeader0: ; 59fcc (16:5fcc) db $2 ; flag's bit db ($2 << 4) ; trainer's view range dw wd827 ; flag's byte - dw SilphCo3BattleText1 ; 0x600d TextBeforeBattle - dw SilphCo3AfterBattleText1 ; 0x6017 TextAfterBattle - dw SilphCo3EndBattleText1 ; 0x6012 TextEndBattle - dw SilphCo3EndBattleText1 ; 0x6012 TextEndBattle + dw SilphCo3BattleText1 ; TextBeforeBattle + dw SilphCo3AfterBattleText1 ; TextAfterBattle + dw SilphCo3EndBattleText1 ; TextEndBattle + dw SilphCo3EndBattleText1 ; TextEndBattle SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8) db $3 ; flag's bit db ($3 << 4) ; trainer's view range dw wd827 ; flag's byte - dw SilphCo3BattleText2 ; 0x6026 TextBeforeBattle - dw SilphCo3AfterBattleText2 ; 0x6030 TextAfterBattle - dw SilphCo3EndBattleText2 ; 0x602b TextEndBattle - dw SilphCo3EndBattleText2 ; 0x602b TextEndBattle + dw SilphCo3BattleText2 ; TextBeforeBattle + dw SilphCo3AfterBattleText2 ; TextAfterBattle + dw SilphCo3EndBattleText2 ; TextEndBattle + dw SilphCo3EndBattleText2 ; TextEndBattle db $ff @@ -86,9 +86,9 @@ SilphCo3Text1: ; 59fe5 (16:5fe5) ld a, [wd838] bit 7, a ld hl, SilphCo3Text_59ffe - jr nz, asm_8c56f ; 0x59fee + jr nz, .asm_59fee ld hl, SilphCo3Text_59ff9 -asm_8c56f ; 0x59ff3 +.asm_59fee call PrintText jp TextScriptEnd -- cgit v1.2.3 From 8431fa7756dace97413f4c35aaa44cd92cf5b6df Mon Sep 17 00:00:00 2001 From: "U-Daniel-PC\\Daniel" Date: Fri, 3 Jul 2015 14:58:50 -0500 Subject: TX_ASM --- scripts/silphco3.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/silphco3.asm') diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 13eb9e84..bc36ed39 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -82,7 +82,7 @@ SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8) db $ff SilphCo3Text1: ; 59fe5 (16:5fe5) - db $08 ; asm + TX_ASM ld a, [wd838] bit 7, a ld hl, SilphCo3Text_59ffe @@ -101,7 +101,7 @@ SilphCo3Text_59ffe: ; 59ffe (16:5ffe) db "@" SilphCo3Text2: ; 5a003 (16:6003) - db $08 ; asm + TX_ASM ld hl, SilphCo3TrainerHeader0 call TalkToTrainer jp TextScriptEnd @@ -119,7 +119,7 @@ SilphCo3AfterBattleText1: ; 5a017 (16:6017) db "@" SilphCo3Text3: ; 5a01c (16:601c) - db $08 ; asm + TX_ASM ld hl, SilphCo3TrainerHeader1 call TalkToTrainer jp TextScriptEnd -- cgit v1.2.3 From fc9af362ae65d24c66b39ea7759637cc9c1f9b0a Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sat, 18 Jul 2015 08:17:29 -0700 Subject: fix variable naming --- scripts/silphco3.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/silphco3.asm') diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index bc36ed39..4bd1edd1 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -58,7 +58,7 @@ SilphCo3TextPointers: ; 59fc4 (16:5fc4) dw SilphCo3Text1 dw SilphCo3Text2 dw SilphCo3Text3 - dw Predef5CText + dw PickUpItemText SilphCo3TrainerHeaders: ; 59fcc (16:5fcc) SilphCo3TrainerHeader0: ; 59fcc (16:5fcc) -- cgit v1.2.3 From fcab935a0f449246380480613ac0896e0b90a0d8 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Mon, 20 Jul 2015 18:32:02 -0700 Subject: enumerate events --- scripts/silphco3.asm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'scripts/silphco3.asm') diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 4bd1edd1..0cb54726 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -16,8 +16,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) ld hl, DataTable_59fa8 call SilphCo2Script_59d43 call SilphCo3Script_59fad - ld a, [wd828] - bit 0, a + CheckEvent EVENT_708 jr nz, .asm_59f98 push af ld a, $5f @@ -37,16 +36,16 @@ DataTable_59fa8: ; 59fa8 (16:5fa8) db $04,$04,$04,$08,$FF SilphCo3Script_59fad: ; 59fad (16:5fad) - ld hl, wd828 + EventFlagAddress hl, EVENT_708 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_59fbb - set 0, [hl] + jr nz, .next + SetEventReuseHL EVENT_708 ret -.asm_59fbb - set 1, [hl] +.next + SetEventAfterBranchReuseHL EVENT_709, EVENT_708 ret SilphCo3ScriptPointers: ; 59fbe (16:5fbe) @@ -62,18 +61,18 @@ SilphCo3TextPointers: ; 59fc4 (16:5fc4) SilphCo3TrainerHeaders: ; 59fcc (16:5fcc) SilphCo3TrainerHeader0: ; 59fcc (16:5fcc) - db $2 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_0 db ($2 << 4) ; trainer's view range - dw wd827 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_0 dw SilphCo3BattleText1 ; TextBeforeBattle dw SilphCo3AfterBattleText1 ; TextAfterBattle dw SilphCo3EndBattleText1 ; TextEndBattle dw SilphCo3EndBattleText1 ; TextEndBattle SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8) - db $3 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_1 db ($3 << 4) ; trainer's view range - dw wd827 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_1 dw SilphCo3BattleText2 ; TextBeforeBattle dw SilphCo3AfterBattleText2 ; TextAfterBattle dw SilphCo3EndBattleText2 ; TextEndBattle @@ -83,8 +82,7 @@ SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8) SilphCo3Text1: ; 59fe5 (16:5fe5) TX_ASM - ld a, [wd838] - bit 7, a + CheckEvent EVENT_78F ld hl, SilphCo3Text_59ffe jr nz, .asm_59fee ld hl, SilphCo3Text_59ff9 -- cgit v1.2.3 From 73171bfff573fa8900563319c014f3e626db6b3e Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Tue, 21 Jul 2015 10:36:03 -0700 Subject: named most of the used events --- scripts/silphco3.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/silphco3.asm') diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index 0cb54726..b55cc5eb 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -16,7 +16,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) ld hl, DataTable_59fa8 call SilphCo2Script_59d43 call SilphCo3Script_59fad - CheckEvent EVENT_708 + CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1 jr nz, .asm_59f98 push af ld a, $5f @@ -25,7 +25,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) predef ReplaceTileBlock pop af .asm_59f98 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret nz ld a, $5f ld [wd09f], a @@ -36,16 +36,16 @@ DataTable_59fa8: ; 59fa8 (16:5fa8) db $04,$04,$04,$08,$FF SilphCo3Script_59fad: ; 59fad (16:5fad) - EventFlagAddress hl, EVENT_708 + EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next - SetEventReuseHL EVENT_708 + SetEventReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret .next - SetEventAfterBranchReuseHL EVENT_709, EVENT_708 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret SilphCo3ScriptPointers: ; 59fbe (16:5fbe) @@ -82,7 +82,7 @@ SilphCo3TrainerHeader1: ; 59fd8 (16:5fd8) SilphCo3Text1: ; 59fe5 (16:5fe5) TX_ASM - CheckEvent EVENT_78F + CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo3Text_59ffe jr nz, .asm_59fee ld hl, SilphCo3Text_59ff9 -- cgit v1.2.3 From 82512e449115aa9d004e24a3d1526dd32570c56d Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Fri, 24 Jul 2015 14:39:45 -0700 Subject: named animation functions/variables --- scripts/silphco3.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/silphco3.asm') diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index b55cc5eb..f693ea33 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -20,7 +20,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) jr nz, .asm_59f98 push af ld a, $5f - ld [wd09f], a + ld [wNewTileBlockID], a ld bc, $404 predef ReplaceTileBlock pop af @@ -28,7 +28,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 ret nz ld a, $5f - ld [wd09f], a + ld [wNewTileBlockID], a ld bc, $408 predef_jump ReplaceTileBlock -- cgit v1.2.3 From f8a9c37a0019eb085c22c6e3ae53b16ff0cd4f6a Mon Sep 17 00:00:00 2001 From: dannye Date: Wed, 5 Aug 2015 16:20:29 -0500 Subject: Use more lb and other clean up --- scripts/silphco3.asm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts/silphco3.asm') diff --git a/scripts/silphco3.asm b/scripts/silphco3.asm index f693ea33..bdaac452 100755 --- a/scripts/silphco3.asm +++ b/scripts/silphco3.asm @@ -13,7 +13,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) bit 5, [hl] res 5, [hl] ret z - ld hl, DataTable_59fa8 + ld hl, SilphCo3GateCoords call SilphCo2Script_59d43 call SilphCo3Script_59fad CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) push af ld a, $5f ld [wNewTileBlockID], a - ld bc, $404 + lb bc, 4, 4 predef ReplaceTileBlock pop af .asm_59f98 @@ -29,11 +29,13 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71) ret nz ld a, $5f ld [wNewTileBlockID], a - ld bc, $408 + lb bc, 4, 8 predef_jump ReplaceTileBlock -DataTable_59fa8: ; 59fa8 (16:5fa8) - db $04,$04,$04,$08,$FF +SilphCo3GateCoords: ; 59fa8 (16:5fa8) + db $04,$04 + db $04,$08 + db $FF SilphCo3Script_59fad: ; 59fad (16:5fad) EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 -- cgit v1.2.3