add base/sprite.h

This commit is contained in:
scawful
2024-08-07 11:22:36 -04:00
parent 1f9f09ce79
commit 79de6ff8b2
2 changed files with 47 additions and 0 deletions

46
src/base/sprite.h Normal file
View File

@@ -0,0 +1,46 @@
#ifndef YAZE_BASE_SPRITE_H_
#define YAZE_BASE_SPRITE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/**
* @brief Sprite instruction.
*/
struct sprite_instruction {
const char* content; /**< Content of the instruction. */
};
typedef struct sprite_instruction sprite_instruction;
/**
* @brief Sprite action.
*/
struct sprite_action {
const char* name; /**< Name of the action. */
uint8_t id; /**< ID of the action. */
sprite_instruction*
instructions; /**< Pointer to the instructions of the action. */
};
typedef struct sprite_action sprite_action;
/**
* @brief Primitive of a sprite.
*/
struct sprite {
const char* name; /**< Name of the sprite. */
uint8_t id; /**< ID of the sprite. */
sprite_action* actions; /**< Pointer to the actions of the sprite. */
};
typedef struct sprite sprite;
#ifdef __cplusplus
}
#endif
#endif // YAZE_BASE_SPRITE_H_

View File

@@ -9,6 +9,7 @@ extern "C" {
#include <stdint.h>
#include "base/snes_color.h"
#include "base/sprite.h"
void yaze_initialize(void);