Animation.h File Reference

Tamago animation handler. More...

#include <stdbool.h>
#include <stdint.h>
Include dependency graph for Animation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Animation
 Animation. More...
 

Macros

#define FRAME_SIZE   64
 Frame size in byte.
 
#define NUM_OF_FRAMES   167
 Total number of frames.
 

Enumerations

enum  AnimID {
  IDLE_EGG = 0, HATCH_EGG, IDLE_BABYTCHI, IDLE_MARUTCHI,
  IDLE_TAMATCHI, IDLE_KUCHITAMATCHI, IDLE_MAMETCHI, IDLE_GINJIROTCHI,
  IDLE_MASKUTCHI, IDLE_KUCHIPATCHI, IDLE_NYOROTCHI, IDLE_TARAKOTCHI,
  IDLE_OYAJITCHI, IDLE_OBAKETCHI, NUM_OF_ANIMATIONS
}
 Animation IDs. More...
 
enum  IconID { ICON_POO = 0, ICON_SKULL, ICON_SLEEP }
 Icon IDs. More...
 

Functions

void Animation_Init (void)
 Initialise animation handler.
 
uint8_t * Animation_GetBufferAddr (void)
 Get address of image buffer. More...
 
void Animation_ShowIcon (IconID eID, bool bShow)
 Show (or hide) icon. More...
 
void Animation_Set (AnimID eID)
 Set current animation. More...
 
void Animation_Update (void)
 Update animation buffer.
 

Detailed Description

Tamago animation handler.

Definition in file Animation.h.

Enumeration Type Documentation

◆ AnimID

enum AnimID

Animation IDs.

Enumerator
IDLE_EGG 

ID, Egg idle animation.

HATCH_EGG 

ID, Babytchi idle animation.

IDLE_BABYTCHI 

ID, Babytchi idle animation.

IDLE_MARUTCHI 

ID, Marutchi idle animation.

IDLE_TAMATCHI 

ID, Tamatchi idle animation.

IDLE_KUCHITAMATCHI 

ID, Kuchitamatchi idle animation.

IDLE_MAMETCHI 

ID, Mametchi idle animation.

IDLE_GINJIROTCHI 

ID, Ginjirotchi idle animation.

IDLE_MASKUTCHI 

ID, Maskutchi idle animation.

IDLE_KUCHIPATCHI 

ID, Kuchipatchi idle animation.

IDLE_NYOROTCHI 

ID, Nyorotchi idle animation.

IDLE_TARAKOTCHI 

ID, Tarakotchi idle animation.

IDLE_OYAJITCHI 

ID, Oyajotchi idle animation.

IDLE_OBAKETCHI 

ID, Obaketchi idle animation.

NUM_OF_ANIMATIONS 

Total number of animations.

Definition at line 18 of file Animation.h.

◆ IconID

enum IconID

Icon IDs.

Enumerator
ICON_POO 

ID, Poo icon.

ICON_SKULL 

ID, Skull icon.

ICON_SLEEP 

ID, Sleep icon.

Definition at line 42 of file Animation.h.

Function Documentation

◆ Animation_GetBufferAddr()

uint8_t* Animation_GetBufferAddr ( void  )

Get address of image buffer.

Returns
Pointer to image buffer

Definition at line 3036 of file Animation.c.

◆ Animation_Set()

void Animation_Set ( AnimID  eID)

Set current animation.

Parameters
eIDAnimation ID

Definition at line 3068 of file Animation.c.

Here is the caller graph for this function:

◆ Animation_ShowIcon()

void Animation_ShowIcon ( IconID  eID,
bool  bShow 
)

Show (or hide) icon.

Parameters
eIDIcon ID
bShowfalse: hide icon, true: show icon

Definition at line 3048 of file Animation.c.