From 5a5f5ececdde2c4c62bdee649d8b1d3edba96fed Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 21 Mar 2020 13:07:18 -0400 Subject: [PATCH] Miscellaneous fixes from #694 --- data/items/descriptions.asm | 4 ++-- engine/battle_anims/anim_commands.asm | 4 ++-- engine/pokemon/stats_screen.asm | 18 ++++++++++-------- macros/enum.asm | 2 +- macros/scripts/audio.asm | 4 ++-- macros/scripts/movement.asm | 4 ++-- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/data/items/descriptions.asm b/data/items/descriptions.asm index e0f009047..2a7900b3a 100644 --- a/data/items/descriptions.asm +++ b/data/items/descriptions.asm @@ -188,7 +188,7 @@ ItemDescriptions: dw MorphMailDesc dw BlueSkyMailDesc dw MusicMailDesc - dw MewMailDesc + dw MirageMailDesc dw TeruSama25Desc dw TeruSama26Desc dw TeruSama26Desc @@ -978,7 +978,7 @@ MusicMailDesc: db "NATU-print MAIL." next "(HOLD)@" -MewMailDesc: +MirageMailDesc: db "MEW-print MAIL." next "(HOLD)@" diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index 113e9df37..c0424088e 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -237,12 +237,12 @@ BattleAnim_ClearOAM: bit BATTLEANIM_KEEPSPRITES_F, a jr z, .delete - ; Instead of deleting the sprites, make them all use palette 0 (monochrome) + ; Instead of deleting the sprites, make them all use PAL_BATTLE_OB_ENEMY ld hl, wVirtualOAMSprite00Attributes ld c, NUM_SPRITE_OAM_STRUCTS .loop ld a, [hl] - and $ff ^ (PALETTE_MASK | VRAM_BANK_1) + and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; PAL_BATTLE_OB_ENEMY (0) ld [hli], a rept SPRITEOAMSTRUCT_LENGTH + -1 inc hl diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm index cb066317d..ae7e71cf2 100644 --- a/engine/pokemon/stats_screen.asm +++ b/engine/pokemon/stats_screen.asm @@ -4,6 +4,8 @@ const BLUE_PAGE ; 3 NUM_STAT_PAGES EQU const_value + -1 +STAT_PAGE_MASK EQU %00000011 + BattleStatsScreenInit: ld a, [wLinkMode] cp LINK_MOBILE @@ -63,15 +65,15 @@ StatsScreenMain: ; ??? ld [wcf64], a ld a, [wcf64] - and %11111100 - or 1 + and $ff ^ STAT_PAGE_MASK + or PINK_PAGE ; first_page ld [wcf64], a .loop ld a, [wJumptableIndex] and $ff ^ (1 << 7) ld hl, StatsScreenPointerTable rst JumpTable - call StatsScreen_WaitAnim ; check for keys? + call StatsScreen_WaitAnim ld a, [wJumptableIndex] bit 7, a jr z, .loop @@ -83,13 +85,13 @@ StatsScreenMobile: ; ??? ld [wcf64], a ld a, [wcf64] - and %11111100 - or 1 + and $ff ^ STAT_PAGE_MASK + or PINK_PAGE ; first_page ld [wcf64], a .loop farcall Mobile_SetOverworldDelay ld a, [wJumptableIndex] - and $ff ^ (1 << 7) + and $7f ld hl, StatsScreenPointerTable rst JumpTable call StatsScreen_WaitAnim @@ -355,7 +357,7 @@ StatsScreen_JoypadAction: .set_page ld a, [wcf64] - and %11111100 + and $ff ^ STAT_PAGE_MASK or c ld [wcf64], a ld h, 4 @@ -759,7 +761,7 @@ StatsScreen_LoadGFX: jr z, .done cp $7f jr z, .done - and $80 + and CAUGHT_GENDER_MASK ld a, "♂" jr z, .got_gender ld a, "♀" diff --git a/macros/enum.asm b/macros/enum.asm index 003445be7..41d1da167 100644 --- a/macros/enum.asm +++ b/macros/enum.asm @@ -9,7 +9,7 @@ endc if _NARG >= 2 __enumdir__ = \2 else -__enumdir__ = +1 +__enumdir__ = 1 endc ENDM diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm index 92654ff9a..6f87bc3ec 100644 --- a/macros/scripts/audio.asm +++ b/macros/scripts/audio.asm @@ -41,7 +41,7 @@ noise_note: MACRO ENDM ; MusicCommands indexes (see audio/engine.asm) - enum_start $d0, +8 + enum_start $d0, 8 FIRST_MUSIC_CMD EQU __enum__ enum octave_cmd ; $d0 @@ -49,7 +49,7 @@ octave: MACRO db octave_cmd | 8 - (\1) ; octave ENDM -__enumdir__ = +1 +__enumdir__ = 1 enum note_type_cmd ; $d8 note_type: MACRO diff --git a/macros/scripts/movement.asm b/macros/scripts/movement.asm index eeda6bd83..e5981c0f9 100644 --- a/macros/scripts/movement.asm +++ b/macros/scripts/movement.asm @@ -1,5 +1,5 @@ ; MovementPointers indexes (see engine/overworld/movement.asm) - enum_start 0, +4 + enum_start 0, 4 ; Directional movements @@ -73,7 +73,7 @@ fast_jump_step: MACRO db movement_fast_jump_step | \1 ENDM -__enumdir__ = +1 +__enumdir__ = 1 ; Control enum movement_remove_sliding ; $38