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/silphco5.asm | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'scripts/silphco5.asm') diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index 0b63708b..4417466d 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -18,7 +18,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) call SilphCo5Script_19f9e ld a, [wd82c] bit 0, a - jr nz, .asm_19f74 ; 0x19f63 $f + jr nz, .asm_19f74 push af ld a, $5f ld [wd09f], a @@ -27,7 +27,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) pop af .asm_19f74 bit 1, a - jr nz, .asm_19f87 ; 0x19f76 $f + jr nz, .asm_19f87 push af ld a, $5f ld [wd09f], a @@ -42,7 +42,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ld bc, $0507 predef_jump ReplaceTileBlock -SilphCo5Coords: ; 19f97 (6:5f97) ; coords? +SilphCo5Coords: ; 19f97 (6:5f97) db $02, $03, $06, $03, $05, $07, $ff SilphCo5Script_19f9e: ; 19f9e (6:5f9e) @@ -51,12 +51,12 @@ SilphCo5Script_19f9e: ; 19f9e (6:5f9e) and a ret z cp $1 - jr nz, .asm_19fac ; 0x19fa7 $3 + jr nz, .asm_19fac set 0, [hl] ret .asm_19fac cp $2 - jr nz, .asm_19fb3 ; 0x19fae $3 + jr nz, .asm_19fb3 set 1, [hl] ret .asm_19fb3 @@ -86,37 +86,37 @@ Silphco5TrainerHeader0: ; 19fd2 (6:5fd2) db $2 ; flag's bit db ($1 << 4) ; trainer's view range dw wd82b ; flag's byte - dw SilphCo5BattleText2 ; 0x6024 TextBeforeBattle - dw SilphCo5AfterBattleText2 ; 0x602e TextAfterBattle - dw SilphCo5EndBattleText2 ; 0x6029 TextEndBattle - dw SilphCo5EndBattleText2 ; 0x6029 TextEndBattle + dw SilphCo5BattleText2 ; TextBeforeBattle + dw SilphCo5AfterBattleText2 ; TextAfterBattle + dw SilphCo5EndBattleText2 ; TextEndBattle + dw SilphCo5EndBattleText2 ; TextEndBattle Silphco5TrainerHeader2: ; 19fde (6:5fde) db $3 ; flag's bit db ($2 << 4) ; trainer's view range dw wd82b ; flag's byte - dw SilphCo5BattleText3 ; 0x603d TextBeforeBattle - dw SilphCo5AfterBattleText3 ; 0x6047 TextAfterBattle - dw SilphCo5EndBattleText3 ; 0x6042 TextEndBattle - dw SilphCo5EndBattleText3 ; 0x6042 TextEndBattle + dw SilphCo5BattleText3 ; TextBeforeBattle + dw SilphCo5AfterBattleText3 ; TextAfterBattle + dw SilphCo5EndBattleText3 ; TextEndBattle + dw SilphCo5EndBattleText3 ; TextEndBattle Silphco5TrainerHeader3: ; 19fea (6:5fea) db $4 ; flag's bit db ($4 << 4) ; trainer's view range dw wd82b ; flag's byte - dw SilphCo5BattleText4 ; 0x6056 TextBeforeBattle - dw SilphCo5AfterBattleText4 ; 0x6060 TextAfterBattle - dw SilphCo5EndBattleText4 ; 0x605b TextEndBattle - dw SilphCo5EndBattleText4 ; 0x605b TextEndBattle + dw SilphCo5BattleText4 ; TextBeforeBattle + dw SilphCo5AfterBattleText4 ; TextAfterBattle + dw SilphCo5EndBattleText4 ; TextEndBattle + dw SilphCo5EndBattleText4 ; TextEndBattle Silphco5TrainerHeader4: ; 19ff6 (6:5ff6) db $5 ; flag's bit db ($3 << 4) ; trainer's view range dw wd82b ; flag's byte - dw SilphCo5BattleText5 ; 0x606f TextBeforeBattle - dw SilphCo5AfterBattleText5 ; 0x6079 TextAfterBattle - dw SilphCo5EndBattleText5 ; 0x6074 TextEndBattle - dw SilphCo5EndBattleText5 ; 0x6074 TextEndBattle + dw SilphCo5BattleText5 ; TextBeforeBattle + dw SilphCo5AfterBattleText5 ; TextAfterBattle + dw SilphCo5EndBattleText5 ; TextEndBattle + dw SilphCo5EndBattleText5 ; 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/silphco5.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/silphco5.asm') diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index 4417466d..750072ab 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -121,7 +121,7 @@ Silphco5TrainerHeader4: ; 19ff6 (6:5ff6) db $ff SilphCo5Text1: ; 1a003 (6:6003) - db $08 ; asm + TX_ASM ld hl, SilphCo5Text_1a010 ld de, SilphCo5Text_1a015 call SilphCo6Script_1a22f @@ -136,7 +136,7 @@ SilphCo5Text_1a015: ; 1a015 (6:6015) db "@" SilphCo5Text2: ; 1a01a (6:601a) - db $08 ; asm + TX_ASM ld hl, Silphco5TrainerHeader0 call TalkToTrainer jp TextScriptEnd @@ -154,7 +154,7 @@ SilphCo5AfterBattleText2: ; 1a02e (6:602e) db "@" SilphCo5Text3: ; 1a033 (6:6033) - db $08 ; asm + TX_ASM ld hl, Silphco5TrainerHeader2 call TalkToTrainer jp TextScriptEnd @@ -172,7 +172,7 @@ SilphCo5AfterBattleText3: ; 1a047 (6:6047) db "@" SilphCo5Text4: ; 1a04c (6:604c) - db $08 ; asm + TX_ASM ld hl, Silphco5TrainerHeader3 call TalkToTrainer jp TextScriptEnd @@ -190,7 +190,7 @@ SilphCo5AfterBattleText4: ; 1a060 (6:6060) db "@" SilphCo5Text5: ; 1a065 (6:6065) - db $08 ; asm + TX_ASM ld hl, Silphco5TrainerHeader4 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/silphco5.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/silphco5.asm') diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index 750072ab..1ed6006f 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -74,9 +74,9 @@ SilphCo5TextPointers: ; 19fbc (6:5fbc) dw SilphCo5Text3 dw SilphCo5Text4 dw SilphCo5Text5 - dw Predef5CText - dw Predef5CText - dw Predef5CText + dw PickUpItemText + dw PickUpItemText + dw PickUpItemText dw SilphCo5Text9 dw SilphCo5Text10 dw SilphCo5Text11 -- 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/silphco5.asm | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'scripts/silphco5.asm') diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index 1ed6006f..cd220b3e 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -16,8 +16,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ld hl, SilphCo5Coords call SilphCo4Script_19d5d call SilphCo5Script_19f9e - ld a, [wd82c] - bit 0, a + CheckEvent EVENT_728 jr nz, .asm_19f74 push af ld a, $5f @@ -46,21 +45,21 @@ SilphCo5Coords: ; 19f97 (6:5f97) db $02, $03, $06, $03, $05, $07, $ff SilphCo5Script_19f9e: ; 19f9e (6:5f9e) - ld hl, wd82c + EventFlagAddress hl, EVENT_728 ld a, [$ffe0] and a ret z cp $1 - jr nz, .asm_19fac - set 0, [hl] + jr nz, .next1 + SetEventReuseHL EVENT_728 ret -.asm_19fac +.next1 cp $2 - jr nz, .asm_19fb3 - set 1, [hl] + jr nz, .next2 + SetEventAfterBranchReuseHL EVENT_729, EVENT_728 ret -.asm_19fb3 - set 2, [hl] +.next2 + SetEventAfterBranchReuseHL EVENT_72A, EVENT_728 ret SilphCo5ScriptPointers: ; 19fb6 (6:5fb6) @@ -83,36 +82,36 @@ SilphCo5TextPointers: ; 19fbc (6:5fbc) SilphCo5TrainerHeaders: ; 19fd2 (6:5fd2) Silphco5TrainerHeader0: ; 19fd2 (6:5fd2) - db $2 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_0 db ($1 << 4) ; trainer's view range - dw wd82b ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_0 dw SilphCo5BattleText2 ; TextBeforeBattle dw SilphCo5AfterBattleText2 ; TextAfterBattle dw SilphCo5EndBattleText2 ; TextEndBattle dw SilphCo5EndBattleText2 ; TextEndBattle Silphco5TrainerHeader2: ; 19fde (6:5fde) - db $3 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_2 db ($2 << 4) ; trainer's view range - dw wd82b ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_2 dw SilphCo5BattleText3 ; TextBeforeBattle dw SilphCo5AfterBattleText3 ; TextAfterBattle dw SilphCo5EndBattleText3 ; TextEndBattle dw SilphCo5EndBattleText3 ; TextEndBattle Silphco5TrainerHeader3: ; 19fea (6:5fea) - db $4 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_3 db ($4 << 4) ; trainer's view range - dw wd82b ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_3 dw SilphCo5BattleText4 ; TextBeforeBattle dw SilphCo5AfterBattleText4 ; TextAfterBattle dw SilphCo5EndBattleText4 ; TextEndBattle dw SilphCo5EndBattleText4 ; TextEndBattle Silphco5TrainerHeader4: ; 19ff6 (6:5ff6) - db $5 ; flag's bit + dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_4 db ($3 << 4) ; trainer's view range - dw wd82b ; flag's byte + dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_4 dw SilphCo5BattleText5 ; TextBeforeBattle dw SilphCo5AfterBattleText5 ; TextAfterBattle dw SilphCo5EndBattleText5 ; 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/silphco5.asm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/silphco5.asm') diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index cd220b3e..ecc57537 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -16,7 +16,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ld hl, SilphCo5Coords call SilphCo4Script_19d5d call SilphCo5Script_19f9e - CheckEvent EVENT_728 + CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1 jr nz, .asm_19f74 push af ld a, $5f @@ -25,7 +25,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) predef ReplaceTileBlock pop af .asm_19f74 - bit 1, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 jr nz, .asm_19f87 push af ld a, $5f @@ -34,7 +34,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) predef ReplaceTileBlock pop af .asm_19f87 - bit 2, a + CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2 ret nz ld a, $5f ld [wd09f], a @@ -45,21 +45,21 @@ SilphCo5Coords: ; 19f97 (6:5f97) db $02, $03, $06, $03, $05, $07, $ff SilphCo5Script_19f9e: ; 19f9e (6:5f9e) - EventFlagAddress hl, EVENT_728 + EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ld a, [$ffe0] and a ret z cp $1 jr nz, .next1 - SetEventReuseHL EVENT_728 + SetEventReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret .next1 cp $2 jr nz, .next2 - SetEventAfterBranchReuseHL EVENT_729, EVENT_728 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR2, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret .next2 - SetEventAfterBranchReuseHL EVENT_72A, EVENT_728 + SetEventAfterBranchReuseHL EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 ret SilphCo5ScriptPointers: ; 19fb6 (6:5fb6) -- 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/silphco5.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/silphco5.asm') diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index ecc57537..d6f35993 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -20,7 +20,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) jr nz, .asm_19f74 push af ld a, $5f - ld [wd09f], a + ld [wNewTileBlockID], a ld bc, $0203 predef ReplaceTileBlock pop af @@ -29,7 +29,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) jr nz, .asm_19f87 push af ld a, $5f - ld [wd09f], a + ld [wNewTileBlockID], a ld bc, $0603 predef ReplaceTileBlock pop af @@ -37,7 +37,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) CheckEventAfterBranchReuseA EVENT_SILPH_CO_5_UNLOCKED_DOOR3, EVENT_SILPH_CO_5_UNLOCKED_DOOR2 ret nz ld a, $5f - ld [wd09f], a + ld [wNewTileBlockID], a ld bc, $0507 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/silphco5.asm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'scripts/silphco5.asm') diff --git a/scripts/silphco5.asm b/scripts/silphco5.asm index d6f35993..7380f98f 100755 --- a/scripts/silphco5.asm +++ b/scripts/silphco5.asm @@ -13,7 +13,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) bit 5, [hl] res 5, [hl] ret z - ld hl, SilphCo5Coords + ld hl, SilphCo5GateCoords call SilphCo4Script_19d5d call SilphCo5Script_19f9e CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1 @@ -21,7 +21,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) push af ld a, $5f ld [wNewTileBlockID], a - ld bc, $0203 + lb bc, 2, 3 predef ReplaceTileBlock pop af .asm_19f74 @@ -30,7 +30,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) push af ld a, $5f ld [wNewTileBlockID], a - ld bc, $0603 + lb bc, 6, 3 predef ReplaceTileBlock pop af .asm_19f87 @@ -38,11 +38,14 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d) ret nz ld a, $5f ld [wNewTileBlockID], a - ld bc, $0507 + lb bc, 5, 7 predef_jump ReplaceTileBlock -SilphCo5Coords: ; 19f97 (6:5f97) - db $02, $03, $06, $03, $05, $07, $ff +SilphCo5GateCoords: ; 19f97 (6:5f97) + db $02,$03 + db $06,$03 + db $05,$07 + db $FF SilphCo5Script_19f9e: ; 19f9e (6:5f9e) EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 -- cgit v1.2.3