cmdfx 0.3.2
Lightweight game engine for your terminal
Loading...
Searching...
No Matches
costumes.h
Go to the documentation of this file.
1
11
12#pragma once
13
14#include "cmdfx/core/sprites.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
26#define MAX_SPRITE_COSTUMES 128
27
78
99 CmdFX_Sprite* sprite, int costumeCount
100);
101
115
132 CmdFX_Sprite* sprite, int index, char** costume, char*** ansiCostume
133);
134
145char** Sprite_getCharCostume(CmdFX_Sprite* sprite, int costumeIndex);
146
157char*** Sprite_getAnsiCostume(CmdFX_Sprite* sprite, int costumeIndex);
158
171int Sprite_switchCostumeTo(CmdFX_Sprite* sprite, int costumeIndex);
172
186 CmdFX_Sprite* sprite, char** costume, char*** ansiCostume
187);
188
200int Sprite_removeCostume(CmdFX_Sprite* sprite, int costumeIndex);
201
213
225
236
250
251#ifdef __cplusplus
252}
253#endif
char *** Sprite_getAnsiCostume(CmdFX_Sprite *sprite, int costumeIndex)
Gets the ANSI costume for a sprite.
CmdFX_SpriteCostumes * Sprite_createCostumes(CmdFX_Sprite *sprite, int costumeCount)
Creates a sprite costumes holder.
int Sprite_setCostumeAt(CmdFX_Sprite *sprite, int index, char **costume, char ***ansiCostume)
Sets a costume at the specified index.
int Sprite_getCurrentCostumeIndex(CmdFX_Sprite *sprite)
Gets the current index of the sprite costume.
CmdFX_SpriteCostumes * Sprite_getCostumes(CmdFX_Sprite *sprite)
Gets the sprite costumes.
int Sprite_removeCostume(CmdFX_Sprite *sprite, int costumeIndex)
Removes a sprite costume.
char ** Sprite_getCharCostume(CmdFX_Sprite *sprite, int costumeIndex)
Gets the sprite costume at a specific index.
int Sprite_freeCostumes(CmdFX_Sprite *sprite)
Frees the sprite costumes.
int Sprite_switchCostumeTo(CmdFX_Sprite *sprite, int costumeIndex)
Switches the sprite costume to a specific index.
int Sprite_addCostume(CmdFX_Sprite *sprite, char **costume, char ***ansiCostume)
Adds a sprite costume.
int Sprite_resetAllCostumes()
Resets all costumes.
int Sprite_resetCostumes(CmdFX_Sprite *sprite)
Resets the sprite costumes.
Sprites API for CmdFX.
Represents the holder for sprite costumes.
Definition costumes.h:38
char **** ansiCostumes
Represents the ANSI codes for the sprite costumes.
Definition costumes.h:67
int costumeCount
Represents the number of sprite costumes.
Definition costumes.h:76
char *** costumes
Represents the sprite costumes.
Definition costumes.h:52
Represents a sprite that can be drawn to the terminal.
Definition sprites.h:31