From 1aa3fb24ec2d5002dc7b755776f42e855b709970 Mon Sep 17 00:00:00 2001 From: Vortyne <104168801+Vortyne@users.noreply.github.com> Date: Sun, 29 Sep 2024 18:54:41 -0400 Subject: `dbsprite` is the wrong macro for `WriteOAMBlock` data (#472) --- engine/overworld/cut.asm | 11 +++++++---- engine/overworld/emotion_bubbles.asm | 11 +++++++---- engine/overworld/ledges.asm | 11 +++++++---- 3 files changed, 21 insertions(+), 12 deletions(-) (limited to 'engine/overworld') diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 3e514672..2f839f8c 100644 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -119,12 +119,15 @@ LoadCutGrassAnimationTilePattern: WriteCutOrBoulderDustAnimationOAMBlock: call GetCutOrBoulderDustAnimationOffsets ld a, $9 - ld de, CutOrBoulderDustAnimationTilesAndAttributes + ld de, .OAMBlock jp WriteOAMBlock -CutOrBoulderDustAnimationTilesAndAttributes: - dbsprite 2, -1, 0, 4, $fd, OAM_OBP1 - dbsprite 2, -1, 0, 6, $ff, OAM_OBP1 +.OAMBlock: +; tile ID, attributes + db $fc, OAM_OBP1 + db $fd, OAM_OBP1 + db $fe, OAM_OBP1 + db $ff, OAM_OBP1 GetCutOrBoulderDustAnimationOffsets: ld hl, wSpritePlayerStateData1YPixels diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index d25d5ff1..d44a12ce 100644 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -51,7 +51,7 @@ EmotionBubble: add $8 ld c, a - ld de, EmotionBubblesOAM + ld de, EmotionBubblesOAMBlock xor a call WriteOAMBlock ld c, 60 @@ -67,9 +67,12 @@ EmotionBubblesPointerTable: dw QuestionEmote dw HappyEmote -EmotionBubblesOAM: - dbsprite 0, -1, 0, 0, $f9, 0 - dbsprite 0, -1, 0, 2, $fb, 0 +EmotionBubblesOAMBlock: +; tile ID, attributes + db $f8, 0 + db $f9, 0 + db $fa, 0 + db $fb, 0 EmotionBubbles: ShockEmote: INCBIN "gfx/emotes/shock.2bpp" diff --git a/engine/overworld/ledges.asm b/engine/overworld/ledges.asm index 73733e15..d88cef76 100644 --- a/engine/overworld/ledges.asm +++ b/engine/overworld/ledges.asm @@ -63,7 +63,7 @@ LoadHoppingShadowOAM: call CopyVideoDataDouble ld a, $9 lb bc, $54, $48 ; b, c = y, x coordinates of shadow - ld de, LedgeHoppingShadowOAM + ld de, LedgeHoppingShadowOAMBlock call WriteOAMBlock ret @@ -71,6 +71,9 @@ LedgeHoppingShadow: INCBIN "gfx/overworld/shadow.1bpp" LedgeHoppingShadowEnd: -LedgeHoppingShadowOAM: - dbsprite 2, -1, 0, 7, $ff, OAM_HFLIP - dbsprite 8, -1, 0, 7, $ff, OAM_HFLIP | OAM_VFLIP +LedgeHoppingShadowOAMBlock: +; tile ID, attributes + db $ff, OAM_OBP1 + db $ff, OAM_HFLIP + db $ff, OAM_VFLIP + db $ff, OAM_HFLIP | OAM_VFLIP -- cgit v1.3.1-sl0p From 678d014aef79fe62d38acfeb59cade17e6137f74 Mon Sep 17 00:00:00 2001 From: Vortyne <104168801+Vortyne@users.noreply.github.com> Date: Mon, 7 Oct 2024 12:03:26 -0400 Subject: `FreezeEnemyTrainerSprite` -> `SetEnemyTrainerToStayAndFaceAnyDirection` --- engine/overworld/auto_movement.asm | 6 +++--- home/map_objects.asm | 4 ++-- home/trainers.asm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/overworld') diff --git a/engine/overworld/auto_movement.asm b/engine/overworld/auto_movement.asm index 8a45735f..0452176e 100644 --- a/engine/overworld/auto_movement.asm +++ b/engine/overworld/auto_movement.asm @@ -266,10 +266,10 @@ RLEList_PewterGymGuy: db NPC_MOVEMENT_RIGHT, 3 db -1 ; end -FreezeEnemyTrainerSprite:: +SetEnemyTrainerToStayAndFaceAnyDirection:: ld a, [wCurMap] cp POKEMON_TOWER_7F - ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them + ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't set them ld hl, RivalIDs ld a, [wEngagedTrainerClass] ld b, a @@ -278,7 +278,7 @@ FreezeEnemyTrainerSprite:: cp -1 jr z, .notRival cp b - ret z ; the rival leaves after battling, so don't freeze him + ret z ; the rival leaves after battling, so don't set him jr .loop .notRival ld a, [wSpriteIndex] diff --git a/home/map_objects.asm b/home/map_objects.asm index e200238a..e0d9b6a5 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -219,9 +219,9 @@ SetSpriteMovementBytesToFE:: SetSpriteMovementBytesToFF:: push hl call GetSpriteMovementByte1Pointer - ld [hl], $FF + ld [hl], STAY call GetSpriteMovementByte2Pointer - ld [hl], $FF ; prevent person from walking? + ld [hl], NONE pop hl ret diff --git a/home/trainers.asm b/home/trainers.asm index bcd15850..04752cc2 100644 --- a/home/trainers.asm +++ b/home/trainers.asm @@ -358,7 +358,7 @@ PrintEndBattleText:: pop af ldh [hLoadedROMBank], a ld [MBC1RomBank], a - farcall FreezeEnemyTrainerSprite + farcall SetEnemyTrainerToStayAndFaceAnyDirection jp WaitForSoundToFinish GetSavedEndBattleTextPointer:: -- cgit v1.3.1-sl0p