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 /engine/battle | |
parent | 229507e3f3722137c4b08ccbf8ee4b654db9baa4 (diff) |
Use VRAM constants where applicable.
Diffstat (limited to 'engine/battle')
-rwxr-xr-x | engine/battle/1c.asm | 8 | ||||
-rwxr-xr-x | engine/battle/animations.asm | 30 | ||||
-rwxr-xr-x | engine/battle/core.asm | 40 | ||||
-rwxr-xr-x | engine/battle/e.asm | 2 |
4 files changed, 40 insertions, 40 deletions
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 |