mirror of
https://github.com/nacabaro/nacapet.git
synced 2026-09-30 23:21:37 +00:00
Cosas, muchas cosas, exageracion de cossas, abundancia de cosas....
- Seleccion de huevo - Scripts de conversion de linea - Carga de sprites - Se produce nacimiento
This commit is contained in:
@@ -9,6 +9,7 @@ const int numFramesEating = 2;
|
||||
const int numFramesHappy = 2;
|
||||
const int numFramesRefuse = 4;
|
||||
const int numFramesSleepy = 2;
|
||||
const int numFramesHatching = 4;
|
||||
|
||||
// TODO: Cambiar a una animación mas atractiva
|
||||
const int animationFrames[numFrames] = {
|
||||
@@ -53,11 +54,16 @@ const int happyAnimationFrames[] = {
|
||||
3, 7
|
||||
};
|
||||
|
||||
const int hatchingAnimationPositions[] = {
|
||||
72, 66, 72, 78
|
||||
};
|
||||
|
||||
void animate_performAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData, uint8_t offsetX);
|
||||
void animate_performAttentionAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData);
|
||||
void animate_performEatingAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData);
|
||||
void animate_performRefuseAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData);
|
||||
void animate_performSleepyAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData);
|
||||
void animate_performHappyAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData);
|
||||
void animate_performHatchingAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData);
|
||||
|
||||
#endif
|
||||
@@ -92,4 +92,18 @@ void animate_performHappyAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct
|
||||
6,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
void animate_performHatchingAnimation(TFT_eSprite &buffer, TFT_eSprite &spr, struct SpriteData* spriteData) {
|
||||
currentAnimationFrame = (currentAnimationFrame + 1) % numFramesHappy;
|
||||
draw_drawSprite(
|
||||
buffer,
|
||||
spr,
|
||||
hatchingAnimationPositions[currentAnimationFrame],
|
||||
spriteHeightOnScreen,
|
||||
spriteData,
|
||||
0,
|
||||
6,
|
||||
false
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user