Browse Source

Towner: Optimize to save 16 bytes (88->72)

pull/5390/head
Gleb Mazovetskiy 3 years ago
parent
commit
08d446b2db
  1. 15
      Source/towners.h

15
Source/towners.h

@ -38,11 +38,16 @@ enum _talker_id : uint8_t {
struct Towner {
OptionalOwnedClxSpriteList ownedAnim;
OptionalClxSpriteList anim;
/** Specifies the animation frame sequence. */
const uint8_t *animOrder; // unowned
void (*talk)(Player &player, Towner &towner);
string_view name;
/** Used to get a voice line and text related to active quests when the player speaks to a town npc */
int16_t seed;
/** Tile position of NPC */
Point position;
/** Used to get a voice line and text related to active quests when the player speaks to a town npc */
int16_t seed;
uint16_t _tAnimWidth;
/** Tick length of each frame in the current animation */
int16_t _tAnimDelay;
@ -53,11 +58,7 @@ struct Towner {
/** Current frame of animation. */
uint8_t _tAnimFrame;
uint8_t _tAnimFrameCnt;
string_view name;
/** Specifies the animation frame sequence. */
const uint8_t *animOrder; // unowned
std::size_t animOrderSize;
void (*talk)(Player &player, Towner &towner);
uint8_t animOrderSize;
_talker_id _ttype;
ClxSprite currentSprite() const

Loading…
Cancel
Save