From 006d9f644168a09ba147643e29a599bc668bf094 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 30 Jan 2018 22:34:05 -0500 Subject: [PATCH] Clarify big doll-related constants (Snorlax and Lapras are symmetrical, Onix is not) --- constants/map_object_constants.asm | 38 +++++++-------- data/sprites/map_objects.asm | 78 +++++++++++++++--------------- docs/map_scripts.md | 4 +- engine/map_objects.asm | 20 ++++---- engine/npc_movement.asm | 2 +- maps/VermilionCity.asm | 2 +- 6 files changed, 73 insertions(+), 71 deletions(-) diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 95da4bebb..8df3b03f0 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -102,7 +102,7 @@ MAPOBJECT_SCREEN_WIDTH EQU 12 const SPRITEMOVEDATA_12 ; 12 const SPRITEMOVEDATA_FOLLOWING ; 13 const SPRITEMOVEDATA_SCRIPTED ; 14 - const SPRITEMOVEDATA_SNORLAX ; 15 + const SPRITEMOVEDATA_BIGDOLLSYM ; 15 const SPRITEMOVEDATA_POKEMON ; 16 const SPRITEMOVEDATA_SUDOWOODO ; 17 const SPRITEMOVEDATA_SMASHABLE_ROCK ; 18 @@ -113,7 +113,7 @@ MAPOBJECT_SCREEN_WIDTH EQU 12 const SPRITEMOVEDATA_SCREENSHAKE ; 1d const SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE ; 1e const SPRITEMOVEDATA_SPINCLOCKWISE ; 1f - const SPRITEMOVEDATA_20 ; 20 + const SPRITEMOVEDATA_BIGDOLLASYM ; 20 const SPRITEMOVEDATA_BIGDOLL ; 21 const SPRITEMOVEDATA_BOULDERDUST ; 22 const SPRITEMOVEDATA_GRASS ; 23 @@ -183,23 +183,23 @@ SPRITEMOVEDATA_FIELDS EQU 6 ; ObjectActionPairPointers indexes (see engine/map_object_action.asm) const_def - const OBJECT_ACTION_00 ; 00 - const OBJECT_ACTION_STAND ; 01 - const OBJECT_ACTION_STEP ; 02 - const OBJECT_ACTION_BUMP ; 03 - const OBJECT_ACTION_SPIN ; 04 - const OBJECT_ACTION_SPIN_FLICKER ; 05 - const OBJECT_ACTION_FISHING ; 06 - const OBJECT_ACTION_SHADOW ; 07 - const OBJECT_ACTION_EMOTE ; 08 - const OBJECT_ACTION_BIG_SNORLAX ; 09 - const OBJECT_ACTION_BOUNCE ; 0a - const OBJECT_ACTION_WEIRD_TREE ; 0b - const OBJECT_ACTION_BIG_LAPRAS ; 0c - const OBJECT_ACTION_BIG_DOLL ; 0d - const OBJECT_ACTION_BOULDER_DUST ; 0e - const OBJECT_ACTION_GRASS_SHAKE ; 0f - const OBJECT_ACTION_SKYFALL ; 10 + const OBJECT_ACTION_00 ; 00 + const OBJECT_ACTION_STAND ; 01 + const OBJECT_ACTION_STEP ; 02 + const OBJECT_ACTION_BUMP ; 03 + const OBJECT_ACTION_SPIN ; 04 + const OBJECT_ACTION_SPIN_FLICKER ; 05 + const OBJECT_ACTION_FISHING ; 06 + const OBJECT_ACTION_SHADOW ; 07 + const OBJECT_ACTION_EMOTE ; 08 + const OBJECT_ACTION_BIG_DOLL_SYM ; 09 + const OBJECT_ACTION_BOUNCE ; 0a + const OBJECT_ACTION_WEIRD_TREE ; 0b + const OBJECT_ACTION_BIG_DOLL_ASYM ; 0c + const OBJECT_ACTION_BIG_DOLL ; 0d + const OBJECT_ACTION_BOULDER_DUST ; 0e + const OBJECT_ACTION_GRASS_SHAKE ; 0f + const OBJECT_ACTION_SKYFALL ; 10 ; Facings indexes (see data/sprites/facings.asm) const_def diff --git a/data/sprites/map_objects.asm b/data/sprites/map_objects.asm index ece2f607b..0197ad945 100755 --- a/data/sprites/map_objects.asm +++ b/data/sprites/map_objects.asm @@ -5,43 +5,43 @@ ENDM SpriteMovementData:: ; 4273 ; entries correspond to SPRITEMOVEDATA_* constants - ; function, facing, action, flags1, flags2, palette flags - sprite_movement_data SPRITEMOVEFN_00, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_00 - sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $0c, $00, %0000 ; SPRITEMOVEDATA_STILL - sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_WANDER - sprite_movement_data SPRITEMOVEFN_SLOW_RANDOM_SPIN, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINRANDOM_SLOW - sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_Y, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_WALK_UP_DOWN - sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_X, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_WALK_LEFT_RIGHT - sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_DOWN - sprite_movement_data SPRITEMOVEFN_STANDING, UP, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_UP - sprite_movement_data SPRITEMOVEFN_STANDING, LEFT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_LEFT - sprite_movement_data SPRITEMOVEFN_STANDING, RIGHT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_RIGHT - sprite_movement_data SPRITEMOVEFN_FAST_RANDOM_SPIN, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINRANDOM_FAST - sprite_movement_data SPRITEMOVEFN_OBEY_DPAD, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_PLAYER - sprite_movement_data SPRITEMOVEFN_08, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0C - sprite_movement_data SPRITEMOVEFN_09, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0D - sprite_movement_data SPRITEMOVEFN_0A, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0E - sprite_movement_data SPRITEMOVEFN_0B, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0F - sprite_movement_data SPRITEMOVEFN_0C, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_10 - sprite_movement_data SPRITEMOVEFN_0D, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_11 - sprite_movement_data SPRITEMOVEFN_0E, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_12 - sprite_movement_data SPRITEMOVEFN_FOLLOW, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_FOLLOWING - sprite_movement_data SPRITEMOVEFN_SCRIPTED, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_SCRIPTED - sprite_movement_data SPRITEMOVEFN_BIG_SNORLAX, DOWN, OBJECT_ACTION_BIG_SNORLAX, $2e, $01, %1100 ; SPRITEMOVEDATA_SNORLAX - sprite_movement_data SPRITEMOVEFN_BOUNCE, DOWN, OBJECT_ACTION_BOUNCE, $2e, $00, %0000 ; SPRITEMOVEDATA_POKEMON - sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $0c, $00, %0000 ; SPRITEMOVEDATA_SUDOWOODO - sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $2e, $10, %0000 ; SPRITEMOVEDATA_SMASHABLE_ROCK - sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_STAND, $2e, $00, %0100 ; SPRITEMOVEDATA_STRENGTH_BOULDER - sprite_movement_data SPRITEMOVEFN_FOLLOWNOTEXACT, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_FOLLOWNOTEXACT - sprite_movement_data SPRITEMOVEFN_SHADOW, DOWN, OBJECT_ACTION_00, $8e, $01, %0000 ; SPRITEMOVEDATA_SHADOW - sprite_movement_data SPRITEMOVEFN_EMOTE, DOWN, OBJECT_ACTION_EMOTE, $8e, $02, %0000 ; SPRITEMOVEDATA_EMOTE - sprite_movement_data SPRITEMOVEFN_SCREENSHAKE, DOWN, OBJECT_ACTION_00, $82, $00, %0000 ; SPRITEMOVEDATA_SCREENSHAKE - sprite_movement_data SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE, LEFT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE - sprite_movement_data SPRITEMOVEFN_SPIN_CLOCKWISE, RIGHT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINCLOCKWISE - sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_BIG_LAPRAS, $2e, $01, %1100 ; SPRITEMOVEDATA_20 - sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_BIG_DOLL, $2e, $01, %1100 ; SPRITEMOVEDATA_BIGDOLL - sprite_movement_data SPRITEMOVEFN_BOULDERDUST, DOWN, OBJECT_ACTION_BOULDER_DUST, $8e, $01, %0000 ; SPRITEMOVEDATA_BOULDERDUST - sprite_movement_data SPRITEMOVEFN_GRASS, DOWN, OBJECT_ACTION_GRASS_SHAKE, $8e, $02, %0000 ; SPRITEMOVEDATA_GRASS - sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, OBJECT_ACTION_STAND, $00, $00, %0010 ; SPRITEMOVEDATA_LAPRAS - sprite_movement_data SPRITEMOVEFN_00, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 25 + ; function, facing, action, flags1, flags2, palette flags + sprite_movement_data SPRITEMOVEFN_00, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_00 + sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $0c, $00, %0000 ; SPRITEMOVEDATA_STILL + sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_WANDER + sprite_movement_data SPRITEMOVEFN_SLOW_RANDOM_SPIN, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINRANDOM_SLOW + sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_Y, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_WALK_UP_DOWN + sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_X, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_WALK_LEFT_RIGHT + sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_DOWN + sprite_movement_data SPRITEMOVEFN_STANDING, UP, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_UP + sprite_movement_data SPRITEMOVEFN_STANDING, LEFT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_LEFT + sprite_movement_data SPRITEMOVEFN_STANDING, RIGHT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_STANDING_RIGHT + sprite_movement_data SPRITEMOVEFN_FAST_RANDOM_SPIN, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINRANDOM_FAST + sprite_movement_data SPRITEMOVEFN_OBEY_DPAD, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_PLAYER + sprite_movement_data SPRITEMOVEFN_08, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0C + sprite_movement_data SPRITEMOVEFN_09, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0D + sprite_movement_data SPRITEMOVEFN_0A, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0E + sprite_movement_data SPRITEMOVEFN_0B, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_0F + sprite_movement_data SPRITEMOVEFN_0C, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_10 + sprite_movement_data SPRITEMOVEFN_0D, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_11 + sprite_movement_data SPRITEMOVEFN_0E, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_12 + sprite_movement_data SPRITEMOVEFN_FOLLOW, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_FOLLOWING + sprite_movement_data SPRITEMOVEFN_SCRIPTED, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_SCRIPTED + sprite_movement_data SPRITEMOVEFN_BIG_SNORLAX, DOWN, OBJECT_ACTION_BIG_DOLL_SYM, $2e, $01, %1100 ; SPRITEMOVEDATA_BIGDOLLSYM + sprite_movement_data SPRITEMOVEFN_BOUNCE, DOWN, OBJECT_ACTION_BOUNCE, $2e, $00, %0000 ; SPRITEMOVEDATA_POKEMON + sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $0c, $00, %0000 ; SPRITEMOVEDATA_SUDOWOODO + sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $2e, $10, %0000 ; SPRITEMOVEDATA_SMASHABLE_ROCK + sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_STAND, $2e, $00, %0100 ; SPRITEMOVEDATA_STRENGTH_BOULDER + sprite_movement_data SPRITEMOVEFN_FOLLOWNOTEXACT, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; SPRITEMOVEDATA_FOLLOWNOTEXACT + sprite_movement_data SPRITEMOVEFN_SHADOW, DOWN, OBJECT_ACTION_00, $8e, $01, %0000 ; SPRITEMOVEDATA_SHADOW + sprite_movement_data SPRITEMOVEFN_EMOTE, DOWN, OBJECT_ACTION_EMOTE, $8e, $02, %0000 ; SPRITEMOVEDATA_EMOTE + sprite_movement_data SPRITEMOVEFN_SCREENSHAKE, DOWN, OBJECT_ACTION_00, $82, $00, %0000 ; SPRITEMOVEDATA_SCREENSHAKE + sprite_movement_data SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE, LEFT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE + sprite_movement_data SPRITEMOVEFN_SPIN_CLOCKWISE, RIGHT, OBJECT_ACTION_STAND, $00, $00, %0000 ; SPRITEMOVEDATA_SPINCLOCKWISE + sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_BIG_DOLL_ASYM, $2e, $01, %1100 ; SPRITEMOVEDATA_BIGDOLLASYM + sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_BIG_DOLL, $2e, $01, %1100 ; SPRITEMOVEDATA_BIGDOLL + sprite_movement_data SPRITEMOVEFN_BOULDERDUST, DOWN, OBJECT_ACTION_BOULDER_DUST, $8e, $01, %0000 ; SPRITEMOVEDATA_BOULDERDUST + sprite_movement_data SPRITEMOVEFN_GRASS, DOWN, OBJECT_ACTION_GRASS_SHAKE, $8e, $02, %0000 ; SPRITEMOVEDATA_GRASS + sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, OBJECT_ACTION_STAND, $00, $00, %0010 ; SPRITEMOVEDATA_LAPRAS + sprite_movement_data SPRITEMOVEFN_00, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 25 ; 4357 diff --git a/docs/map_scripts.md b/docs/map_scripts.md index c024c0244..9c82f8b60 100644 --- a/docs/map_scripts.md +++ b/docs/map_scripts.md @@ -136,7 +136,7 @@ Movement types: - `SPRITEMOVEDATA_SPINRANDOM_FAST` -- `SPRITEMOVEDATA_SNORLAX` +- `SPRITEMOVEDATA_BIGDOLLSYM` - `SPRITEMOVEDATA_POKEMON` @@ -150,6 +150,8 @@ Movement types: - `SPRITEMOVEDATA_SPINCLOCKWISE` +- `SPRITEMOVEDATA_BIGDOLLASYM` + - `SPRITEMOVEDATA_BIGDOLL` - `SPRITEMOVEDATA_LAPRAS` diff --git a/engine/map_objects.asm b/engine/map_objects.asm index dc39b3f16..d9716b3bb 100644 --- a/engine/map_objects.asm +++ b/engine/map_objects.asm @@ -792,7 +792,7 @@ MapObjectMovementPattern: ; 47dd ld [hl], STANDING ld hl, OBJECT_ACTION add hl, bc - ld [hl], OBJECT_ACTION_BIG_SNORLAX + ld [hl], OBJECT_ACTION_BIG_DOLL_SYM ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_04 @@ -1103,20 +1103,20 @@ SetRandomStepDuration: ; 4b2d StepTypesJumptable: ; 4b45 ; entries correspond to STEP_TYPE_* constants dw ObjectMovementReset ; 00 - dw MapObjectMovementPattern ; unused - dw NPCStep ; 02 npc walk + dw MapObjectMovementPattern ; 01 + dw NPCStep ; 02 dw StepType03 ; 03 dw StepType04 ; 04 dw StepType05 ; 05 - dw PlayerStep ; 06 player walk + dw PlayerStep ; 06 dw StepType07 ; 07 - dw NPCJump ; 08 npc jump step - dw PlayerJump ; 09 player jump step - dw PlayerOrNPCTurnStep ; 0a half step + dw NPCJump ; 08 + dw PlayerJump ; 09 + dw PlayerOrNPCTurnStep ; 0a dw StepTypeBump ; 0b - dw TeleportFrom ; 0c teleport from - dw TeleportTo ; 0d teleport to - dw Skyfall ; 0e skyfall + dw TeleportFrom ; 0c + dw TeleportTo ; 0d + dw Skyfall ; 0e dw StepType0f ; 0f dw GotBiteStep ; 10 dw RockSmashStep ; 11 diff --git a/engine/npc_movement.asm b/engine/npc_movement.asm index e8b353fa6..2144ae61e 100755 --- a/engine/npc_movement.asm +++ b/engine/npc_movement.asm @@ -496,7 +496,7 @@ Unreferenced_Function7113: ld hl, OBJECT_MOVEMENTTYPE add hl, bc ld a, [hl] - cp SPRITEMOVEDATA_SNORLAX + cp SPRITEMOVEDATA_BIGDOLLSYM jr nz, .not_snorlax call Function7171 jr c, .yes diff --git a/maps/VermilionCity.asm b/maps/VermilionCity.asm index abdca0cba..fb07c28e8 100644 --- a/maps/VermilionCity.asm +++ b/maps/VermilionCity.asm @@ -297,5 +297,5 @@ VermilionCity_MapEvents: object_event 23, 6, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionMachopOwner, -1 object_event 26, 7, SPRITE_MACHOP, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VermilionMachop, -1 object_event 14, 16, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionCitySuperNerdScript, -1 - object_event 34, 8, SPRITE_BIG_SNORLAX, SPRITEMOVEDATA_SNORLAX, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionSnorlax, EVENT_VERMILION_CITY_SNORLAX + object_event 34, 8, SPRITE_BIG_SNORLAX, SPRITEMOVEDATA_BIGDOLLSYM, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionSnorlax, EVENT_VERMILION_CITY_SNORLAX object_event 31, 12, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionGymBadgeGuy, -1