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/overworld/emotion_bubbles.asm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'engine/overworld/emotion_bubbles.asm') diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index b480c06d..12cae862 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -1,5 +1,5 @@ PrintEmotionBubble: ; 17c47 (5:7c47) - ld a, [$cd50] + ld a, [wcd50] ld c, a ld b, $0 ld hl, EmotionBubblesPointerTable ; $7caf @@ -11,17 +11,17 @@ PrintEmotionBubble: ; 17c47 (5:7c47) ld hl, $8f80 ld bc, (BANK(EmotionBubblesPointerTable) << 8) + $04 call CopyVideoData - ld a, [$cfcb] + ld a, [wcfcb] push af ld a, $ff - ld [$cfcb], a - ld a, [$d736] + ld [wcfcb], a + ld a, [wd736] bit 6, a - ld hl, $c38f - ld de, $c39f + ld hl, wOAMBuffer + $8f + ld de, wOAMBuffer + $9f jr z, .asm_17c7a - ld hl, $c37f - ld de, $c38f + ld hl, wOAMBuffer + $7f + ld de, wOAMBuffer + $8f .asm_17c7a ld bc, $90 .asm_17c7d @@ -33,8 +33,8 @@ PrintEmotionBubble: ; 17c47 (5:7c47) ld a, c or b jr nz, .asm_17c7d - ld hl, $c104 - ld a, [$cd4f] + ld hl, wSpriteStateData1 + 4 + ld a, [wcd4f] swap a ld c, a ld b, $0 @@ -51,7 +51,7 @@ PrintEmotionBubble: ; 17c47 (5:7c47) ld c, $3c call DelayFrames pop af - ld [$cfcb], a + ld [wcfcb], a call DelayFrame jp UpdateSprites -- 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/overworld/emotion_bubbles.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/overworld/emotion_bubbles.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 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/overworld/emotion_bubbles.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