Mario: change size and texture when Mario eats a mushroom
This commit is contained in:
+9
-14
@@ -25,20 +25,8 @@ public:
|
||||
return _death;
|
||||
}
|
||||
void handleDeath();
|
||||
void setBig() {
|
||||
if (isBig()) {
|
||||
setFireFlag();
|
||||
} else {
|
||||
setBigFlag();
|
||||
}
|
||||
}
|
||||
void unsetBig() {
|
||||
if (hasFire()) {
|
||||
unsetFireFlag();
|
||||
} else {
|
||||
unsetBigFlag();
|
||||
}
|
||||
}
|
||||
void setBig();
|
||||
void unsetBig();
|
||||
void setStar() {
|
||||
setStarFlag();
|
||||
}
|
||||
@@ -86,6 +74,13 @@ private:
|
||||
void stopMovement();
|
||||
uint8_t special_flags = 0;
|
||||
|
||||
// SRCs
|
||||
const SDL_Rect *standing_src = &MARIO_STANDING_SRC;
|
||||
const SDL_Rect *death_src = &MARIO_DEATH_SRC;
|
||||
const SDL_Rect *change_dir_src = &MARIO_CHANGE_DIR_SRC;
|
||||
const SDL_Rect *jump_src = &MARIO_JUMP_SRC;
|
||||
const std::vector<SDL_Rect> *walk_anim = &MARIO_WALK_ANIM;
|
||||
|
||||
void setBigFlag() {
|
||||
special_flags = special_flags | BIG_FLAG;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user