cmdfx 0.2.0
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
75
96
110
126int Sprite_setCostumeAt(CmdFX_Sprite* sprite, int index, char** costume, char*** ansiCostume);
127
138char** Sprite_getCharCostume(CmdFX_Sprite* sprite, int costumeIndex);
139
150char*** Sprite_getAnsiCostume(CmdFX_Sprite* sprite, int costumeIndex);
151
164int Sprite_switchCostumeTo(CmdFX_Sprite* sprite, int costumeIndex);
165
178int Sprite_addCostume(CmdFX_Sprite* sprite, char** costume, char*** ansiCostume);
179
191int Sprite_removeCostume(CmdFX_Sprite* sprite, int costumeIndex);
192
204
215
216#ifdef __cplusplus
217}
218#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_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_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:64
int costumeCount
Represents the number of sprite costumes.
Definition costumes.h:73
char *** costumes
Represents the sprite costumes.
Definition costumes.h:51
Represents a sprite that can be drawn to the terminal.
Definition sprites.h:30