diff options
author | yenatch <yenatch@gmail.com> | 2014-05-29 01:31:46 -0700 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2014-05-29 01:31:46 -0700 |
commit | da0a72cdbf45fa624b2d1151afe94a98d7da2ae0 (patch) | |
tree | abf5310b19ccf0fb7195158abbc4792dc995253b | |
parent | 229507e3f3722137c4b08ccbf8ee4b654db9baa4 (diff) |
Use VRAM constants where applicable.
34 files changed, 234 insertions, 280 deletions
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 @@ -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 @@ -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 |