From 40c17c906b2b3f65b3b04b1933b90238a7ac5566 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 26 May 2014 14:04:56 -0700 Subject: Remove most static wram addresses. Use labels instead. For unknown addresses, use "w
". Label overleads are still an issue. --- engine/HoF_room_pc.asm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'engine/HoF_room_pc.asm') diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index aa9a9882..9b5bd8b2 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -16,7 +16,7 @@ HallOfFameComputer: ; 7405c (1d:405c) call FillMemory ld hl, wTileMap call Func_7417b - FuncCoord 0, 14 ; $c4b8 + FuncCoord 0, 14 ld hl, Coord call Func_7417b ld a, $c0 @@ -30,8 +30,8 @@ HallOfFameComputer: ; 7405c (1d:405c) ld c, $80 call DelayFrames xor a - ld [wWhichTrade], a ; $cd3d - ld [$cd3e], a + ld [wWhichTrade], a ; wWhichTrade + ld [wTrainerEngageDistance], a jp Credits Func_740ba: ; 740ba (1d:40ba) @@ -53,16 +53,16 @@ DisplayCreditsMon: ; 740cb (1d:40cb) call FillMiddleOfScreenWithWhite ; display the next monster from CreditsMons - ld hl,$CD3E + ld hl,wTrainerEngageDistance ld c,[hl] ; how many monsters have we displayed so far? inc [hl] ld b,0 ld hl,CreditsMons add hl,bc ; go that far in the list of monsters and get the next one ld a,[hl] - ld [$CF91],a - ld [$D0B5],a - FuncCoord 8, 6 ; $c420 + ld [wcf91],a + ld [wd0b5],a + FuncCoord 8, 6 ld hl,Coord call GetMonHeader call LoadFrontSpriteByMonIndex @@ -153,7 +153,7 @@ Func_7417b: ; 7417b (1d:417b) jp FillMemory FillMiddleOfScreenWithWhite: ; 74183 (1d:4183) - FuncCoord 0, 4 ; $c3f0 + FuncCoord 0, 4 ld hl, Coord ld bc, $c8 ; 10 rows of 20 tiles each ld a, $7f ; blank white tile @@ -164,7 +164,7 @@ Credits: ; 7418e (1d:418e) push de .asm_74192 pop de - FuncCoord 9, 6 ; $c421 + FuncCoord 9, 6 ld hl, Coord push hl call FillMiddleOfScreenWithWhite @@ -241,11 +241,11 @@ Credits: ; 7418e (1d:418e) ld hl, $9600 ld bc, (BANK(TheEndGfx) << 8) + $0a call CopyVideoData - FuncCoord 4, 8 ; $c444 + FuncCoord 4, 8 ld hl, Coord ld de, UnnamedText_74229 ; $4229 call PlaceString - FuncCoord 4, 9 ; $c458 + FuncCoord 4, 9 ld hl, Coord inc de call PlaceString -- cgit v1.3.1-sl0p From da0a72cdbf45fa624b2d1151afe94a98d7da2ae0 Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 29 May 2014 01:31:46 -0700 Subject: Use VRAM constants where applicable. --- engine/HoF_room_pc.asm | 18 ++--- engine/battle/1c.asm | 8 +-- engine/battle/animations.asm | 30 ++++----- engine/battle/core.asm | 40 +++++------ engine/battle/e.asm | 2 +- engine/evolution.asm | 6 +- engine/gamefreak.asm | 6 +- engine/hall_of_fame.asm | 6 +- engine/hidden_object_functions17.asm | 2 +- engine/intro.asm | 14 ++-- engine/load_pokedex_tiles.asm | 4 +- engine/menu/bills_pc.asm | 2 +- engine/menu/diploma.asm | 2 +- engine/menu/naming_screen.asm | 2 +- engine/menu/start_sub_menus.asm | 18 ++--- engine/menu/status_screen.asm | 8 +-- engine/mon_party_sprites.asm | 60 ++++++++--------- engine/oak_speech.asm | 6 +- engine/overworld/cut.asm | 12 ++-- engine/overworld/emotion_bubbles.asm | 2 +- engine/overworld/healing_machine.asm | 2 +- engine/overworld/ledges.asm | 2 +- engine/overworld/map_sprites.asm | 6 +- engine/overworld/player_animations.asm | 24 +++---- engine/overworld/ssanne.asm | 2 +- engine/palettes.asm | 4 +- engine/slot_machine.asm | 12 ++-- engine/titlescreen.asm | 22 +++--- engine/town_map.asm | 10 +-- engine/trade.asm | 14 ++-- home.asm | 44 ++++++------ main.asm | 2 +- scripts/rockethideout2.asm | 120 ++++++++++----------------------- scripts/vermiliondock.asm | 2 +- 34 files changed, 234 insertions(+), 280 deletions(-) (limited to 'engine/HoF_room_pc.asm') diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index 9b5bd8b2..82e769f5 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -4,13 +4,13 @@ HallOfFameComputer: ; 7405c (1d:405c) ld c, $64 call DelayFrames call DisableLCD - ld hl, $8800 - ld bc, $400 + ld hl, vFont + ld bc, $800 / 2 call Func_74171 - ld hl, $9600 - ld bc, $100 + ld hl, vChars2 + $600 + ld bc, $200 / 2 call Func_74171 - ld hl, $97e0 + ld hl, vChars2 + $7e0 ld bc, $10 ld a, $ff call FillMemory @@ -66,16 +66,16 @@ DisplayCreditsMon: ; 740cb (1d:40cb) ld hl,Coord call GetMonHeader call LoadFrontSpriteByMonIndex - ld hl,$980C + ld hl,vBGMap0 + $c call Func_74164 xor a ld [H_AUTOBGTRANSFERENABLED],a call LoadScreenTilesFromBuffer1 - ld hl,$9800 + ld hl,vBGMap0 call Func_74164 ld a,$A7 ld [$FF4B],a - ld hl,$9C00 + ld hl,vBGMap1 call Func_74164 call FillMiddleOfScreenWithWhite ld a,$FC @@ -238,7 +238,7 @@ Credits: ; 7418e (1d:418e) call FillMiddleOfScreenWithWhite pop de ld de, TheEndGfx - ld hl, $9600 + ld hl, vChars2 + $600 ld bc, (BANK(TheEndGfx) << 8) + $0a call CopyVideoData FuncCoord 4, 8 diff --git a/engine/battle/1c.asm b/engine/battle/1c.asm index 2e7cf82d..edc74e9a 100755 --- a/engine/battle/1c.asm +++ b/engine/battle/1c.asm @@ -45,9 +45,9 @@ Func_708ca: ; 708ca (1c:48ca) jp ClearSprites Func_7092a: ; 7092a (1c:492a) - ld de, $9000 - ld hl, $8000 - ld bc, $31 + ld de, vFrontPic + ld hl, vSprites + ld bc, 7 * 7 call CopyVideoData ld a, $10 ld [W_BASECOORDY], a ; wd082 @@ -250,7 +250,7 @@ MapIDList_70a44: ; 70a44 (1c:4a44) db $FF LoadBattleTransitionTile: ; 70a4d (1c:4a4d) - ld hl, $8ff0 + ld hl, vChars1 + $7f0 ld de, BattleTransitionTile ; $4a59 ld bc, (BANK(BattleTransitionTile) << 8) + $01 jp CopyVideoData diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index a7bda2d2..e3ee4fe0 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -341,7 +341,7 @@ LoadAnimationTileset: ; 781d2 (1e:41d2) ld e,a ld a,[hl] ld d,a ; de = address of tileset - ld hl,$8310 ; destination address in VRAM + ld hl,vSprites + $310 ld b, BANK(AnimationTileset1) ; ROM bank ld a,[wd07d] ld c,a ; number of tiles @@ -1960,17 +1960,17 @@ AnimationSlideMonHalfLeft: ; 79645 (1e:5645) Func_79652: ; 79652 (1e:5652) ld a, [H_WHOSETURN] ; $fff3 and a - ld hl, $9310 + ld hl, vBackPic jr z, .asm_7965d - ld hl, $9000 + ld hl, vFrontPic .asm_7965d ld de, wTempPic - ld bc, $31 + ld bc, 7 * 7 jp CopyVideoData AnimationWavyScreen: ; 79666 (1e:5666) ; used in Psywave/Psychic etc. - ld hl, $9800 + ld hl, vBGMap0 call Func_79e0d call Delay3 xor a @@ -2005,7 +2005,7 @@ AnimationWavyScreen: ; 79666 (1e:5666) ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call LoadScreenTilesFromBuffer2 - ld hl, $9c00 + ld hl, vBGMap1 call Func_79e0d ret @@ -2751,22 +2751,22 @@ Unknown_79d63: ; 79d63 (1e:5d63) db $00,$84,$06,$81,$02,$88,$01,$83,$05,$89,$09,$80,$07,$87,$03,$82,$04,$85,$08,$86 AnimationShakeEnemyHUD: ; 79d77 (1e:5d77) - ld de, $9310 - ld hl, $8000 - ld bc, $0031 + ld de, vBackPic + ld hl, vSprites + ld bc, 7 * 7 call CopyVideoData xor a ld [$ffae], a - ld hl, $9800 + ld hl, vBGMap0 call Func_79e0d ld a, $90 ld [$ffb0], a - ld hl, $9b20 + ld hl, vBGMap0 + $320 call Func_79e0d ld a, $38 ld [$ffb0], a call Func_792fd - ld hl, $9800 + ld hl, vBGMap0 call Func_79e0d call AnimationHideMonPic call Delay3 @@ -2776,17 +2776,17 @@ AnimationShakeEnemyHUD: ; 79d77 (1e:5d77) call ClearSprites ld a, $90 ld [$ffb0], a - ld hl, $9c00 + ld hl, vBGMap1 call Func_79e0d xor a ld [$ffb0], a call SaveScreenTilesToBuffer1 - ld hl, $9800 + ld hl, vBGMap0 call Func_79e0d call ClearScreen call Delay3 call LoadScreenTilesFromBuffer1 - ld hl, $9c00 + ld hl, vBGMap1 jp Func_79e0d Func_79dda: ; 79dda (1e:5dda) diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 538b91e3..c1041bca 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -103,7 +103,7 @@ Func_3c04c: ; 3c04c (f:404c) call DisableLCD call LoadFontTilePatterns call Func_3ee58 - ld hl, $9800 + ld hl, vBGMap0 ld bc, $400 .asm_3c06f ld a, $7f @@ -113,7 +113,7 @@ Func_3c04c: ; 3c04c (f:404c) or c jr nz, .asm_3c06f ld hl, wTileMap - ld de, $9800 + ld de, vBGMap0 ld b, $12 .asm_3c07f ld c, $14 @@ -1462,7 +1462,7 @@ Func_3c92a: ; 3c92a (f:492a) ld [wcf91],a ld [wd0b5],a call GetMonHeader - ld de,$9000 + ld de,vFrontPic call LoadMonFrontSprite ld a,$CF ld [$FFE1],a @@ -2400,7 +2400,7 @@ Func_3d119: ; 3d119 (f:5119) ld [wcf91], a ld [wd0b5], a call GetMonHeader - ld de, $9000 + ld de, vFrontPic call LoadMonFrontSprite jr .asm_3d187 .asm_3d182 @@ -6288,17 +6288,17 @@ Func_3ec92: ; 3ec92 (f:6c92) ld e, a dec b jr nz, .asm_3ecb2 - ld de, $9310 + ld de, vBackPic call InterlaceMergeSpriteBuffers ld a, $a ld [$0], a xor a ld [$4000], a - ld hl, $8000 + ld hl, vSprites ld de, S_SPRITEBUFFER1 ld a, [H_LOADEDROMBANK] ld b, a - ld c, $31 + ld c, 7 * 7 call CopyVideoData xor a ld [$0], a @@ -6552,22 +6552,22 @@ Func_3ee5b: ; 3ee5b (f:6e5b) add a jr c, .asm_3ee7c ld hl, BattleHudTiles1 ; $6080 - ld de, $96d0 + ld de, vChars2 + $6d0 ld bc, $18 ld a, BANK(BattleHudTiles1) call FarCopyDataDouble ld hl, BattleHudTiles2 ; $6098 - ld de, $9730 + ld de, vChars2 + $730 ld bc, $30 ld a, BANK(BattleHudTiles2) jp FarCopyDataDouble .asm_3ee7c ld de, BattleHudTiles1 ; $6080 - ld hl, $96d0 + ld hl, vChars2 + $6d0 ld bc, (BANK(BattleHudTiles1) << 8) + $03 call CopyVideoDataDouble ld de, BattleHudTiles2 ; $6098 - ld hl, $9730 + ld hl, vChars2 + $730 ld bc, (BANK(BattleHudTiles2) << 8) + $06 jp CopyVideoDataDouble @@ -6751,13 +6751,13 @@ InitWildBattle: ; 3ef8b (f:6f8b) push af ld a, MON_GHOST ld [wcf91], a - ld de, $9000 + ld de, vFrontPic call LoadMonFrontSprite ; load ghost sprite pop af ld [wcf91], a jr .spriteLoaded .isNoGhost - ld de, $9000 + ld de, vFrontPic call LoadMonFrontSprite ; load mon sprite .spriteLoaded xor a @@ -6825,7 +6825,7 @@ _LoadTrainerPic: ; 3f04b (f:704b) ld a, Bank(RedPicFront) .loadSprite call UncompressSpriteFromDE - ld de, $9000 + ld de, vFrontPic ld a, $77 ld c, a jp LoadUncompressedSpriteData @@ -6930,9 +6930,9 @@ asm_3f0d0: ; 3f0d0 (f:70d0) jr nz, .asm_3f0f4 ret -; loads back sprite of mon to $8000 -; assumes the corresponding mon header is already loaded -LoadMonBackSprite: ; 3f103 (f:7103) +LoadMonBackSprite: +; Assumes the monster's attributes have +; been loaded with GetMonHeader. ld a, [wcfd9] ld [wcf91], a FuncCoord 1, 5 @@ -6944,10 +6944,10 @@ LoadMonBackSprite: ; 3f103 (f:7103) call UncompressMonSprite ld a, $3 call Predef ; indirect jump to ScaleSpriteByTwo (2fe40 (b:7e40)) - ld de, $9310 + ld de, vBackPic call InterlaceMergeSpriteBuffers ; combine the two buffers to a single 2bpp sprite - ld hl, $8000 - ld de, $9310 + ld hl, vSprites + ld de, vBackPic ld c, (2*SPRITEBUFFERSIZE)/16 ; count of 16-byte chunks to be copied ld a, [H_LOADEDROMBANK] ld b, a diff --git a/engine/battle/e.asm b/engine/battle/e.asm index 77fae4df..fbede5dd 100755 --- a/engine/battle/e.asm +++ b/engine/battle/e.asm @@ -1382,7 +1382,7 @@ DrawEnemyPokeballs: ; 0x3a857 LoadPartyPokeballGfx: ; 3a85d (e:685d) ld de, PokeballTileGraphics ; $697e - ld hl, $8310 + ld hl, vSprites + $310 ld bc, (BANK(PokeballTileGraphics) << 8) + $04 jp CopyVideoData diff --git a/engine/evolution.asm b/engine/evolution.asm index 37aef792..8e511182 100755 --- a/engine/evolution.asm +++ b/engine/evolution.asm @@ -28,9 +28,9 @@ Func_7bde9: ; 7bde9 (1e:7de9) ld [wcf91], a ld [wd0b5], a call Func_7beb9 - ld de, $9000 - ld hl, $9310 - ld bc, $31 + ld de, vFrontPic + ld hl, vBackPic + ld bc, 7 * 7 call CopyVideoData ld a, [wHPBarMaxHP] ld [wcf91], a diff --git a/engine/gamefreak.asm b/engine/gamefreak.asm index 25f0bf5a..d0f1bbac 100755 --- a/engine/gamefreak.asm +++ b/engine/gamefreak.asm @@ -4,15 +4,15 @@ LoadShootingStarGraphics: ; 70000 (1c:4000) ld a, $a4 ld [rOBP1], a ; $ff49 ld de, AnimationTileset2 + $30 ; $471e ; star tile (top left quadrant) - ld hl, $8a00 + ld hl, vChars1 + $200 ld bc, (BANK(AnimationTileset2) << 8) + $01 call CopyVideoData ld de, AnimationTileset2 + $130 ; $481e ; star tile (bottom left quadrant) - ld hl, $8a10 + ld hl, vChars1 + $210 ld bc, (BANK(AnimationTileset2) << 8) + $01 call CopyVideoData ld de, FallingStar ; $4190 - ld hl, $8a20 + ld hl, vChars1 + $220 ld bc, (BANK(FallingStar) << 8) + $01 call CopyVideoData ld hl, GameFreakLogoOAMData ; $4140 diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index f02107cc..981e1db5 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -6,7 +6,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) call LoadFontTilePatterns call LoadTextBoxTilePatterns call DisableLCD - ld hl, $9800 + ld hl,vBGMap0 ld bc, $800 ld a, $7f call FillMemory @@ -197,14 +197,14 @@ Func_7033e: ; 7033e (1c:433e) ld de, $a000 ld bc, $310 call CopyData - ld de, $9000 + ld de, vFrontPic call InterlaceMergeSpriteBuffers ld de, RedPicBack ; $7e0a ld a, BANK(RedPicBack) call UncompressSpriteFromDE ld a, $3 call Predef ; indirect jump to ScaleSpriteByTwo (2fe40 (b:7e40)) - ld de, $9310 + ld de, vBackPic call InterlaceMergeSpriteBuffers ld c, $1 diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm index 070dde98..bdda042c 100755 --- a/engine/hidden_object_functions17.asm +++ b/engine/hidden_object_functions17.asm @@ -73,7 +73,7 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9) ld a, [wcf91] ld [wd0b5], a call GetMonHeader - ld de, $8b10 + ld de, vChars1 + $310 call LoadMonFrontSprite ld a, $80 ld [$ffe1], a diff --git a/engine/intro.asm b/engine/intro.asm index 767522e7..c20e5e3f 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -199,7 +199,7 @@ Func_417c7: ; 417c7 (10:57c7) ret Func_417f0: ; 417f0 (10:57f0) - ld hl, $9c00 + ld hl, vBGMap1 ld bc, $240 jr asm_417fe @@ -275,22 +275,22 @@ Func_41849: ; 41849 (10:5849) LoadIntroGraphics: ; 41852 (10:5852) ld hl, FightIntroBackMon ; $5a99 - ld de, $9000 + ld de, vChars2 ld bc, $600 ld a, BANK(FightIntroBackMon) call FarCopyData2 ld hl, GameFreakIntro ; $5959 - ld de, $9600 + ld de, vChars2 + $600 ld bc, $140 ld a, BANK(GameFreakIntro) call FarCopyData2 ld hl, GameFreakIntro ; $5959 - ld de, $8800 + ld de, vChars1 ld bc, $140 ld a, BANK(GameFreakIntro) call FarCopyData2 ld hl, FightIntroFrontMon ; $6099 - ld de, $8000 + ld de, vChars0 ld bc, $6c0 ld a, BANK(FightIntroFrontMon) jp FarCopyData2 @@ -341,10 +341,10 @@ Func_418e9: ; 418e9 (10:58e9) ld hl, Coord ld c, $50 call Func_41807 - ld hl, $9c00 + ld hl, vBGMap1 ld c, $80 call Func_41807 - ld hl, $9dc0 + ld hl, vBGMap1 + $1c0 ld c, $80 jp Func_41807 diff --git a/engine/load_pokedex_tiles.asm b/engine/load_pokedex_tiles.asm index 7a49adaa..e8205ef8 100755 --- a/engine/load_pokedex_tiles.asm +++ b/engine/load_pokedex_tiles.asm @@ -2,10 +2,10 @@ LoadPokedexTilePatterns: ; 17840 (5:7840) call LoadHpBarAndStatusTilePatterns ld de,PokedexTileGraphics ; $6488 - ld hl,$9600 + ld hl,vChars2 + $600 ld bc,(BANK(PokedexTileGraphics) << 8) + $12 call CopyVideoData ld de,PokeballTileGraphics ; $697e - ld hl,$9720 + ld hl,vChars2 + $720 ld bc,(BANK(PokeballTileGraphics) << 8) + $01 jp CopyVideoData ; load pokeball tile for marking caught mons diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index 41210f72..bfcdcb9b 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -137,7 +137,7 @@ Func_214e8: ; 214e8 (8:54e8) BillsPCMenu: ld a, [wccd3] ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld hl, $9780 + ld hl, vChars2 + $780 ld de, PokeballTileGraphics ; $697e ld bc, (BANK(PokeballTileGraphics) << 8) + $01 call CopyVideoData diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm index bb1a2584..58b613c5 100755 --- a/engine/menu/diploma.asm +++ b/engine/menu/diploma.asm @@ -8,7 +8,7 @@ DisplayDiploma: ; 566e2 (15:66e2) set 6, [hl] call DisableLCD ld hl, CircleTile ; $7d88 - ld de, $9700 + ld de, vChars2 + $700 ld bc, $0010 ld a, BANK(CircleTile) call FarCopyData2 diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index bfafe778..26e7227f 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -325,7 +325,7 @@ DisplayNamingScreen: ; 6596 (1:6596) LoadEDTile: ; 675b (1:675b) ld de, ED_Tile - ld hl, $8f00 + ld hl, vFont + $700 ld bc, $1 jp CopyVideoDataDouble diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index c495136e..931de340 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -545,39 +545,39 @@ DrawTrainerInfo: ; 1349a (4:749a) FuncCoord 1,2 ld hl,Coord call TrainerInfo_DrawVerticalLine - ld hl,$9070 - ld de,$9000 - ld bc,$01c0 + ld hl,vChars2 + $70 + ld de,vChars2 + ld bc,$70 * 4 call CopyData ld hl,TrainerInfoTextBoxTileGraphics ; $7b98 ; trainer info text box tile patterns - ld de,$9770 + ld de,vChars2 + $770 ld bc,$0080 push bc call TrainerInfo_FarCopyData ld hl,BlankLeaderNames ; $7c28 - ld de,$9600 + ld de,vChars2 + $600 ld bc,$0170 call TrainerInfo_FarCopyData pop bc ld hl,BadgeNumbersTileGraphics ; $7d98 ; badge number tile patterns - ld de,$8d80 + ld de,vChars1 + $580 call TrainerInfo_FarCopyData ld hl,GymLeaderFaceAndBadgeTileGraphics ; $6a9e ; gym leader face and badge tile patterns - ld de,$9200 + ld de,vChars2 + $200 ld bc,$0400 ld a,$03 call FarCopyData2 ld hl,TextBoxGraphics ; $6288 ld de,$00d0 add hl,de ; hl = colon tile pattern - ld de,$8d60 + ld de,vChars1 + $560 ld bc,$0010 ld a,$04 push bc call FarCopyData2 pop bc ld hl,TrainerInfoTextBoxTileGraphics + $80 ; $7c18 ; background tile pattern - ld de,$8d70 + ld de,vChars1 + $570 call TrainerInfo_FarCopyData call EnableLCD ld hl,wWhichTrade diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index a4036bdb..ce5f85ab 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -21,19 +21,19 @@ StatusScreen: ; 12953 (4:6953) call UpdateSprites ; move sprites (?) call LoadHpBarAndStatusTilePatterns ld de, BattleHudTiles1 ; $6080 ; source - ld hl, $96d0 ; dest + ld hl, vChars2 + $6d0 ; dest ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8 call CopyVideoDataDouble ; ·│ :L and halfarrow line end ld de, BattleHudTiles2 ; $6098 - ld hl, $9780 + ld hl, vChars2 + $780 ld bc, (BANK(BattleHudTiles2) << 8) + $01 call CopyVideoDataDouble ; │ ld de, BattleHudTiles3 ; $60b0 - ld hl, $9760 + ld hl, vChars2 + $760 ld bc, (BANK(BattleHudTiles3) << 8) + $02 call CopyVideoDataDouble ; ─┘ ld de, PTile - ld hl, $9720 + ld hl, vChars2 + $720 ld bc,(BANK(PTile) << 8 | $01) call CopyVideoDataDouble ; P (for PP), inline ld a, [$ffd7] diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm index 8c8f5406..cfe34512 100755 --- a/engine/mon_party_sprites.asm +++ b/engine/mon_party_sprites.asm @@ -156,142 +156,142 @@ MonPartySpritePointers: ; 717c0 (1c:57c0) dw SlowbroSprite + $c0 db $40 / $10 ; 40 bytes db BANK(SlowbroSprite) - dw $8000 + dw vSprites dw BallSprite db $80 / $10 ; $80 bytes db BANK(BallSprite) - dw $8040 + dw vSprites + $40 dw ClefairySprite + $c0 db $40 / $10 ; $40 bytes db BANK(ClefairySprite) - dw $80C0 + dw vSprites + $c0 dw BirdSprite + $c0 db $40 / $10 ; $40 bytes db BANK(BirdSprite) - dw $8100 + dw vSprites + $100 dw SeelSprite db $40 / $10 ; $40 bytes db BANK(SeelSprite) - dw $8140 + dw vSprites + $140 dw MonPartySprites + $40 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8180 + dw vSprites + $180 dw MonPartySprites + $50 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $81A0 + dw vSprites + $1a0 dw MonPartySprites + $60 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $81C0 + dw vSprites + $1c0 dw MonPartySprites + $70 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $81E0 + dw vSprites + $1e0 dw MonPartySprites + $80 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8200 + dw vSprites + $200 dw MonPartySprites + $90 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8220 + dw vSprites + $220 dw MonPartySprites + $A0 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8240 + dw vSprites + $240 dw MonPartySprites + $B0 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8260 + dw vSprites + $260 dw MonPartySprites + $100 db $40 / $10 ; $40 bytes db BANK(MonPartySprites) - dw $8380 + dw vSprites + $380 dw SlowbroSprite db $40 / $10 ; $40 bytes db BANK(SlowbroSprite) - dw $8400 + dw vSprites + $400 dw BallSprite db $80 / $10 ; $80 bytes db BANK(BallSprite) - dw $8440 + dw vSprites + $440 dw ClefairySprite db $40 / $10 ; $40 bytes db BANK(ClefairySprite) - dw $84C0 + dw vSprites + $4c0 dw BirdSprite db $40 / $10 ; $40 bytes db BANK(BirdSprite) - dw $8500 + dw vSprites + $500 dw SeelSprite + $C0 db $40 / $10 ; $40 bytes db BANK(SeelSprite) - dw $8540 + dw vSprites + $540 dw MonPartySprites db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8580 + dw vSprites + $580 dw MonPartySprites + $10 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $85A0 + dw vSprites + $5a0 dw MonPartySprites + $20 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $85C0 + dw vSprites + $5c0 dw MonPartySprites + $30 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $85E0 + dw vSprites + $5E0 dw MonPartySprites + $C0 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8600 + dw vSprites + $600 dw MonPartySprites + $D0 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8620 + dw vSprites + $620 dw MonPartySprites + $E0 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8640 + dw vSprites + $640 dw MonPartySprites + $F0 db $10 / $10 ; $10 bytes db BANK(MonPartySprites) - dw $8660 + dw vSprites + $660 dw MonPartySprites + $140 db $40 / $10 ; $40 bytes db BANK(MonPartySprites) - dw $8780 + dw vSprites + $780 Func_71868: ; 71868 (1c:5868) push hl @@ -323,11 +323,11 @@ Func_71890: ; 71890 (1c:5890) ld a, [wcf91] call GetPartyMonSpriteID push af - ld hl, $8000 + ld hl, vSprites call Func_718ac pop af add $54 - ld hl, $8040 + ld hl, vSprites + $40 call Func_718ac xor a ld [wcd5d], a diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 60883c54..03c41e12 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -117,7 +117,7 @@ Func_61bc: ; 61bc (1:61bc) ld c,4 call DelayFrames ld de,RedSprite ; $4180 - ld hl,$8000 + ld hl,vSprites ld bc,(BANK(RedSprite) << 8) | $0C call CopyVideoData ld de,ShrinkPic1 @@ -219,9 +219,9 @@ IntroPredef3B: ; 62a4 (1:62a4) call UncompressSpriteFromDE ld hl,S_SPRITEBUFFER1 ld de,$A000 - ld bc,$0310 + ld bc,$310 call CopyData - ld de,$9000 + ld de,vFrontPic call InterlaceMergeSpriteBuffers pop bc ld a,c diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 78945c59..922d01e7 100755 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -80,22 +80,22 @@ AnimateCutTree: ; eff7 (3:6ff7) cp $52 jr z, .asm_f020 ld de, Overworld_GFX + $2d0 ; $42d0 ; cuttable tree sprite top row - ld hl, $8fc0 + ld hl, vChars1 + $7c0 ld bc, (BANK(Overworld_GFX) << 8) + $02 call CopyVideoData ld de, Overworld_GFX + $3d0 ; $43d0 ; cuttable tree sprite bottom row - ld hl, $8fe0 + ld hl, vChars1 + $7e0 ld bc, (BANK(Overworld_GFX) << 8) + $02 call CopyVideoData jr asm_f055 .asm_f020 - ld hl, $8fc0 + ld hl, vChars1 + $7c0 call LoadCutTreeOAM - ld hl, $8fd0 + ld hl, vChars1 + $7d0 call LoadCutTreeOAM - ld hl, $8fe0 + ld hl, vChars1 + $7e0 call LoadCutTreeOAM - ld hl, $8ff0 + ld hl, vChars1 + $7f0 call LoadCutTreeOAM call asm_f055 ld hl, wOAMBuffer + $93 diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 12cae862..27214240 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -8,7 +8,7 @@ PrintEmotionBubble: ; 17c47 (5:7c47) ld e, [hl] inc hl ld d, [hl] - ld hl, $8f80 + ld hl, vChars1 + $780 ld bc, (BANK(EmotionBubblesPointerTable) << 8) + $04 call CopyVideoData ld a, [wcfcb] diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 1dcb5054..f9636fcb 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -1,6 +1,6 @@ AnimateHealingMachine: ; 70433 (1c:4433) ld de, PokeCenterFlashingMonitorAndHealBall ; $44b7 - ld hl, $87c0 + ld hl, vChars0 + $7c0 ld bc, (BANK(PokeCenterFlashingMonitorAndHealBall) << 8) + $03 call CopyVideoData ld hl, wcfcb diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index a94f79f6..1da91880 100755 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -69,7 +69,7 @@ LedgeTiles: ; 1a6cf (6:66cf) db $FF LoadHoppingShadowOAM: ; 1a6f0 (6:66f0) - ld hl, $8ff0 + ld hl, vChars1 + $7f0 ld de, LedgeHoppingShadow ; $6708 ld bc, (BANK(LedgeHoppingShadow) << 8) + $01 call CopyVideoDataDouble diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 297c45b8..81443c9f 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -126,7 +126,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) push af push de push bc - ld hl,$8000 ; VRAM base address + ld hl,vNPCSprites ; VRAM base address ld bc,$c0 ; number of bytes per VRAM slot ld a,[$ff8d] cp a,11 ; is it a 4-tile sprite? @@ -141,12 +141,12 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871) jr nz,.calculateVRAMAddrLoop jr .loadStillTilePattern .fourTileSpriteVRAMAddr - ld hl,$87c0 ; address for second 4-tile sprite + ld hl,vSprites + $7c0 ; address for second 4-tile sprite ld a,[$ff8e] ; 4-tile sprite counter and a ; is it the first 4-tile sprite? jr nz,.loadStillTilePattern ; if it's the first 4-tile sprite - ld hl,$8780 ; address for first 4-tile sprite + ld hl,vSprites + $780 ; address for first 4-tile sprite inc a ld [$ff8e],a ; 4-tile sprite counter .loadStillTilePattern diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 0b654369..45051531 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -45,7 +45,7 @@ Func_70510: ; 70510 (1c:4510) .asm_70568 pop hl ld de, BirdSprite ; $4d80 - ld hl, $8000 + ld hl, vNPCSprites ld bc, (BANK(BirdSprite) << 8) + $0c call CopyVideoData call Func_706d7 @@ -244,11 +244,11 @@ Func_706ae: ; 706ae (1c:46ae) Func_706d7: ; 706d7 (1c:46d7) ld de, BirdSprite ; $4d80 - ld hl, $8000 + ld hl, vNPCSprites ld bc, (BANK(BirdSprite) << 8) + $0c call CopyVideoData ld de, BirdSprite + $c0 ; $4e40 ; moving amination sprite - ld hl, $8800 + ld hl, vNPCSprites2 ld bc, (BANK(BirdSprite) << 8) + $0c jp CopyVideoData @@ -379,7 +379,7 @@ Func_707b6: ; 707b6 (1c:47b6) ld hl, wd736 set 6, [hl] ld de, RedSprite ; $4180 - ld hl, $8000 + ld hl, vNPCSprites ld bc, (BANK(RedSprite) << 8) + $0c call CopyVideoData ld a, $4 @@ -468,20 +468,20 @@ FishingRodGfxProperties: ; 70856 (1c:4856) RedFishingTiles: ; 70866 (1c:4866) dw RedFishingTilesFront - db $02, $1E - dw $8020 + db 2, BANK(RedFishingTilesFront) + dw vNPCSprites + $20 dw RedFishingTilesBack - db $02, $1E - dw $8060 + db 2, BANK(RedFishingTilesBack) + dw vNPCSprites + $60 dw RedFishingTilesSide - db $02, $1E - dw $80A0 + db 2, BANK(RedFishingTilesSide) + dw vNPCSprites + $a0 dw RedFishingRodTiles - db $03, $1E - dw $8FD0 + db 3, BANK(RedFishingRodTiles) + dw vNPCSprites2 + $7d0 _HandleMidJump: ; 7087e (1c:487e) ld a, [wd714] diff --git a/engine/overworld/ssanne.asm b/engine/overworld/ssanne.asm index 03114bca..8fd8f99a 100755 --- a/engine/overworld/ssanne.asm +++ b/engine/overworld/ssanne.asm @@ -65,7 +65,7 @@ PointerTable_79fb0: ; 79fb0 (1e:5fb0) dw Func_79337 LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0) - ld hl, $8fc0 + ld hl, vChars1 + $7c0 ld c, $4 .loop push bc diff --git a/engine/palettes.asm b/engine/palettes.asm index b1692415..0a2db277 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -503,7 +503,7 @@ Func_7210b: ; 7210b (1c:610b) call DisableLCD ld a, $e4 ld [rBGP], a ; $ff47 - ld de, $8800 + ld de, vChars1 ld a, [wcf2d] and a jr z, .asm_72122 @@ -513,7 +513,7 @@ Func_7210b: ; 7210b (1c:610b) ld bc, $1000 call CopyData .asm_72128 - ld hl, $9800 + ld hl, vBGMap0 ld de, $c ld a, $80 ld c, $d diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index ec94dd28..68a15a18 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -824,18 +824,18 @@ SlotMachine_37882: ; 37882 (d:7882) LoadSlotMachineTiles: ; 378a8 (d:78a8) call DisableLCD ld hl, SlotMachineTiles2 - ld de, $8000 - ld bc, $01c0 + ld de, vChars0 + ld bc, $1c0 ld a, BANK(SlotMachineTiles2) call FarCopyData2 ld hl, SlotMachineTiles1 - ld de, $9000 - ld bc, $0250 + ld de, vChars2 + ld bc, $250 ld a, BANK(SlotMachineTiles1) call FarCopyData2 ld hl, SlotMachineTiles2 - ld de, $9250 - ld bc, $01c0 + ld de, vChars2 + $250 + ld bc, $1c0 ld a, BANK(SlotMachineTiles2) call FarCopyData2 ld hl, SlotMachineMap diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index 2d9b27a8..10081d63 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -36,33 +36,33 @@ LoadTitlescreenGraphics: ; 42dd (1:42dd) call DisableLCD call LoadFontTilePatterns ld hl, NintendoCopyrightLogoGraphics ; $60c8 - ld de, $9410 + ld de, vTitleLogo2 + $100 ld bc, $50 ld a, BANK(NintendoCopyrightLogoGraphics) call FarCopyData2 ld hl, GamefreakLogoGraphics ; $61f8 - ld de, $9460 + ld de, vTitleLogo2 + $100 + $50 ld bc, $90 ld a, BANK(GamefreakLogoGraphics) call FarCopyData2 ld hl, PokemonLogoGraphics ; $5380 - ld de, $8800 + ld de, vTitleLogo ld bc, $600 ld a, BANK(PokemonLogoGraphics) call FarCopyData2 ; first chunk ld hl, PokemonLogoGraphics+$600 ; $5980 - ld de, $9310 + ld de, vTitleLogo2 ld bc, $100 ld a, BANK(PokemonLogoGraphics) call FarCopyData2 ; second chunk ld hl, Version_GFX ; $402f IF _RED - ld de,$9600 ; where to put redgreenversion.2bpp in the VRAM - ld bc,$50 ; how big that file is + ld de,vChars2 + $600 + ld bc,$50 ENDC IF _BLUE - ld de,$9610 ; where to put blueversion.2bpp in the VRAM - ld bc,$40 ; how big that file is + ld de,vChars2 + $600 + $10 + ld bc,$50 - $10 ENDC ld a, BANK(Version_GFX) @@ -302,7 +302,7 @@ Func_44cf: ; 44cf (1:44cf) Func_44dd: ; 44dd (1:44dd) ld hl, PlayerCharacterTitleGraphics ; $66a8 - ld de, $8000 + ld de, vSprites ld bc, $230 ld a, BANK(PlayerCharacterTitleGraphics) call FarCopyData2 @@ -338,7 +338,7 @@ Func_44dd: ; 44dd (1:44dd) ret Func_4519: ; 4519 (1:4519) - ld hl, $9800 + ld hl, vBGMap0 ld bc, $800 ld a, $7f jp FillMemory @@ -363,7 +363,7 @@ LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538) LoadCopyrightTiles: ; 4541 (1:4541) ld de, NintendoCopyrightLogoGraphics ; $60c8 - ld hl, $9600 + ld hl, vChars2 + $600 ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c call CopyVideoData FuncCoord 2, 7 diff --git a/engine/town_map.asm b/engine/town_map.asm index 3be90604..ea2d3171 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -19,7 +19,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e) ld de, wTileMapBackup ld bc, $10 call CopyData - ld hl, $8040 + ld hl, vSprites + $40 ld de, TownMapCursor ; $4f40 ld bc, (BANK(TownMapCursor) << 8) + $04 call CopyVideoDataDouble @@ -143,11 +143,11 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) call LoadPlayerSpriteGraphics call LoadFontTilePatterns ld de, BirdSprite ; $4d80 - ld hl, $8040 + ld hl, vSprites + $40 ld bc, (BANK(BirdSprite) << 8) + $0c call CopyVideoData ld de, TownMapUpArrow ; $5093 - ld hl, $8ed0 + ld hl, vChars1 + $6d0 ld bc, (BANK(TownMapUpArrow) << 8) + $01 call CopyVideoDataDouble call Func_71070 @@ -294,12 +294,12 @@ LoadTownMap: ; 7109b (1c:509b) call TextBoxBorder call DisableLCD ld hl, WorldMapTileGraphics ; $65a8 - ld de, $9600 + ld de, vChars2 + $600 ld bc, $100 ld a, BANK(WorldMapTileGraphics) call FarCopyData2 ld hl, MonNestIcon ; $56be - ld de, $8040 + ld de, vSprites + $40 ld bc, $8 ld a, BANK(MonNestIcon) call FarCopyDataDouble diff --git a/engine/trade.asm b/engine/trade.asm index 86cf2bca..41f50bde 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -104,16 +104,16 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1) call Func_41196 call DisableLCD ld hl, TradingAnimationGraphics ; $69be - ld de, $9310 + ld de, vChars2 + $310 ld bc, $310 ld a, BANK(TradingAnimationGraphics) call FarCopyData2 ld hl, TradingAnimationGraphics2 ; $6cce - ld de, $87c0 + ld de, vSprites + $7c0 ld bc, $40 ld a, BANK(TradingAnimationGraphics2) call FarCopyData2 - ld hl, $9800 + ld hl, vBGMap0 ld bc, $800 ld a, $7f call FillMemory @@ -220,7 +220,7 @@ Func_41298: ; 41298 (10:5298) call CopyScreenTileBufferToVRAM ld b, $8 call GoPAL_SET - ld hl, $9c8c + ld hl, vBGMap1 + $8c call Func_414ae ld a, $a0 ld [$ffae], a @@ -340,7 +340,7 @@ Func_41376: ; 41376 (10:5376) call Func_4142d call Func_41186 call Func_4149f - ld hl, $9c8c + ld hl, vBGMap1 + $8c call Func_414ae ld b, $6 call Func_414c5 @@ -371,7 +371,7 @@ Func_413c6: ; 413c6 (10:53c6) call Func_4145c call Func_41186 call Func_4149f - ld hl, $9c94 + ld hl, vBGMap1 + $94 call Func_414ae call Func_41525 ld b, $6 @@ -492,7 +492,7 @@ Func_414ae: ; 414ae (10:54ae) call ScheduleRowRedrawHelper pop hl ld a, h - ld [$ffd2], a + ld [H_SCREENEDGEREDRAWADDR + 1], a ld a, l ld [H_SCREENEDGEREDRAWADDR], a ; $ffd1 ld a, $2 diff --git a/home.asm b/home.asm index e09ec535..b13714fe 100644 --- a/home.asm +++ b/home.asm @@ -1032,8 +1032,8 @@ LoadTilesetTilePatternData:: ; 09e8 (0:09e8) ld l,a ld a,[W_TILESETGFXPTR + 1] ld h,a - ld de,$9000 - ld bc,$0600 + ld de,vTileset + ld bc,$600 ld a,[W_TILESETBANK] jp FarCopyData2 @@ -2165,17 +2165,17 @@ RunMapScript:: ; 101b (0:101b) LoadWalkingPlayerSpriteGraphics:: ; 104d (0:104d) ld de,RedSprite ; $4180 - ld hl,$8000 + ld hl,vNPCSprites jr LoadPlayerSpriteGraphicsCommon LoadSurfingPlayerSpriteGraphics:: ; 1055 (0:1055) ld de,SeelSprite - ld hl,$8000 + ld hl,vNPCSprites jr LoadPlayerSpriteGraphicsCommon LoadBikePlayerSpriteGraphics:: ; 105d (0:105d) ld de,RedCyclingSprite - ld hl,$8000 + ld hl,vNPCSprites LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063) push de @@ -2508,17 +2508,17 @@ LoadMapData:: ; 1241 (0:1241) call LoadCurrentMapView ; copy current map view to VRAM ld hl,wTileMap - ld de,$9800 - ld b,$12 + ld de,vBGMap0 + ld b,18 .vramCopyLoop - ld c,$14 + ld c,20 .vramCopyInnerLoop ld a,[hli] ld [de],a inc e dec c jr nz,.vramCopyInnerLoop - ld a,$0c + ld a,32 - 20 add e ld e,a jr nc,.noCarry @@ -2749,7 +2749,7 @@ LoadFrontSpriteByMonIndex:: ; 1389 (0:1389) ret .validDexNumber push hl - ld de, $9000 + ld de, vFrontPic call LoadMonFrontSprite pop hl ld a, [H_LOADEDROMBANK] @@ -4795,7 +4795,7 @@ UpdateMovingBgTiles:: cp 21 jr z, .flower - ld hl, $9140 + ld hl, vTileset + $14 * $10 ld c, $10 ld a, [wd085] @@ -4839,7 +4839,7 @@ UpdateMovingBgTiles:: jr z, .copy ld hl, FlowerTile3 .copy - ld de, $9030 + ld de, vTileset + $3 * $10 ld c, $10 .loop ld a, [hli] @@ -4938,9 +4938,9 @@ rLCDC_DEFAULT EQU %11100011 ld a, $ff ld [$ffaa], a - ld h, $9800 / $100 ; bg map 0 + ld h, vBGMap0 / $100 call ClearBgMap - ld h, $9c00 / $100 ; bg map 1 + ld h, vBGMap1 / $100 call ClearBgMap ld a, rLCDC_DEFAULT @@ -8471,13 +8471,13 @@ LoadFontTilePatterns:: ; 3680 (0:3680) jr nz,.lcdEnabled .lcdDisabled ld hl,FontGraphics - ld de,$8800 + ld de,vFont ld bc,$400 ld a,BANK(FontGraphics) jp FarCopyDataDouble ; if LCD is off, transfer all at once .lcdEnabled ld de,FontGraphics - ld hl,$8800 + ld hl,vFont ld bc,(BANK(FontGraphics) << 8 | $80) jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank @@ -8488,13 +8488,13 @@ LoadTextBoxTilePatterns:: ; 36a0 (0:36a0) jr nz,.lcdEnabled .lcdDisabled ld hl,TextBoxGraphics - ld de,$9600 - ld bc,$0200 + ld de,vChars2 + $600 + ld bc,$200 ld a,BANK(TextBoxGraphics) jp FarCopyData2 ; if LCD is off, transfer all at once .lcdEnabled ld de,TextBoxGraphics - ld hl,$9600 + ld hl,vChars2 + $600 ld bc,(BANK(TextBoxGraphics) << 8 | $20) jp CopyVideoData ; if LCD is on, transfer during V-blank @@ -8505,13 +8505,13 @@ LoadHpBarAndStatusTilePatterns:: ; 36c0 (0:36c0) jr nz,.lcdEnabled .lcdDisabled ld hl,HpBarAndStatusGraphics - ld de,$9620 - ld bc,$01e0 + ld de,vChars2 + $620 + ld bc,$1e0 ld a,BANK(HpBarAndStatusGraphics) jp FarCopyData2 ; if LCD is off, transfer all at once .lcdEnabled ld de,HpBarAndStatusGraphics - ld hl,$9620 + ld hl,vChars2 + $620 ld bc,(BANK(HpBarAndStatusGraphics) << 8 | $1e) jp CopyVideoData ; if LCD is on, transfer during V-blank diff --git a/main.asm b/main.asm index db19a022..f928ec70 100755 --- a/main.asm +++ b/main.asm @@ -500,7 +500,7 @@ INCLUDE "engine/cable_club.asm" LoadTrainerInfoTextBoxTiles: ; 5ae6 (1:5ae6) ld de, TrainerInfoTextBoxTileGraphics ; $7b98 - ld hl, $9760 + ld hl, vChars2 + $760 ld bc, (BANK(TrainerInfoTextBoxTileGraphics) << 8) +$09 jp CopyVideoData diff --git a/scripts/rockethideout2.asm b/scripts/rockethideout2.asm index a476f060..aa8d31a4 100755 --- a/scripts/rockethideout2.asm +++ b/scripts/rockethideout2.asm @@ -329,9 +329,9 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7) ld [wSpriteStateData1 + 2], a ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET cp FACILITY - ld hl, SpinnerArrowTilePointers1 ; $5023 + ld hl, FacilitySpinnerArrows ; $5023 jr z, .asm_44ff6 - ld hl, SpinnerArrowTilePointers2 ; $5053 + ld hl, GymSpinnerArrows ; $5053 .asm_44ff6 ld a, [wcd38] bit 0, a @@ -368,87 +368,41 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7) jr nz, .asm_45006 ret -SpinnerArrowTilePointers1: ; 45023 (11:5023) - dw SpinnerArrowAnimTiles ;address from within tileset graphics - db 1 ;number of tiles to copy? - db BANK(SpinnerArrowAnimTiles) ;bank of tileset graphics - dw $9200 ;where to load in VRAM - - dw SpinnerArrowAnimTiles + $10 - db 1 - db BANK(SpinnerArrowAnimTiles) - dw $9210 - - dw SpinnerArrowAnimTiles + $20 - db 1 - db BANK(SpinnerArrowAnimTiles) - dw $9300 - - dw SpinnerArrowAnimTiles + $30 - db 1 - db BANK(SpinnerArrowAnimTiles) - dw $9310 - - dw Facility_GFX + $200 - db 1 - db BANK(Facility_GFX) - dw $9200 - - dw Facility_GFX + $210 - db 1 - db BANK(Facility_GFX) - dw $9210 - - dw Facility_GFX + $300 - db 1 - db BANK(Facility_GFX) - dw $9300 - - dw Facility_GFX + $310 - db 1 - db BANK(Facility_GFX) - dw $9310 - -SpinnerArrowTilePointers2: ; 45053 (11:5053) - dw SpinnerArrowAnimTiles + $10 - db 1 - db BANK(SpinnerArrowAnimTiles) - dw $93C0 - - dw SpinnerArrowAnimTiles + $30 - db 1 - db BANK(SpinnerArrowAnimTiles) - dw $93D0 - - dw SpinnerArrowAnimTiles - db 1 - db BANK(SpinnerArrowAnimTiles) - dw $94C0 - - dw SpinnerArrowAnimTiles + $20 - db 1 - db BANK(SpinnerArrowAnimTiles) - dw $94D0 - - dw Gym_GFX + $3C0 - db 1 - db BANK(Facility_GFX) - dw $93C0 - - dw Gym_GFX + $3D0 - db 1 - db BANK(Facility_GFX) - dw $93D0 - - dw Gym_GFX + $4C0 - db 1 - db BANK(Facility_GFX) - dw $94C0 - - dw Gym_GFX + $4D0 - db 1 - db BANK(Facility_GFX) - dw $94D0 +spinner: MACRO +; \1: source +; \2: offset (BANK() chokes on literals) +; \3: length +; \4: dest + dw \1 + \2 + db \3, BANK(\1) + dw \4 +ENDM + +FacilitySpinnerArrows: +FACILITY_SPINNER EQU $20 * $10 +vFacilitySpinner EQU vTileset + FACILITY_SPINNER + + spinner SpinnerArrowAnimTiles, $00, 1, vFacilitySpinner + spinner SpinnerArrowAnimTiles, $10, 1, vFacilitySpinner + $10 + spinner SpinnerArrowAnimTiles, $20, 1, vFacilitySpinner + $100 + spinner SpinnerArrowAnimTiles, $30, 1, vFacilitySpinner + $110 + spinner Facility_GFX, FACILITY_SPINNER + $000, 1, vFacilitySpinner + spinner Facility_GFX, FACILITY_SPINNER + $010, 1, vFacilitySpinner + $10 + spinner Facility_GFX, FACILITY_SPINNER + $100, 1, vFacilitySpinner + $100 + spinner Facility_GFX, FACILITY_SPINNER + $110, 1, vFacilitySpinner + $110 + +GymSpinnerArrows: +GYM_SPINNER EQU $3c * $10 +vGymSpinner EQU vTileset + GYM_SPINNER + + spinner SpinnerArrowAnimTiles, $10, 1, vGymSpinner + spinner SpinnerArrowAnimTiles, $30, 1, vGymSpinner + $10 + spinner SpinnerArrowAnimTiles, $00, 1, vGymSpinner + $100 + spinner SpinnerArrowAnimTiles, $20, 1, vGymSpinner + $110 + spinner Gym_GFX, GYM_SPINNER + $000, 1, vGymSpinner + spinner Gym_GFX, GYM_SPINNER + $010, 1, vGymSpinner + $10 + spinner Gym_GFX, GYM_SPINNER + $100, 1, vGymSpinner + $100 + spinner Gym_GFX, GYM_SPINNER + $110, 1, vGymSpinner + $110 SpinnerPlayerFacingDirections: ; 45083 (11:5083) ; This isn't the order of the facing directions. Rather, it's a list of diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm index b094878c..215bf467 100755 --- a/scripts/vermiliondock.asm +++ b/scripts/vermiliondock.asm @@ -184,7 +184,7 @@ VermilionDock_1dc94: ; 1dc94 (7:5c94) ld bc, $00b4 ld a, $14 call FillMemory - ld hl, $9940 + ld hl, vBGMap0 + 10 * 32 ld de, wcc5b ld bc, $000c call CopyVideoData -- cgit v1.3.1-sl0p From 188ac8a9b4816dd98df0108314e58885c3b07452 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 30 May 2014 01:30:10 -0700 Subject: Remove redundant dimensions in image filenames. --- data/sgb_border.asm | 4 +-- engine/HoF_room_pc.asm | 2 +- engine/intro.asm | 2 +- engine/overworld/emotion_bubbles.asm | 2 +- gfx/badges.png | Bin 0 -> 924 bytes gfx/badges.w16.png | Bin 924 -> 0 bytes gfx/blue/blueversion.h8.png | Bin 136 -> 0 bytes gfx/blue/blueversion.png | Bin 0 -> 136 bytes gfx/blue/sgbborder.png | Bin 0 -> 1117 bytes gfx/blue/sgbborder.w128.png | Bin 1117 -> 0 bytes gfx/copyright.h8.png | Bin 220 -> 0 bytes gfx/copyright.png | Bin 0 -> 220 bytes gfx/emotion_bubbles.png | Bin 0 -> 149 bytes gfx/emotion_bubbles.w16.png | Bin 149 -> 0 bytes gfx/font.png | Bin 0 -> 719 bytes gfx/font.w128.png | Bin 719 -> 0 bytes gfx/gamefreak.h8.png | Bin 147 -> 0 bytes gfx/gamefreak.png | Bin 0 -> 147 bytes gfx/gamefreak_intro.h8.png | Bin 297 -> 0 bytes gfx/gamefreak_intro.png | Bin 0 -> 297 bytes gfx/hp_bar_and_status.w80.png | Bin 257 -> 0 bytes gfx/pokemon_logo.png | Bin 0 -> 926 bytes gfx/pokemon_logo.w128.png | Bin 926 -> 0 bytes gfx/red/redgreenversion.h8.png | Bin 145 -> 0 bytes gfx/red/redgreenversion.png | Bin 0 -> 145 bytes gfx/red/sgbborder.png | Bin 0 -> 1048 bytes gfx/red/sgbborder.w128.png | Bin 1048 -> 0 bytes gfx/theend.interleave.png | Bin 0 -> 139 bytes gfx/theend.w40.interleave.png | Bin 139 -> 0 bytes gfx/tilesets/cavern.t14.png | Bin 0 -> 1022 bytes gfx/tilesets/cavern.w128.t14.png | Bin 1022 -> 0 bytes gfx/tilesets/cemetery.t4.png | Bin 0 -> 928 bytes gfx/tilesets/cemetery.w128.t4.png | Bin 928 -> 0 bytes gfx/tilesets/club.t5.png | Bin 0 -> 899 bytes gfx/tilesets/club.w128.t5.png | Bin 899 -> 0 bytes gfx/tilesets/facility.png | Bin 0 -> 1081 bytes gfx/tilesets/facility.w128.png | Bin 1081 -> 0 bytes gfx/tilesets/forest.png | Bin 0 -> 1414 bytes gfx/tilesets/forest.w128.png | Bin 1414 -> 0 bytes gfx/tilesets/gate.t1.png | Bin 0 -> 1119 bytes gfx/tilesets/gate.w128.t1.png | Bin 1119 -> 0 bytes gfx/tilesets/gym.png | Bin 0 -> 1157 bytes gfx/tilesets/gym.w128.png | Bin 1157 -> 0 bytes gfx/tilesets/house.t2.png | Bin 0 -> 1163 bytes gfx/tilesets/house.w128.t2.png | Bin 1163 -> 0 bytes gfx/tilesets/interior.t1.png | Bin 0 -> 1141 bytes gfx/tilesets/interior.w128.t1.png | Bin 1141 -> 0 bytes gfx/tilesets/lab.t4.png | Bin 0 -> 1051 bytes gfx/tilesets/lab.w128.t4.png | Bin 1051 -> 0 bytes gfx/tilesets/lobby.t2.png | Bin 0 -> 966 bytes gfx/tilesets/lobby.w128.t2.png | Bin 966 -> 0 bytes gfx/tilesets/mansion.t2.png | Bin 0 -> 960 bytes gfx/tilesets/mansion.w128.t2.png | Bin 960 -> 0 bytes gfx/tilesets/overworld.t2.png | Bin 0 -> 1309 bytes gfx/tilesets/overworld.w128.t2.png | Bin 1309 -> 0 bytes gfx/tilesets/plateau.t10.png | Bin 0 -> 1011 bytes gfx/tilesets/plateau.w128.t10.png | Bin 1011 -> 0 bytes gfx/tilesets/pokecenter.png | Bin 0 -> 1200 bytes gfx/tilesets/pokecenter.w128.png | Bin 1200 -> 0 bytes gfx/tilesets/reds_house.t7.png | Bin 0 -> 845 bytes gfx/tilesets/reds_house.w128.t7.png | Bin 845 -> 0 bytes gfx/tilesets/ship.t6.png | Bin 0 -> 865 bytes gfx/tilesets/ship.w128.t6.png | Bin 865 -> 0 bytes gfx/tilesets/ship_port.t2.png | Bin 0 -> 1125 bytes gfx/tilesets/ship_port.w128.t2.png | Bin 1125 -> 0 bytes gfx/tilesets/underground.t7.png | Bin 0 -> 272 bytes gfx/tilesets/underground.w128.t7.png | Bin 272 -> 0 bytes main.asm | 52 +++++++++++++++++------------------ 68 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 gfx/badges.png delete mode 100644 gfx/badges.w16.png delete mode 100644 gfx/blue/blueversion.h8.png create mode 100644 gfx/blue/blueversion.png create mode 100644 gfx/blue/sgbborder.png delete mode 100644 gfx/blue/sgbborder.w128.png delete mode 100644 gfx/copyright.h8.png create mode 100644 gfx/copyright.png create mode 100644 gfx/emotion_bubbles.png delete mode 100644 gfx/emotion_bubbles.w16.png create mode 100644 gfx/font.png delete mode 100644 gfx/font.w128.png delete mode 100644 gfx/gamefreak.h8.png create mode 100644 gfx/gamefreak.png delete mode 100644 gfx/gamefreak_intro.h8.png create mode 100644 gfx/gamefreak_intro.png delete mode 100644 gfx/hp_bar_and_status.w80.png create mode 100644 gfx/pokemon_logo.png delete mode 100644 gfx/pokemon_logo.w128.png delete mode 100644 gfx/red/redgreenversion.h8.png create mode 100644 gfx/red/redgreenversion.png create mode 100644 gfx/red/sgbborder.png delete mode 100644 gfx/red/sgbborder.w128.png create mode 100644 gfx/theend.interleave.png delete mode 100644 gfx/theend.w40.interleave.png create mode 100644 gfx/tilesets/cavern.t14.png delete mode 100644 gfx/tilesets/cavern.w128.t14.png create mode 100644 gfx/tilesets/cemetery.t4.png delete mode 100644 gfx/tilesets/cemetery.w128.t4.png create mode 100644 gfx/tilesets/club.t5.png delete mode 100644 gfx/tilesets/club.w128.t5.png create mode 100644 gfx/tilesets/facility.png delete mode 100644 gfx/tilesets/facility.w128.png create mode 100644 gfx/tilesets/forest.png delete mode 100644 gfx/tilesets/forest.w128.png create mode 100644 gfx/tilesets/gate.t1.png delete mode 100644 gfx/tilesets/gate.w128.t1.png create mode 100644 gfx/tilesets/gym.png delete mode 100644 gfx/tilesets/gym.w128.png create mode 100644 gfx/tilesets/house.t2.png delete mode 100644 gfx/tilesets/house.w128.t2.png create mode 100644 gfx/tilesets/interior.t1.png delete mode 100644 gfx/tilesets/interior.w128.t1.png create mode 100644 gfx/tilesets/lab.t4.png delete mode 100644 gfx/tilesets/lab.w128.t4.png create mode 100644 gfx/tilesets/lobby.t2.png delete mode 100644 gfx/tilesets/lobby.w128.t2.png create mode 100644 gfx/tilesets/mansion.t2.png delete mode 100644 gfx/tilesets/mansion.w128.t2.png create mode 100644 gfx/tilesets/overworld.t2.png delete mode 100644 gfx/tilesets/overworld.w128.t2.png create mode 100644 gfx/tilesets/plateau.t10.png delete mode 100644 gfx/tilesets/plateau.w128.t10.png create mode 100644 gfx/tilesets/pokecenter.png delete mode 100644 gfx/tilesets/pokecenter.w128.png create mode 100644 gfx/tilesets/reds_house.t7.png delete mode 100644 gfx/tilesets/reds_house.w128.t7.png create mode 100644 gfx/tilesets/ship.t6.png delete mode 100644 gfx/tilesets/ship.w128.t6.png create mode 100644 gfx/tilesets/ship_port.t2.png delete mode 100644 gfx/tilesets/ship_port.w128.t2.png create mode 100644 gfx/tilesets/underground.t7.png delete mode 100644 gfx/tilesets/underground.w128.t7.png (limited to 'engine/HoF_room_pc.asm') diff --git a/data/sgb_border.asm b/data/sgb_border.asm index 716a991e..5a0bbb2d 100755 --- a/data/sgb_border.asm +++ b/data/sgb_border.asm @@ -55,8 +55,8 @@ ENDC SGBBorderGraphics: ; 72fe8 (1c:6fe8) IF _RED - INCBIN "gfx/red/sgbborder.w128.2bpp" + INCBIN "gfx/red/sgbborder.2bpp" ENDC IF _BLUE - INCBIN "gfx/blue/sgbborder.w128.2bpp" + INCBIN "gfx/blue/sgbborder.2bpp" ENDC diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index 82e769f5..5af7484c 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -260,4 +260,4 @@ INCLUDE "data/credits_order.asm" INCLUDE "text/credits_text.asm" TheEndGfx: ; 7473e (1d:473e) ; 473E (473F on blue) - INCBIN "gfx/theend.w40.interleave.2bpp" + INCBIN "gfx/theend.interleave.2bpp" diff --git a/engine/intro.asm b/engine/intro.asm index c20e5e3f..8e344e48 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -425,7 +425,7 @@ IntroNidorinoAnimation7: ; 41950 (10:5950) db $50 ; list terminator GameFreakIntro: ; 41959 (10:5959) - INCBIN "gfx/gamefreak_intro.h8.2bpp" + INCBIN "gfx/gamefreak_intro.2bpp" INCBIN "gfx/gamefreak_logo.2bpp" ds $10 ; blank tile diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 27214240..a8d863df 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -65,4 +65,4 @@ EmotionBubblesOAM: ; 17cb5 (5:7cb5) db $FA,$00,$FB,$00 EmotionBubbles: ; 17cbd (5:7cbd) - INCBIN "gfx/emotion_bubbles.w16.2bpp" + INCBIN "gfx/emotion_bubbles.2bpp" diff --git a/gfx/badges.png b/gfx/badges.png new file mode 100644 index 00000000..8b0fc516 Binary files /dev/null and b/gfx/badges.png differ diff --git a/gfx/badges.w16.png b/gfx/badges.w16.png deleted file mode 100644 index 8b0fc516..00000000 Binary files a/gfx/badges.w16.png and /dev/null differ diff --git a/gfx/blue/blueversion.h8.png b/gfx/blue/blueversion.h8.png deleted file mode 100644 index dd7e2b6f..00000000 Binary files a/gfx/blue/blueversion.h8.png and /dev/null differ diff --git a/gfx/blue/blueversion.png b/gfx/blue/blueversion.png new file mode 100644 index 00000000..dd7e2b6f Binary files /dev/null and b/gfx/blue/blueversion.png differ diff --git a/gfx/blue/sgbborder.png b/gfx/blue/sgbborder.png new file mode 100644 index 00000000..098df2b6 Binary files /dev/null and b/gfx/blue/sgbborder.png differ diff --git a/gfx/blue/sgbborder.w128.png b/gfx/blue/sgbborder.w128.png deleted file mode 100644 index 098df2b6..00000000 Binary files a/gfx/blue/sgbborder.w128.png and /dev/null differ diff --git a/gfx/copyright.h8.png b/gfx/copyright.h8.png deleted file mode 100644 index 49174349..00000000 Binary files a/gfx/copyright.h8.png and /dev/null differ diff --git a/gfx/copyright.png b/gfx/copyright.png new file mode 100644 index 00000000..49174349 Binary files /dev/null and b/gfx/copyright.png differ diff --git a/gfx/emotion_bubbles.png b/gfx/emotion_bubbles.png new file mode 100644 index 00000000..31deacf4 Binary files /dev/null and b/gfx/emotion_bubbles.png differ diff --git a/gfx/emotion_bubbles.w16.png b/gfx/emotion_bubbles.w16.png deleted file mode 100644 index 31deacf4..00000000 Binary files a/gfx/emotion_bubbles.w16.png and /dev/null differ diff --git a/gfx/font.png b/gfx/font.png new file mode 100644 index 00000000..d5548c09 Binary files /dev/null and b/gfx/font.png differ diff --git a/gfx/font.w128.png b/gfx/font.w128.png deleted file mode 100644 index d5548c09..00000000 Binary files a/gfx/font.w128.png and /dev/null differ diff --git a/gfx/gamefreak.h8.png b/gfx/gamefreak.h8.png deleted file mode 100644 index 509232bd..00000000 Binary files a/gfx/gamefreak.h8.png and /dev/null differ diff --git a/gfx/gamefreak.png b/gfx/gamefreak.png new file mode 100644 index 00000000..509232bd Binary files /dev/null and b/gfx/gamefreak.png differ diff --git a/gfx/gamefreak_intro.h8.png b/gfx/gamefreak_intro.h8.png deleted file mode 100644 index 0fa6832c..00000000 Binary files a/gfx/gamefreak_intro.h8.png and /dev/null differ diff --git a/gfx/gamefreak_intro.png b/gfx/gamefreak_intro.png new file mode 100644 index 00000000..0fa6832c Binary files /dev/null and b/gfx/gamefreak_intro.png differ diff --git a/gfx/hp_bar_and_status.w80.png b/gfx/hp_bar_and_status.w80.png deleted file mode 100644 index 79830885..00000000 Binary files a/gfx/hp_bar_and_status.w80.png and /dev/null differ diff --git a/gfx/pokemon_logo.png b/gfx/pokemon_logo.png new file mode 100644 index 00000000..cc7582c5 Binary files /dev/null and b/gfx/pokemon_logo.png differ diff --git a/gfx/pokemon_logo.w128.png b/gfx/pokemon_logo.w128.png deleted file mode 100644 index cc7582c5..00000000 Binary files a/gfx/pokemon_logo.w128.png and /dev/null differ diff --git a/gfx/red/redgreenversion.h8.png b/gfx/red/redgreenversion.h8.png deleted file mode 100644 index 8b34ec09..00000000 Binary files a/gfx/red/redgreenversion.h8.png and /dev/null differ diff --git a/gfx/red/redgreenversion.png b/gfx/red/redgreenversion.png new file mode 100644 index 00000000..8b34ec09 Binary files /dev/null and b/gfx/red/redgreenversion.png differ diff --git a/gfx/red/sgbborder.png b/gfx/red/sgbborder.png new file mode 100644 index 00000000..7549bb47 Binary files /dev/null and b/gfx/red/sgbborder.png differ diff --git a/gfx/red/sgbborder.w128.png b/gfx/red/sgbborder.w128.png deleted file mode 100644 index 7549bb47..00000000 Binary files a/gfx/red/sgbborder.w128.png and /dev/null differ diff --git a/gfx/theend.interleave.png b/gfx/theend.interleave.png new file mode 100644 index 00000000..025ebb61 Binary files /dev/null and b/gfx/theend.interleave.png differ diff --git a/gfx/theend.w40.interleave.png b/gfx/theend.w40.interleave.png deleted file mode 100644 index 025ebb61..00000000 Binary files a/gfx/theend.w40.interleave.png and /dev/null differ diff --git a/gfx/tilesets/cavern.t14.png b/gfx/tilesets/cavern.t14.png new file mode 100644 index 00000000..5397fd65 Binary files /dev/null and b/gfx/tilesets/cavern.t14.png differ diff --git a/gfx/tilesets/cavern.w128.t14.png b/gfx/tilesets/cavern.w128.t14.png deleted file mode 100644 index 5397fd65..00000000 Binary files a/gfx/tilesets/cavern.w128.t14.png and /dev/null differ diff --git a/gfx/tilesets/cemetery.t4.png b/gfx/tilesets/cemetery.t4.png new file mode 100644 index 00000000..b1df015a Binary files /dev/null and b/gfx/tilesets/cemetery.t4.png differ diff --git a/gfx/tilesets/cemetery.w128.t4.png b/gfx/tilesets/cemetery.w128.t4.png deleted file mode 100644 index b1df015a..00000000 Binary files a/gfx/tilesets/cemetery.w128.t4.png and /dev/null differ diff --git a/gfx/tilesets/club.t5.png b/gfx/tilesets/club.t5.png new file mode 100644 index 00000000..05a55879 Binary files /dev/null and b/gfx/tilesets/club.t5.png differ diff --git a/gfx/tilesets/club.w128.t5.png b/gfx/tilesets/club.w128.t5.png deleted file mode 100644 index 05a55879..00000000 Binary files a/gfx/tilesets/club.w128.t5.png and /dev/null differ diff --git a/gfx/tilesets/facility.png b/gfx/tilesets/facility.png new file mode 100644 index 00000000..3654900e Binary files /dev/null and b/gfx/tilesets/facility.png differ diff --git a/gfx/tilesets/facility.w128.png b/gfx/tilesets/facility.w128.png deleted file mode 100644 index 3654900e..00000000 Binary files a/gfx/tilesets/facility.w128.png and /dev/null differ diff --git a/gfx/tilesets/forest.png b/gfx/tilesets/forest.png new file mode 100644 index 00000000..fd534d48 Binary files /dev/null and b/gfx/tilesets/forest.png differ diff --git a/gfx/tilesets/forest.w128.png b/gfx/tilesets/forest.w128.png deleted file mode 100644 index fd534d48..00000000 Binary files a/gfx/tilesets/forest.w128.png and /dev/null differ diff --git a/gfx/tilesets/gate.t1.png b/gfx/tilesets/gate.t1.png new file mode 100644 index 00000000..372e6751 Binary files /dev/null and b/gfx/tilesets/gate.t1.png differ diff --git a/gfx/tilesets/gate.w128.t1.png b/gfx/tilesets/gate.w128.t1.png deleted file mode 100644 index 372e6751..00000000 Binary files a/gfx/tilesets/gate.w128.t1.png and /dev/null differ diff --git a/gfx/tilesets/gym.png b/gfx/tilesets/gym.png new file mode 100644 index 00000000..bffb472b Binary files /dev/null and b/gfx/tilesets/gym.png differ diff --git a/gfx/tilesets/gym.w128.png b/gfx/tilesets/gym.w128.png deleted file mode 100644 index bffb472b..00000000 Binary files a/gfx/tilesets/gym.w128.png and /dev/null differ diff --git a/gfx/tilesets/house.t2.png b/gfx/tilesets/house.t2.png new file mode 100644 index 00000000..b5d67c95 Binary files /dev/null and b/gfx/tilesets/house.t2.png differ diff --git a/gfx/tilesets/house.w128.t2.png b/gfx/tilesets/house.w128.t2.png deleted file mode 100644 index b5d67c95..00000000 Binary files a/gfx/tilesets/house.w128.t2.png and /dev/null differ diff --git a/gfx/tilesets/interior.t1.png b/gfx/tilesets/interior.t1.png new file mode 100644 index 00000000..3123d81c Binary files /dev/null and b/gfx/tilesets/interior.t1.png differ diff --git a/gfx/tilesets/interior.w128.t1.png b/gfx/tilesets/interior.w128.t1.png deleted file mode 100644 index 3123d81c..00000000 Binary files a/gfx/tilesets/interior.w128.t1.png and /dev/null differ diff --git a/gfx/tilesets/lab.t4.png b/gfx/tilesets/lab.t4.png new file mode 100644 index 00000000..4a114337 Binary files /dev/null and b/gfx/tilesets/lab.t4.png differ diff --git a/gfx/tilesets/lab.w128.t4.png b/gfx/tilesets/lab.w128.t4.png deleted file mode 100644 index 4a114337..00000000 Binary files a/gfx/tilesets/lab.w128.t4.png and /dev/null differ diff --git a/gfx/tilesets/lobby.t2.png b/gfx/tilesets/lobby.t2.png new file mode 100644 index 00000000..f2a1c180 Binary files /dev/null and b/gfx/tilesets/lobby.t2.png differ diff --git a/gfx/tilesets/lobby.w128.t2.png b/gfx/tilesets/lobby.w128.t2.png deleted file mode 100644 index f2a1c180..00000000 Binary files a/gfx/tilesets/lobby.w128.t2.png and /dev/null differ diff --git a/gfx/tilesets/mansion.t2.png b/gfx/tilesets/mansion.t2.png new file mode 100644 index 00000000..557c23b4 Binary files /dev/null and b/gfx/tilesets/mansion.t2.png differ diff --git a/gfx/tilesets/mansion.w128.t2.png b/gfx/tilesets/mansion.w128.t2.png deleted file mode 100644 index 557c23b4..00000000 Binary files a/gfx/tilesets/mansion.w128.t2.png and /dev/null differ diff --git a/gfx/tilesets/overworld.t2.png b/gfx/tilesets/overworld.t2.png new file mode 100644 index 00000000..c7533e40 Binary files /dev/null and b/gfx/tilesets/overworld.t2.png differ diff --git a/gfx/tilesets/overworld.w128.t2.png b/gfx/tilesets/overworld.w128.t2.png deleted file mode 100644 index c7533e40..00000000 Binary files a/gfx/tilesets/overworld.w128.t2.png and /dev/null differ diff --git a/gfx/tilesets/plateau.t10.png b/gfx/tilesets/plateau.t10.png new file mode 100644 index 00000000..b87162d8 Binary files /dev/null and b/gfx/tilesets/plateau.t10.png differ diff --git a/gfx/tilesets/plateau.w128.t10.png b/gfx/tilesets/plateau.w128.t10.png deleted file mode 100644 index b87162d8..00000000 Binary files a/gfx/tilesets/plateau.w128.t10.png and /dev/null differ diff --git a/gfx/tilesets/pokecenter.png b/gfx/tilesets/pokecenter.png new file mode 100644 index 00000000..ab4821d9 Binary files /dev/null and b/gfx/tilesets/pokecenter.png differ diff --git a/gfx/tilesets/pokecenter.w128.png b/gfx/tilesets/pokecenter.w128.png deleted file mode 100644 index ab4821d9..00000000 Binary files a/gfx/tilesets/pokecenter.w128.png and /dev/null differ diff --git a/gfx/tilesets/reds_house.t7.png b/gfx/tilesets/reds_house.t7.png new file mode 100644 index 00000000..5f210d04 Binary files /dev/null and b/gfx/tilesets/reds_house.t7.png differ diff --git a/gfx/tilesets/reds_house.w128.t7.png b/gfx/tilesets/reds_house.w128.t7.png deleted file mode 100644 index 5f210d04..00000000 Binary files a/gfx/tilesets/reds_house.w128.t7.png and /dev/null differ diff --git a/gfx/tilesets/ship.t6.png b/gfx/tilesets/ship.t6.png new file mode 100644 index 00000000..cf5b6b95 Binary files /dev/null and b/gfx/tilesets/ship.t6.png differ diff --git a/gfx/tilesets/ship.w128.t6.png b/gfx/tilesets/ship.w128.t6.png deleted file mode 100644 index cf5b6b95..00000000 Binary files a/gfx/tilesets/ship.w128.t6.png and /dev/null differ diff --git a/gfx/tilesets/ship_port.t2.png b/gfx/tilesets/ship_port.t2.png new file mode 100644 index 00000000..fa5bbb27 Binary files /dev/null and b/gfx/tilesets/ship_port.t2.png differ diff --git a/gfx/tilesets/ship_port.w128.t2.png b/gfx/tilesets/ship_port.w128.t2.png deleted file mode 100644 index fa5bbb27..00000000 Binary files a/gfx/tilesets/ship_port.w128.t2.png and /dev/null differ diff --git a/gfx/tilesets/underground.t7.png b/gfx/tilesets/underground.t7.png new file mode 100644 index 00000000..baa86c17 Binary files /dev/null and b/gfx/tilesets/underground.t7.png differ diff --git a/gfx/tilesets/underground.w128.t7.png b/gfx/tilesets/underground.w128.t7.png deleted file mode 100644 index baa86c17..00000000 Binary files a/gfx/tilesets/underground.w128.t7.png and /dev/null differ diff --git a/main.asm b/main.asm index f928ec70..4ba797f2 100755 --- a/main.asm +++ b/main.asm @@ -3044,7 +3044,7 @@ DrawBadges: ; ea03 (3:6a03) db $20, $28, $30, $38, $40, $48, $50, $58 GymLeaderFaceAndBadgeTileGraphics: ; ea9e (3:6a9e) - INCBIN "gfx/badges.w16.2bpp" + INCBIN "gfx/badges.2bpp" Func_ee9e: ; ee9e (3:6e9e) call GetPredefRegisters @@ -4687,15 +4687,15 @@ SnorlaxSprite: INCBIN "gfx/sprites/snorlax.2bpp" OldAmberSprite: INCBIN "gfx/sprites/old_amber.2bpp" LyingOldManSprite: INCBIN "gfx/sprites/lying_old_man.2bpp" -PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.w128.2bpp" -FontGraphics: INCBIN "gfx/font.w128.1bpp" +PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp" +FontGraphics: INCBIN "gfx/font.1bpp" ABTiles: INCBIN "gfx/AB.2bpp" HpBarAndStatusGraphics: INCBIN "gfx/hp_bar_and_status.2bpp" BattleHudTiles1: INCBIN "gfx/battle_hud1.1bpp" BattleHudTiles2: INCBIN "gfx/battle_hud2.1bpp" BattleHudTiles3: INCBIN "gfx/battle_hud3.1bpp" -NintendoCopyrightLogoGraphics: INCBIN "gfx/copyright.h8.2bpp" -GamefreakLogoGraphics: INCBIN "gfx/gamefreak.h8.2bpp" +NintendoCopyrightLogoGraphics: INCBIN "gfx/copyright.2bpp" +GamefreakLogoGraphics: INCBIN "gfx/gamefreak.2bpp" TextBoxGraphics: INCBIN "gfx/text_box.2bpp" PokedexTileGraphics: INCBIN "gfx/pokedex.2bpp" WorldMapTileGraphics: INCBIN "gfx/town_map.2bpp" @@ -6343,23 +6343,23 @@ INCLUDE "engine/hidden_object_functions18.asm" SECTION "bank19",ROMX,BANK[$19] -Overworld_GFX: INCBIN "gfx/tilesets/overworld.w128.t2.2bpp" +Overworld_GFX: INCBIN "gfx/tilesets/overworld.t2.2bpp" Overworld_Block: INCBIN "gfx/blocksets/overworld.bst" RedsHouse1_GFX: -RedsHouse2_GFX: INCBIN "gfx/tilesets/reds_house.w128.t7.2bpp" +RedsHouse2_GFX: INCBIN "gfx/tilesets/reds_house.t7.2bpp" RedsHouse1_Block: RedsHouse2_Block: INCBIN "gfx/blocksets/reds_house.bst" -House_GFX: INCBIN "gfx/tilesets/house.w128.t2.2bpp" +House_GFX: INCBIN "gfx/tilesets/house.t2.2bpp" House_Block: INCBIN "gfx/blocksets/house.bst" -Mansion_GFX: INCBIN "gfx/tilesets/mansion.w128.t2.2bpp" +Mansion_GFX: INCBIN "gfx/tilesets/mansion.t2.2bpp" Mansion_Block: INCBIN "gfx/blocksets/mansion.bst" -ShipPort_GFX: INCBIN "gfx/tilesets/ship_port.w128.t2.2bpp" +ShipPort_GFX: INCBIN "gfx/tilesets/ship_port.t2.2bpp" ShipPort_Block: INCBIN "gfx/blocksets/ship_port.bst" -Interior_GFX: INCBIN "gfx/tilesets/interior.w128.t1.2bpp" +Interior_GFX: INCBIN "gfx/tilesets/interior.t1.2bpp" Interior_Block: INCBIN "gfx/blocksets/interior.bst" -Plateau_GFX: INCBIN "gfx/tilesets/plateau.w128.t10.2bpp" +Plateau_GFX: INCBIN "gfx/tilesets/plateau.t10.2bpp" Plateau_Block: INCBIN "gfx/blocksets/plateau.bst" @@ -6369,50 +6369,50 @@ INCLUDE "engine/battle/1a.asm" Version_GFX: IF _RED - INCBIN "gfx/red/redgreenversion.h8.1bpp" ; 10 tiles + INCBIN "gfx/red/redgreenversion.1bpp" ; 10 tiles ENDC IF _BLUE - INCBIN "gfx/blue/blueversion.h8.1bpp" ; 8 tiles + INCBIN "gfx/blue/blueversion.1bpp" ; 8 tiles ENDC Dojo_GFX: -Gym_GFX: INCBIN "gfx/tilesets/gym.w128.2bpp" +Gym_GFX: INCBIN "gfx/tilesets/gym.2bpp" Dojo_Block: Gym_Block: INCBIN "gfx/blocksets/gym.bst" Mart_GFX: -Pokecenter_GFX: INCBIN "gfx/tilesets/pokecenter.w128.2bpp" +Pokecenter_GFX: INCBIN "gfx/tilesets/pokecenter.2bpp" Mart_Block: Pokecenter_Block: INCBIN "gfx/blocksets/pokecenter.bst" ForestGate_GFX: Museum_GFX: -Gate_GFX: INCBIN "gfx/tilesets/gate.w128.t1.2bpp" +Gate_GFX: INCBIN "gfx/tilesets/gate.t1.2bpp" ForestGate_Block: Museum_Block: Gate_Block: INCBIN "gfx/blocksets/gate.bst" -Forest_GFX: INCBIN "gfx/tilesets/forest.w128.2bpp" +Forest_GFX: INCBIN "gfx/tilesets/forest.2bpp" Forest_Block: INCBIN "gfx/blocksets/forest.bst" -Facility_GFX: INCBIN "gfx/tilesets/facility.w128.2bpp" +Facility_GFX: INCBIN "gfx/tilesets/facility.2bpp" Facility_Block: INCBIN "gfx/blocksets/facility.bst" SECTION "bank1B",ROMX,BANK[$1B] -Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.w128.t4.2bpp" +Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.t4.2bpp" Cemetery_Block: INCBIN "gfx/blocksets/cemetery.bst" -Cavern_GFX: INCBIN "gfx/tilesets/cavern.w128.t14.2bpp" +Cavern_GFX: INCBIN "gfx/tilesets/cavern.t14.2bpp" Cavern_Block: INCBIN "gfx/blocksets/cavern.bst" -Lobby_GFX: INCBIN "gfx/tilesets/lobby.w128.t2.2bpp" +Lobby_GFX: INCBIN "gfx/tilesets/lobby.t2.2bpp" Lobby_Block: INCBIN "gfx/blocksets/lobby.bst" -Ship_GFX: INCBIN "gfx/tilesets/ship.w128.t6.2bpp" +Ship_GFX: INCBIN "gfx/tilesets/ship.t6.2bpp" Ship_Block: INCBIN "gfx/blocksets/ship.bst" -Lab_GFX: INCBIN "gfx/tilesets/lab.w128.t4.2bpp" +Lab_GFX: INCBIN "gfx/tilesets/lab.t4.2bpp" Lab_Block: INCBIN "gfx/blocksets/lab.bst" -Club_GFX: INCBIN "gfx/tilesets/club.w128.t5.2bpp" +Club_GFX: INCBIN "gfx/tilesets/club.t5.2bpp" Club_Block: INCBIN "gfx/blocksets/club.bst" -Underground_GFX: INCBIN "gfx/tilesets/underground.w128.t7.2bpp" +Underground_GFX: INCBIN "gfx/tilesets/underground.t7.2bpp" Underground_Block: INCBIN "gfx/blocksets/underground.bst" -- cgit v1.3.1-sl0p From 32de1b269468f48d073a8e6d52843877baff0ba4 Mon Sep 17 00:00:00 2001 From: "U-Fish-PC\\Daniel" Date: Sat, 31 May 2014 10:35:46 -0400 Subject: Relabel a few missed map scripts and TheEndTextString --- engine/HoF_room_pc.asm | 5 +++-- scripts/pokemontower6.asm | 4 ++-- scripts/route16.asm | 4 ++-- scripts/route16gate.asm | 6 +++--- scripts/route18gate.asm | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) (limited to 'engine/HoF_room_pc.asm') diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index 5af7484c..a6b3f4d5 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -243,7 +243,7 @@ Credits: ; 7418e (1d:418e) call CopyVideoData FuncCoord 4, 8 ld hl, Coord - ld de, UnnamedText_74229 ; $4229 + ld de, TheEndTextString call PlaceString FuncCoord 4, 9 ld hl, Coord @@ -251,7 +251,8 @@ Credits: ; 7418e (1d:418e) call PlaceString jp Func_740ba -UnnamedText_74229: ; 74229 (1d:4229) +TheEndTextString: ; 74229 (1d:4229) +; "T H E E N D" db $60," ",$62," ",$64," ",$64," ",$66," ",$68,"@" db $61," ",$63," ",$65," ",$65," ",$67," ",$69,"@" diff --git a/scripts/pokemontower6.asm b/scripts/pokemontower6.asm index b7be3941..fe33ce29 100755 --- a/scripts/pokemontower6.asm +++ b/scripts/pokemontower6.asm @@ -7,7 +7,7 @@ PokemonTower6Script: ; 60aef (18:4aef) ld [W_POKEMONTOWER6CURSCRIPT], a ret -Func_60b02: ; 60b02 (18:4b02) +PokemonTower6Script_60b02: ; 60b02 (18:4b02) xor a ld [wJoyIgnore], a ld [W_POKEMONTOWER6CURSCRIPT], a @@ -48,7 +48,7 @@ CoordsData_60b45: ; 60b45 (18:4b45) PokemonTower6Script4: ; 60b48 (18:4b48) ld a, [W_ISINBATTLE] ; W_ISINBATTLE cp $ff - jp z, Func_60b02 + jp z, PokemonTower6Script_60b02 ld a, $ff ld [wJoyIgnore], a ld a, [wd72d] diff --git a/scripts/route16.asm b/scripts/route16.asm index 68474c3f..39c3f477 100755 --- a/scripts/route16.asm +++ b/scripts/route16.asm @@ -7,7 +7,7 @@ Route16Script: ; 59933 (16:5933) ld [W_ROUTE16CURSCRIPT], a ret -Func_59946: ; 59946 (16:5946) +Route16Script_59946: ; 59946 (16:5946) xor a ld [wJoyIgnore], a ld [W_ROUTE16CURSCRIPT], a @@ -47,7 +47,7 @@ Route16Script0: ; 59959 (16:5959) Route16Script3: ; 5998f (16:598f) ld a, [W_ISINBATTLE] ; W_ISINBATTLE cp $ff - jp z, Func_59946 + jp z, Route16Script_59946 call UpdateSprites ld a, [wcf0b] cp $2 diff --git a/scripts/route16gate.asm b/scripts/route16gate.asm index eb85ac22..e7179ea7 100755 --- a/scripts/route16gate.asm +++ b/scripts/route16gate.asm @@ -13,7 +13,7 @@ Route16GateScriptPointers: ; 496cf (12:56cf) dw Route16GateScript3 Route16GateScript0: ; 496d7 (12:56d7) - call Func_49755 + call Route16GateScript_49755 ret nz ld hl, CoordsData_49714 call ArePlayerCoordsInArray @@ -82,7 +82,7 @@ Route16GateScript3: ; 49741 (12:5741) ld [W_ROUTE16GATECURSCRIPT], a ret -Func_49755: ; 49755 (12:5755) +Route16GateScript_49755: ; 49755 (12:5755) ld b, BICYCLE jp IsItemInBag @@ -93,7 +93,7 @@ Route16GateTextPointers: ; 4975a (12:575a) Route16GateText1: ; 49760 (12:5760) db $08 ; asm - call Func_49755 + call Route16GateScript_49755 jr z, .asm_0bdf3 ; 0x49764 ld hl, Route16GateText_4977c call PrintText diff --git a/scripts/route18gate.asm b/scripts/route18gate.asm index bc64f8ca..03c4b921 100755 --- a/scripts/route18gate.asm +++ b/scripts/route18gate.asm @@ -13,7 +13,7 @@ Route18GateScriptPointers: ; 49887 (12:5887) dw Route18GateScript3 Route18GateScript0: ; 4988f (12:588f) - call Func_49755 + call Route16GateScript_49755 ret nz ld hl, CoordsData_498cc call ArePlayerCoordsInArray @@ -88,7 +88,7 @@ Route18GateTextPointers: ; 4990d (12:590d) Route18GateText1: ; 49911 (12:5911) db $08 ; asm - call Func_49755 + call Route16GateScript_49755 jr z, .asm_3c84d ; 0x49915 ld hl, Route18GateText_4992d call PrintText -- cgit v1.3.1-sl0p From 35f2bb90d4a8f8e4dcac3fbab7d89cbc590285e8 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 16 Jun 2014 13:03:05 -0700 Subject: Rename predef functions so they aren't excessive in length. This is mostly because of an rgbasm bug that prevents macro arguments from exceeding 16 characters, but the names were bad anyway. --- engine/HoF_room_pc.asm | 2 +- engine/battle/1c.asm | 1 + engine/battle/core.asm | 12 +++--- engine/battle/e.asm | 4 +- engine/give_pokemon.asm | 2 +- engine/hp_bar.asm | 8 ++-- engine/in_game_trades.asm | 2 +- engine/items/items.asm | 2 +- engine/items/tms.asm | 2 +- engine/menu/naming_screen.asm | 2 +- engine/menu/pokedex.asm | 2 +- engine/menu/vending_machine.asm | 2 +- engine/overworld/emotion_bubbles.asm | 2 +- engine/overworld/item.asm | 2 +- engine/overworld/player_animations.asm | 2 +- engine/overworld/trainers.asm | 2 +- engine/palettes.asm | 2 +- engine/predefs.asm | 73 ++++++++++++---------------------- engine/predefs17.asm | 2 +- engine/slot_machine.asm | 2 +- home.asm | 4 +- home/overworld.asm | 12 +++--- main.asm | 26 ++++++------ scripts/celadongamecorner.asm | 2 +- scripts/daycarem.asm | 2 +- scripts/mtmoonpokecenter.asm | 2 +- scripts/museum1f.asm | 2 +- scripts/oakslab.asm | 4 +- scripts/safarizoneentrance.asm | 2 +- 29 files changed, 81 insertions(+), 103 deletions(-) (limited to 'engine/HoF_room_pc.asm') diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index a6b3f4d5..0ebb3b61 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -1,4 +1,4 @@ -HallOfFameComputer: ; 7405c (1d:405c) +HallOfFamePC: ; 7405c (1d:405c) callba AnimateHallOfFame call ClearScreen ld c, $64 diff --git a/engine/battle/1c.asm b/engine/battle/1c.asm index 242b8d66..5523ba7d 100755 --- a/engine/battle/1c.asm +++ b/engine/battle/1c.asm @@ -430,6 +430,7 @@ BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9) ld [wd09f], a jr .done2_ +FlashScreen: BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d) ld hl, BattleTransition_FlashScreenPalettes .loop diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 15102340..21ee9d0d 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -241,7 +241,7 @@ Func_3c11e: ; 3c11e (f:411e) call DelayFrames call SaveScreenTilesToBuffer1 .asm_3c14f - call AnyPlayerPokemonAliveCheck + call AnyPartyAlive ld a, d and a jp z, HandlePlayerBlackOut @@ -774,7 +774,7 @@ HandleEnemyMonFainted: ; 3c525 (f:4525) xor a ld [wccf0], a call FaintEnemyPokemon - call AnyPlayerPokemonAliveCheck + call AnyPartyAlive ld a, d and a jp z, HandlePlayerBlackOut @@ -870,7 +870,7 @@ FaintEnemyPokemon ; 0x3c567 jr nz, .playermonnotfaint call Func_3c741 .playermonnotfaint - call AnyPlayerPokemonAliveCheck + call AnyPartyAlive ld a, d and a ret z @@ -1021,7 +1021,7 @@ HandlePlayerMonFainted: ; 3c700 (f:4700) ld a, $1 ld [wccf0], a call Func_3c741 - call AnyPlayerPokemonAliveCheck ; test if any more mons are alive + call AnyPartyAlive ; test if any more mons are alive ld a, d and a jp z, HandlePlayerBlackOut @@ -1492,7 +1492,7 @@ TrainerSentOutText: ; 3ca7e (f:4a7e) ; tests if the player has any pokemon that are not fainted ; sets d = 0 if all fainted, d != 0 if some mons are still alive -AnyPlayerPokemonAliveCheck: ; 3ca83 (f:4a83) +AnyPartyAlive: ; 3ca83 (f:4a83) ld a, [wPartyCount] ; wPartyCount ld e, a xor a @@ -6930,7 +6930,7 @@ asm_3f0d0: ; 3f0d0 (f:70d0) jr nz, .asm_3f0f4 ret -LoadMonBackSprite: +LoadMonBackPic: ; Assumes the monster's attributes have ; been loaded with GetMonHeader. ld a, [wBattleMonSpecies2] diff --git a/engine/battle/e.asm b/engine/battle/e.asm index f3eac4c9..0cea797d 100755 --- a/engine/battle/e.asm +++ b/engine/battle/e.asm @@ -758,7 +758,7 @@ ReadTrainer: ; 39c53 (e:5c53) ld a,1 ld [wcc49],a push hl - call AddPokemonToParty + call AddPartyMon pop hl jr .LoopTrainerData .SpecialTrainer @@ -775,7 +775,7 @@ ReadTrainer: ; 39c53 (e:5c53) ld a,1 ld [wcc49],a push hl - call AddPokemonToParty + call AddPartyMon pop hl jr .SpecialTrainer .AddLoneMove diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm index 3bda4729..21b56bf3 100755 --- a/engine/give_pokemon.asm +++ b/engine/give_pokemon.asm @@ -41,7 +41,7 @@ _GivePokemon: ; 4fda5 (13:7da5) ret .asm_4fe01 call SetPokedexOwnedFlag - call AddPokemonToParty + call AddPartyMon ld a, $1 ld [wcc3c], a ld [wccd3], a diff --git a/engine/hp_bar.asm b/engine/hp_bar.asm index b4d7125c..de0c4e41 100755 --- a/engine/hp_bar.asm +++ b/engine/hp_bar.asm @@ -1,9 +1,9 @@ -UpdateHPBar_LoadRegisters: ; f9dc (3:79dc) +HPBarLength: ; f9dc (3:79dc) call GetPredefRegisters ; calculates bc * 48 / de, the number of pixels the HP bar has ; the result is always at least 1 -UpdateHPBar_CalcNumberOfHPBarPixels: ; f9df (3:79df) +GetHPBarLength: ; f9df (3:79df) push hl xor a ld hl, H_MULTIPLICAND @@ -254,12 +254,12 @@ UpdateHPBar_CalcOldNewHPBarPixels: ; fb30 (3:7b30) ld l, a push hl push de - call UpdateHPBar_CalcNumberOfHPBarPixels ; calc num pixels for old HP + call GetHPBarLength ; calc num pixels for old HP ld a, e pop de pop bc push af - call UpdateHPBar_CalcNumberOfHPBarPixels ; calc num pixels for new HP + call GetHPBarLength ; calc num pixels for new HP pop af ld d, e ld e, a diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index e39cdb67..e1b6f757 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -136,7 +136,7 @@ Func_71c07: ; 71c07 (1c:5c07) call RemovePokemon ld a,$80 ld [wcc49],a - call AddPokemonToParty + call AddPartyMon call Func_71d19 callab EvolveTradeMon call ClearScreen diff --git a/engine/items/items.asm b/engine/items/items.asm index 194b7733..6b1bf8b3 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -431,7 +431,7 @@ ItemUseBall: ; d687 (3:5687) xor a ld [wcc49],a call ClearSprites - call AddPokemonToParty ;add mon to Party + call AddPartyMon ;add mon to Party jr .End .sendToBox ;$5907 call ClearSprites diff --git a/engine/items/tms.asm b/engine/items/tms.asm index 53b338d6..7a13250b 100755 --- a/engine/items/tms.asm +++ b/engine/items/tms.asm @@ -1,5 +1,5 @@ ; tests if mon [wcf91] can learn move [wd0e0] -TestMonMoveCompatibility: ; 1373e (4:773e) +CanLearnTM: ; 1373e (4:773e) ld a, [wcf91] ld [wd0b5], a call GetMonHeader diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 35c8be12..e065d98d 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -1,4 +1,4 @@ -AskForMonNickname: ; 64eb (1:64eb) +AskName: ; 64eb (1:64eb) call SaveScreenTilesToBuffer1 call GetPredefRegisters push hl diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 3f50d8c5..2336cb47 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -1,4 +1,4 @@ -DisplayPokedexMenu_: ; 40000 (10:4000) +ShowPokedexMenu: ; 40000 (10:4000) call GBPalWhiteOut call ClearScreen call UpdateSprites ; move sprites diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm index 8a84c5e2..19550899 100755 --- a/engine/menu/vending_machine.asm +++ b/engine/menu/vending_machine.asm @@ -71,7 +71,7 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) ld hl, $ffde ld de, wPlayerMoney + 2 ; wd349 ld c, $3 - ld a, $c ; SubtractBCDPredef + ld a, $c ; SubBCDPredef call Predef ld a, $13 ld [wd125], a diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index a8d863df..ae7702b4 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -1,4 +1,4 @@ -PrintEmotionBubble: ; 17c47 (5:7c47) +EmotionBubble: ; 17c47 (5:7c47) ld a, [wcd50] ld c, a ld b, $0 diff --git a/engine/overworld/item.asm b/engine/overworld/item.asm index c66fc143..a75c393c 100644 --- a/engine/overworld/item.asm +++ b/engine/overworld/item.asm @@ -32,7 +32,7 @@ PickupItem: ld a, [$ffdb] ld [wcc4d], a - ld a, $11 ; RemoveMissableObject + ld a, $11 ; HideObject call Predef ld a, 1 ld [wcc3c], a diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 68a6b170..184d38f4 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -89,7 +89,7 @@ Func_705aa: ; 705aa (1c:45aa) ld [hl], a jp Func_70755 -_DoFlyOrTeleportAwayGraphics: ; 705ba (1c:45ba) +_LeaveMapAnim: ; 705ba (1c:45ba) call Func_706ef call Func_70787 ld a, b diff --git a/engine/overworld/trainers.asm b/engine/overworld/trainers.asm index 583decb9..b05ddbf1 100755 --- a/engine/overworld/trainers.asm +++ b/engine/overworld/trainers.asm @@ -159,7 +159,7 @@ Func_56903: ; 56903 (15:6903) ret ; tests if this trainer is in the right position to engage the player and do so if she is. -CheckEngagePlayer: ; 5690f (15:690f) +TrainerEngage: ; 5690f (15:690f) push hl push de ld a, [wTrainerSpriteOffset] ; wWhichTrade diff --git a/engine/palettes.asm b/engine/palettes.asm index 5eae18bd..5835f483 100755 --- a/engine/palettes.asm +++ b/engine/palettes.asm @@ -379,7 +379,7 @@ SendSGBPacket: ; 71feb (1c:5feb) ; else send 16 more bytes jr .loop2 -LoadSGBBorderAndPalettes: ; 7202b (1c:602b) +LoadSGB: ; 7202b (1c:602b) xor a ld [wcf1b], a call Func_7209b diff --git a/engine/predefs.asm b/engine/predefs.asm index e0df874f..7081df53 100755 --- a/engine/predefs.asm +++ b/engine/predefs.asm @@ -56,8 +56,7 @@ PredefPointers: ; 4fe79 (13:7e79) dbw BANK(Func_3f0c6),Func_3f0c6 dbw BANK(Func_3f073),Func_3f073 dbw BANK(ScaleSpriteByTwo), ScaleSpriteByTwo - db BANK(LoadMonBackSprite) ; dbw macro gives an error for some reason - dw LoadMonBackSprite + dbw BANK(LoadMonBackPic), LoadMonBackPic dbw BANK(Func_79aba),Func_79aba dbw BANK(Func_f132),Func_f132 HealPartyPredef: ; 4fe8e (13:7e8e) @@ -66,32 +65,24 @@ MoveAnimationPredef: ; 4fe91 (13:7e91) dbw BANK(MoveAnimation),MoveAnimation; 08 play move animation dbw BANK(DivideBCDPredef),DivideBCDPredef dbw BANK(DivideBCDPredef),DivideBCDPredef - dbw BANK(AddBCDPredef),AddBCDPredef - db BANK(SubtractBCDPredef) - dw SubtractBCDPredef + dbw BANK(AddBCDPredef), AddBCDPredef + dbw BANK(SubBCDPredef), SubBCDPredef dbw BANK(DivideBCDPredef),DivideBCDPredef dbw BANK(DivideBCDPredef),DivideBCDPredef - db BANK(InitializePlayerData) - dw InitializePlayerData + dbw BANK(InitPlayerData), InitPlayerData dbw BANK(FlagActionPredef),FlagActionPredef - db BANK(RemoveMissableObject) - dw RemoveMissableObject - db BANK(IsMissableObjectHidden) - dw IsMissableObjectHidden + dbw BANK(HideObject), HideObject + dbw BANK(IsObjectHidden), IsObjectHidden dbw BANK(Func_c69c),Func_c69c - db BANK(AnyPlayerPokemonAliveCheck) - dw AnyPlayerPokemonAliveCheck - db BANK(AddMissableObject) - dw AddMissableObject - db BANK(AddMissableObject) - dw AddMissableObject + dbw BANK(AnyPartyAlive), AnyPartyAlive + dbw BANK(ShowObject), ShowObject + dbw BANK(ShowObject), ShowObject dbw BANK(Func_ee9e),Func_ee9e - db BANK(InitializePlayerData) - dw InitializePlayerData + dbw BANK(InitPlayerData), InitPlayerData dbw BANK(Func_c754),Func_c754 dbw BANK(Func_3af5b),Func_3af5b dbw BANK(LearnMove),LearnMove - dbw BANK(IsItemInBag_),IsItemInBag_; 1C, used in Pokémon Tower + dbw BANK(IsItemInBag_),IsItemInBag_ ; 1C, used in Pokémon Tower dbw $03,Func_3eb5 ; for these two, the bank number is actually 0 dbw $03,GiveItem dbw BANK(Func_480eb),Func_480eb @@ -101,12 +92,10 @@ MoveAnimationPredef: ; 4fe91 (13:7e91) dbw BANK(Func_f9a0),Func_f9a0 dbw BANK(Func_48125),Func_48125 dbw BANK(UpdateHPBar),UpdateHPBar - db BANK(UpdateHPBar_LoadRegisters) - dw UpdateHPBar_LoadRegisters + dbw BANK(HPBarLength), HPBarLength dbw BANK(Func_5ab0),Func_5ab0 dbw BANK(Func_3ed02),Func_3ed02 - db BANK(DisplayPokedexMenu_) - dw DisplayPokedexMenu_ + dbw BANK(ShowPokedexMenu), ShowPokedexMenu dbw BANK(Func_3ad1c),Func_3ad1c dbw BANK(SaveSAVtoSRAM0),SaveSAVtoSRAM0 dbw BANK(InitOpponent),InitOpponent @@ -117,58 +106,46 @@ MoveAnimationPredef: ; 4fe91 (13:7e91) dbw BANK(Func_79dda),Func_79dda dbw BANK(PlayIntro),PlayIntro dbw BANK(Func_79869),Func_79869 - db BANK(BattleTransition_FlashScreen_) - dw BattleTransition_FlashScreen_ + dbw BANK(FlashScreen), FlashScreen dbw BANK(Func_c586),Func_c586 dbw BANK(StatusScreen),StatusScreen ; 37 0x12953 dbw BANK(StatusScreen2),StatusScreen2 ; 38 dbw BANK(Func_410e2),Func_410e2 - db BANK(CheckEngagePlayer) - dw CheckEngagePlayer + dbw BANK(TrainerEngage), TrainerEngage dbw BANK(IndexToPokedex),IndexToPokedex dbw BANK(Predef3B),Predef3B; 3B display pic? dbw BANK(UsedCut),UsedCut dbw BANK(ShowPokedexData),ShowPokedexData dbw BANK(WriteMonMoves),WriteMonMoves dbw BANK(SaveSAV),SaveSAV - db BANK(LoadSGBBorderAndPalettes) - dw LoadSGBBorderAndPalettes + dbw BANK(LoadSGB), LoadSGB dbw BANK(Func_f113),Func_f113 dbw BANK(SetPartyMonTypes),SetPartyMonTypes - db BANK(TestMonMoveCompatibility) - dw TestMonMoveCompatibility + dbw BANK(CanLearnTM), CanLearnTM dbw BANK(TMToMove),TMToMove dbw BANK(Func_71ddf),Func_71ddf - db BANK(DisplayStarterMonDex) - dw DisplayStarterMonDex; 46 load dex screen - db BANK(_AddPokemonToParty) - dw _AddPokemonToParty + dbw BANK(StarterDex), StarterDex ; 46 + dbw BANK(_AddPartyMon), _AddPartyMon dbw BANK(UpdateHPBar),UpdateHPBar dbw BANK(Func_3cdec),Func_3cdec dbw BANK(LoadTownMap_Nest),LoadTownMap_Nest dbw BANK(Func_27d6b),Func_27d6b - db BANK(PrintEmotionBubble) - dw PrintEmotionBubble; 4C player exclamation + dbw BANK(EmotionBubble), EmotionBubble; 4C player exclamation dbw BANK(Func_5aaf),Func_5aaf; return immediately - db BANK(AskForMonNickname) - dw AskForMonNickname + dbw BANK(AskName), AskName dbw BANK(PewterGuys),PewterGuys dbw BANK(SaveSAVtoSRAM2),SaveSAVtoSRAM2 dbw BANK(LoadSAVCheckSum2),LoadSAVCheckSum2 dbw BANK(LoadSAV),LoadSAV dbw BANK(SaveSAVtoSRAM1),SaveSAVtoSRAM1 dbw BANK(Predef54),Predef54 ; 54 initiate trade - db BANK(HallOfFameComputer) - dw HallOfFameComputer + dbw BANK(HallOfFamePC), HallOfFamePC dbw BANK(DisplayDexRating),DisplayDexRating - db $1E ; uses wrong bank number - dw _DoFlyOrTeleportAwayGraphics - db $1E ; uses wrong bank number - dw Func_70510 + dbw $1E, _LeaveMapAnim ; wrong bank + dbw $1E, Func_70510 ; wrong bank dbw BANK(Func_c5be),Func_c5be dbw BANK(Func_c60b),Func_c60b - db BANK(PrintUsedStrengthText) - dw PrintUsedStrengthText + dbw BANK(PrintStrengthTxt), PrintStrengthTxt dbw BANK(PickupItem),PickupItem dbw BANK(Func_27d98),Func_27d98 dbw BANK(LoadMovePPs),LoadMovePPs diff --git a/engine/predefs17.asm b/engine/predefs17.asm index 91a6f7fe..11e67aff 100755 --- a/engine/predefs17.asm +++ b/engine/predefs17.asm @@ -1,6 +1,6 @@ ; this function temporarily makes the starters (and Ivysaur) seen ; so that the full Pokedex information gets displayed in Oak's lab -DisplayStarterMonDex: ; 5c0dc (17:40dc) +StarterDex: ; 5c0dc (17:40dc) ld a, %01001011 ; set starter flags ld [wPokedexOwned], a ; wPokedexOwned ld a, $3d diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index 68a15a18..0e17d13f 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -618,7 +618,7 @@ SlotMachine_37741: ; 37741 (d:7741) ld [hli], a ld de, wPlayerCoins + 1 ld c, $2 - ld a, $c ; SubtractBCDPredef + ld a, $c ; SubBCDPredef call Predef SlotMachine_37754: ; 37754 (d:7754) diff --git a/home.asm b/home.asm index f1dd60b4..5062b18c 100644 --- a/home.asm +++ b/home.asm @@ -4146,11 +4146,11 @@ RemovePokemon:: ; 391f (0:391f) ld b, BANK(_RemovePokemon) jp Bankswitch -AddPokemonToParty:: ; 3927 (0:3927) +AddPartyMon:: ; 3927 (0:3927) push hl push de push bc - callba _AddPokemonToParty + callba _AddPartyMon pop bc pop de pop hl diff --git a/home/overworld.asm b/home/overworld.asm index 84c96f3e..941b50cb 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -332,7 +332,7 @@ OverworldLoopLessDelay:: ld a,[W_CURMAP] cp a,OAKS_LAB jp z,.noFaintCheck - callab AnyPlayerPokemonAliveCheck ; check if all the player's pokemon fainted + callab AnyPartyAlive ; check if all the player's pokemon fainted ld a,d and a jr z,.allPokemonFainted @@ -507,7 +507,7 @@ WarpFound2:: ; 073c (0:073c) ; if it's a Silph Co. teleporter ld hl,wd732 set 3,[hl] - call DoFlyOrTeleportAwayGraphics + call LeaveMapAnim jr .skipMapChangeSound .notTeleporter call PlayMapChangeSound @@ -778,16 +778,16 @@ HandleFlyOrTeleportAway:: ld hl, wd732 set 2, [hl] res 5, [hl] - call DoFlyOrTeleportAwayGraphics + call LeaveMapAnim ld a, Bank(Func_62ce) ld [H_LOADEDROMBANK], a ld [$2000], a call Func_62ce jp Func_5d5f -DoFlyOrTeleportAwayGraphics:: - ld b, BANK(_DoFlyOrTeleportAwayGraphics) - ld hl, _DoFlyOrTeleportAwayGraphics +LeaveMapAnim:: + ld b, BANK(_LeaveMapAnim) + ld hl, _LeaveMapAnim jp Bankswitch LoadPlayerSpriteGraphics:: diff --git a/main.asm b/main.asm index 9d612cd2..ef17ad63 100755 --- a/main.asm +++ b/main.asm @@ -487,7 +487,7 @@ TestBattle: xor a ld [wcc49], a ld [W_CURMAP], a - call AddPokemonToParty + call AddPartyMon ; Fight against a ; level 20 Rhydon. @@ -686,7 +686,7 @@ SetIshiharaTeam: ; 64ca (1:64ca) ld a, [de] ld [W_CURENEMYLVL], a inc de - call AddPokemonToParty + call AddPartyMon jr .loop IshiharaTeam: ; 64df (1:64df) @@ -2638,7 +2638,7 @@ Func_c8de: ; c8de (3:48de) INCLUDE "data/hide_show_data.asm" -PrintUsedStrengthText: ; cd99 (3:4d99) +PrintStrengthTxt: ; cd99 (3:4d99) ld hl, wd728 set 0, [hl] ld hl, UsedStrengthText @@ -3231,7 +3231,7 @@ InitializeMissableObjectsFlags: ; f175 (3:7175) jr .missableObjectsLoop ; tests if current sprite is a missable object that is hidden/has been removed -IsMissableObjectHidden: ; f1a6 (3:71a6) +IsObjectHidden: ; f1a6 (3:71a6) ld a, [H_CURRENTSPRITEOFFSET] swap a ld b, a @@ -3258,7 +3258,7 @@ IsMissableObjectHidden: ; f1a6 (3:71a6) ; adds missable object (items, leg. pokemon, etc.) to the map ; [wcc4d]: index of the missable object to be added (global index) -AddMissableObject: ; f1c8 (3:71c8) +ShowObject: ; f1c8 (3:71c8) ld hl, W_MISSABLEOBJECTFLAGS ld a, [wcc4d] ld c, a @@ -3268,7 +3268,7 @@ AddMissableObject: ; f1c8 (3:71c8) ; removes missable object (items, leg. pokemon, etc.) from the map ; [wcc4d]: index of the missable object to be removed (global index) -RemoveMissableObject: ; f1d7 (3:71d7) +HideObject: ; f1d7 (3:71d7) ld hl, W_MISSABLEOBJECTFLAGS ld a, [wcc4d] ld c, a @@ -3452,7 +3452,7 @@ Func_f2dd: ; f2dd (3:72dd) res 6, [hl] ret -_AddPokemonToParty: ; f2e5 (3:72e5) +_AddPartyMon: ; f2e5 (3:72e5) ld de, wPartyCount ; wPartyCount ld a, [wcc49] and $f @@ -3668,7 +3668,7 @@ _AddPokemonToParty: ; f2e5 (3:72e5) inc de inc de pop hl - call AddPokemonToParty_WriteMovePP + call AddPartyMon_WriteMovePP inc de ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL ld [de], a @@ -3694,7 +3694,7 @@ _AddPokemonToParty: ; f2e5 (3:72e5) LoadMovePPs: ; f473 (3:7473) call GetPredefRegisters ; fallthrough -AddPokemonToParty_WriteMovePP: ; f476 (3:7476) +AddPartyMon_WriteMovePP: ; f476 (3:7476) ld b, $4 .pploop ld a, [hli] ; read move ID @@ -4286,7 +4286,7 @@ Func_f800: ; f800 (3:7800) ld de, $ffa1 ld hl, $ffa4 push bc - call SubtractBCD + call SubBCD pop bc jr .asm_f803 @@ -4318,10 +4318,10 @@ AddBCD:: ret -SubtractBCDPredef:: +SubBCDPredef:: call GetPredefRegisters -SubtractBCD:: +SubBCD:: and a ld b, c .sub @@ -4346,7 +4346,7 @@ SubtractBCD:: ret -InitializePlayerData: +InitPlayerData: call Random ld a, [hRandomSub] diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index 039abe42..4cb001e6 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -157,7 +157,7 @@ CeladonGameCornerText2: ; 48ca9 (12:4ca9) ld hl, $ffa1 ld de, wPlayerMoney + 2 ld c, $3 - ld a, $c ; SubtractBCDPredef + ld a, $c ; SubBCDPredef call Predef xor a ldh [$9f], a diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index d2a70578..b584c4ed 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -156,7 +156,7 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) inc hl ld de, wPlayerMoney + 2 ld c, $3 - ld a, $c ; SubtractBCDPredef + ld a, $c ; SubBCDPredef call Predef ld a, (SFX_02_5a - SFX_Headers_02) / 3 call PlaySoundWaitForCurrent diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm index e4515a61..6bbe7a1b 100755 --- a/scripts/mtmoonpokecenter.asm +++ b/scripts/mtmoonpokecenter.asm @@ -55,7 +55,7 @@ MtMoonPokecenterText4: ; 492ec (12:52ec) ld hl, wTrainerFacingDirection ld de, wPlayerMoney + 2 ld c, $3 - ld a, $c ; SubtractBCDPredef + ld a, $c ; SubBCDPredef call Predef ld a, $13 ld [wd125], a diff --git a/scripts/museum1f.asm b/scripts/museum1f.asm index ed36973d..5e1bb792 100755 --- a/scripts/museum1f.asm +++ b/scripts/museum1f.asm @@ -103,7 +103,7 @@ Museum1FText1: ; 5c135 (17:4135) ld hl, wTrainerFacingDirection ld de, wPlayerMoney + 2 ld c, $3 - ld a, $c ; SubtractBCDPredef + ld a, $c ; SubBCDPredef call Predef ld a, $13 ld [wd125], a diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 0a54082d..194eb1a8 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -847,7 +847,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157) ld hl, wd730 set 6, [hl] ld a, $46 - call Predef ; DisplayStarterMonDex + call Predef ; StarterDex ld hl, wd730 res 6, [hl] call ReloadMapData @@ -921,7 +921,7 @@ asm_1d1e5: ; 1d1e5 (7:51e5) ld [W_CURENEMYLVL], a ld a, [wcf91] ld [wd11e], a - call AddPokemonToParty + call AddPartyMon ld hl, wd72e set 3, [hl] ld a, $fc diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm index b560c53d..7140f67b 100755 --- a/scripts/safarizoneentrance.asm +++ b/scripts/safarizoneentrance.asm @@ -176,7 +176,7 @@ SafariZoneEntranceText4: ; 752ca (1d:52ca) ld hl, wTrainerFacingDirection ld de, wPlayerMoney + 2 ld c, $3 - ld a, $c ; SubtractBCDPredef + ld a, $c ; SubBCDPredef call Predef ld a, $13 ld [wd125], a -- cgit v1.3.1-sl0p From bd533aa79bbe1998fd2b699bd7205da2de4fe55c Mon Sep 17 00:00:00 2001 From: "U-Fish-PC\\Daniel" Date: Wed, 25 Jun 2014 16:58:27 -0400 Subject: Use *Coord instead of FuncCoord Using 'Coord =' doesn't like using wTileMap So use hlCoord, deCoord, bcCoord, aCoord, Coorda, or dwCoord to avoid static addresses --- engine/HoF_room_pc.asm | 18 +-- engine/battle/1.asm | 6 +- engine/battle/1c.asm | 114 +++++++------------ engine/battle/4_2.asm | 15 +-- engine/battle/animations.asm | 33 ++---- engine/battle/core.asm | 201 +++++++++++---------------------- engine/battle/d.asm | 12 +- engine/battle/e.asm | 12 +- engine/battle/e_2.asm | 6 +- engine/cable_club.asm | 6 +- engine/clear_save.asm | 3 +- engine/evolution.asm | 6 +- engine/hall_of_fame.asm | 48 +++----- engine/hidden_object_functions17.asm | 3 +- engine/hidden_object_functions3.asm | 3 +- engine/intro.asm | 9 +- engine/items/items.asm | 9 +- engine/learn_move.asm | 12 +- engine/menu/bills_pc.asm | 48 +++----- engine/menu/diploma.asm | 3 +- engine/menu/league_pc.asm | 12 +- engine/menu/main_menu.asm | 78 +++++-------- engine/menu/naming_screen.asm | 30 ++--- engine/menu/party_menu.asm | 3 +- engine/menu/players_pc.asm | 3 +- engine/menu/pokedex.asm | 99 ++++++---------- engine/menu/prize_menu.asm | 45 +++----- engine/menu/start_sub_menus.asm | 48 +++----- engine/menu/status_screen.asm | 93 +++++---------- engine/menu/vending_machine.asm | 9 +- engine/oak_speech.asm | 12 +- engine/oak_speech2.asm | 12 +- engine/overworld/cinnabar_lab.asm | 3 +- engine/overworld/doors.asm | 3 +- engine/overworld/ledges.asm | 3 +- engine/overworld/movement.asm | 3 +- engine/overworld/player_animations.asm | 3 +- engine/overworld/pokemart.asm | 6 +- engine/save.asm | 27 ++--- engine/titlescreen.asm | 18 +-- engine/town_map.asm | 36 ++---- engine/trade.asm | 45 +++----- engine/trade2.asm | 30 ++--- home.asm | 53 +++------ home/overworld.asm | 21 ++-- home/text.asm | 60 ++++------ home/vcopy.asm | 9 +- macros.asm | 34 +++++- main.asm | 93 +++++---------- scripts/bikeshop.asm | 6 +- scripts/celadongamecorner.asm | 24 ++-- scripts/celadonmartroof.asm | 3 +- scripts/vermiliondock.asm | 3 +- 53 files changed, 519 insertions(+), 975 deletions(-) (limited to 'engine/HoF_room_pc.asm') diff --git a/engine/HoF_room_pc.asm b/engine/HoF_room_pc.asm index 0ebb3b61..16a3c3f9 100755 --- a/engine/HoF_room_pc.asm +++ b/engine/HoF_room_pc.asm @@ -16,8 +16,7 @@ HallOfFamePC: ; 7405c (1d:405c) call FillMemory ld hl, wTileMap call Func_7417b - FuncCoord 0, 14 - ld hl, Coord + hlCoord 0, 14 call Func_7417b ld a, $c0 ld [rBGP], a ; $ff47 @@ -62,8 +61,7 @@ DisplayCreditsMon: ; 740cb (1d:40cb) ld a,[hl] ld [wcf91],a ld [wd0b5],a - FuncCoord 8, 6 - ld hl,Coord + hlCoord 8, 6 call GetMonHeader call LoadFrontSpriteByMonIndex ld hl,vBGMap0 + $c @@ -153,8 +151,7 @@ Func_7417b: ; 7417b (1d:417b) jp FillMemory FillMiddleOfScreenWithWhite: ; 74183 (1d:4183) - FuncCoord 0, 4 - ld hl, Coord + hlCoord 0, 4 ld bc, $c8 ; 10 rows of 20 tiles each ld a, $7f ; blank white tile jp FillMemory @@ -164,8 +161,7 @@ Credits: ; 7418e (1d:418e) push de .asm_74192 pop de - FuncCoord 9, 6 - ld hl, Coord + hlCoord 9, 6 push hl call FillMiddleOfScreenWithWhite pop hl @@ -241,12 +237,10 @@ Credits: ; 7418e (1d:418e) ld hl, vChars2 + $600 ld bc, (BANK(TheEndGfx) << 8) + $0a call CopyVideoData - FuncCoord 4, 8 - ld hl, Coord + hlCoord 4, 8 ld de, TheEndTextString call PlaceString - FuncCoord 4, 9 - ld hl, Coord + hlCoord 4, 9 inc de call PlaceString jp Func_740ba diff --git a/engine/battle/1.asm b/engine/battle/1.asm index 7e744dba..04546313 100755 --- a/engine/battle/1.asm +++ b/engine/battle/1.asm @@ -67,12 +67,10 @@ Func_7861: ; 7861 (1:7861) .asm_789c ld a, [H_WHOSETURN] ; $fff3 and a - FuncCoord 10, 9 - ld hl, Coord + hlCoord 10, 9 ld a, $1 jr z, .asm_78aa - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 xor a .asm_78aa ld [wListMenuID], a ; wListMenuID diff --git a/engine/battle/1c.asm b/engine/battle/1c.asm index 5523ba7d..b3b24007 100755 --- a/engine/battle/1c.asm +++ b/engine/battle/1c.asm @@ -2,8 +2,7 @@ Func_708ca: ; 708ca (1c:48ca) ld a, $e4 ld [rOBP1], a ; $ff49 call Func_7092a - FuncCoord 12, 0 - ld hl, Coord + hlCoord 12, 0 ld bc, $707 call ClearScreenArea call Delay3 @@ -287,8 +286,7 @@ BattleTransition_Spiral: ; 70a72 (1c:4a72) call BattleTransition_InwardSpiral jr .done .outwardSpiral - FuncCoord 10, 10 - ld hl, Coord + hlCoord 10, 10 ld a, $3 ld [wd09f], a ld a, l @@ -457,28 +455,20 @@ BattleTransition_Shrink: ; 70b7f (1c:4b7f) push bc xor a ld [H_AUTOBGTRANSFERENABLED], a - FuncCoord 0, 7 - ld hl, Coord - FuncCoord 0, 8 - ld de, Coord + hlCoord 0, 7 + deCoord 0, 8 ld bc, $ffd8 call BattleTransition_CopyTiles1 - FuncCoord 0, 10 - ld hl, Coord - FuncCoord 0, 9 - ld de, Coord + hlCoord 0, 10 + deCoord 0, 9 ld bc, $28 call BattleTransition_CopyTiles1 - FuncCoord 8, 0 - ld hl, Coord - FuncCoord 9, 0 - ld de, Coord + hlCoord 8, 0 + deCoord 9, 0 ld bc, $fffe call BattleTransition_CopyTiles2 - FuncCoord 11, 0 - ld hl, Coord - FuncCoord 10, 0 - ld de, Coord + hlCoord 11, 0 + deCoord 10, 0 ld bc, $2 call BattleTransition_CopyTiles2 ld a, $1 @@ -499,25 +489,19 @@ BattleTransition_Split: ; 70bca (1c:4bca) ld [H_AUTOBGTRANSFERENABLED], a .loop push bc - FuncCoord 0, 16 - ld hl, Coord - FuncCoord 0, 17 - ld de, Coord + hlCoord 0, 16 + deCoord 0, 17 ld bc, $ffd8 call BattleTransition_CopyTiles1 - FuncCoord 0, 1 - ld hl, Coord + hlCoord 0, 1 ld de, wTileMap ld bc, $28 call BattleTransition_CopyTiles1 - FuncCoord 18, 0 - ld hl, Coord - FuncCoord 19, 0 - ld de, Coord + hlCoord 18, 0 + deCoord 19, 0 ld bc, $fffe call BattleTransition_CopyTiles2 - FuncCoord 1, 0 - ld hl, Coord + hlCoord 1, 0 ld de, wTileMap ld bc, $2 call BattleTransition_CopyTiles2 @@ -615,8 +599,7 @@ BattleTransition_CopyTiles2: ; 70c3f (1c:4c3f) BattleTransition_VerticalStripes: ; 70c7e (1c:4c7e) ld c, $12 ld hl, wTileMap - FuncCoord 1, 17 - ld de, Coord + deCoord 1, 17 xor a ld [H_AUTOBGTRANSFERENABLED], a .loop @@ -655,8 +638,7 @@ BattleTransition_VerticalStripes_: ; 70caa (1c:4caa) BattleTransition_HorizontalStripes: ; 70cb4 (1c:4cb4) ld c, $14 ld hl, wTileMap - FuncCoord 19, 1 - ld de, Coord + deCoord 19, 1 xor a ld [H_AUTOBGTRANSFERENABLED], a .loop @@ -777,104 +759,84 @@ BattleTransition_Circle_Sub2: ; 70d50 (1c:4d50) BattleTransition_HalfCircle1: ; 70d61 (1c:4d61) db $01 dw BattleTransition_CircleData1 - FuncCoord 18, 6 - dw Coord + dwCoord 18, 6 db $01 dw BattleTransition_CircleData2 - FuncCoord 19, 3 - dw Coord + dwCoord 19, 3 db $01 dw BattleTransition_CircleData3 - FuncCoord 18, 0 - dw Coord + dwCoord 18, 0 db $01 dw BattleTransition_CircleData4 - FuncCoord 14, 0 - dw Coord + dwCoord 14, 0 db $01 dw BattleTransition_CircleData5 - FuncCoord 10, 0 - dw Coord + dwCoord 10, 0 db $00 dw BattleTransition_CircleData5 - FuncCoord 9, 0 - dw Coord + dwCoord 9, 0 db $00 dw BattleTransition_CircleData4 - FuncCoord 5, 0 - dw Coord + dwCoord 5, 0 db $00 dw BattleTransition_CircleData3 - FuncCoord 1, 0 - dw Coord + dwCoord 1, 0 db $00 dw BattleTransition_CircleData2 - FuncCoord 0, 3 - dw Coord + dwCoord 0, 3 db $00 dw BattleTransition_CircleData1 - FuncCoord 1, 6 - dw Coord + dwCoord 1, 6 BattleTransition_HalfCircle2: ; 70d93 (1c:4d93) db $00 dw BattleTransition_CircleData1 - FuncCoord 1, 11 - dw Coord + dwCoord 1, 11 db $00 dw BattleTransition_CircleData2 - FuncCoord 0, 14 - dw Coord + dwCoord 0, 14 db $00 dw BattleTransition_CircleData3 - FuncCoord 1, 17 - dw Coord + dwCoord 1, 17 db $00 dw BattleTransition_CircleData4 - FuncCoord 5, 17 - dw Coord + dwCoord 5, 17 db $00 dw BattleTransition_CircleData5 - FuncCoord 9, 17 - dw Coord + dwCoord 9, 17 db $01 dw BattleTransition_CircleData5 - FuncCoord 10, 17 - dw Coord + dwCoord 10, 17 db $01 dw BattleTransition_CircleData4 - FuncCoord 14, 17 - dw Coord + dwCoord 14, 17 db $01 dw BattleTransition_CircleData3 - FuncCoord 18, 17 - dw Coord + dwCoord 18, 17 db $01 dw BattleTransition_CircleData2 - FuncCoord 19, 14 - dw Coord + dwCoord 19, 14 db $01 dw BattleTransition_CircleData1 - FuncCoord 18, 11 - dw Coord + dwCoord 18, 11 BattleTransition_Circle_Sub3: ; 70dc5 (1c:4dc5) push hl diff --git a/engine/battle/4_2.asm b/engine/battle/4_2.asm index db9d076f..c5c62796 100755 --- a/engine/battle/4_2.asm +++ b/engine/battle/4_2.asm @@ -18,8 +18,7 @@ Func_137aa: ; 137aa (4:77aa) jr z, .asm_137de ld de, DrawText .asm_137de - FuncCoord 6, 8 - ld hl, Coord + hlCoord 6, 8 call PlaceString ld c, $c8 call DelayFrames @@ -110,8 +109,7 @@ Func_13870: ; 13870 (4:7870) jr z, .asm_13905 ld [wd0db], a .asm_1389e - FuncCoord 9, 9 - ld hl, Coord + hlCoord 9, 9 ld c, [hl] ld a, [W_GRASSTILE] cp c @@ -145,8 +143,7 @@ Func_13870: ; 13870 (4:7870) .asm_138d7 ld c, [hl] ld hl, W_GRASSMONS ; wd888 - FuncCoord 8, 9 - ld a, [Coord] + aCoord 8, 9 cp $14 jr nz, .asm_138e5 ld hl, W_WATERMONS ; wd8a5 (aliases: wEnemyMon1HP) @@ -250,14 +247,12 @@ RecoilEffect_: ; 1392c (4:792c) ld [hli], a ld [hl], a .asm_13982 - FuncCoord 10, 9 - ld hl, Coord + hlCoord 10, 9 ld a, [H_WHOSETURN] ; $fff3 and a ld a, $1 jr z, .asm_13990 - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 xor a .asm_13990 ld [wListMenuID], a ; wListMenuID diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 8fad427a..cc598de4 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -754,8 +754,7 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e) cp a,1 ret nz .moveGhostMarowakLeft - FuncCoord 17,0 - ld hl,Coord + hlCoord 17, 0 ld de,20 ld bc,$0707 ; 7 rows and 7 columns .loop @@ -854,8 +853,7 @@ DoExplodeSpecialEffects: ; 79009 (1e:5009) cp a,1 ; is it the end of the subanimation? jr nz,FlashScreenEveryFourFrameBlocks ; if it's the end of the subanimation, make the attacking pokemon disappear - FuncCoord 1, 5 - ld hl,Coord + hlCoord 1, 5 jp AnimationHideMonPic ; make pokemon disappear ; flashes the screen when subanimation counter is 1 modulo 4 @@ -1561,11 +1559,9 @@ AnimationMoveMonHorizontally: ; 793f9 (1e:53f9) call AnimationHideMonPic ld a, [H_WHOSETURN] ; $fff3 and a - FuncCoord 2, 5 - ld hl, Coord + hlCoord 2, 5 jr z, .asm_79407 - FuncCoord 11, 0 - ld hl, Coord + hlCoord 11, 0 .asm_79407 xor a push hl @@ -1676,16 +1672,12 @@ AnimationSquishMonPic: ; 794a1 (1e:54a1) ld a, [H_WHOSETURN] ; $fff3 and a jr z, .asm_794b1 - FuncCoord 16, 0 - ld hl, Coord - FuncCoord 14, 0 - ld de, Coord + hlCoord 16, 0 + deCoord 14, 0 jr .asm_794b7 .asm_794b1 - FuncCoord 5, 5 - ld hl, Coord - FuncCoord 3, 5 - ld de, Coord + hlCoord 5, 5 + deCoord 3, 5 .asm_794b7 push de xor a @@ -1889,12 +1881,10 @@ Func_795f8: ; 795f8 (1e:55f8) ld a, [H_WHOSETURN] ; $fff3 and a jr z, .asm_79602 - FuncCoord 12, 0 - ld hl, Coord + hlCoord 12, 0 jr .asm_79605 .asm_79602 - FuncCoord 0, 5 - ld hl, Coord + hlCoord 0, 5 .asm_79605 ld d, $8 .asm_79607 @@ -2128,8 +2118,7 @@ Func_79793: ; 79793 (1e:5793) xor a ld [W_SPRITEFLIPPED], a call GetMonHeader - FuncCoord 12, 0 - ld hl, Coord + hlCoord 12, 0 call LoadFrontSpriteByMonIndex jr .asm_797d3 .asm_797b0 diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 4f382df7..b3495a29 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -96,8 +96,7 @@ Func_3c04c: ; 3c04c (f:404c) ld a, $1 ld [wd125], a call DisplayTextBoxID - FuncCoord 1, 5 - ld hl, Coord + hlCoord 1, 5 ld bc, $307 call ClearScreenArea call DisableLCD @@ -171,8 +170,7 @@ Func_3c04c: ; 3c04c (f:404c) ld [H_AUTOBGTRANSFERENABLED], a ; $ffba ld a, $31 ld [$ffe1], a - FuncCoord 1, 5 - ld hl, Coord + hlCoord 1, 5 predef Func_3f0c6 xor a ld [$ffb0], a @@ -309,8 +307,7 @@ Func_3c1ad: ; 3c1ad (f:41ad) ld [wcf91], a ld [wBattleMonSpecies2], a call LoadScreenTilesFromBuffer1 - FuncCoord 1, 5 - ld hl, Coord + hlCoord 1, 5 ld a, $9 call Func_3c8df call SaveScreenTilesToBuffer1 @@ -736,14 +733,12 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3) ret UpdateCurMonHPBar: ; 3c4f6 (f:44f6) - FuncCoord 10, 9 - ld hl, Coord ; tile pointer to player HP bar + hlCoord 10, 9 ; tile pointer to player HP bar ld a, [H_WHOSETURN] ; $fff3 and a ld a, $1 jr z, .playersTurn - FuncCoord 2, 2 - ld hl, Coord ; tile pointer to enemy HP bar + hlCoord 2, 2 ; tile pointer to enemy HP bar xor a .playersTurn push bc @@ -828,10 +823,8 @@ FaintEnemyPokemon ; 0x3c567 ld hl, wccf1 ld [hli], a ld [hl], a - FuncCoord 12, 5 - ld hl, Coord - FuncCoord 12, 6 - ld de, Coord + hlCoord 12, 5 + deCoord 12, 6 call Func_3c893 ld hl, wTileMap ld bc, $40b @@ -1063,14 +1056,11 @@ Func_3c741: ; 3c741 (f:4741) ld [hl], a ld [wBattleMonStatus], a ; wBattleMonStatus call ReadPlayerMonCurHPAndStatus - FuncCoord 9, 7 - ld hl, Coord + hlCoord 9, 7 ld bc, $50b call ClearScreenArea - FuncCoord 1, 10 - ld hl, Coord - FuncCoord 1, 11 - ld de, Coord + hlCoord 1, 10 + deCoord 1, 11 call Func_3c893 ld a, $1 ld [wcf0b], a @@ -1096,8 +1086,7 @@ Func_3c79b: ; 3c79b (f:479b) ld hl, UseNextMonText call PrintText .asm_3c7ad - FuncCoord 13, 9 - ld hl, Coord + hlCoord 13, 9 ld bc, $a0e ld a, $14 ld [wd125], a @@ -1333,8 +1322,7 @@ Func_3c92a: ; 3c92a (f:492a) ld [wAICount],a ld hl,W_PLAYERBATTSTATUS1 res 5,[hl] - FuncCoord 18, 0 - ld hl,Coord + hlCoord 18, 0 ld a,8 call Func_3c8df call Func_3ee94 @@ -1404,8 +1392,7 @@ Func_3c92a: ; 3c92a (f:492a) jr nz,.next4 ld hl, TrainerAboutToUseText call PrintText - FuncCoord 0, 7 - ld hl,Coord + hlCoord 0, 7 ld bc,$0801 ld a,$14 ld [wd125],a @@ -1456,8 +1443,7 @@ Func_3c92a: ; 3c92a (f:492a) call LoadMonFrontSprite ld a,$CF ld [$FFE1],a - FuncCoord 15, 6 - ld hl,Coord + hlCoord 15, 6 predef Func_3f073 ld a,[wEnemyMonSpecies2] call PlayCry @@ -1777,8 +1763,7 @@ Func_3cca4: ; 3cca4 (f:4ca4) ld [H_WHOSETURN], a ; $fff3 ld a, POOF_ANIM call PlayMoveAnimation - FuncCoord 4, 11 - ld hl, Coord + hlCoord 4, 11 predef Func_3f073 ld a, [wcf91] call PlayCry @@ -1786,12 +1771,10 @@ Func_3cca4: ; 3cca4 (f:4ca4) jp SaveScreenTilesToBuffer1 Func_3ccfa: ; 3ccfa (f:4cfa) - FuncCoord 1, 5 - ld hl, Coord + hlCoord 1, 5 ld bc, $707 call ClearScreenArea - FuncCoord 3, 7 - ld hl, Coord + hlCoord 3, 7 ld bc, $505 xor a ld [wcd6c], a @@ -1800,8 +1783,7 @@ Func_3ccfa: ; 3ccfa (f:4cfa) ld c, $4 call DelayFrames call Func_3cd3a - FuncCoord 4, 9 - ld hl, Coord + hlCoord 4, 9 ld bc, $303 ld a, $1 ld [wcd6c], a @@ -1811,12 +1793,10 @@ Func_3ccfa: ; 3ccfa (f:4cfa) call Delay3 call Func_3cd3a ld a, $4c - FuncCoord 5, 11 - ld [Coord], a + Coorda 5, 11 Func_3cd3a: ; 3cd3a (f:4d3a) - FuncCoord 1, 5 - ld hl, Coord + hlCoord 1, 5 ld bc, $707 jp ClearScreenArea @@ -1839,17 +1819,14 @@ Func_3cd5a: ; 3cd5a (f:4d5a) Func_3cd60: ; 3cd60 (f:4d60) xor a ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - FuncCoord 9, 7 - ld hl, Coord + hlCoord 9, 7 ld bc, $50b call ClearScreenArea callab PlacePlayerHUDTiles - FuncCoord 18, 9 - ld hl, Coord + hlCoord 18, 9 ld [hl], $73 ld de, wBattleMonNick - FuncCoord 10, 7 - ld hl, Coord + hlCoord 10, 7 call Func_3ce9c call PlaceString ld hl, wBattleMonSpecies @@ -1860,8 +1837,7 @@ Func_3cd60: ; 3cd60 (f:4d60) ld de, wcfb9 ld bc, $b call CopyData - FuncCoord 14, 8 - ld hl, Coord + hlCoord 14, 8 push hl inc hl ld de, wcf9c @@ -1872,8 +1848,7 @@ Func_3cd60: ; 3cd60 (f:4d60) .asm_3cdae ld a, [wcf98] ld [wcf91], a - FuncCoord 10, 9 - ld hl, Coord + hlCoord 10, 9 predef DrawHP ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a ; $ffba @@ -1910,12 +1885,10 @@ Func_3cdec: ; 3cdec (f:4dec) call ClearScreenArea callab PlaceEnemyHUDTiles ld de, wEnemyMonNick - FuncCoord 1, 0 - ld hl, Coord + hlCoord 1, 0 call Func_3ce9c call PlaceString - FuncCoord 4, 1 - ld hl, Coord + hlCoord 4, 1 push hl inc hl ld de, wEnemyMonStatus ; wcfe9 @@ -1984,8 +1957,7 @@ Func_3cdec: ; 3cdec (f:4dec) Func_3ce7f: ; 3ce7f (f:4e7f) xor a ld [wListMenuID], a ; wListMenuID - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 call DrawHPBar ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a ; $ffba @@ -2055,14 +2027,12 @@ InitBattleMenu: ; 3ceb3 (f:4eb3) ld bc, $b call CopyData ; the following simulates the keystrokes by drawing menus on screen - FuncCoord 9, 14 - ld hl, Coord + hlCoord 9, 14 ld [hl], "▶" ld c, $50 call DelayFrames ld [hl], $7f - FuncCoord 9, 16 - ld hl, Coord + hlCoord 9, 16 ld [hl], "▶" ld c, $32 call DelayFrames @@ -2087,19 +2057,14 @@ RegularBattleMenu: ; 3cf1a (f:4f1a) cp $2 ld a, " " jr z, .safaribattle - FuncCoord 15, 14 - ld [Coord], a - FuncCoord 15, 16 - ld [Coord], a + Coorda 15, 14 + Coorda 15, 16 ld b, $9 jr .notsafari .safaribattle - FuncCoord 13, 14 - ld [Coord], a - FuncCoord 13, 16 - ld [Coord], a - FuncCoord 7, 14 - ld hl, Coord + Coorda 13, 14 + Coorda 13, 16 + hlCoord 7, 14 ld de, W_NUMSAFARIBALLS ; W_NUMSAFARIBALLS ld bc, $102 call PrintNumber @@ -2124,19 +2089,14 @@ RegularBattleMenu: ; 3cf1a (f:4f1a) cp $2 ld a, " " jr z, .safarirightcolumn - FuncCoord 9, 14 - ld [Coord], a - FuncCoord 9, 16 - ld [Coord], a + Coorda 9, 14 + Coorda 9, 16 ld b, $f jr .notsafarirightcolumn .safarirightcolumn - FuncCoord 1, 14 - ld [Coord], a - FuncCoord 1, 16 - ld [Coord], a - FuncCoord 7, 14 - ld hl, Coord + Coorda 1, 14 + Coorda 1, 16 + hlCoord 7, 14 ld de, W_NUMSAFARIBALLS ; W_NUMSAFARIBALLS ld bc, $102 call PrintNumber @@ -2328,8 +2288,7 @@ asm_3d0f0: ; 3d0f0 (f:50f0) jp InitBattleMenu Func_3d105: ; 3d105 (f:5105) - FuncCoord 11, 11 - ld hl, Coord + hlCoord 11, 11 ld bc, $81 ld a, $7f call FillMemory @@ -2484,21 +2443,17 @@ MoveSelectionMenu: ; 3d219 (f:5219) ret z ld hl, wBattleMonMoves call .loadmoves - FuncCoord 4, 12 - ld hl, Coord + hlCoord 4, 12 ld b, $4 ld c, $e di call TextBoxBorder - FuncCoord 4, 12 - ld hl, Coord + hlCoord 4, 12 ld [hl], $7a - FuncCoord 10, 12 - ld hl, Coord + hlCoord 10, 12 ld [hl], $7e ei - FuncCoord 6, 13 - ld hl, Coord + hlCoord 6, 13 call .writemoves ld b, $5 ld a, $c @@ -2506,13 +2461,11 @@ MoveSelectionMenu: ; 3d219 (f:5219) .mimicmenu ld hl, wEnemyMonMoves call .loadmoves - FuncCoord 0, 7 - ld hl, Coord + hlCoord 0, 7 ld b, $4 ld c, $e call TextBoxBorder - FuncCoord 2, 8 - ld hl, Coord + hlCoord 2, 8 call .writemoves ld b, $1 ld a, $7 @@ -2523,13 +2476,11 @@ MoveSelectionMenu: ; 3d219 (f:5219) ld bc, $2c call AddNTimes call .loadmoves - FuncCoord 4, 7 - ld hl, Coord + hlCoord 4, 7 ld b, $4 ld c, $e call TextBoxBorder - FuncCoord 6, 8 - ld hl, Coord + hlCoord 6, 8 call .writemoves ld b, $5 ld a, $7 @@ -2584,8 +2535,7 @@ Func_3d2fe: ; 3d2fe (f:52fe) jr z, .battleselect dec a jr nz, .select - FuncCoord 1, 14 - ld hl, Coord + hlCoord 1, 14 ld de, WhichTechniqueString ; $53b8 call PlaceString jr .select @@ -2597,8 +2547,7 @@ Func_3d2fe: ; 3d2fe (f:52fe) ld a, [wcc35] and a jr z, .select - FuncCoord 5, 13 - ld hl, Coord + hlCoord 5, 13 dec a ld bc, $14 call AddNTimes @@ -2834,8 +2783,7 @@ asm_3d4ad: ; 3d4ad (f:54ad) Func_3d4b6: ; 3d4b6 (f:54b6) xor a ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - FuncCoord 0, 8 - ld hl, Coord + hlCoord 0, 8 ld b, $3 ld c, $9 call TextBoxBorder @@ -2848,8 +2796,7 @@ Func_3d4b6: ; 3d4b6 (f:54b6) ld a, [wCurrentMenuItem] ; wCurrentMenuItem cp b jr nz, .asm_3d4df - FuncCoord 1, 10 - ld hl, Coord + hlCoord 1, 10 ld de, DisabledText call PlaceString jr .asm_3d54e @@ -2879,29 +2826,23 @@ Func_3d4b6: ; 3d4b6 (f:54b6) ld a, [hl] and $3f ld [wcd6d], a - FuncCoord 1, 9 - ld hl, Coord + hlCoord 1, 9 ld de, TypeText call PlaceString - FuncCoord 7, 11 - ld hl, Coord + hlCoord 7, 11 ld [hl], "/" - FuncCoord 5, 9 - ld hl, Coord + hlCoord 5, 9 ld [hl], "/" - FuncCoord 5, 11 - ld hl, Coord + hlCoord 5, 11 ld de, wcd6d ld bc, $102 call PrintNumber - FuncCoord 8, 11 - ld hl, Coord + hlCoord 8, 11 ld de, wd11e ld bc, $102 call PrintNumber call GetCurrentMove - FuncCoord 2, 10 - ld hl, Coord + hlCoord 2, 10 predef Func_27d98 .asm_3d54e ld a, $1 @@ -4773,8 +4714,7 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142) ld [wHPBarNewHP+1],a ld a,[hl] ld [wHPBarNewHP],a - FuncCoord 2, 2 - ld hl,Coord + hlCoord 2, 2 xor a ld [wListMenuID],a predef UpdateHPBar2 ; animate the HP bar shortening @@ -4892,8 +4832,7 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200) ld [wHPBarMaxHP+1],a ld a,[hl] ld [wHPBarMaxHP],a - FuncCoord 10, 9 - ld hl,Coord + hlCoord 10, 9 ld a,$01 ld [wListMenuID],a predef UpdateHPBar2 ; animate the HP bar shortening @@ -6274,8 +6213,7 @@ Func_3ec92: ; 3ec92 (f:6c92) ld [$0], a ld a, $31 ld [$ffe1], a - FuncCoord 1, 5 - ld hl, Coord + hlCoord 1, 5 predef_jump Func_3f0c6 Func_3ed02: ; 3ed02 (f:6d02) @@ -6676,8 +6614,7 @@ asm_3ef3d: ; 3ef3d (f:6f3d) ld [$ffe1], a dec a ld [wAICount], a ; wccdf - FuncCoord 12, 0 - ld hl, Coord + hlCoord 12, 0 predef Func_3f0c6 ld a, $ff ld [wEnemyMonPartyPos], a @@ -6731,8 +6668,7 @@ InitWildBattle: ; 3ef8b (f:6f8b) xor a ld [W_TRAINERCLASS], a ; wd031 ld [$ffe1], a - FuncCoord 12, 0 - ld hl, Coord + hlCoord 12, 0 predef Func_3f0c6 Func_3efeb: ; 3efeb (f:6feb) @@ -6753,12 +6689,10 @@ Func_3efeb: ; 3efeb (f:6feb) ld a, $9c ld [$ffbd], a call LoadScreenTilesFromBuffer1 - FuncCoord 9, 7 - ld hl, Coord + hlCoord 9, 7 ld bc, $50a call ClearScreenArea - FuncCoord 1, 0 - ld hl, Coord + hlCoord 1, 0 ld bc, $40a call ClearScreenArea call ClearSprites @@ -6900,8 +6834,7 @@ LoadMonBackPic: ; been loaded with GetMonHeader. ld a, [wBattleMonSpecies2] ld [wcf91], a - FuncCoord 1, 5 - ld hl, Coord + hlCoord 1, 5 ld b, $7 ld c, $8 call ClearScreenArea diff --git a/engine/battle/d.asm b/engine/battle/d.asm index 5a1010b8..d23c9114 100755 --- a/engine/battle/d.asm +++ b/engine/battle/d.asm @@ -1,20 +1,16 @@ Func_372d6: ; 372d6 (d:72d6) call LoadTextBoxTilePatterns - FuncCoord 3, 4 - ld hl, Coord + hlCoord 3, 4 ld b, $7 ld c, $c call TextBoxBorder - FuncCoord 4, 5 - ld hl, Coord + hlCoord 4, 5 ld de, wPlayerName ; wd158 call PlaceString - FuncCoord 4, 10 - ld hl, Coord + hlCoord 4, 10 ld de, W_GRASSRATE ; W_GRASSRATE call PlaceString - FuncCoord 9, 8 - ld hl, Coord + hlCoord 9, 8 ld a, $69 ld [hli], a ld [hl], $6a diff --git a/engine/battle/e.asm b/engine/battle/e.asm index 3e9f3685..8b0476ca 100755 --- a/engine/battle/e.asm +++ b/engine/battle/e.asm @@ -67,8 +67,7 @@ _ScrollTrainerPicAfterBattle: ; 396d3 (e:56d3) ld b, $1 call GoPAL_SET callab _LoadTrainerPic - FuncCoord 19, 0 - ld hl, Coord + hlCoord 19, 0 ld c, $0 .asm_396e9 inc c @@ -1173,8 +1172,7 @@ AIRecoverHP: ; 3a6da (e:66da) Func_3a718: ; 3a718 (e:6718) call AIPrintItemUse_ - FuncCoord 2, 2 - ld hl,Coord + hlCoord 2, 2 xor a ld [wListMenuID],a predef UpdateHPBar2 @@ -1489,8 +1487,7 @@ PlacePlayerHUDTiles: ; 3a902 (e:6902) ld de, wTrainerFacingDirection ld bc, $3 call CopyData - FuncCoord 18, 10 - ld hl, Coord + hlCoord 18, 10 ld de, rIE ; $ffff jr PlaceHUDTiles @@ -1505,8 +1502,7 @@ PlaceEnemyHUDTiles: ; 3a919 (e:6919) ld de, wTrainerFacingDirection ld bc, $3 call CopyData - FuncCoord 1, 2 - ld hl, Coord + hlCoord 1, 2 ld de, $1 jr PlaceHUDTiles diff --git a/engine/battle/e_2.asm b/engine/battle/e_2.asm index f6d65301..665807fe 100755 --- a/engine/battle/e_2.asm +++ b/engine/battle/e_2.asm @@ -85,12 +85,10 @@ HealEffect_: ; 3b9ec (e:79ec) call BankswitchEtoF ld a, [H_WHOSETURN] ; $fff3 and a - FuncCoord 10, 9 - ld hl, Coord + hlCoord 10, 9 ld a, $1 jr z, .asm_3ba83 - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 xor a .asm_3ba83 ld [wListMenuID], a ; wListMenuID diff --git a/engine/cable_club.asm b/engine/cable_club.asm index 75d8bd00..fc049ceb 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -6,13 +6,11 @@ Func_5317: ; 5317 (1:5317) call LoadFontTilePatterns call LoadHpBarAndStatusTilePatterns call LoadTrainerInfoTextBoxTiles - FuncCoord 3, 8 - ld hl, Coord + hlCoord 3, 8 ld b, $2 ld c, $c call Func_5ab3 - FuncCoord 4, 10 - ld hl, Coord + hlCoord 4, 10 ld de, PleaseWaitString ; $550f call PlaceString ld hl, W_NUMHITS ; wd074 diff --git a/engine/clear_save.asm b/engine/clear_save.asm index 3a296e2e..5ef0d475 100755 --- a/engine/clear_save.asm +++ b/engine/clear_save.asm @@ -5,8 +5,7 @@ Func_1c98a: ; 1c98a (7:498a) call LoadTextBoxTilePatterns ld hl, ClearSaveDataText call PrintText - FuncCoord 14, 7 - ld hl, Coord + hlCoord 14, 7 ld bc, $80f ld a, $7 ld [wd12c], a diff --git a/engine/evolution.asm b/engine/evolution.asm index 8e511182..07ccdbda 100755 --- a/engine/evolution.asm +++ b/engine/evolution.asm @@ -99,8 +99,7 @@ Func_7beb4: ; 7beb4 (1e:7eb4) Func_7beb9: ; 7beb9 (1e:7eb9) call GetMonHeader - FuncCoord 7, 2 - ld hl, Coord + hlCoord 7, 2 jp LoadFlippedFrontSpriteByMonIndex asm_7bec2: ; 7bec2 (1e:7ec2) ld a, $31 @@ -117,8 +116,7 @@ Func_7bed6: ; 7bed6 (1e:7ed6) push bc xor a ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - FuncCoord 7, 2 - ld hl, Coord + hlCoord 7, 2 ld bc, $707 ld de, $d .asm_7bee3 diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index caadce13..f4384b91 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -57,13 +57,11 @@ AnimateHallOfFame: ; 701a0 (1c:41a0) call Func_702e1 ld c, $50 call DelayFrames - FuncCoord 2, 13 - ld hl, Coord + hlCoord 2, 13 ld b, $3 ld c, $e call TextBoxBorder - FuncCoord 4, 15 - ld hl, Coord + hlCoord 4, 15 ld de, HallOfFameText call PlaceString ld c, 180 @@ -113,8 +111,7 @@ Func_70278: ; 70278 (1c:4278) call Func_7033e jr .asm_702ab .asm_7029d - FuncCoord 12, 5 - ld hl, Coord + hlCoord 12, 5 call GetMonHeader call LoadFrontSpriteByMonIndex predef LoadMonBackPic @@ -157,27 +154,22 @@ Func_702e1: ; 702e1 (1c:42e1) jp Func_70404 Func_702f0: ; 702f0 (1c:42f0) - FuncCoord 0, 2 - ld hl, Coord + hlCoord 0, 2 ld b, $9 ld c, $a call TextBoxBorder - FuncCoord 2, 6 - ld hl, Coord + hlCoord 2, 6 ld de, HoFMonInfoText call PlaceString - FuncCoord 1, 4 - ld hl, Coord + hlCoord 1, 4 ld de, wcd6d call PlaceString ld a, [wTrainerFacingDirection] - FuncCoord 8, 7 - ld hl, Coord + hlCoord 8, 7 call PrintLevelCommon ld a, [wWhichTrade] ; wWhichTrade ld [wd0b5], a - FuncCoord 3, 9 - ld hl, Coord + hlCoord 3, 9 predef Func_27d6b ld a, [wWhichTrade] ; wWhichTrade jp PlayCry @@ -207,34 +199,28 @@ Func_7033e: ; 7033e (1c:433e) Func_7036d: ; 7036d (1c:436d) ld b, $0 - FuncCoord 12, 5 - ld hl, Coord + hlCoord 12, 5 predef_jump Func_79dda Func_70377: ; 70377 (1c:4377) ld hl, wd747 set 3, [hl] predef DisplayDexRating - FuncCoord 0, 4 - ld hl, Coord + hlCoord 0, 4 ld b, $6 ld c, $a call TextBoxBorder - FuncCoord 5, 0 - ld hl, Coord + hlCoord 5, 0 ld b, $2 ld c, $9 call TextBoxBorder - FuncCoord 7, 2 - ld hl, Coord + hlCoord 7, 2 ld de, wPlayerName ; wd158 call PlaceString - FuncCoord 1, 6 - ld hl, Coord + hlCoord 1, 6 ld de, HoFPlayTimeText call PlaceString - FuncCoord 5, 7 - ld hl, Coord + hlCoord 5, 7 ld de, W_PLAYTIMEHOURS + 1 ld bc, $103 call PrintNumber @@ -243,12 +229,10 @@ Func_70377: ; 70377 (1c:4377) ld de, W_PLAYTIMEMINUTES + 1 ld bc, $8102 call PrintNumber - FuncCoord 1, 9 - ld hl, Coord + hlCoord 1, 9 ld de, HoFMoneyText call PlaceString - FuncCoord 4, 10 - ld hl, Coord + hlCoord 4, 10 ld de, wPlayerMoney ; wPlayerMoney ld c, $a3 call PrintBCDNumber diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm index d2408a5b..f0126b65 100755 --- a/engine/hidden_object_functions17.asm +++ b/engine/hidden_object_functions17.asm @@ -77,8 +77,7 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9) call LoadMonFrontSprite ld a, $80 ld [$ffe1], a - FuncCoord 10, 11 - ld hl, Coord + hlCoord 10, 11 predef Func_3f073 call WaitForTextScrollButtonPress call LoadScreenTilesFromBuffer1 diff --git a/engine/hidden_object_functions3.asm b/engine/hidden_object_functions3.asm index a71ef667..e613df2e 100755 --- a/engine/hidden_object_functions3.asm +++ b/engine/hidden_object_functions3.asm @@ -5,8 +5,7 @@ PrintBookshelfText: ; fb50 (3:7b50) jr nz, .asm_fb7f ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET ld b, a - FuncCoord 8, 7 - ld a, [Coord] + aCoord 8, 7 ld c, a ld hl, BookshelfTileIDs ; $7b8b .asm_fb62 diff --git a/engine/intro.asm b/engine/intro.asm index 2b8c2dbf..801324a5 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -204,8 +204,7 @@ Func_417f0: ; 417f0 (10:57f0) jr asm_417fe Func_417f8: ; 417f8 (10:57f8) - FuncCoord 0, 4 - ld hl, Coord + hlCoord 0, 4 ld bc, $c8 asm_417fe: ; 417fe (10:57fe) ld [hl], $0 @@ -259,8 +258,7 @@ Func_4180e: ; 4180e (10:580e) ret Func_4183f: ; 4183f (10:583f) - FuncCoord 13, 7 - ld hl, Coord + hlCoord 13, 7 Func_41842: ; 41842 (10:5842) ld c, $0 @@ -335,8 +333,7 @@ Func_418e9: ; 418e9 (10:58e9) ld hl, wTileMap ld c, $50 call Func_41807 - FuncCoord 0, 14 - ld hl, Coord + hlCoord 0, 14 ld c, $50 call Func_41807 ld hl, vBGMap1 diff --git a/engine/items/items.asm b/engine/items/items.asm index fbb2ec8f..830f0dfc 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -913,8 +913,7 @@ ItemUseMedicine: ; dabb (3:5abb) sbc b ld [hl],a ld [wHPBarNewHP+1],a - FuncCoord 4, 1 - ld hl,Coord + hlCoord 4, 1 ld a,[wWhichPokemon] ld bc,2 * 20 call AddNTimes ; calculate coordinates of HP bar of pokemon that used Softboiled @@ -2096,8 +2095,7 @@ ItemUseTMHM: ; e479 (3:6479) call PrintText ld hl,TeachMachineMoveText call PrintText - FuncCoord 14,7 - ld hl,Coord + hlCoord 14, 7 ld bc,$080f ld a,$14 ld [wd125],a @@ -2488,8 +2486,7 @@ TossItem_: ; e6f1 (3:66f1) call CopyStringToCF4B ; copy name to wcf4b ld hl,IsItOKToTossItemText call PrintText - FuncCoord 14,7 - ld hl,Coord + hlCoord 14, 7 ld bc,$080f ld a,$14 ld [wd125],a diff --git a/engine/learn_move.asm b/engine/learn_move.asm index 0561abcd..bbfb41a3 100755 --- a/engine/learn_move.asm +++ b/engine/learn_move.asm @@ -76,8 +76,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b) AbandonLearning: ; 6eda (1:6eda) ld hl, AbandonLearningText call PrintText - FuncCoord 14, 7 - ld hl, Coord + hlCoord 14, 7 ld bc, $80f ld a, $14 ld [wd125], a @@ -100,8 +99,7 @@ TryingToLearn: ; 6f07 (1:6f07) push hl ld hl, TryingToLearnText call PrintText - FuncCoord 14, 7 - ld hl, Coord + hlCoord 14, 7 ld bc, $80f ld a, $14 ld [wd125], a @@ -122,13 +120,11 @@ TryingToLearn: ; 6f07 (1:6f07) push hl ld hl, WhichMoveToForgetText call PrintText - FuncCoord 4, 7 - ld hl, Coord + hlCoord 4, 7 ld b, $4 ld c, $e call TextBoxBorder - FuncCoord 6, 8 - ld hl, Coord + hlCoord 6, 8 ld de, wd0e1 ld a, [$fff6] set 2, a diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index 2640bada..3edaadd8 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -32,18 +32,15 @@ Func_213c8:: ; 213c8 (8:53c8) ld a, [wd7f1] bit 0, a jr nz, .asm_21414 - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld de, SomeonesPCText ; $548b jr .asm_2141a .asm_21414 - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld de, BillsPCText ; $5497 .asm_2141a call PlaceString - FuncCoord 2, 4 - ld hl, Coord + hlCoord 2, 4 ld de, wPlayerName ; wd158 call PlaceString ld l, c @@ -53,8 +50,7 @@ Func_213c8:: ; 213c8 (8:53c8) ld a, [wd74b] bit 5, a jr z, .asm_21462 - FuncCoord 2, 6 - ld hl, Coord + hlCoord 2, 6 ld de, OaksPCText ; $54a5 call PlaceString ld a, [wd5a2] @@ -62,24 +58,20 @@ Func_213c8:: ; 213c8 (8:53c8) jr z, .asm_2145a ld a, $4 ld [wMaxMenuItem], a ; wMaxMenuItem - FuncCoord 2, 8 - ld hl, Coord + hlCoord 2, 8 ld de, PKMNLeaguePCText ; $54b2 call PlaceString - FuncCoord 2, 10 - ld hl, Coord + hlCoord 2, 10 ld de, LogOffPCText ; $54ba jr .asm_2146d .asm_2145a - FuncCoord 2, 8 - ld hl, Coord + hlCoord 2, 8 ld de, LogOffPCText ; $54ba jr .asm_2146d .asm_21462 ld a, $2 ld [wMaxMenuItem], a ; wMaxMenuItem - FuncCoord 2, 6 - ld hl, Coord + hlCoord 2, 6 ld de, LogOffPCText ; $54ba .asm_2146d call PlaceString @@ -146,8 +138,7 @@ BillsPCMenu: ld b, $a ld c, $c call TextBoxBorder - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld de, BillsPCMenuText ; $56e1 call PlaceString ld hl, wTopMenuItemY ; wTopMenuItemY @@ -170,8 +161,7 @@ BillsPCMenu: ld [wPlayerMonNumber], a ; wPlayerMonNumber ld hl, WhatText call PrintText - FuncCoord 9, 14 - ld hl, Coord + hlCoord 9, 14 ld b, $2 ld c, $9 call TextBoxBorder @@ -180,18 +170,15 @@ BillsPCMenu: cp $9 jr c, .asm_2154f sub $9 - FuncCoord 17, 16 - ld hl, Coord + hlCoord 17, 16 ld [hl], $f7 add $f6 jr .asm_21551 .asm_2154f add $f7 .asm_21551 - FuncCoord 18, 16 - ld [Coord], a - FuncCoord 10, 16 - ld hl, Coord + Coorda 18, 16 + hlCoord 10, 16 ld de, BoxNoPCText ; $5713 call PlaceString ld a, $1 @@ -405,8 +392,7 @@ HMMoveArray: ; 21745 (8:5745) db $ff Func_2174b: ; 2174b (8:574b) - FuncCoord 9, 10 - ld hl, Coord + hlCoord 9, 10 ld b, $6 ld c, $9 call TextBoxBorder @@ -416,11 +402,9 @@ Func_2174b: ; 2174b (8:574b) jr nz, .asm_21761 ld de, WithdrawPCText ; $57d3 .asm_21761 - FuncCoord 11, 12 - ld hl, Coord + hlCoord 11, 12 call PlaceString - FuncCoord 11, 14 - ld hl, Coord + hlCoord 11, 14 ld de, StatsCancelPCText ; $57dc call PlaceString ld hl, wTopMenuItemY ; wTopMenuItemY diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm index 3bf185fd..023c6177 100755 --- a/engine/menu/diploma.asm +++ b/engine/menu/diploma.asm @@ -33,8 +33,7 @@ DisplayDiploma: ; 566e2 (15:66e2) pop bc dec c jr nz, .asm_56715 ; 0x56725 $ee - FuncCoord 10, 4 - ld hl, Coord + hlCoord 10, 4 ld de, wPlayerName call PlaceString callba Func_44dd diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm index 46f63420..4833e57d 100755 --- a/engine/menu/league_pc.asm +++ b/engine/menu/league_pc.asm @@ -93,22 +93,18 @@ Func_76610: ; 76610 (1d:6610) ld b, $0B ld c, 0 call GoPAL_SET - FuncCoord 12, 5 - ld hl, Coord + hlCoord 12, 5 call GetMonHeader call LoadFrontSpriteByMonIndex call GBPalNormal - FuncCoord 0, 13 - ld hl, Coord + hlCoord 0, 13 ld b, 2 ld c, $12 call TextBoxBorder - FuncCoord 1, 15 - ld hl, Coord + hlCoord 1, 15 ld de, HallOfFameNoText call PlaceString - FuncCoord 16, 15 - ld hl, Coord + hlCoord 16, 15 ld de, wcd42 ld bc, $0103 call PrintNumber diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 06c85096..4044da43 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -33,24 +33,20 @@ MainMenu: ; 5af2 (1:5af2) ld a,[wd088] cp a,1 jr z,.next1 - FuncCoord 0,0 - ld hl,Coord + hlCoord 0, 0 ld b,6 ld c,13 call TextBoxBorder - FuncCoord 2,2 - ld hl,Coord + hlCoord 2, 2 ld de,ContinueText call PlaceString jr .next2 .next1 - FuncCoord 0,0 - ld hl,Coord + hlCoord 0, 0 ld b,4 ld c,13 call TextBoxBorder - FuncCoord 2,2 - ld hl,Coord + hlCoord 2, 2 ld de,NewGameText call PlaceString .next2 @@ -142,14 +138,12 @@ LinkMenu: ; 5c0a (1:5c0a) call SaveScreenTilesToBuffer1 ld hl, WhereWouldYouLikeText call PrintText - FuncCoord 5, 5 - ld hl, Coord + hlCoord 5, 5 ld b, $6 ld c, $d call TextBoxBorder call UpdateSprites - FuncCoord 7, 7 - ld hl, Coord + hlCoord 7, 7 ld de, TradeCenterText call PlaceString xor a @@ -238,14 +232,11 @@ LinkMenu: ; 5c0a (1:5c0a) ld c, d .asm_5ccc ld a, b - FuncCoord 6, 7 - ld [Coord], a + Coorda 6, 7 ld a, c - FuncCoord 6, 9 - ld [Coord], a + Coorda 6, 9 ld a, d - FuncCoord 6, 11 - ld [Coord], a + Coorda 6, 11 ld c, $28 call DelayFrames call LoadScreenTilesFromBuffer1 @@ -343,27 +334,21 @@ TradeCenterText: ; 5d97 (1:5d97) ContinueGame: ; 5db5 (1:5db5) xor a ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - FuncCoord 4, 7 - ld hl, Coord + hlCoord 4, 7 ld b, $8 ld c, $e call TextBoxBorder - FuncCoord 5, 9 - ld hl, Coord + hlCoord 5, 9 ld de, SaveScreenInfoText call PlaceString - FuncCoord 12, 9 - ld hl, Coord + hlCoord 12, 9 ld de, wPlayerName ; wd158 call PlaceString - FuncCoord 17, 11 - ld hl, Coord + hlCoord 17, 11 call Func_5e2f - FuncCoord 16, 13 - ld hl, Coord + hlCoord 16, 13 call Func_5e42 - FuncCoord 13, 15 - ld hl, Coord + hlCoord 13, 15 call Func_5e55 ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a ; $ffba @@ -433,35 +418,28 @@ SaveScreenInfoText: ; 5e6a (1:5e6a) next "TIME@" DisplayOptionMenu: ; 5e8a (1:5e8a) - FuncCoord 0,0 - ld hl,Coord + hlCoord 0, 0 ld b,3 ld c,18 call TextBoxBorder - FuncCoord 0,5 - ld hl,Coord + hlCoord 0, 5 ld b,3 ld c,18 call TextBoxBorder - FuncCoord 0,10 - ld hl,Coord + hlCoord 0, 10 ld b,3 ld c,18 call TextBoxBorder - FuncCoord 1,1 - ld hl,Coord + hlCoord 1, 1 ld de,TextSpeedOptionText call PlaceString - FuncCoord 1,6 - ld hl,Coord + hlCoord 1, 6 ld de,BattleAnimationOptionText call PlaceString - FuncCoord 1,11 - ld hl,Coord + hlCoord 1, 11 ld de,BattleStyleOptionText call PlaceString - FuncCoord 2,16 - ld hl,Coord + hlCoord 2, 16 ld de,OptionMenuCancelText call PlaceString xor a @@ -655,8 +633,7 @@ SetCursorPositionsFromOptions: ; 604c (1:604c) dec hl ld a,[hl] ld [wWhichTrade],a ; text speed cursor X coordinate - FuncCoord 0,3 - ld hl,Coord + hlCoord 0, 3 call .placeUnfilledRightArrow sla c ld a,1 ; On @@ -664,8 +641,7 @@ SetCursorPositionsFromOptions: ; 604c (1:604c) ld a,10 ; Off .storeBattleAnimationCursorX ld [wTrainerEngageDistance],a ; battle animation cursor X coordinate - FuncCoord 0,8 - ld hl,Coord + hlCoord 0, 8 call .placeUnfilledRightArrow sla c ld a,1 @@ -673,12 +649,10 @@ SetCursorPositionsFromOptions: ; 604c (1:604c) ld a,10 .storeBattleStyleCursorX ld [wTrainerFacingDirection],a ; battle style cursor X coordinate - FuncCoord 0,13 - ld hl,Coord + hlCoord 0, 13 call .placeUnfilledRightArrow ; cursor in front of Cancel - FuncCoord 0,16 - ld hl,Coord + hlCoord 0, 16 ld a,1 .placeUnfilledRightArrow ld e,a diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index e065d98d..17aa96e6 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -13,8 +13,7 @@ AskName: ; 64eb (1:64eb) call GetMonName ld hl, DoYouWantToNicknameText call PrintText - FuncCoord 14, 7 - ld hl, Coord + hlCoord 14, 7 ld bc, $80f ld a, $14 ld [wd125], a @@ -94,8 +93,7 @@ DisplayNamingScreen: ; 6596 (1:6596) call LoadHpBarAndStatusTilePatterns call LoadEDTile callba Func_7176c - FuncCoord 0, 4 - ld hl, Coord + hlCoord 0, 4 ld b, $9 ld c, $12 call TextBoxBorder @@ -341,8 +339,7 @@ PrintAlphabet: ; 676f (1:676f) jr nz, .asm_677e ld de, UpperCaseAlphabet ; $67d6 .asm_677e - FuncCoord 2, 5 - ld hl, Coord + hlCoord 2, 5 ld bc, $509 .asm_6784 push bc @@ -373,16 +370,13 @@ Func_680e: ; 680e (1:680e) call CalcStringLength ld a, c ld [wHPBarMaxHP], a - FuncCoord 10, 2 - ld hl, Coord + hlCoord 10, 2 ld bc, $10a call ClearScreenArea - FuncCoord 10, 2 - ld hl, Coord + hlCoord 10, 2 ld de, wcf4b call PlaceString - FuncCoord 10, 3 - ld hl, Coord + hlCoord 10, 3 ld a, [wd07d] cp $2 jr nc, .asm_6835 @@ -419,8 +413,7 @@ Func_680e: ; 680e (1:680e) .asm_6867 ld c, a ld b, $0 - FuncCoord 10, 3 - ld hl, Coord + hlCoord 10, 3 add hl, bc ld [hl], $77 ret @@ -468,8 +461,7 @@ CalcStringLength: ; 68eb (1:68eb) jr .asm_68f0 PrintNamingText: ; 68f8 (1:68f8) - FuncCoord 0, 1 - ld hl, Coord + hlCoord 0, 1 ld a, [wd07d] ld de, YourTextString ; $693f and a @@ -484,14 +476,12 @@ PrintNamingText: ; 68f8 (1:68f8) pop af ld [wd11e], a call GetMonName - FuncCoord 4, 1 - ld hl, Coord + hlCoord 4, 1 call PlaceString ld hl, $1 add hl, bc ld [hl], $c9 - FuncCoord 1, 3 - ld hl, Coord + hlCoord 1, 3 ld de, NicknameTextString ; $6953 jr .placeString .notNickname diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index d0a74c11..4e47361b 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -30,8 +30,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) jp z,.printMessage call ErasePartyMenuCursors callba SendBlkPacket_PartyMenu ; loads some data to wcf2e - FuncCoord 3,0 - ld hl,Coord + hlCoord 3, 0 ld de,wPartySpecies xor a ld c,a diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm index f29ef258..4ff1b16f 100755 --- a/engine/menu/players_pc.asm +++ b/engine/menu/players_pc.asm @@ -26,8 +26,7 @@ Func_790c: ; 790c (1:790c) ld c, $e call TextBoxBorder call UpdateSprites - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld de, PlayersPCMenuEntries ; $7af5 call PlaceString ld hl, wTopMenuItemY ; wTopMenuItemY diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 4d3f5aaa..63e440f8 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -118,8 +118,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d) pop af ld [wCurrentMenuItem],a push bc - FuncCoord 0,3 - ld hl,Coord + hlCoord 0, 3 ld de,20 ld bc,$7f0d ; 13 blank tiles call DrawTileLine ; cover up the menu cursor in the pokemon list @@ -127,8 +126,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d) ret .buttonBPressed push bc - FuncCoord 15,10 - ld hl,Coord + hlCoord 15, 10 ld de,20 ld bc,$7f07 ; 7 blank tiles call DrawTileLine ; cover up the menu cursor in the side menu @@ -155,53 +153,43 @@ HandlePokedexListMenu: ; 40111 (10:4111) xor a ld [H_AUTOBGTRANSFERENABLED],a ; draw the horizontal line separating the seen and owned amounts from the menu - FuncCoord 15,8 - ld hl,Coord + hlCoord 15, 8 ld a,$7a ; horizontal line tile ld [hli],a ld [hli],a ld [hli],a ld [hli],a ld [hli],a - FuncCoord 14,0 - ld hl,Coord + hlCoord 14, 0 ld [hl],$71 ; vertical line tile - FuncCoord 14,1 - ld hl,Coord + hlCoord 14, 1 call DrawPokedexVerticalLine - FuncCoord 14,9 - ld hl,Coord + hlCoord 14, 9 call DrawPokedexVerticalLine ld hl,wPokedexSeen ld b,wPokedexSeenEnd - wPokedexSeen call CountSetBits ld de,wd11e - FuncCoord 16,3 - ld hl,Coord + hlCoord 16, 3 ld bc,$0103 call PrintNumber ; print number of seen pokemon ld hl,wPokedexOwned ld b,wPokedexOwnedEnd - wPokedexOwned call CountSetBits ld de,wd11e - FuncCoord 16,6 - ld hl,Coord + hlCoord 16, 6 ld bc,$0103 call PrintNumber ; print number of owned pokemon - FuncCoord 16,2 - ld hl,Coord + hlCoord 16, 2 ld de,PokedexSeenText call PlaceString - FuncCoord 16,5 - ld hl,Coord + hlCoord 16, 5 ld de,PokedexOwnText call PlaceString - FuncCoord 1,1 - ld hl,Coord + hlCoord 1, 1 ld de,PokedexContentsText call PlaceString - FuncCoord 16,10 - ld hl,Coord + hlCoord 16, 10 ld de,PokedexMenuItemsText call PlaceString ; find the highest pokedex number among the pokemon the player has seen @@ -223,12 +211,10 @@ HandlePokedexListMenu: ; 40111 (10:4111) .loop xor a ld [H_AUTOBGTRANSFERENABLED],a - FuncCoord 4,2 - ld hl,Coord + hlCoord 4, 2 ld bc,$0e0a call ClearScreenArea - FuncCoord 1,3 - ld hl,Coord + hlCoord 1, 3 ld a,[wListScrollOffset] ld [wd11e],a ld d,7 @@ -422,47 +408,36 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) push af xor a ld [$ffd7],a - FuncCoord 0,0 - ld hl,Coord + hlCoord 0, 0 ld de,1 ld bc,$6414 call DrawTileLine ; draw top border - FuncCoord 0,17 - ld hl,Coord + hlCoord 0, 17 ld b,$6f call DrawTileLine ; draw bottom border - FuncCoord 0,1 - ld hl,Coord + hlCoord 0, 1 ld de,20 ld bc,$6610 call DrawTileLine ; draw left border - FuncCoord 19,1 - ld hl,Coord + hlCoord 19, 1 ld b,$67 call DrawTileLine ; draw right border - FuncCoord 0,0 ld a,$63 ; upper left corner tile - ld [Coord],a - FuncCoord 19,0 + Coorda 0, 0 ld a,$65 ; upper right corner tile - ld [Coord],a - FuncCoord 0,17 + Coorda 19, 0 ld a,$6c ; lower left corner tile - ld [Coord],a - FuncCoord 19,17 + Coorda 0, 17 ld a,$6e ; lower right corner tile - ld [Coord],a - FuncCoord 0,9 - ld hl,Coord + Coorda 19, 17 + hlCoord 0, 9 ld de,PokedexDataDividerLine call PlaceString ; draw horizontal divider line - FuncCoord 9,6 - ld hl,Coord + hlCoord 9, 6 ld de,HeightWeightText call PlaceString call GetMonName - FuncCoord 9,2 - ld hl,Coord + hlCoord 9, 2 call PlaceString ld hl,PokedexEntryPointers ld a,[wd11e] @@ -474,8 +449,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld a,[hli] ld e,a ld d,[hl] ; de = address of pokedex entry - FuncCoord 9,4 - ld hl,Coord + hlCoord 9, 4 call PlaceString ; print species name ld h,b ld l,c @@ -483,8 +457,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld a,[wd11e] push af call IndexToPokedex - FuncCoord 2,8 - ld hl,Coord + hlCoord 2, 8 ld a, "№" ld [hli],a ld a,$f2 @@ -506,8 +479,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) call Delay3 call GBPalNormal call GetMonHeader ; load pokemon picture location - FuncCoord 1,1 - ld hl,Coord + hlCoord 1, 1 call LoadFlippedFrontSpriteByMonIndex ; draw pokemon picture ld a,[wcf91] call PlayCry ; play pokemon cry @@ -520,16 +492,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) jp z,.waitForButtonPress ; if the pokemon has not been owned, don't print the height, weight, or description inc de ; de = address of feet (height) ld a,[de] ; reads feet, but a is overwritten without being used - FuncCoord 12,6 - ld hl,Coord + hlCoord 12, 6 ld bc,$0102 call PrintNumber ; print feet (height) ld a,$60 ; feet symbol tile (one tick) ld [hl],a inc de inc de ; de = address of inches (height) - FuncCoord 15,6 - ld hl,Coord + hlCoord 15, 6 ld bc,$8102 call PrintNumber ; print inches (height) ld a,$61 ; inches symbol tile (two ticks) @@ -550,13 +520,11 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) dec de ld a,[de] ; a = lower byte of weight ld [hl],a ; store lower byte of weight in [$ff8c] - FuncCoord 11,8 ld de,$ff8b - ld hl,Coord + hlCoord 11, 8 ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits call PrintNumber ; print weight - FuncCoord 14,8 - ld hl,Coord + hlCoord 14, 8 ld a,[$ff8c] sub a,10 ld a,[$ff8b] @@ -574,8 +542,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld [$ff8b],a ; restore original value of [$ff8b] pop hl inc hl ; hl = address of pokedex description text - FuncCoord 1,11 - ld bc,Coord + bcCoord 1, 11 ld a,2 ld [$fff4],a call TextCommandProcessor ; print pokedex description text diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm index 63bdedee..141b9beb 100755 --- a/engine/menu/prize_menu.asm +++ b/engine/menu/prize_menu.asm @@ -22,8 +22,7 @@ CeladonPrizeMenu: ; 5271b (14:671b) ld a,$01 ld [wTopMenuItemX],a call PrintPrizePrice ; 687A - FuncCoord 0,2 - ld hl,Coord + hlCoord 0, 2 ld b,$08 ld c,$10 call TextBoxBorder @@ -94,50 +93,42 @@ GetPrizeMenuId: ; 5278e (14:678e) ld a,[W_PRIZE1] ld [wd11e],a call GetItemName - FuncCoord 2,4 - ld hl,Coord + hlCoord 2, 4 call PlaceString ld a,[W_PRIZE2] ld [wd11e],a call GetItemName - FuncCoord 2,6 - ld hl,Coord + hlCoord 2, 6 call PlaceString ld a,[W_PRIZE3] ld [wd11e],a call GetItemName - FuncCoord 2,8 - ld hl,Coord + hlCoord 2, 8 call PlaceString jr .putNoThanksText .putMonName ; 14:67EC ld a,[W_PRIZE1] ld [wd11e],a call GetMonName - FuncCoord 2,4 - ld hl,Coord + hlCoord 2, 4 call PlaceString ld a,[W_PRIZE2] ld [wd11e],a call GetMonName - FuncCoord 2,6 - ld hl,Coord + hlCoord 2, 6 call PlaceString ld a,[W_PRIZE3] ld [wd11e],a call GetMonName - FuncCoord 2,8 - ld hl,Coord + hlCoord 2, 8 call PlaceString .putNoThanksText ; 14:6819 - FuncCoord 2,10 - ld hl,Coord + hlCoord 2, 10 ld de,NoThanksText call PlaceString ; put prices on the right side of the textbox ld de,wd141 - FuncCoord 13,5 - ld hl,Coord + hlCoord 13, 5 ; reg. c: ; [low nybble] number of bytes ; [bit 765 = %100] space-padding (not zero-padding) @@ -146,35 +137,29 @@ GetPrizeMenuId: ; 5278e (14:678e) ; used by text-command $02) call PrintBCDNumber ; Print_BCD ld de,wd143 - FuncCoord 13,7 - ld hl,Coord + hlCoord 13, 7 ld c,(%1 << 7 | 2) call PrintBCDNumber ld de,wd145 - FuncCoord 13,9 - ld hl,Coord + hlCoord 13, 9 ld c,(1 << 7 | 2) jp PrintBCDNumber INCLUDE "data/prizes.asm" PrintPrizePrice: ; 5287a (14:687a) - FuncCoord 11,0 - ld hl,Coord + hlCoord 11, 0 ld b,$01 ld c,$07 call TextBoxBorder call UpdateSprites ; XXX save OAM? - FuncCoord 12,0 - ld hl,Coord + hlCoord 12, 0 ld de,.CoinText call PlaceString - FuncCoord 13,1 - ld hl,Coord + hlCoord 13, 1 ld de,.SixSpacesText call PlaceString - FuncCoord 13,1 - ld hl,Coord + hlCoord 13, 1 ld de,wPlayerCoins ld c,%10000010 call PrintBCDNumber diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index bb23321b..7c6fe4d6 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -285,8 +285,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) ; writes a blank tile to all possible menu cursor positions on the party menu ErasePartyMenuCursors: ; 132ed (4:72ed) - FuncCoord 0,1 - ld hl,Coord + hlCoord 0, 1 ld bc,2 * 20 ; menu cursor positions are 2 rows apart ld a,6 ; 6 menu cursor positions .loop @@ -331,14 +330,10 @@ StartMenu_Item: ; 13302 (4:7302) .choseItem ; erase menu cursor (blank each tile in front of an item name) ld a," " - FuncCoord 5,4 - ld [Coord],a - FuncCoord 5,6 - ld [Coord],a - FuncCoord 5,8 - ld [Coord],a - FuncCoord 5,10 - ld [Coord],a + Coorda 5, 4 + Coorda 5, 6 + Coorda 5, 8 + Coorda 5, 10 call PlaceUnfilledArrowMenuCursor xor a ld [wcc35],a @@ -531,12 +526,10 @@ DrawTrainerInfo: ; 1349a (4:749a) ld bc,(BANK(RedPicFront) << 8) | $01 predef Predef3B call DisableLCD - FuncCoord 0,2 - ld hl,Coord + hlCoord 0, 2 ld a," " call TrainerInfo_DrawVerticalLine - FuncCoord 1,2 - ld hl,Coord + hlCoord 1, 2 call TrainerInfo_DrawVerticalLine ld hl,vChars2 + $70 ld de,vChars2 @@ -579,8 +572,7 @@ DrawTrainerInfo: ; 1349a (4:749a) dec a ld [hli],a ld [hl],1 - FuncCoord 0,0 - ld hl,Coord + hlCoord 0, 0 call TrainerInfo_DrawTextBox ld hl,wWhichTrade ld a,16 + 1 @@ -588,35 +580,27 @@ DrawTrainerInfo: ; 1349a (4:749a) dec a ld [hli],a ld [hl],3 - FuncCoord 1,10 - ld hl,Coord + hlCoord 1, 10 call TrainerInfo_DrawTextBox - FuncCoord 0,10 - ld hl,Coord + hlCoord 0, 10 ld a,$d7 call TrainerInfo_DrawVerticalLine - FuncCoord 19,10 - ld hl,Coord + hlCoord 19, 10 call TrainerInfo_DrawVerticalLine - FuncCoord 6,9 - ld hl,Coord + hlCoord 6, 9 ld de,TrainerInfo_BadgesText call PlaceString - FuncCoord 2,2 - ld hl,Coord + hlCoord 2, 2 ld de,TrainerInfo_NameMoneyTimeText call PlaceString - FuncCoord 7,2 - ld hl,Coord + hlCoord 7, 2 ld de,wPlayerName call PlaceString - FuncCoord 8,4 - ld hl,Coord + hlCoord 8, 4 ld de,wPlayerMoney ld c,$e3 call PrintBCDNumber - FuncCoord 9,6 - ld hl,Coord + hlCoord 9, 6 ld de,W_PLAYTIMEHOURS + 1 ; hours ld bc,$4103 call PrintNumber diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 3b830244..65b06e9d 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -40,8 +40,7 @@ StatusScreen: ; 12953 (4:6953) push af xor a ld [$ffd7], a - FuncCoord 19,1 - ld hl, Coord + hlCoord 19, 1 ld bc, $060a call DrawLineBox ; Draws the box around name, HP and status ld de, $fffa @@ -49,66 +48,54 @@ StatusScreen: ; 12953 (4:6953) ld [hl], $f2 ; . after No ("." is a different one) dec hl ld [hl], "№" - FuncCoord 19,9 - ld hl, Coord + hlCoord 19, 9 ld bc, $0806 call DrawLineBox ; Draws the box around types, ID No. and OT - FuncCoord 10,9 - ld hl, Coord + hlCoord 10, 9 ld de, Type1Text call PlaceString ; "TYPE1/" - FuncCoord 11,3 - ld hl, Coord + hlCoord 11, 3 predef DrawHP ; predef $5f ld hl, wcf25 call GetHealthBarColor ld b, $3 call GoPAL_SET ; SGB palette - FuncCoord 16,6 - ld hl, Coord + hlCoord 16, 6 ld de, wcf9c call PrintStatusCondition jr nz, .StatusWritten ; 0x129fc $9 - FuncCoord 16,6 - ld hl, Coord + hlCoord 16, 6 ld de, OKText call PlaceString ; "OK" .StatusWritten - FuncCoord 9,6 - ld hl, Coord + hlCoord 9, 6 ld de, StatusText call PlaceString ; "STATUS/" - FuncCoord 14,2 - ld hl, Coord + hlCoord 14, 2 call PrintLevel ; Pokémon level ld a, [W_MONHDEXNUM] ld [wd11e], a ld [wd0b5], a predef IndexToPokedex - FuncCoord 3,7 - ld hl, Coord + hlCoord 3, 7 ld de, wd11e ld bc, $8103 ; Zero-padded, 3 call PrintNumber ; Pokémon no. - FuncCoord 11,10 - ld hl, Coord + hlCoord 11, 10 predef Func_27d6b ; Prints the type (?) ld hl, NamePointers2 ; $6a9d call .unk_12a7e ld d, h ld e, l - FuncCoord 9,1 - ld hl, Coord + hlCoord 9, 1 call PlaceString ; Pokémon name ld hl, OTPointers ; $6a95 call .unk_12a7e ld d, h ld e, l - FuncCoord 12,16 - ld hl, Coord + hlCoord 12, 16 call PlaceString ; OT - FuncCoord 12,14 - ld hl, Coord + hlCoord 12, 14 ld de, wcfa4 ld bc, $8205 ; 5 call PrintNumber ; ID Number @@ -116,8 +103,7 @@ StatusScreen: ; 12953 (4:6953) call PrintStatsBox call Delay3 call GBPalNormal - FuncCoord 1, 0 - ld hl, Coord + hlCoord 1, 0 call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture ld a, [wcf91] call PlayCry ; play Pokémon cry @@ -195,23 +181,19 @@ PrintStatsBox: ; 12ae4 (4:6ae4) ld a, d and a ; a is 0 from the status screen jr nz, .DifferentBox ; 0x12ae6 $12 - FuncCoord 0,8 - ld hl, Coord + hlCoord 0, 8 ld b, $8 ld c, $8 call TextBoxBorder ; Draws the box - FuncCoord 1,9 ; Start printing stats from here - ld hl, Coord + hlCoord 1, 9 ; Start printing stats from here ld bc, $0019 ; Number offset jr .PrintStats ; 0x12af8 $10 .DifferentBox - FuncCoord 9,2 - ld hl, Coord + hlCoord 9, 2 ld b, $8 ld c, $9 call TextBoxBorder - FuncCoord 11, 3 - ld hl, Coord + hlCoord 11, 3 ld bc, $0018 .PrintStats push bc @@ -258,20 +240,16 @@ StatusScreen2: ; 12b57 (4:6b57) ld bc, $0004 call CopyData callab Func_39b87 - FuncCoord 9,2 - ld hl, Coord + hlCoord 9, 2 ld bc, $050a call ClearScreenArea ; Clear under name - FuncCoord 19, 3 - ld hl, Coord + hlCoord 19, 3 ld [hl], $78 - FuncCoord 0,8 - ld hl, Coord + hlCoord 0, 8 ld b, $8 ld c, $12 call TextBoxBorder ; Draw move container - FuncCoord 2,9 - ld hl, Coord + hlCoord 2, 9 ld de, wd0e1 call PlaceString ; Print moves ld a, [wcd6c] @@ -280,8 +258,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld a, $4 sub c ld b, a ; Number of moves ? - FuncCoord 11,10 - ld hl, Coord + hlCoord 11, 10 ld de, $0028 ld a, $72 call Func_12ccb ; Print "PP" @@ -293,8 +270,7 @@ StatusScreen2: ; 12b57 (4:6b57) call Func_12ccb ; Fill the rest with -- .InitPP ; 12bbb ld hl, wcfa0 - FuncCoord 14,10 - ld de, Coord + deCoord 14, 10 ld b, $0 .PrintPP ; 12bc3 ld a, [hli] @@ -344,8 +320,7 @@ StatusScreen2: ; 12b57 (4:6b57) cp $4 jr nz, .PrintPP ; 0x12c0f $b2 .PPDone - FuncCoord 9,3 - ld hl, Coord + hlCoord 9, 3 ld de, EXPPointsText call PlaceString ld a, [wcfb9] ; level @@ -355,8 +330,7 @@ StatusScreen2: ; 12b57 (4:6b57) inc a ld [wcfb9], a ; Increase temporarily if not 100 .Level100 - FuncCoord 14,6 - ld hl, Coord + hlCoord 14, 6 ld [hl], $70 ; 1-tile "to" inc hl inc hl @@ -364,27 +338,22 @@ StatusScreen2: ; 12b57 (4:6b57) pop af ld [wcfb9], a ld de, wcfa6 - FuncCoord 12,4 - ld hl, Coord + hlCoord 12, 4 ld bc, $0307 call PrintNumber ; exp call .asm_12c86 ld de, wcfa6 - FuncCoord 7,6 - ld hl, Coord + hlCoord 7, 6 ld bc, $0307 call PrintNumber - FuncCoord 9,0 - ld hl, Coord + hlCoord 9, 0 call Func_12cc3 - FuncCoord 9,1 - ld hl, Coord + hlCoord 9, 1 call Func_12cc3 ld a, [W_MONHDEXNUM] ld [wd11e], a call GetMonName - FuncCoord 9,1 - ld hl, Coord + hlCoord 9, 1 call PlaceString ld a, $1 ld [$ffba], a diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm index 73dece40..c2968e2f 100755 --- a/engine/menu/vending_machine.asm +++ b/engine/menu/vending_machine.asm @@ -17,18 +17,15 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) ld [wTopMenuItemX], a ; wTopMenuItemX ld hl, wd730 set 6, [hl] - FuncCoord 0, 3 - ld hl, Coord + hlCoord 0, 3 ld b, $8 ld c, $c call TextBoxBorder call UpdateSprites - FuncCoord 2, 5 - ld hl, Coord + hlCoord 2, 5 ld de, DrinkText call PlaceString - FuncCoord 9, 6 - ld hl, Coord + hlCoord 9, 6 ld de, DrinkPriceText call PlaceString ld hl, wd730 diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 314c34df..767b8b5a 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -68,8 +68,7 @@ OakSpeech: ; 6115 (1:6115) ld [wd0b5],a ; pic displayed is stored at this location ld [wcf91],a call GetMonHeader ; this is also related to the pic - FuncCoord 6, 4 - ld hl,Coord ; position on tilemap the pic is displayed + hlCoord 6, 4 ; position on tilemap the pic is displayed call LoadFlippedFrontSpriteByMonIndex ; displays pic? call MovePicLeft ld hl,OakSpeechText2 @@ -143,8 +142,7 @@ Func_61bc: ; 61bc (1:61bc) ld [$2000],a ld c,$14 call DelayFrames - FuncCoord 6, 5 - ld hl,Coord + hlCoord 6, 5 ld b,7 ld c,7 call ClearScreenArea @@ -225,11 +223,9 @@ IntroPredef3B: ; 62a4 (1:62a4) pop bc ld a,c and a - FuncCoord 15, 1 - ld hl,Coord + hlCoord 15, 1 jr nz,.next - FuncCoord 6, 4 - ld hl,Coord + hlCoord 6, 4 .next xor a ld [$FFE1],a diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm index 380ff7bf..9d994047 100755 --- a/engine/oak_speech2.asm +++ b/engine/oak_speech2.asm @@ -76,15 +76,13 @@ Func_69ec: ; 69ec (1:69ec) ld bc, $b call CopyData call Delay3 - FuncCoord 12, 4 - ld hl, Coord + hlCoord 12, 4 ld de, $67d ld a, $ff jr asm_6a19 Func_6a12: ; 6a12 (1:6a12) - FuncCoord 5, 4 - ld hl, Coord + hlCoord 5, 4 ld de, $67d xor a asm_6a19: ; 6a19 (1:6a19) @@ -161,13 +159,11 @@ DisplayIntroNameTextBox: ; 6a6c (1:6a6c) ld b, $a ld c, $9 call TextBoxBorder - FuncCoord 3, 0 - ld hl, Coord + hlCoord 3, 0 ld de, .namestring ; $6aa3 call PlaceString pop de - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 call PlaceString call UpdateSprites xor a diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm index bb202333..eefa2176 100755 --- a/engine/overworld/cinnabar_lab.asm +++ b/engine/overworld/cinnabar_lab.asm @@ -101,8 +101,7 @@ Func_610c2: ; 610c2 (18:50c2) push hl ld [wd11e], a call GetItemName - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld a, [$ffdb] ld bc, $28 call AddNTimes diff --git a/engine/overworld/doors.asm b/engine/overworld/doors.asm index 6337f511..42ebb174 100755 --- a/engine/overworld/doors.asm +++ b/engine/overworld/doors.asm @@ -10,8 +10,7 @@ HandleDoors: ; 1a609 (6:6609) ld a, [hli] ld h, [hl] ld l, a - FuncCoord 8, 9 - ld a, [Coord] + aCoord 8, 9 ld b, a .asm_1a621 ld a, [hli] diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index b64a1174..43df82e2 100755 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -8,8 +8,7 @@ HandleLedges: ; 1a672 (6:6672) predef Func_c586 ld a, [wSpriteStateData1 + 9] ld b, a - FuncCoord 8, 9 - ld a, [Coord] + aCoord 8, 9 ld c, a ld a, [wcfc6] ld d, a diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index f8dd5fc4..f08a20cb 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -8,8 +8,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31) ld [wSpriteStateData2], a jr .asm_4e4a .asm_4e41 - FuncCoord 8, 9 - ld a, [Coord] + aCoord 8, 9 ld [$ff93], a cp $60 jr c, .asm_4e50 diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index ee4c999d..a0d8175f 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -349,8 +349,7 @@ Func_70787: ; 70787 (1c:4787) jr z, .asm_707a4 cp c jr nz, .asm_7079e - FuncCoord 8, 9 - ld a, [Coord] + aCoord 8, 9 cp [hl] jr z, .asm_707a2 .asm_7079e diff --git a/engine/overworld/pokemart.asm b/engine/overworld/pokemart.asm index adae76de..3b06bd2c 100755 --- a/engine/overworld/pokemart.asm +++ b/engine/overworld/pokemart.asm @@ -77,8 +77,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) ld hl,PokemartTellSellPriceText ld bc,$0e01 call PrintText - FuncCoord 14,7 - ld hl,Coord + hlCoord 14, 7 ld bc,$080f ld a,$14 ld [wd125],a @@ -149,8 +148,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20) call CopyStringToCF4B ; copy name to wcf4b ld hl,PokemartTellBuyPriceText call PrintText - FuncCoord 14,7 - ld hl,Coord + hlCoord 14, 7 ld bc,$080f ld a,$14 ld [wd125],a diff --git a/engine/save.asm b/engine/save.asm index 1b8f1467..fcfbd133 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -151,12 +151,10 @@ SaveSAV: ;$770a ret nz .save ;$772d call SaveSAVtoSRAM ;$7848 - FuncCoord 1,13 - ld hl,Coord + hlCoord 1, 13 ld bc,$0412 call ClearScreenArea ; clear area 4x12 starting at 13,1 - FuncCoord 1,14 - ld hl,Coord + hlCoord 1, 14 ld de,NowSavingString call PlaceString ld c,$78 @@ -174,8 +172,7 @@ NowSavingString: SaveSAVConfirm: ; 73768 (1c:7768) call PrintText - FuncCoord 0, 7 - ld hl,Coord + hlCoord 0, 7 ld bc,$0801 ;arrow's coordinates |b = Y|c = X| ld a,$14 ;one line shifting ($28 = 2 lines) ld [wd125],a @@ -435,16 +432,14 @@ Func_7393f: ; 7393f (1c:793f) call TextBoxBorder ld hl, ChooseABoxText call PrintText - FuncCoord 11, 0 - ld hl, Coord + hlCoord 11, 0 ld b, $c ld c, $7 call TextBoxBorder ld hl, $fff6 set 2, [hl] ld de, BoxNames ; $79d9 - FuncCoord 13, 1 - ld hl, Coord + hlCoord 13, 1 call PlaceString ld hl, $fff6 res 2, [hl] @@ -453,23 +448,19 @@ Func_7393f: ; 7393f (1c:793f) cp $9 jr c, .asm_739a6 sub $9 - FuncCoord 8, 2 - ld hl, Coord + hlCoord 8, 2 ld [hl], $f7 add $f6 jr .asm_739a8 .asm_739a6 add $f7 .asm_739a8 - FuncCoord 9, 2 - ld [Coord], a - FuncCoord 1, 2 - ld hl, Coord + Coorda 9, 2 + hlCoord 1, 2 ld de, BoxNoText call PlaceString call Func_73a84 - FuncCoord 18, 1 - ld hl, Coord + hlCoord 18, 1 ld de, wWhichTrade ; wWhichTrade ld bc, $14 ld a, $c diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index 9698da56..10c5fad4 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -68,8 +68,7 @@ ENDC ld a, BANK(Version_GFX) call FarCopyDataDouble call Func_4519 - FuncCoord 2, 1 - ld hl, Coord + hlCoord 2, 1 ld a, $80 ld de, $14 ld c, $6 @@ -85,8 +84,7 @@ ENDC add hl, de dec c jr nz, .asm_434d - FuncCoord 2, 7 - ld hl, Coord + hlCoord 2, 7 ld a, $31 ld b, $10 .asm_4361 @@ -98,8 +96,7 @@ ENDC ld hl, wOAMBuffer + $28 ld a, $74 ld [hl], a - FuncCoord 2, 17 - ld hl, Coord + hlCoord 2, 17 ld de, .titlescreenTilemap ; $437f ld b, $10 .asm_4377 @@ -346,8 +343,7 @@ Func_4519: ; 4519 (1:4519) Func_4524: ; 4524 (1:4524) ld [wcf91], a ld [wd0b5], a - FuncCoord 5, 10 - ld hl, Coord + hlCoord 5, 10 call GetMonHeader jp LoadFrontSpriteByMonIndex @@ -366,8 +362,7 @@ LoadCopyrightTiles: ; 4541 (1:4541) ld hl, vChars2 + $600 ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c call CopyVideoData - FuncCoord 2, 7 - ld hl, Coord + hlCoord 2, 7 ld de, CopyrightTextString ; $4556 jp PlaceString @@ -381,8 +376,7 @@ INCLUDE "data/title_mons.asm" ; prints version text (red, blue) PrintGameVersionOnTitleScreen: ; 4598 (1:4598) - FuncCoord 7, 8 - ld hl, Coord + hlCoord 7, 8 ld de, VersionOnTitleScreenText jp PlaceString diff --git a/engine/town_map.asm b/engine/town_map.asm index ea2d3171..2cd37284 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -11,8 +11,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e) push af ld b, $0 call Func_711c4 - FuncCoord 1, 0 - ld hl, Coord + hlCoord 1, 0 ld de, wcd6d call PlaceString ld hl, wOAMBuffer @@ -57,8 +56,7 @@ Func_70e92: ; 70e92 (1c:4e92) inc de cp $50 jr nz, .asm_70eac - FuncCoord 1, 0 - ld hl, Coord + hlCoord 1, 0 ld de, wcd6d call PlaceString ld hl, wOAMBuffer + $10 @@ -120,8 +118,7 @@ LoadTownMap_Nest: ; 70f60 (1c:4f60) push hl call Func_711ef call GetMonName - FuncCoord 1, 0 - ld hl, Coord + hlCoord 1, 0 call PlaceString ld h, b ld l, c @@ -163,33 +160,28 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) ld b, $0 call Func_711c4 ld hl, wTrainerEngageDistance - FuncCoord 18, 0 - ld de, Coord + deCoord 18, 0 .townMapFlyLoop ld a, $7f ld [de], a push hl push hl - FuncCoord 3, 0 - ld hl, Coord + hlCoord 3, 0 ld bc, $10f call ClearScreenArea pop hl ld a, [hl] ld b, $4 call Func_711c4 - FuncCoord 3, 0 - ld hl, Coord + hlCoord 3, 0 ld de, wcd6d call PlaceString ld c, $f call DelayFrames - FuncCoord 18, 0 - ld hl, Coord + hlCoord 18, 0 ld [hl], $ed - FuncCoord 19, 0 - ld hl, Coord + hlCoord 19, 0 ld [hl], $ee pop hl .asm_71004 @@ -228,8 +220,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) ld [hl], a ret .asm_71042 - FuncCoord 18, 0 - ld de, Coord + deCoord 18, 0 inc hl ld a, [hl] cp $ff @@ -241,8 +232,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90) ld hl, wTrainerEngageDistance jp .townMapFlyLoop .asm_71058 - FuncCoord 19, 0 - ld de, Coord + deCoord 19, 0 dec hl ld a, [hl] cp $ff @@ -402,13 +392,11 @@ Func_711ef: ; 711ef (1c:51ef) ld a, l and a jr nz, .asm_71236 - FuncCoord 1, 7 - ld hl, Coord + hlCoord 1, 7 ld b, $2 ld c, $f call TextBoxBorder - FuncCoord 2, 9 - ld hl, Coord + hlCoord 2, 9 ld de, AreaUnknownText call PlaceString jr .asm_7123e diff --git a/engine/trade.asm b/engine/trade.asm index 3da1760f..54abdab6 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -181,8 +181,7 @@ Func_41245: ; 41245 (10:5245) ld [$ffae], a xor a ld [H_AUTOBGTRANSFERENABLED], a ; $ffba - FuncCoord 4, 0 - ld hl, Coord + hlCoord 4, 0 ld b, $6 ld c, $a call TextBoxBorder @@ -227,8 +226,7 @@ Func_41298: ; 41298 (10:5298) call DelayFrame ld a, $8b ld [rLCDC], a ; $ff40 - FuncCoord 6, 2 - ld hl, Coord + hlCoord 6, 2 ld b, $7 call Func_41842 call Func_41186 @@ -300,8 +298,7 @@ Func_41336: ; 41336 (10:5336) ld a, $ac call Func_41676 call Func_415c8 - FuncCoord 4, 10 - ld hl, Coord + hlCoord 4, 10 ld b, $6 ld c, $a call TextBoxBorder @@ -318,8 +315,7 @@ Func_41336: ; 41336 (10:5336) ld a, [wTrainerEngageDistance] call PlayCry call Func_41181 - FuncCoord 4, 10 - ld hl, Coord + hlCoord 4, 10 ld bc, $80c call ClearScreenArea jp PrintTradeTakeCareText @@ -406,8 +402,7 @@ Func_41411: ; 41411 (10:5411) Func_4142d: ; 4142d (10:542d) call Func_41196 - FuncCoord 11, 4 - ld hl, Coord + hlCoord 11, 4 ld a, $5d ld [hli], a ld a, $5e @@ -416,25 +411,21 @@ Func_4142d: ; 4142d (10:542d) ld [hli], a dec c jr nz, .asm_4143a - FuncCoord 5, 3 - ld hl, Coord + hlCoord 5, 3 ld b, $6 call Func_41842 - FuncCoord 4, 12 - ld hl, Coord + hlCoord 4, 12 ld b, $2 ld c, $7 call TextBoxBorder - FuncCoord 5, 14 - ld hl, Coord + hlCoord 5, 14 ld de, wPlayerName ; wd158 call PlaceString jp DelayFrame Func_4145c: ; 4145c (10:545c) call Func_41196 - FuncCoord 0, 4 - ld hl, Coord + hlCoord 0, 4 ld a, $5e ld c, $e .asm_41466 @@ -458,25 +449,21 @@ Func_4145c: ; 4145c (10:545c) ld [hld], a ld a, $5d ld [hl], a - FuncCoord 7, 8 - ld hl, Coord + hlCoord 7, 8 ld b, $6 call Func_41842 - FuncCoord 6, 0 - ld hl, Coord + hlCoord 6, 0 ld b, $2 ld c, $7 call TextBoxBorder - FuncCoord 7, 2 - ld hl, Coord + hlCoord 7, 2 ld de, W_GRASSRATE ; W_GRASSRATE call PlaceString jp DelayFrame Func_4149f: ; 4149f (10:549f) call Func_41196 - FuncCoord 0, 4 - ld hl, Coord + hlCoord 0, 4 ld a, $5e ld c, $14 .asm_414a9 @@ -487,8 +474,7 @@ Func_4149f: ; 4149f (10:549f) Func_414ae: ; 414ae (10:54ae) push hl - FuncCoord 0, 4 - ld hl, Coord + hlCoord 0, 4 call ScheduleRowRedrawHelper pop hl ld a, h @@ -655,8 +641,7 @@ Func_415a4: ; 415a4 (10:55a4) xor $1 ld [H_AUTOBGTRANSFERENABLED], a ; $ffba call GetMonHeader - FuncCoord 7, 2 - ld hl, Coord + hlCoord 7, 2 call LoadFlippedFrontSpriteByMonIndex ld c, $a jp DelayFrames diff --git a/engine/trade2.asm b/engine/trade2.asm index 496ce24b..b13a18b6 100755 --- a/engine/trade2.asm +++ b/engine/trade2.asm @@ -1,53 +1,43 @@ Func_42769: ; 42769 (10:6769) - FuncCoord 5,0 - ld hl,Coord + hlCoord 5, 0 ld de,OTString67E5 call PlaceString ld a,[wWhichTrade] ld [wd11e],a predef IndexToPokedex - FuncCoord 9, 0 - ld hl,Coord + hlCoord 9, 0 ld de,wd11e ld bc,$8103 call PrintNumber - FuncCoord 5,2 - ld hl,Coord + hlCoord 5, 2 ld de,wcf4b call PlaceString - FuncCoord 8,4 - ld hl,Coord + hlCoord 8, 4 ld de,wTrainerScreenX call PlaceString - FuncCoord 8, 6 - ld hl,Coord + hlCoord 8, 6 ld de,wcd4c ld bc,$8205 jp PrintNumber Func_427a7: ; 427a7 (10:67a7) - FuncCoord 5,10 - ld hl,Coord + hlCoord 5, 10 ld de,OTString67E5 call PlaceString ld a,[wTrainerEngageDistance] ld [wd11e],a predef IndexToPokedex - FuncCoord 9, 10 - ld hl,Coord + hlCoord 9, 10 ld de,wd11e ld bc,$8103 call PrintNumber - FuncCoord 5,12 - ld hl,Coord + hlCoord 5, 12 ld de,wcd6d call PlaceString - FuncCoord 8,14 - ld hl,Coord + hlCoord 8, 14 ld de,wcd4e call PlaceString - FuncCoord 8, 16 - ld hl,Coord + hlCoord 8, 16 ld de,wcd59 ld bc,$8205 jp PrintNumber diff --git a/home.asm b/home.asm index e9dc60c3..dc0b0889 100644 --- a/home.asm +++ b/home.asm @@ -1937,8 +1937,7 @@ DisplayListMenuID:: ; 2be6 (0:2be6) ld [wd125],a call DisplayTextBoxID ; draw the menu text box call UpdateSprites ; move sprites - FuncCoord 4,2 ; coordinates of upper left corner of menu text box - ld hl,Coord + hlCoord 4, 2 ; coordinates of upper left corner of menu text box ld de,$090e ; height and width of menu text box ld a,[wListMenuID] and a ; is it a PC pokemon list? @@ -1974,13 +1973,12 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) jr z,.notOldManBattle .oldManBattle ld a,"▶" - FuncCoord 5,4 - ld [Coord],a ; place menu cursor in front of first menu entry + Coorda 5, 4 ; place menu cursor in front of first menu entry ld c,80 call DelayFrames xor a ld [wCurrentMenuItem],a - ld hl,Coord + hlCoord 5, 4 ld a,l ld [wMenuCursorLocation],a ld a,h @@ -2099,27 +2097,23 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) ; text box dimensions/coordinates for just quantity - FuncCoord 15,9 - ld hl,Coord + hlCoord 15, 9 ld b,1 ; height ld c,3 ; width ld a,[wListMenuID] cp a,PRICEDITEMLISTMENU jr nz,.drawTextBox ; text box dimensions/coordinates for quantity and price - FuncCoord 7,9 - ld hl,Coord + hlCoord 7, 9 ld b,1 ; height ld c,11 ; width .drawTextBox call TextBoxBorder - FuncCoord 16,10 - ld hl,Coord + hlCoord 16, 10 ld a,[wListMenuID] cp a,PRICEDITEMLISTMENU jr nz,.printInitialQuantity - FuncCoord 8,10 - ld hl,Coord + hlCoord 8, 10 .printInitialQuantity ld de,InitialQuantityText call PlaceString @@ -2159,8 +2153,7 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) ld a,[wcf97] ; max quantity ld [hl],a .handleNewQuantity - FuncCoord 17,10 - ld hl,Coord + hlCoord 17, 10 ld a,[wListMenuID] cp a,PRICEDITEMLISTMENU jr nz,.printQuantity @@ -2199,15 +2192,13 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57) ld a,[$ffa4] ld [$ffa1],a .skipHalvingPrice - FuncCoord 12,10 - ld hl,Coord + hlCoord 12, 10 ld de,SpacesBetweenQuantityAndPriceText call PlaceString ld de,$ff9f ; total price ld c,$a3 call PrintBCDNumber - FuncCoord 9,10 - ld hl,Coord + hlCoord 9, 10 .printQuantity ld de,wcf96 ; current quantity ld bc,$8102 ; print leading zeroes, 1 byte, 2 digits @@ -2246,8 +2237,7 @@ ExitListMenu:: ; 2e3b (0:2e3b) ret PrintListMenuEntries:: ; 2e5a (0:2e5a) - FuncCoord 5, 3 - ld hl,Coord + hlCoord 5, 3 ld b,$09 ld c,$0e call ClearScreenArea @@ -2272,8 +2262,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a) jr nc,.noCarry inc d .noCarry - FuncCoord 6,4 ; coordinates of first list entry name - ld hl,Coord + hlCoord 6, 4 ; coordinates of first list entry name ld b,4 ; print 4 names .loop ld a,b @@ -3539,8 +3528,7 @@ Func_35f4:: ; 35f4 (0:35f4) InitYesNoTextBoxParameters:: ; 35ff (0:35ff) xor a ld [wd12c], a - FuncCoord 14, 7 - ld hl, Coord + hlCoord 14, 7 ld bc, $80f ret @@ -3548,8 +3536,7 @@ YesNoChoicePokeCenter:: ; 360a (0:360a) call SaveScreenTilesToBuffer1 ld a, $6 ld [wd12c], a - FuncCoord 11, 6 - ld hl, Coord + hlCoord 11, 6 ld bc, $80c jr DisplayYesNoChoice @@ -3557,8 +3544,7 @@ Func_361a:: ; 361a (0:361a) call SaveScreenTilesToBuffer1 ld a, $3 ld [wd12c], a - FuncCoord 12, 7 - ld hl, Coord + hlCoord 12, 7 ld bc, $080d DisplayYesNoChoice:: ; 3628 (0:3628) ld a, $14 @@ -3995,8 +3981,7 @@ WaitForTextScrollButtonPress:: ; 3865 (0:3865) jr z, .asm_387c call Func_716c6 .asm_387c - FuncCoord 18, 16 - ld hl, Coord + hlCoord 18, 16 call HandleDownArrowBlinkTiming pop hl call JoypadLowSensitivity @@ -4472,8 +4457,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) and a ; was a key pressed? jr nz,.keyPressed push hl - FuncCoord 18,11 ; coordinates of blinking down arrow in some menus - ld hl,Coord + hlCoord 18, 11 ; coordinates of blinking down arrow in some menus call HandleDownArrowBlinkTiming ; blink down arrow (if any) pop hl ld a,[wMenuJoypadPollCount] @@ -4734,8 +4718,7 @@ PrintText:: ; 3c49 (0:3c49) call Delay3 pop hl Func_3c59:: ; 3c59 (0:3c59) - FuncCoord 1,14 - ld bc,Coord + bcCoord 1, 14 jp TextCommandProcessor ; converts a big-endian binary number into decimal and prints it diff --git a/home/overworld.asm b/home/overworld.asm index 872d63ee..cf36aba8 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -105,8 +105,7 @@ OverworldLoopLessDelay:: jr nz,.checkForOpponent bit 0,a jr nz,.checkForOpponent - FuncCoord 8, 9 - ld a,[Coord] + aCoord 8, 9 ld [wcf0e],a call DisplayTextID ; display either the start menu or the NPC/sign text ld a,[wcc47] @@ -670,8 +669,7 @@ CheckMapConnections:: ; 07ba (0:07ba) ; function to play a sound when changing maps PlayMapChangeSound:: ; 08c9 (0:08c9) - FuncCoord 8, 8 - ld a,[Coord] ; upper left tile of the 4x4 square the player's sprite is standing on + aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on cp a,$0b ; door tile in tileset 0 jr nz,.didNotGoThroughDoor ld a,(SFX_02_57 - SFX_Headers_02) / 3 @@ -1279,8 +1277,7 @@ CheckForJumpingAndTilePairCollisions:: ; 0c2a (0:0c2a) ; if not jumping Func_c44:: ; 0c44 (0:0c44) - FuncCoord 8, 9 - ld a,[Coord] ; tile the player is on + aCoord 8, 9 ; tile the player is on ld [wcf0e],a CheckForTilePairCollisions:: ; 0c4a (0:0c4a) @@ -1694,8 +1691,7 @@ MoveTileBlockMapPointerNorth:: ; 0e85 (0:0e85) ; the portion of the map that was newly exposed due to the player's movement ScheduleNorthRowRedraw:: ; 0e91 (0:0e91) - FuncCoord 0, 0 - ld hl,Coord + hlCoord 0, 0 call ScheduleRowRedrawHelper ld a,[wd526] ld [H_SCREENEDGEREDRAWADDR],a @@ -1717,8 +1713,7 @@ ScheduleRowRedrawHelper:: ; 0ea6 (0:0ea6) ret ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2) - FuncCoord 0,16 - ld hl,Coord + hlCoord 0, 16 call ScheduleRowRedrawHelper ld a,[wd526] ld l,a @@ -1737,8 +1732,7 @@ ScheduleSouthRowRedraw:: ; 0eb2 (0:0eb2) ret ScheduleEastColumnRedraw:: ; 0ed3 (0:0ed3) - FuncCoord 18,0 - ld hl,Coord + hlCoord 18, 0 call ScheduleColumnRedrawHelper ld a,[wd526] ld c,a @@ -1776,8 +1770,7 @@ ScheduleColumnRedrawHelper:: ; 0ef2 (0:0ef2) ret ScheduleWestColumnRedraw:: ; 0f08 (0:0f08) - FuncCoord 0,0 - ld hl,Coord + hlCoord 0, 0 call ScheduleColumnRedrawHelper ld a,[wd526] ld [H_SCREENEDGEREDRAWADDR],a diff --git a/home/text.asm b/home/text.asm index 46c17b07..abcac9fd 100644 --- a/home/text.asm +++ b/home/text.asm @@ -76,8 +76,7 @@ PlaceNextChar:: ; 1956 (0:1956) cp $4F jr nz,.next3 pop hl - FuncCoord 1, 16 - ld hl,Coord + hlCoord 1, 16 push hl jp Next19E8 @@ -270,14 +269,12 @@ Char58:: ; 1a95 (0:1a95) cp 4 jp z,Next1AA2 ld a,$EE - FuncCoord 18, 16 - ld [Coord],a + Coorda 18, 16 Next1AA2:: ; 1aa2 (0:1aa2) call ProtectedDelay3 call ManualTextScroll ld a,$7F - FuncCoord 18, 16 - ld [Coord],a + Coorda 18, 16 Char57:: ; 1aad (0:1aad) pop hl ld de,Char58Text @@ -290,67 +287,56 @@ Char58Text:: ; 1ab3 (0:1ab3) Char51:: ; 1ab4 (0:1ab4) push de ld a,$EE - FuncCoord 18, 16 - ld [Coord],a + Coorda 18, 16 call ProtectedDelay3 call ManualTextScroll - FuncCoord 1, 13 - ld hl,Coord + hlCoord 1, 13 ld bc,$0412 call ClearScreenArea ld c,$14 call DelayFrames pop de - FuncCoord 1, 14 - ld hl,Coord + hlCoord 1, 14 jp Next19E8 Char49:: ; 1ad5 (0:1ad5) push de ld a,$EE - FuncCoord 18, 16 - ld [Coord],a + Coorda 18, 16 call ProtectedDelay3 call ManualTextScroll - FuncCoord 1, 10 - ld hl,Coord + hlCoord 1, 10 ld bc,$0712 call ClearScreenArea ld c,$14 call DelayFrames pop de pop hl - FuncCoord 1, 11 - ld hl,Coord + hlCoord 1, 11 push hl jp Next19E8 Char4B:: ; 1af8 (0:1af8) ld a,$EE - FuncCoord 18, 16 - ld [Coord],a + Coorda 18, 16 call ProtectedDelay3 push de call ManualTextScroll pop de ld a,$7F - FuncCoord 18, 16 - ld [Coord],a + Coorda 18, 16 ;fall through Char4C:: ; 1b0a (0:1b0a) push de call Next1B18 call Next1B18 - FuncCoord 1, 16 - ld hl,Coord + hlCoord 1, 16 pop de jp Next19E8 Next1B18:: ; 1b18 (0:1b18) - FuncCoord 0, 14 - ld hl,Coord - FuncCoord 0, 13 - ld de,Coord + hlCoord 0, 14 + deCoord 0, 13 ld b,$3C .next ld a,[hli] @@ -358,8 +344,7 @@ Next1B18:: ; 1b18 (0:1b18) inc de dec b jr nz,.next - FuncCoord 1, 16 - ld hl,Coord + hlCoord 1, 16 ld a,$7F ld b,$12 .next2 @@ -514,8 +499,7 @@ TextCommand03:: ; 1bb7 (0:1bb7) ; (no arguments) TextCommand05:: ; 1bc5 (0:1bc5) pop hl - FuncCoord 1, 16 - ld bc,Coord ; address of second line of dialogue text box + bcCoord 1, 16 ; address of second line of dialogue text box jp NextTextCommand ; blink arrow and wait for A or B to be pressed @@ -526,14 +510,12 @@ TextCommand06:: ; 1bcc (0:1bcc) cp a,$04 jp z,TextCommand0D ld a,$ee ; down arrow - FuncCoord 18, 16 - ld [Coord],a ; place down arrow in lower right corner of dialogue text box + Coorda 18, 16 ; place down arrow in lower right corner of dialogue text box push bc call ManualTextScroll ; blink arrow and wait for A or B to be pressed pop bc ld a," " - FuncCoord 18, 16 - ld [Coord],a ; overwrite down arrow with blank space + Coorda 18, 16 ; overwrite down arrow with blank space pop hl jp NextTextCommand @@ -542,13 +524,11 @@ TextCommand06:: ; 1bcc (0:1bcc) ; (no arguments) TextCommand07:: ; 1be7 (0:1be7) ld a," " - FuncCoord 18, 16 - ld [Coord],a ; place blank space in lower right corner of dialogue text box + Coorda 18, 16 ; place blank space in lower right corner of dialogue text box call Next1B18 ; scroll up text call Next1B18 pop hl - FuncCoord 1, 16 - ld bc,Coord ; address of second line of dialogue text box + bcCoord 1, 16 ; address of second line of dialogue text box jp NextTextCommand ; execute asm inline diff --git a/home/vcopy.asm b/home/vcopy.asm index 71487cf1..81fcb991 100644 --- a/home/vcopy.asm +++ b/home/vcopy.asm @@ -130,8 +130,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57) dec a jr z,.transferMiddleThird .transferBottomThird - FuncCoord 0,12 - ld hl,Coord + hlCoord 0, 12 ld sp,hl ld a,[H_AUTOBGTRANSFERDEST + 1] ld h,a @@ -142,8 +141,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57) xor a ; TRANSFERTOP jr .doTransfer .transferTopThird - FuncCoord 0,0 - ld hl,Coord + hlCoord 0, 0 ld sp,hl ld a,[H_AUTOBGTRANSFERDEST + 1] ld h,a @@ -152,8 +150,7 @@ AutoBgMapTransfer:: ; 1d57 (0:1d57) ld a,TRANSFERMIDDLE jr .doTransfer .transferMiddleThird - FuncCoord 0,6 - ld hl,Coord + hlCoord 0, 6 ld sp,hl ld a,[H_AUTOBGTRANSFERDEST + 1] ld h,a diff --git a/macros.asm b/macros.asm index a99a80ea..8244c8c9 100644 --- a/macros.asm +++ b/macros.asm @@ -37,8 +37,38 @@ callab: MACRO ;\1 = X ;\2 = Y -FuncCoord: MACRO -Coord = $C3A0 + 20 * \2 + \1 +hlCoord: MACRO + ld hl, wTileMap + 20 * \2 + \1 + ENDM + +;\1 = X +;\2 = Y +deCoord: MACRO + ld de, wTileMap + 20 * \2 + \1 + ENDM + +;\1 = X +;\2 = Y +bcCoord: MACRO + ld bc, wTileMap + 20 * \2 + \1 + ENDM + +;\1 = X +;\2 = Y +aCoord: MACRO + ld a, [wTileMap + 20 * \2 + \1] + ENDM + +;\1 = X +;\2 = Y +Coorda: MACRO + ld [wTileMap + 20 * \2 + \1], a + ENDM + +;\1 = X +;\2 = Y +dwCoord: MACRO + dw wTileMap + 20 * \2 + \1 ENDM ;\1 = Map Width diff --git a/main.asm b/main.asm index df42f937..32a3db2c 100755 --- a/main.asm +++ b/main.asm @@ -158,8 +158,7 @@ INCLUDE "engine/overworld/oam.asm" INCLUDE "engine/oam_dma.asm" PrintWaitingText: - FuncCoord 3, 10 - ld hl, Coord + hlCoord 3, 10 ld b, $1 ld c, $b ld a, [W_ISINBATTLE] @@ -170,8 +169,7 @@ PrintWaitingText: .asm_4c17 call Func_5ab3 .asm_4c1a - FuncCoord 4, 11 - ld hl, Coord + hlCoord 4, 11 ld de, WaitingText call PlaceString ld c, 50 @@ -920,21 +918,18 @@ DisplayTextIDInit: ; 7096 (1:7096) ld a,[wd74b] bit 5,a ; does the player have the pokedex? ; start menu with pokedex - FuncCoord 10, 0 - ld hl,Coord + hlCoord 10, 0 ld b,$0e ld c,$08 jr nz,.drawTextBoxBorder ; start menu without pokedex - FuncCoord 10, 0 - ld hl,Coord + hlCoord 10, 0 ld b,$0c ld c,$08 jr .drawTextBoxBorder ; if text ID is not 0 (i.e. not the start menu) then do a standard dialogue text box .notStartMenu - FuncCoord 0, 12 - ld hl,Coord + hlCoord 0, 12 ld b,$04 ld c,$12 .drawTextBoxBorder @@ -992,14 +987,12 @@ DrawStartMenu: ; 710b (1:710b) ld a,[wd74b] bit 5,a ; does the player have the pokedex? ; menu with pokedex - FuncCoord 10, 0 - ld hl,Coord + hlCoord 10, 0 ld b,$0e ld c,$08 jr nz,.drawTextBoxBorder ; shorter menu if the player doesn't have the pokedex - FuncCoord 10, 0 - ld hl,Coord + hlCoord 10, 0 ld b,$0c ld c,$08 .drawTextBoxBorder @@ -1017,8 +1010,7 @@ DrawStartMenu: ; 710b (1:710b) ld [wcc37],a ld hl,wd730 set 6,[hl] ; no pauses between printing each letter - FuncCoord 12, 2 - ld hl,Coord + hlCoord 12, 2 ld a,[wd74b] bit 5,a ; does the player have the pokedex? ; case for not having pokdex @@ -1360,13 +1352,11 @@ Func_74ba: ; 74ba (1:74ba) ld a, $f ld [wd125], a call DisplayTextBoxID - FuncCoord 13, 1 - ld hl, Coord + hlCoord 13, 1 ld b, $1 ld c, $6 call ClearScreenArea - FuncCoord 12, 1 - ld hl, Coord + hlCoord 12, 1 ld de, wPlayerMoney ; wPlayerMoney ld c, $a3 call PrintBCDNumber @@ -1637,22 +1627,19 @@ Func_76e1: ; 76e1 (1:36e1) ld a, [wTrainerScreenX] and a jr nz, .asm_770f - FuncCoord 11, 11 - ld hl, Coord + hlCoord 11, 11 ld b, $5 ld c, $7 call TextBoxBorder call UpdateSprites ld a, $c ld [$fff7], a - FuncCoord 13, 12 - ld hl, Coord + hlCoord 13, 12 ld de, PokemonMenuEntries ; $77c2 jp PlaceString .asm_770f push af - FuncCoord 0, 11 - ld hl, Coord + hlCoord 0, 11 ld a, [wcd42] dec a ld e, a @@ -1675,8 +1662,7 @@ Func_76e1: ; 76e1 (1:36e1) inc b call TextBoxBorder call UpdateSprites - FuncCoord 0, 12 - ld hl, Coord + hlCoord 0, 12 ld a, [wcd42] inc a ld e, a @@ -1723,8 +1709,7 @@ Func_76e1: ; 76e1 (1:36e1) pop hl ld a, [wcd42] ld [$fff7], a - FuncCoord 0, 12 - ld hl, Coord + hlCoord 0, 12 ld a, [wcd42] inc a ld e, a @@ -2191,8 +2176,7 @@ Func_c49d: ; c49d (3:449d) ld h, [hl] ld l, a ld de, $1 - FuncCoord 8, 9 - ld a, [Coord] + aCoord 8, 9 call IsInArray jr nc, .asm_c4c8 ld hl, wd736 @@ -2215,29 +2199,24 @@ PrintSafariZoneSteps: ; c52f (3:452f) ld b, $3 ld c, $7 call TextBoxBorder - FuncCoord 1, 1 - ld hl, Coord + hlCoord 1, 1 ld de, wSafariSteps ; wd70d ld bc, $203 call PrintNumber - FuncCoord 4, 1 - ld hl, Coord + hlCoord 4, 1 ld de, SafariSteps ; $4579 call PlaceString - FuncCoord 1, 3 - ld hl, Coord + hlCoord 1, 3 ld de, SafariBallText call PlaceString ld a, [W_NUMSAFARIBALLS] ; W_NUMSAFARIBALLS cp $a jr nc, .asm_c56d - FuncCoord 5, 3 - ld hl, Coord + hlCoord 5, 3 ld a, $7f ld [hl], a .asm_c56d - FuncCoord 6, 3 - ld hl, Coord + hlCoord 6, 3 ld de, W_NUMSAFARIBALLS ; W_NUMSAFARIBALLS ld bc, $102 jp PrintNumber @@ -2259,29 +2238,25 @@ Func_c589: ; c589 (3:4589) ld a, [wSpriteStateData1 + 9] and a jr nz, .asm_c59d - FuncCoord 8, 11 - ld a, [Coord] + aCoord 8, 11 inc d jr .asm_c5b9 .asm_c59d cp $4 jr nz, .asm_c5a7 - FuncCoord 8, 7 - ld a, [Coord] + aCoord 8, 7 dec d jr .asm_c5b9 .asm_c5a7 cp $8 jr nz, .asm_c5b1 - FuncCoord 6, 9 - ld a, [Coord] + aCoord 6, 9 dec e jr .asm_c5b9 .asm_c5b1 cp $c jr nz, .asm_c5b9 - FuncCoord 10, 9 - ld a, [Coord] + aCoord 10, 9 inc e .asm_c5b9 ld c, a @@ -2300,8 +2275,7 @@ Func_c5be: ; c5be (3:45be) jr nz, .asm_c5d8 ld hl, $ffdb set 0, [hl] - FuncCoord 8, 13 - ld a, [Coord] + aCoord 8, 13 inc d jr .asm_c603 .asm_c5d8 @@ -2309,8 +2283,7 @@ Func_c5be: ; c5be (3:45be) jr nz, .asm_c5e7 ld hl, $ffdb set 1, [hl] - FuncCoord 8, 5 - ld a, [Coord] + aCoord 8, 5 dec d jr .asm_c603 .asm_c5e7 @@ -2318,8 +2291,7 @@ Func_c5be: ; c5be (3:45be) jr nz, .asm_c5f6 ld hl, $ffdb set 2, [hl] - FuncCoord 4, 9 - ld a, [Coord] + aCoord 4, 9 dec e jr .asm_c603 .asm_c5f6 @@ -2327,8 +2299,7 @@ Func_c5be: ; c5be (3:45be) jr nz, .asm_c603 ld hl, $ffdb set 3, [hl] - FuncCoord 12, 9 - ld a, [Coord] + aCoord 12, 9 inc e .asm_c603 ld c, a @@ -2919,13 +2890,11 @@ DrawBadges: ; ea03 (3:6a03) ld [hli], a ld [hl], $60 ; First name - FuncCoord 2, 11 - ld hl, Coord + hlCoord 2, 11 ld de, wcd49 call .DrawBadgeRow - FuncCoord 2, 14 - ld hl, Coord + hlCoord 2, 14 ld de, wcd49 + 4 ; call .DrawBadgeRow ; ret diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index c30829e9..4bd26a7e 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -56,12 +56,10 @@ BikeShopText1: ; 1d745 (7:5745) ld c, $f call TextBoxBorder call UpdateSprites - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld de, BikeShopMenuText call PlaceString - FuncCoord 8, 3 - ld hl, Coord + hlCoord 8, 3 ld de, BikeShopMenuPrice call PlaceString ld hl, BikeShopText_1d815 diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm index 2d638044..9746f54e 100755 --- a/scripts/celadongamecorner.asm +++ b/scripts/celadongamecorner.asm @@ -467,40 +467,32 @@ CeladonGameCornerText_48f19: ; 48f19 (12:4f19) CeladonGameCornerScript_48f1e: ; 48f1e (12:4f1e) ld hl, wd730 set 6, [hl] - FuncCoord 11, 0 - ld hl, Coord + hlCoord 11, 0 ld b, $5 ld c, $7 call TextBoxBorder call UpdateSprites - FuncCoord 12, 1 - ld hl, Coord + hlCoord 12, 1 ld b, $4 ld c, $7 call ClearScreenArea - FuncCoord 12, 2 - ld hl, Coord + hlCoord 12, 2 ld de, GameCornerMoneyText call PlaceString - FuncCoord 12, 3 - ld hl, Coord + hlCoord 12, 3 ld de, GameCornerBlankText1 call PlaceString - FuncCoord 12, 3 - ld hl, Coord + hlCoord 12, 3 ld de, wPlayerMoney ld c, $a3 call PrintBCDNumber - FuncCoord 12, 4 - ld hl, Coord + hlCoord 12, 4 ld de, GameCornerCoinText call PlaceString - FuncCoord 12, 5 - ld hl, Coord + hlCoord 12, 5 ld de, GameCornerBlankText2 call PlaceString - FuncCoord 15, 5 - ld hl, Coord + hlCoord 15, 5 ld de, wPlayerCoins ld c, $82 call PrintBCDNumber diff --git a/scripts/celadonmartroof.asm b/scripts/celadonmartroof.asm index 02f2959d..37025525 100755 --- a/scripts/celadonmartroof.asm +++ b/scripts/celadonmartroof.asm @@ -200,8 +200,7 @@ CeladonMartRoofScript_48532: ; 48532 (12:4532) push hl ld [wd11e], a call GetItemName - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld a, [$ffdb] ld bc, $28 call AddNTimes diff --git a/scripts/vermiliondock.asm b/scripts/vermiliondock.asm index 215bf467..03dc4377 100755 --- a/scripts/vermiliondock.asm +++ b/scripts/vermiliondock.asm @@ -53,8 +53,7 @@ VermilionDock_1db9b: ; 1db9b (7:5b9b) call DelayFrames ld b, $9c call CopyScreenTileBufferToVRAM - FuncCoord 0, 10 - ld hl, Coord + hlCoord 0, 10 ld bc, $0078 ld a, $14 call FillMemory -- cgit v1.3.1-sl0p