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/silphco4.asm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'scripts/silphco4.asm') diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 15a46dd3..18d56587 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -49,19 +49,19 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d) .asm_19d69 ld a, [hli] cp $ff - jr z, .asm_19d85 ; 0x19d6c $17 + jr z, .asm_19d85 push hl ld hl, $ffe0 inc [hl] pop hl cp b - jr z, .asm_19d7a ; 0x19d75 $3 + jr z, .asm_19d7a inc hl - jr .asm_19d69 ; 0x19d78 $ef + jr .asm_19d69 .asm_19d7a ld a, [hli] cp c - jr nz, .asm_19d69 ; 0x19d7c $eb + jr nz, .asm_19d69 ld hl, wCardKeyDoorY xor a ld [hli], a @@ -78,7 +78,7 @@ SilphCo4Script_19d89: ; 19d89 (6:5d89) and a ret z cp $1 - jr nz, .asm_19d97 ; 0x19d92 $3 + jr nz, .asm_19d97 set 0, [hl] ret .asm_19d97 @@ -104,28 +104,28 @@ SilphCo4TrainerHeader0: ; 19dae (6:5dae) db $2 ; flag's bit db ($4 << 4) ; trainer's view range dw wd829 ; flag's byte - dw SilphCo4BattleText2 ; 0x5df4 TextBeforeBattle - dw SilphCo4AfterBattleText2 ; 0x5dfe TextAfterBattle - dw SilphCo4EndBattleText2 ; 0x5df9 TextEndBattle - dw SilphCo4EndBattleText2 ; 0x5df9 TextEndBattle + dw SilphCo4BattleText2 ; TextBeforeBattle + dw SilphCo4AfterBattleText2 ; TextAfterBattle + dw SilphCo4EndBattleText2 ; TextEndBattle + dw SilphCo4EndBattleText2 ; TextEndBattle SilphCo4TrainerHeader2: ; 19dba (6:5dba) db $3 ; flag's bit db ($3 << 4) ; trainer's view range dw wd829 ; flag's byte - dw SilphCo4BattleText3 ; 0x5e0d TextBeforeBattle - dw SilphCo4AfterBattleText3 ; 0x5e17 TextAfterBattle - dw SilphCo4EndBattleText3 ; 0x5e12 TextEndBattle - dw SilphCo4EndBattleText3 ; 0x5e12 TextEndBattle + dw SilphCo4BattleText3 ; TextBeforeBattle + dw SilphCo4AfterBattleText3 ; TextAfterBattle + dw SilphCo4EndBattleText3 ; TextEndBattle + dw SilphCo4EndBattleText3 ; TextEndBattle SilphCo4TrainerHeader3: ; 19dc6 (6:5dc6) db $4 ; flag's bit db ($4 << 4) ; trainer's view range dw wd829 ; flag's byte - dw SilphCo4BattleText4 ; 0x5e26 TextBeforeBattle - dw SilphCo4AfterBattleText4 ; 0x5e30 TextAfterBattle - dw SilphCo4EndBattleText4 ; 0x5e2b TextEndBattle - dw SilphCo4EndBattleText4 ; 0x5e2b TextEndBattle + dw SilphCo4BattleText4 ; TextBeforeBattle + dw SilphCo4AfterBattleText4 ; TextAfterBattle + dw SilphCo4EndBattleText4 ; TextEndBattle + dw SilphCo4EndBattleText4 ; TextEndBattle db $ff -- 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/silphco4.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/silphco4.asm') diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 18d56587..866afd54 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -130,7 +130,7 @@ SilphCo4TrainerHeader3: ; 19dc6 (6:5dc6) db $ff SilphCo4Text1: ; 19dd3 (6:5dd3) - db $08 ; asm + TX_ASM ld hl, SilphCo4Text_19de0 ld de, SilphCo4Text_19de5 call SilphCo6Script_1a22f @@ -145,7 +145,7 @@ SilphCo4Text_19de5: ; 19de5 (6:5de5) db "@" SilphCo4Text2: ; 19dea (6:5dea) - db $08 ; asm + TX_ASM ld hl, SilphCo4TrainerHeader0 call TalkToTrainer jp TextScriptEnd @@ -163,7 +163,7 @@ SilphCo4AfterBattleText2: ; 19dfe (6:5dfe) db "@" SilphCo4Text3: ; 19e03 (6:5e03) - db $08 ; asm + TX_ASM ld hl, SilphCo4TrainerHeader2 call TalkToTrainer jp TextScriptEnd @@ -181,7 +181,7 @@ SilphCo4AfterBattleText3: ; 19e17 (6:5e17) db "@" SilphCo4Text4: ; 19e1c (6:5e1c) - db $08 ; asm + TX_ASM ld hl, SilphCo4TrainerHeader3 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/silphco4.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/silphco4.asm') diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 866afd54..a3953e27 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -95,9 +95,9 @@ SilphCo4TextPointers: ; 19da0 (6:5da0) dw SilphCo4Text2 dw SilphCo4Text3 dw SilphCo4Text4 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText SilphCo4TrainerHeaders: ; 19dae (6:5dae) SilphCo4TrainerHeader0: ; 19dae (6:5dae) -- 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/silphco4.asm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'scripts/silphco4.asm') diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index a3953e27..aff77e4a 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -16,8 +16,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) ld hl, SilphCo4Data19d58 call SilphCo4Script_19d5d call SilphCo4Script_19d89 - ld a, [wd82a] - bit 0, a + CheckEvent EVENT_718 jr nz, .asm_19d48 push af ld a, $54 @@ -73,16 +72,16 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d) ret SilphCo4Script_19d89: ; 19d89 (6:5d89) - ld hl, wd82a + EventFlagAddress hl, EVENT_718 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_19d97 - set 0, [hl] + jr nz, .next + SetEventReuseHL EVENT_718 ret -.asm_19d97 - set 1, [hl] +.next + SetEventAfterBranchReuseHL EVENT_719, EVENT_718 ret SilphCo4ScriptPointers: ; 19d9a (6:5d9a) @@ -101,27 +100,27 @@ SilphCo4TextPointers: ; 19da0 (6:5da0) SilphCo4TrainerHeaders: ; 19dae (6:5dae) SilphCo4TrainerHeader0: ; 19dae (6:5dae) - db $2 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_0 db ($4 << 4) ; trainer's view range - dw wd829 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_0 dw SilphCo4BattleText2 ; TextBeforeBattle dw SilphCo4AfterBattleText2 ; TextAfterBattle dw SilphCo4EndBattleText2 ; TextEndBattle dw SilphCo4EndBattleText2 ; TextEndBattle SilphCo4TrainerHeader2: ; 19dba (6:5dba) - db $3 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_2 db ($3 << 4) ; trainer's view range - dw wd829 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_2 dw SilphCo4BattleText3 ; TextBeforeBattle dw SilphCo4AfterBattleText3 ; TextAfterBattle dw SilphCo4EndBattleText3 ; TextEndBattle dw SilphCo4EndBattleText3 ; TextEndBattle SilphCo4TrainerHeader3: ; 19dc6 (6:5dc6) - db $4 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_3 db ($4 << 4) ; trainer's view range - dw wd829 ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_3 dw SilphCo4BattleText4 ; TextBeforeBattle dw SilphCo4AfterBattleText4 ; TextAfterBattle dw SilphCo4EndBattleText4 ; TextEndBattle -- 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/silphco4.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/silphco4.asm') diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index aff77e4a..815170ff 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -16,7 +16,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) ld hl, SilphCo4Data19d58 call SilphCo4Script_19d5d call SilphCo4Script_19d89 - CheckEvent EVENT_718 + CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1 jr nz, .asm_19d48 push af ld a, $54 @@ -25,7 +25,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) predef ReplaceTileBlock pop af .asm_19d48 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret nz ld a, $54 ld [wd09f], a @@ -72,16 +72,16 @@ SilphCo4Script_19d5d: ; 19d5d (6:5d5d) ret SilphCo4Script_19d89: ; 19d89 (6:5d89) - EventFlagAddress hl, EVENT_718 + EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next - SetEventReuseHL EVENT_718 + SetEventReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret .next - SetEventAfterBranchReuseHL EVENT_719, EVENT_718 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret SilphCo4ScriptPointers: ; 19d9a (6:5d9a) -- 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/silphco4.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/silphco4.asm') diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 815170ff..0ea2c8c8 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -20,7 +20,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) jr nz, .asm_19d48 push af ld a, $54 - ld [wd09f], a + ld [wNewTileBlockID], a ld bc, $0602 predef ReplaceTileBlock pop af @@ -28,7 +28,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) CheckEventAfterBranchReuseA EVENT_SILPH_CO_4_UNLOCKED_DOOR2, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 ret nz ld a, $54 - ld [wd09f], a + ld [wNewTileBlockID], a ld bc, $0406 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/silphco4.asm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts/silphco4.asm') diff --git a/scripts/silphco4.asm b/scripts/silphco4.asm index 0ea2c8c8..0dad6f6b 100755 --- a/scripts/silphco4.asm +++ b/scripts/silphco4.asm @@ -13,7 +13,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo4Data19d58 + ld hl, SilphCo4GateCoords call SilphCo4Script_19d5d call SilphCo4Script_19d89 CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) push af ld a, $54 ld [wNewTileBlockID], a - ld bc, $0602 + lb bc, 6, 2 predef ReplaceTileBlock pop af .asm_19d48 @@ -29,11 +29,13 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21) ret nz ld a, $54 ld [wNewTileBlockID], a - ld bc, $0406 + lb bc, 4, 6 predef_jump ReplaceTileBlock -SilphCo4Data19d58: ; 19d58 (6:5d58) - db $06, $02, $04, $06, $ff +SilphCo4GateCoords: ; 19d58 (6:5d58) + db $06,$02 + db $04,$06 + db $FF SilphCo4Script_19d5d: ; 19d5d (6:5d5d) push hl -- cgit v1.2.3