Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → [pokecrystal] Make the player sprite walk in place when not moving

#1 2017-10-11 02:12:09

Rangi
Member
Registered: 2016-05-09
Post 815/870

[pokecrystal] Make the player sprite walk in place when not moving

I would like the player sprite to walk in place when they're not moving, the way SPRITEMOVEDATA_POKEMON does.

engine/player_object.asm:SpawnPlayer initializes the player to use SPRITEMOVEDATA_PLAYER. That corresponds to this entry in the data/map_objects.asm sprite_movement_data table:

; function,                                  facing, action,              flags1, flags2, palette flags
sprite_movement_data SPRITEMOVEFN_OBEY_DPAD, DOWN,   PERSON_ACTION_STAND, $02,    $00,    %0000 ; 0b

I tried replacing PERSON_ACTION_STAND with PERSON_ACTION_BOUNCE, but this had no apparent effect. I also checked engine/map_objects.asm:MapObjectMovementPattern.Pointers for anything related to SPRITEMOVEFN_OBEY_DPAD that would need to change, but I don't see anything that would. (Replacing movement_step_sleep with other movements causes them to happen once when you first press Up/Down/Left/Right; it does not affect what the sprite does without input.)

Any pointers, please?

(Long-term goal is to only have the bouncing occur on maps that use TILESET_UNDERWATER, but I can probably handle this myself once the core behavior works at all.)

Last edited by Rangi (2017-10-11 02:14:23)


Pokémon Polished Crystal (GitHub) — version 2.2.0 released
Pokémon Red★ and Blue★: Space World Edition (GitHub) — updated August 19!
Polished Map: pokered+pokecrystal map, tileset, and palette editor — version 3.5.1 released!

Offline

  • Index
  • → Help/Question
  • → [pokecrystal] Make the player sprite walk in place when not moving

Board footer

Powered by FluxBB