diff options
Diffstat (limited to 'engine/overworld')
-rwxr-xr-x | engine/overworld/cut.asm | 24 | ||||
-rwxr-xr-x | engine/overworld/dust_smoke.asm | 6 | ||||
-rwxr-xr-x | engine/overworld/emotion_bubbles.asm | 4 | ||||
-rwxr-xr-x | engine/overworld/healing_machine.asm | 4 | ||||
-rwxr-xr-x | engine/overworld/ledges.asm | 2 | ||||
-rwxr-xr-x | engine/overworld/map_sprites.asm | 8 | ||||
-rwxr-xr-x | engine/overworld/player_animations.asm | 36 |
7 files changed, 40 insertions, 44 deletions
diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 97842079..07039e03 100755 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -80,23 +80,23 @@ InitCutAnimOAM: cp $52 jr z, .grass ; tree - ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row - ld hl, vChars1 + $7c0 - lb bc, BANK(Overworld_GFX), $02 + ld de, Overworld_GFX tile $2d ; cuttable tree sprite top row + ld hl, vChars1 tile $7c + lb bc, BANK(Overworld_GFX), 2 call CopyVideoData - ld de, Overworld_GFX + $3d0 ; cuttable tree sprite bottom row - ld hl, vChars1 + $7e0 - lb bc, BANK(Overworld_GFX), $02 + ld de, Overworld_GFX tile $3d ; cuttable tree sprite bottom row + ld hl, vChars1 tile $7e + lb bc, BANK(Overworld_GFX), 2 call CopyVideoData jr WriteCutOrBoulderDustAnimationOAMBlock .grass - ld hl, vChars1 + $7c0 + ld hl, vChars1 tile $7c call LoadCutGrassAnimationTilePattern - ld hl, vChars1 + $7d0 + ld hl, vChars1 tile $7d call LoadCutGrassAnimationTilePattern - ld hl, vChars1 + $7e0 + ld hl, vChars1 tile $7e call LoadCutGrassAnimationTilePattern - ld hl, vChars1 + $7f0 + ld hl, vChars1 tile $7f call LoadCutGrassAnimationTilePattern call WriteCutOrBoulderDustAnimationOAMBlock ld hl, wOAMBuffer + $93 @@ -112,8 +112,8 @@ InitCutAnimOAM: ret LoadCutGrassAnimationTilePattern: - ld de, AnimationTileset2 + $60 ; tile depicting a leaf - lb bc, BANK(AnimationTileset2), $01 + ld de, AnimationTileset2 tile 6 ; tile depicting a leaf + lb bc, BANK(AnimationTileset2), 1 jp CopyVideoData WriteCutOrBoulderDustAnimationOAMBlock: diff --git a/engine/overworld/dust_smoke.asm b/engine/overworld/dust_smoke.asm index 09a71a18..a20a0591 100755 --- a/engine/overworld/dust_smoke.asm +++ b/engine/overworld/dust_smoke.asm @@ -69,14 +69,14 @@ MoveBoulderDustFunctionPointerTable: dw AdjustOAMBlockXPos LoadSmokeTileFourTimes:: - ld hl, vChars1 + $7c0 - ld c, $4 + ld hl, vChars1 tile $7c + ld c, 4 .loop push bc push hl call LoadSmokeTile pop hl - ld bc, $10 + ld bc, 1 tiles add hl, bc pop bc dec c diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 1ac07b80..298858a2 100755 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -8,8 +8,8 @@ EmotionBubble: ld e, [hl] inc hl ld d, [hl] - ld hl, vChars1 + $780 - lb bc, BANK(EmotionBubbles), $04 + ld hl, vChars1 tile $78 + lb bc, BANK(EmotionBubbles), 4 call CopyVideoData ld a, [wUpdateSpritesEnabled] push af diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 062ef7ea..eaa396d0 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -1,7 +1,7 @@ AnimateHealingMachine: ld de, PokeCenterFlashingMonitorAndHealBall - ld hl, vChars0 + $7c0 - lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03 ; loads one too many tiles + ld hl, vChars0 tile $7c + lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), 3 ; should be 2 call CopyVideoData ld hl, wUpdateSpritesEnabled ld a, [hl] diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index 254680a5..0e006c5e 100755 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -57,7 +57,7 @@ HandleLedges:: INCLUDE "data/tilesets/ledge_tiles.asm" LoadHoppingShadowOAM: - ld hl, vChars1 + $7f0 + ld hl, vChars1 tile $7f ld de, LedgeHoppingShadow lb bc, BANK(LedgeHoppingShadow), (LedgeHoppingShadowEnd - LedgeHoppingShadow) / $8 call CopyVideoDataDouble diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm index 4a68169a..8f1f3931 100755 --- a/engine/overworld/map_sprites.asm +++ b/engine/overworld/map_sprites.asm @@ -130,25 +130,25 @@ LoadMapSpriteTilePatterns: push de push bc ld hl, vNPCSprites ; VRAM base address - ld bc, $c0 ; number of bytes per VRAM slot + ld bc, 12 tiles ; number of bytes per VRAM slot ldh a, [hVRAMSlot] cp 11 ; is it a 4-tile sprite? jr nc, .fourTileSpriteVRAMAddr ld d, a dec d -; hl = vSprites + [hVRAMSlot] * $C0 (the number of bytes in 12 tiles) +; hl = vSprites + [hVRAMSlot] * 12 tiles .calculateVRAMAddrLoop add hl, bc dec d jr nz, .calculateVRAMAddrLoop jr .loadStillTilePattern .fourTileSpriteVRAMAddr - ld hl, vSprites + $7c0 ; address for second 4-tile sprite + ld hl, vSprites tile $7c ; address for second 4-tile sprite ldh a, [hFourTileSpriteCount] and a jr nz, .loadStillTilePattern ; if it's the first 4-tile sprite - ld hl, vSprites + $780 ; address for first 4-tile sprite + ld hl, vSprites tile $78 ; address for first 4-tile sprite inc a ldh [hFourTileSpriteCount], a .loadStillTilePattern diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 69c1eefc..9e9b4073 100755 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -250,11 +250,11 @@ DoFlyAnimation: LoadBirdSpriteGraphics: ld de, BirdSprite ld hl, vNPCSprites - lb bc, BANK(BirdSprite), $0c + lb bc, BANK(BirdSprite), 12 call CopyVideoData - ld de, BirdSprite + $c0 ; moving animation sprite + ld de, BirdSprite tile 12 ; moving animation sprite ld hl, vNPCSprites2 - lb bc, BANK(BirdSprite), $0c + lb bc, BANK(BirdSprite), 12 jp CopyVideoData InitFacingDirectionList: @@ -381,8 +381,8 @@ FishingAnim: ld hl, wd736 set 6, [hl] ; reserve the last 4 OAM entries ld de, RedSprite - ld hl, vNPCSprites - lb bc, BANK(RedSprite), $c + ld hl, vNPCSprites tile $00 + lb bc, BANK(RedSprite), 12 call CopyVideoData ld a, $4 ld hl, RedFishingTiles @@ -479,22 +479,18 @@ FishingRodOAM: db $50, $40, $FE, $00 ; player facing left db $50, $58, $FE, $20 ; player facing right ($20 means "horizontally flip the tile") -RedFishingTiles: - dw RedFishingTilesFront - db 2, BANK(RedFishingTilesFront) - dw vNPCSprites + $20 +fishing_gfx: MACRO + dw \1 + db \2 + db BANK(\1) + dw vNPCSprites tile \3 +ENDM - dw RedFishingTilesBack - db 2, BANK(RedFishingTilesBack) - dw vNPCSprites + $60 - - dw RedFishingTilesSide - db 2, BANK(RedFishingTilesSide) - dw vNPCSprites + $a0 - - dw RedFishingRodTiles - db 3, BANK(RedFishingRodTiles) - dw vNPCSprites2 + $7d0 +RedFishingTiles: + fishing_gfx RedFishingTilesFront, 2, $02 + fishing_gfx RedFishingTilesBack, 2, $06 + fishing_gfx RedFishingTilesSide, 2, $0a + fishing_gfx RedFishingRodTiles, 3, $fd _HandleMidJump:: ld a, [wPlayerJumpingYScreenCoordsIndex] |