diff options
| author | dannye <33dannye@gmail.com> | 2025-01-30 21:40:19 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2025-01-30 21:40:19 -0600 |
| commit | 6cb885a9f68b9f445d7fa45279731336fe0247d4 (patch) | |
| tree | 39736ab1dd8ebcc57f8e981db6103285743d5530 /engine/items | |
| parent | Identify unnamed functions in map_sprites.asm (#126) (diff) | |
| parent | Fix some label typos, and add some constants instead of raw numbers (#492) (diff) | |
| download | pokeyellow-6cb885a9f68b9f445d7fa45279731336fe0247d4.tar.gz pokeyellow-6cb885a9f68b9f445d7fa45279731336fe0247d4.tar.xz pokeyellow-6cb885a9f68b9f445d7fa45279731336fe0247d4.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/items')
| -rw-r--r-- | engine/items/item_effects.asm | 14 | ||||
| -rw-r--r-- | engine/items/town_map.asm | 26 |
2 files changed, 20 insertions, 20 deletions
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 89a20113..de95b0c7 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -482,7 +482,7 @@ ItemUseBall: push hl -; If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. +; Bug: If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. ; This is a bug because a wild Pokémon could have used Transform via ; Mirror Move even though the only wild Pokémon that knows Transform is Ditto. ld hl, wEnemyBattleStatus3 @@ -828,7 +828,7 @@ ItemUseEvoStone: ld a, SFX_HEAL_AILMENT call PlaySoundWaitForCurrent call WaitForSoundToFinish - ld a, $01 + ld a, TRUE ld [wForceEvolution], a callfar TryEvolvingMon ; try to evolve pokemon pop af @@ -2321,10 +2321,10 @@ ItemUsePPRestore: .fullyRestorePP ld a, [hl] ; move PP -; Note that this code has a bug. It doesn't mask out the upper two bits, which -; are used to count how many PP Ups have been used on the move. So, Max Ethers -; and Max Elixirs will not be detected as having no effect on a move with full -; PP if the move has had any PP Ups used on it. +; Bug: This code doesn't mask out the upper two bits, which are used to count +; how many PP Ups have been used on the move. +; So, Max Ethers and Max Elixirs will not be detected as having no effect on +; a move with full PP if the move has had any PP Ups used on it. cp b ; does current PP equal max PP? ret z jr .storeNewAmount @@ -2794,7 +2794,7 @@ GetMaxPP: and %11000000 ; get PP Up count pop bc or b ; place normal max PP in 6 lower bits of a - assert wMoveData + MOVE_PP + 1 == wPPUpCountAndMaxPP + ASSERT wMoveData + MOVE_PP + 1 == wPPUpCountAndMaxPP ld h, d ld l, e inc hl ; hl = wPPUpCountAndMaxPP diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index abd3b13f..d5960afd 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -18,9 +18,9 @@ DisplayTownMap: hlcoord 1, 0 ld de, wNameBuffer call PlaceString - ld hl, wShadowOAM - ld de, wTileMapBackup - ld bc, $10 + ld hl, wShadowOAMSprite00 + ld de, wShadowOAMBackupSprite00 + ld bc, 4 * 4 call CopyData ld hl, vSprites tile BIRD_BASE_TILE ld de, TownMapCursor @@ -63,8 +63,8 @@ DisplayTownMap: ld de, wNameBuffer call PlaceString ld hl, wShadowOAMSprite04 - ld de, wTileMapBackup + 16 - ld bc, $10 + ld de, wShadowOAMBackupSprite04 + ld bc, 4 * 4 call CopyData .inputLoop call TownMapSpriteBlinkingAnimation @@ -222,7 +222,7 @@ LoadTownMap_Fly:: ld [wDestinationMap], a ld hl, wStatusFlags6 set BIT_FLY_WARP, [hl] - assert wStatusFlags6 + 1 == wStatusFlags7 + ASSERT wStatusFlags6 + 1 == wStatusFlags7 inc hl set BIT_USED_FLY, [hl] .pressedB @@ -376,8 +376,8 @@ DrawPlayerOrBirdSprite: cp "@" jr nz, .loop ld hl, wShadowOAM - ld de, wTileMapBackup - ld bc, $a0 + ld de, wShadowOAMBackup + ld bc, NUM_SPRITE_OAM_STRUCTS * 4 jp CopyData DisplayWildLocations: @@ -423,8 +423,8 @@ DisplayWildLocations: call DrawPlayerOrBirdSprite .done ld hl, wShadowOAM - ld de, wTileMapBackup - ld bc, $a0 + ld de, wShadowOAMBackup + ld bc, NUM_SPRITE_OAM_STRUCTS * 4 jp CopyData AreaUnknownText: @@ -611,15 +611,15 @@ TownMapSpriteBlinkingAnimation:: cp 50 jr nz, .done ; show sprites when the counter reaches 50 - ld hl, wTileMapBackup + ld hl, wShadowOAMBackup ld de, wShadowOAM - ld bc, $90 + ld bc, (NUM_SPRITE_OAM_STRUCTS - 4) * 4 call CopyData xor a jr .done .hideSprites ld hl, wShadowOAM - ld b, $24 + ld b, NUM_SPRITE_OAM_STRUCTS - 4 ld de, $4 .hideSpritesLoop ld [hl], $a0 |
