From 9a3088e50cf58158cbfb8de5ad80170967d975dc Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 13:24:05 +0100 Subject: Clean up XXX comments for unused content --- engine/routines/printhoursmins.asm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/printhoursmins.asm b/engine/routines/printhoursmins.asm index 50117188c..eb7dc1619 100644 --- a/engine/routines/printhoursmins.asm +++ b/engine/routines/printhoursmins.asm @@ -1,5 +1,4 @@ -Function1dd6a9: ; 1dd6a9 -; XXX +Unreferenced_Function1dd6a9: ; 1dd6a9 ld a, b ld b, c ld c, a -- cgit v1.2.3 From 7a24703398aba3ab112ed770368805a17c601c03 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 15:05:14 +0100 Subject: Clean up Predef function names --- engine/routines/placewaitingtext.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/routines') diff --git a/engine/routines/placewaitingtext.asm b/engine/routines/placewaitingtext.asm index 37fc2a056..11b747ec5 100644 --- a/engine/routines/placewaitingtext.asm +++ b/engine/routines/placewaitingtext.asm @@ -11,7 +11,7 @@ PlaceWaitingText:: ; 4000 jr .proceed .notinbattle - predef Predef_LinkTextbox + predef LinkTextboxPredef .proceed hlcoord 4, 11 -- cgit v1.2.3 From 6f0b81504d6471afe7df6adae83791cc81933ca6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 16:04:21 +0100 Subject: More unreferenced labels cleanup --- engine/routines/correcterrorsinplayerparty.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/routines') diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm index 2fa98a545..639e5c544 100644 --- a/engine/routines/correcterrorsinplayerparty.asm +++ b/engine/routines/correcterrorsinplayerparty.asm @@ -1,4 +1,4 @@ -CorrectErrorsInPlayerParty: ; unreferenced +Unreferenced_CorrectErrorsInPlayerParty: ld hl, PartyCount ld a, [hl] and a -- cgit v1.2.3 From f1ea15bbfe8528143ace793b050891a9b1f99d03 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 17:13:57 +0100 Subject: Consolidate Special function names --- engine/routines/playslowcry.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/routines') diff --git a/engine/routines/playslowcry.asm b/engine/routines/playslowcry.asm index 3cc347a55..636741bcf 100644 --- a/engine/routines/playslowcry.asm +++ b/engine/routines/playslowcry.asm @@ -1,4 +1,4 @@ -PlaySlowCry: ; fb841 +Special_PlaySlowCry: ; fb841 ld a, [ScriptVar] call LoadCryHeader jr c, .done -- cgit v1.2.3 From d7970f749ac23786728926109be430ab732f19e6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 18:49:25 +0100 Subject: Consistent predef function names --- engine/routines/correcterrorsinplayerparty.asm | 2 +- engine/routines/flagpredef.asm | 2 +- engine/routines/newpokedexentry.asm | 2 +- engine/routines/placegraphic.asm | 2 +- engine/routines/placewaitingtext.asm | 2 +- engine/routines/trademonfrontpic.asm | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm index 639e5c544..fcc2f36af 100644 --- a/engine/routines/correcterrorsinplayerparty.asm +++ b/engine/routines/correcterrorsinplayerparty.asm @@ -90,7 +90,7 @@ Unreferenced_CorrectErrorsInPlayerParty: ld hl, MON_STAT_EXP - 1 add hl, bc ld b, $1 - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop hl ld bc, PARTYMON_STRUCT_LENGTH add hl, bc diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm index bd4f37882..8074e9dbe 100644 --- a/engine/routines/flagpredef.asm +++ b/engine/routines/flagpredef.asm @@ -1,4 +1,4 @@ -FlagPredef: ; 4d7c1 +Predef_Flag: ; 4d7c1 ; Perform action b on flag c in flag array hl. ; If checking a flag, check flag array d:hl unless d is 0. diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm index acf9fca7b..c52188f6e 100644 --- a/engine/routines/newpokedexentry.asm +++ b/engine/routines/newpokedexentry.asm @@ -1,4 +1,4 @@ -NewPokedexEntry: ; fb877 +Predef_NewPokedexEntry: ; fb877 ld a, [hMapAnims] push af xor a diff --git a/engine/routines/placegraphic.asm b/engine/routines/placegraphic.asm index d72364776..28b69fc23 100644 --- a/engine/routines/placegraphic.asm +++ b/engine/routines/placegraphic.asm @@ -1,4 +1,4 @@ -PlaceGraphic: ; 2ef6e +Predef_PlaceGraphic: ; 2ef6e ; Fill wBoxAlignment-aligned box width b height c ; with iterating tile starting from hGraphicStartTile at hl. ; Predef $13 diff --git a/engine/routines/placewaitingtext.asm b/engine/routines/placewaitingtext.asm index 11b747ec5..37fc2a056 100644 --- a/engine/routines/placewaitingtext.asm +++ b/engine/routines/placewaitingtext.asm @@ -11,7 +11,7 @@ PlaceWaitingText:: ; 4000 jr .proceed .notinbattle - predef LinkTextboxPredef + predef Predef_LinkTextbox .proceed hlcoord 4, 11 diff --git a/engine/routines/trademonfrontpic.asm b/engine/routines/trademonfrontpic.asm index e312042ff..2d05a1c04 100644 --- a/engine/routines/trademonfrontpic.asm +++ b/engine/routines/trademonfrontpic.asm @@ -4,13 +4,13 @@ GetTrademonFrontpic: ; 4d7fd ld de, vTiles2 push de push af - predef GetUnownLetter + predef Predef_GetUnownLetter pop af ld [CurPartySpecies], a ld [CurSpecies], a call GetBaseData pop de - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic ret AnimateTrademonFrontpic: ; 4d81e @@ -34,5 +34,5 @@ AnimateTrademonFrontpic: ; 4d81e hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_TRADE - predef AnimateFrontpic + predef Predef_AnimateFrontpic ret -- cgit v1.2.3 From e9e8bf6eb14020d4a88a7cd4bca8539a2b45803e Mon Sep 17 00:00:00 2001 From: xCrystal Date: Fri, 5 Jan 2018 11:05:01 +0100 Subject: Predef_Flag -> Predef_FlagAction --- engine/routines/flagpredef.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/routines') diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm index 8074e9dbe..5b19950a1 100644 --- a/engine/routines/flagpredef.asm +++ b/engine/routines/flagpredef.asm @@ -1,4 +1,4 @@ -Predef_Flag: ; 4d7c1 +Predef_FlagAction: ; 4d7c1 ; Perform action b on flag c in flag array hl. ; If checking a flag, check flag array d:hl unless d is 0. -- cgit v1.2.3 From 2c789b64b1bfa9ec33d805d06ad3a7141e3871f1 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Sun, 7 Jan 2018 11:53:20 +0100 Subject: Predef_FlagAction -> Predef_SmallFarFlagAction --- engine/routines/flagpredef.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm index 5b19950a1..676960c31 100644 --- a/engine/routines/flagpredef.asm +++ b/engine/routines/flagpredef.asm @@ -1,5 +1,5 @@ -Predef_FlagAction: ; 4d7c1 -; Perform action b on flag c in flag array hl. +Predef_SmallFarFlagAction: ; 4d7c1 +; Perform action b on bit c in flag array hl. ; If checking a flag, check flag array d:hl unless d is 0. ; For longer flag arrays, see FlagAction. -- cgit v1.2.3 From d6f20ae74619fa4b3071867016fa7ae7253df98f Mon Sep 17 00:00:00 2001 From: Adelaide Walter Date: Mon, 8 Jan 2018 17:13:37 -0500 Subject: Use BANK for hardcoded SRAM banks (except for vestigial refs to JP's banks 4-7) --- engine/routines/emptyallsrambanks.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/emptyallsrambanks.asm b/engine/routines/emptyallsrambanks.asm index aa4b28e0d..8b060f3ef 100644 --- a/engine/routines/emptyallsrambanks.asm +++ b/engine/routines/emptyallsrambanks.asm @@ -1,11 +1,11 @@ EmptyAllSRAMBanks: ; 4cf1f - ld a, $0 + ld a, 0 call .EmptyBank - ld a, $1 + ld a, 1 call .EmptyBank - ld a, $2 + ld a, 2 call .EmptyBank - ld a, $3 + ld a, 3 call .EmptyBank ret -- cgit v1.2.3 From 11556196ba546f5c45b97fffc2c263a79eb639b9 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 9 Jan 2018 16:39:36 -0500 Subject: Consistent sine wave code formatting --- engine/routines/sine.asm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/sine.asm b/engine/routines/sine.asm index 89a905d2e..5f56a10a8 100755 --- a/engine/routines/sine.asm +++ b/engine/routines/sine.asm @@ -7,7 +7,6 @@ _Sine:: ; 84d9 and %111111 cp %100000 jr nc, .negative - call .ApplySineWave ld a, h ret @@ -16,7 +15,7 @@ _Sine:: ; 84d9 and %011111 call .ApplySineWave ld a, h - xor -1 + xor $ff inc a ret @@ -31,7 +30,6 @@ _Sine:: ; 84d9 inc hl ld d, [hl] ld hl, 0 - ; Factor amplitude .multiply srl a -- cgit v1.2.3 From 417937cffc2a7c3cfac49f3b00caf1a856d0a925 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Wed, 10 Jan 2018 13:47:57 -0500 Subject: Resolve #461 --- engine/routines/loadpushoam.asm | 2 +- engine/routines/switchpartymons.asm | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/loadpushoam.asm b/engine/routines/loadpushoam.asm index 6af0ddf6d..c07c06d0f 100644 --- a/engine/routines/loadpushoam.asm +++ b/engine/routines/loadpushoam.asm @@ -13,7 +13,7 @@ LoadPushOAM:: ; 4031 .PushOAM: ; 403f ld a, HIGH(Sprites) ld [rDMA], a - ld a, (SpritesEnd - Sprites) / 4 ; 40 + ld a, NUM_SPRITE_OAM_STRUCTS .pushoam_loop dec a jr nz, .pushoam_loop diff --git a/engine/routines/switchpartymons.asm b/engine/routines/switchpartymons.asm index cde9c82b2..1379dff9c 100644 --- a/engine/routines/switchpartymons.asm +++ b/engine/routines/switchpartymons.asm @@ -25,13 +25,13 @@ _SwitchPartyMons: ld a, " " call ByteFill pop af - ld hl, Sprites - ld bc, $10 + ld hl, Sprite01 + ld bc, 4 * SPRITEOAMSTRUCT_LENGTH call AddNTimes - ld de, $4 - ld c, $4 + ld de, SPRITEOAMSTRUCT_LENGTH + ld c, 4 .gfx_loop - ld [hl], $a0 + ld [hl], SCREEN_WIDTH_PX ; y (off-screen) add hl, de dec c jr nz, .gfx_loop -- cgit v1.2.3 From 94d6a327218fc56753238b424df208245092d96c Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 11 Jan 2018 12:00:01 -0500 Subject: Use maskbits some more --- engine/routines/drawkrispackgfx.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/drawkrispackgfx.asm b/engine/routines/drawkrispackgfx.asm index 457dd7110..54a21e447 100644 --- a/engine/routines/drawkrispackgfx.asm +++ b/engine/routines/drawkrispackgfx.asm @@ -11,10 +11,10 @@ DrawKrisPackGFX: ; 48e81 ret PackFGFXPointers: ; 48e93 - dw PackFGFX + (15 tiles) * 1 - dw PackFGFX + (15 tiles) * 3 - dw PackFGFX + (15 tiles) * 0 - dw PackFGFX + (15 tiles) * 2 + dw PackFGFX + (15 tiles) * 1 ; ITEM_POCKET + dw PackFGFX + (15 tiles) * 3 ; BALL_POCKET + dw PackFGFX + (15 tiles) * 0 ; KEY_ITEM_POCKET + dw PackFGFX + (15 tiles) * 2 ; TM_HM_POCKET PackFGFX: ; 48e9b INCBIN "gfx/pack/pack_f.2bpp" -- cgit v1.2.3 From 0e1148fb2c754c579284b609c4edbfd676c8d044 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Fri, 12 Jan 2018 03:15:58 -0500 Subject: Move code out of data/ --- engine/routines/printitemdescription.asm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 engine/routines/printitemdescription.asm (limited to 'engine/routines') diff --git a/engine/routines/printitemdescription.asm b/engine/routines/printitemdescription.asm new file mode 100644 index 000000000..e6d087dae --- /dev/null +++ b/engine/routines/printitemdescription.asm @@ -0,0 +1,31 @@ +PrintItemDescription: ; 0x1c8955 +; Print the description for item [CurSpecies] at de. + + ld a, [CurSpecies] + cp TM01 + jr c, .not_a_tm + + ld [CurItem], a + push de + farcall GetTMHMItemMove + pop hl + ld a, [wd265] + ld [CurSpecies], a + predef PrintMoveDesc + ret + +.not_a_tm + push de + ld hl, ItemDescriptions + ld a, [CurSpecies] + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + pop hl + jp PlaceString +; 0x1c8987 -- cgit v1.2.3 From 9180362211cf465c52798124baa5c5c06ba1d332 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Mon, 15 Jan 2018 11:06:17 -0500 Subject: Move code out of gfx/ (close #474) --- engine/routines/loadoverworldfont.asm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 engine/routines/loadoverworldfont.asm (limited to 'engine/routines') diff --git a/engine/routines/loadoverworldfont.asm b/engine/routines/loadoverworldfont.asm new file mode 100644 index 000000000..f23f01c4e --- /dev/null +++ b/engine/routines/loadoverworldfont.asm @@ -0,0 +1,17 @@ +LoadOverworldFont:: ; 106594 + ld de, .OverworldFontGFX + ld hl, vTiles1 + lb bc, BANK(.OverworldFontGFX), $80 + call Get2bpp + ld de, .OverworldFontSpaceGFX + ld hl, vTiles2 tile " " + lb bc, BANK(.OverworldFontSpaceGFX), 1 + call Get2bpp + ret +; 1065ad + +.OverworldFontGFX: +INCBIN "gfx/font/overworld.2bpp" + +.OverworldFontSpaceGFX: +INCBIN "gfx/font/overworld_space.2bpp" -- cgit v1.2.3 From 80480821142d7a7b16dd2b1a98a213e7b389af0f Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 14:30:10 -0500 Subject: Remove Predef_ prefix from routines listed in PredefPointers --- engine/routines/correcterrorsinplayerparty.asm | 2 +- engine/routines/flagpredef.asm | 2 +- engine/routines/newpokedexentry.asm | 2 +- engine/routines/placegraphic.asm | 3 +-- engine/routines/placewaitingtext.asm | 2 +- engine/routines/printitemdescription.asm | 2 +- engine/routines/trademonfrontpic.asm | 6 +++--- 7 files changed, 9 insertions(+), 10 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm index fcc2f36af..639e5c544 100644 --- a/engine/routines/correcterrorsinplayerparty.asm +++ b/engine/routines/correcterrorsinplayerparty.asm @@ -90,7 +90,7 @@ Unreferenced_CorrectErrorsInPlayerParty: ld hl, MON_STAT_EXP - 1 add hl, bc ld b, $1 - predef Predef_CalcPkmnStats + predef CalcPkmnStats pop hl ld bc, PARTYMON_STRUCT_LENGTH add hl, bc diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm index 676960c31..2a6d91ee1 100644 --- a/engine/routines/flagpredef.asm +++ b/engine/routines/flagpredef.asm @@ -1,4 +1,4 @@ -Predef_SmallFarFlagAction: ; 4d7c1 +SmallFarFlagAction: ; 4d7c1 ; Perform action b on bit c in flag array hl. ; If checking a flag, check flag array d:hl unless d is 0. diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm index c52188f6e..acf9fca7b 100644 --- a/engine/routines/newpokedexentry.asm +++ b/engine/routines/newpokedexentry.asm @@ -1,4 +1,4 @@ -Predef_NewPokedexEntry: ; fb877 +NewPokedexEntry: ; fb877 ld a, [hMapAnims] push af xor a diff --git a/engine/routines/placegraphic.asm b/engine/routines/placegraphic.asm index 28b69fc23..21b914950 100644 --- a/engine/routines/placegraphic.asm +++ b/engine/routines/placegraphic.asm @@ -1,7 +1,6 @@ -Predef_PlaceGraphic: ; 2ef6e +PlaceGraphic: ; 2ef6e ; Fill wBoxAlignment-aligned box width b height c ; with iterating tile starting from hGraphicStartTile at hl. -; Predef $13 ld de, SCREEN_WIDTH diff --git a/engine/routines/placewaitingtext.asm b/engine/routines/placewaitingtext.asm index 37fc2a056..9b2260722 100644 --- a/engine/routines/placewaitingtext.asm +++ b/engine/routines/placewaitingtext.asm @@ -11,7 +11,7 @@ PlaceWaitingText:: ; 4000 jr .proceed .notinbattle - predef Predef_LinkTextbox + predef LinkTextboxAtHL .proceed hlcoord 4, 11 diff --git a/engine/routines/printitemdescription.asm b/engine/routines/printitemdescription.asm index 4da061fda..e6d087dae 100644 --- a/engine/routines/printitemdescription.asm +++ b/engine/routines/printitemdescription.asm @@ -11,7 +11,7 @@ PrintItemDescription: ; 0x1c8955 pop hl ld a, [wd265] ld [CurSpecies], a - predef Predef_PrintMoveDesc + predef PrintMoveDesc ret .not_a_tm diff --git a/engine/routines/trademonfrontpic.asm b/engine/routines/trademonfrontpic.asm index 2d05a1c04..e9611553b 100644 --- a/engine/routines/trademonfrontpic.asm +++ b/engine/routines/trademonfrontpic.asm @@ -4,13 +4,13 @@ GetTrademonFrontpic: ; 4d7fd ld de, vTiles2 push de push af - predef Predef_GetUnownLetter + predef GetUnownLetter pop af ld [CurPartySpecies], a ld [CurSpecies], a call GetBaseData pop de - predef Predef_GetAnimatedFrontpic + predef GetAnimatedFrontpic ret AnimateTrademonFrontpic: ; 4d81e @@ -34,5 +34,5 @@ AnimateTrademonFrontpic: ; 4d81e hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_TRADE - predef Predef_AnimateFrontpic + predef AnimateFrontpic ret -- cgit v1.2.3 From 5407d8de920b779d760d88153d8e314a687d100e Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 17:59:05 -0500 Subject: =?UTF-8?q?Cleaner=20Pok=C3=A9dex=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/routines/getsquareroot.asm | 14 ++++++++------ engine/routines/newpokedexentry.asm | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/getsquareroot.asm b/engine/routines/getsquareroot.asm index 0ba2e50a5..412fd04ff 100644 --- a/engine/routines/getsquareroot.asm +++ b/engine/routines/getsquareroot.asm @@ -1,3 +1,5 @@ +NUM_SQUARE_ROOTS EQU 255 + GetSquareRoot: ; 13b87 ; Return the square root of de in b. @@ -10,7 +12,7 @@ GetSquareRoot: ; 13b87 ; Make sure we don't go past the end of the table. inc b ld a, b - cp $ff + cp NUM_SQUARE_ROOTS ret z ; Iterate over the table until b**2 >= de. @@ -23,8 +25,8 @@ GetSquareRoot: ; 13b87 ret .Squares: ; 13b98 -root = 1 - rept $ff - dw root * root -root = root + 1 - endr +x = 1 +rept NUM_SQUARE_ROOTS + dw x * x +x = x + 1 +endr diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm index acf9fca7b..122688eff 100644 --- a/engine/routines/newpokedexentry.asm +++ b/engine/routines/newpokedexentry.asm @@ -11,13 +11,13 @@ NewPokedexEntry: ; fb877 ld a, [wPokedexStatus] push af ld a, [hSCX] - add $5 + add POKDEX_SCX ld [hSCX], a xor a ld [wPokedexStatus], a farcall _NewPokedexEntry call WaitPressAorB_BlinkCursor - ld a, $1 + ld a, 1 ; page 2 ld [wPokedexStatus], a farcall DisplayDexEntry call WaitPressAorB_BlinkCursor @@ -26,7 +26,7 @@ NewPokedexEntry: ; fb877 call MaxVolume call RotateThreePalettesRight ld a, [hSCX] - add -5 ; 251 ; NUM_POKEMON + add -POKDEX_SCX ld [hSCX], a call .ReturnFromDexRegistration pop af -- cgit v1.2.3 From 6d20cf3e80780af15ed15acea2f7feac1ffd9705 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Tue, 16 Jan 2018 23:47:45 -0500 Subject: =?UTF-8?q?"CryHeader"=20=E2=86=92=20"Cry";=20"Cry"=20=E2=86=92=20?= =?UTF-8?q?"MonCry"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/routines/playslowcry.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/playslowcry.asm b/engine/routines/playslowcry.asm index 636741bcf..545629e51 100644 --- a/engine/routines/playslowcry.asm +++ b/engine/routines/playslowcry.asm @@ -1,6 +1,6 @@ Special_PlaySlowCry: ; fb841 ld a, [ScriptVar] - call LoadCryHeader + call LoadCry jr c, .done ld hl, CryPitch @@ -23,7 +23,7 @@ Special_PlaySlowCry: ; fb841 ld [CryLength], a ld a, h ld [CryLength + 1], a - farcall _PlayCryHeader + farcall _PlayCry call WaitSFX .done -- cgit v1.2.3 From 2acaa96cf16ce953a7149f300d54e5440abc27d8 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 18 Jan 2018 18:34:20 -0500 Subject: More charmap and home/text.asm documentation for JP chars --- engine/routines/checknickerrors.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/checknickerrors.asm b/engine/routines/checknickerrors.asm index 1cedca420..65efd7b94 100644 --- a/engine/routines/checknickerrors.asm +++ b/engine/routines/checknickerrors.asm @@ -64,10 +64,10 @@ CheckNickErrors:: ; 669f ; table defining which characters are actually text commands ; format: ; ≥ < - db "", TX_BOX + 1 + db TX_START, TX_BOX + 1 db "", $18 + 1 - db $1d, "%" + 1 - db $35, "" + 1 + db "", "%" + 1 + db "", "" + 1 db "", "" + 1 db "", "" + 1 db "", "┘" + 1 -- cgit v1.2.3 From 2c7ca13194be53a6e4707c7bdcfe83d80e35515f Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Thu, 18 Jan 2018 22:30:30 -0500 Subject: Disambiguate "%" and "" --- engine/routines/checknickerrors.asm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/checknickerrors.asm b/engine/routines/checknickerrors.asm index 65efd7b94..70cc8d058 100644 --- a/engine/routines/checknickerrors.asm +++ b/engine/routines/checknickerrors.asm @@ -64,11 +64,11 @@ CheckNickErrors:: ; 669f ; table defining which characters are actually text commands ; format: ; ≥ < - db TX_START, TX_BOX + 1 - db "", $18 + 1 - db "", "%" + 1 - db "", "" + 1 - db "", "" + 1 - db "", "" + 1 - db "", "┘" + 1 + db TX_START, TX_BOX + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "┘" + 1 db -1 ; end -- cgit v1.2.3 From ddec0ee305f25bc9941e19e16c79f499c5e95c23 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Fri, 19 Jan 2018 20:48:33 -0500 Subject: More Japanese characters --- engine/routines/checknickerrors.asm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/checknickerrors.asm b/engine/routines/checknickerrors.asm index 70cc8d058..245c28586 100644 --- a/engine/routines/checknickerrors.asm +++ b/engine/routines/checknickerrors.asm @@ -64,11 +64,11 @@ CheckNickErrors:: ; 669f ; table defining which characters are actually text commands ; format: ; ≥ < - db TX_START, TX_BOX + 1 - db "", "" + 1 - db "", "" + 1 - db "", "" + 1 - db "", "" + 1 - db "", "" + 1 - db "", "┘" + 1 + db TX_START, TX_BOX + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "┘" + 1 db -1 ; end -- cgit v1.2.3 From 05382d3e3c03616d6edf21833e89a8264a8cd10a Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sat, 20 Jan 2018 12:25:55 -0500 Subject: PARTY_LENGTH; MON_NAME; sgb_border.bin --- engine/routines/checknickerrors.asm | 2 +- engine/routines/correcterrorsinplayerparty.asm | 2 +- engine/routines/initlist.asm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/checknickerrors.asm b/engine/routines/checknickerrors.asm index 245c28586..87ebd6bb3 100644 --- a/engine/routines/checknickerrors.asm +++ b/engine/routines/checknickerrors.asm @@ -6,7 +6,7 @@ CheckNickErrors:: ; 669f push bc push de - ld b, PKMN_NAME_LENGTH + ld b, MON_NAME_LENGTH .checkchar ; end of nick? diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm index 639e5c544..42e550900 100644 --- a/engine/routines/correcterrorsinplayerparty.asm +++ b/engine/routines/correcterrorsinplayerparty.asm @@ -128,7 +128,7 @@ Unreferenced_CorrectErrorsInPlayerParty: ld hl, StringBuffer1 .got_nickname pop de - ld bc, PKMN_NAME_LENGTH + ld bc, MON_NAME_LENGTH call CopyBytes pop bc diff --git a/engine/routines/initlist.asm b/engine/routines/initlist.asm index e2b7235ab..b7260e552 100644 --- a/engine/routines/initlist.asm +++ b/engine/routines/initlist.asm @@ -21,7 +21,7 @@ InitList: ; 50db9 jr nz, .check_item_name ld hl, CurMart ld de, PokemonNames - ld a, PKMN_NAME + ld a, MON_NAME jr .done .check_item_name -- cgit v1.2.3 From 5db31feba93b10a2d629cf88a9ca7096d4b1c9ae Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 21 Jan 2018 16:53:19 -0500 Subject: POKEDEX_SCX --- engine/routines/newpokedexentry.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/routines') diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm index 122688eff..d6b755200 100644 --- a/engine/routines/newpokedexentry.asm +++ b/engine/routines/newpokedexentry.asm @@ -11,7 +11,7 @@ NewPokedexEntry: ; fb877 ld a, [wPokedexStatus] push af ld a, [hSCX] - add POKDEX_SCX + add POKEDEX_SCX ld [hSCX], a xor a ld [wPokedexStatus], a @@ -26,7 +26,7 @@ NewPokedexEntry: ; fb877 call MaxVolume call RotateThreePalettesRight ld a, [hSCX] - add -POKDEX_SCX + add -POKEDEX_SCX ld [hSCX], a call .ReturnFromDexRegistration pop af -- cgit v1.2.3 From 5e4fa42fa7e2405760efc77f8c2e7167e67990ac Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 21 Jan 2018 17:45:56 -0500 Subject: Unrelated routine gets its own file --- .../unreferenced_getgen1trainerclassname.asm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 engine/routines/unreferenced_getgen1trainerclassname.asm (limited to 'engine/routines') diff --git a/engine/routines/unreferenced_getgen1trainerclassname.asm b/engine/routines/unreferenced_getgen1trainerclassname.asm new file mode 100644 index 000000000..64c55ed84 --- /dev/null +++ b/engine/routines/unreferenced_getgen1trainerclassname.asm @@ -0,0 +1,21 @@ +Unreferenced_GetGen1TrainerClassName: ; 50a28 + ld hl, Gen1TrainerClassNames + ld a, [TrainerClass] + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, StringBuffer1 +.copy + ld a, [hli] + ld [de], a + inc de + cp "@" + jr nz, .copy + ret + +INCLUDE "data/unused/gen_1_trainer_names.asm" -- cgit v1.2.3 From 7f54df58bfb00564874f8b6b3acef52a9aff7442 Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Sun, 21 Jan 2018 18:00:23 -0500 Subject: Group engine/pokedex files --- engine/routines/newpokedexentry.asm | 52 ------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 engine/routines/newpokedexentry.asm (limited to 'engine/routines') diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm deleted file mode 100644 index d6b755200..000000000 --- a/engine/routines/newpokedexentry.asm +++ /dev/null @@ -1,52 +0,0 @@ -NewPokedexEntry: ; fb877 - ld a, [hMapAnims] - push af - xor a - ld [hMapAnims], a - call LowVolume - call ClearBGPalettes - call ClearTileMap - call UpdateSprites - call ClearSprites - ld a, [wPokedexStatus] - push af - ld a, [hSCX] - add POKEDEX_SCX - ld [hSCX], a - xor a - ld [wPokedexStatus], a - farcall _NewPokedexEntry - call WaitPressAorB_BlinkCursor - ld a, 1 ; page 2 - ld [wPokedexStatus], a - farcall DisplayDexEntry - call WaitPressAorB_BlinkCursor - pop af - ld [wPokedexStatus], a - call MaxVolume - call RotateThreePalettesRight - ld a, [hSCX] - add -POKEDEX_SCX - ld [hSCX], a - call .ReturnFromDexRegistration - pop af - ld [hMapAnims], a - ret -; fb8c8 - -.ReturnFromDexRegistration: ; fb8c8 - call ClearTileMap - call LoadFontsExtra - call LoadStandardFont - farcall Pokedex_PlaceFrontpicTopLeftCorner - call WaitBGMap2 - farcall GetEnemyMonDVs - ld a, [hli] - ld [TempMonDVs], a - ld a, [hl] - ld [TempMonDVs + 1], a - ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS - call GetSGBLayout - call SetPalettes - ret -; fb8f1 -- cgit v1.2.3