still working on adding frames to config
This commit is contained in:
parent
3fa74e8f9e
commit
0591b6ca6e
10 changed files with 199 additions and 53 deletions
|
|
@ -4,11 +4,13 @@
|
|||
#ifdef ARC_SDL
|
||||
|
||||
#include <SDL.h>
|
||||
#include "arc/graphics/spritesheet.h"
|
||||
#include "arc/graphics/sprite.h"
|
||||
|
||||
struct ARC_Sprite {
|
||||
ARC_Spritesheet *spritesheet;
|
||||
SDL_Rect *bounds;
|
||||
ARC_Rect *frames;
|
||||
uint32_t *frameSize;
|
||||
uint32_t *frameIndex;
|
||||
};
|
||||
|
||||
#endif // ARC_SDL
|
||||
|
|
|
|||
|
|
@ -5,8 +5,20 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "arc/graphics/renderer.h"
|
||||
#include "arc/graphics/spritesheet.h"
|
||||
#include "arc/math/rectangle.h"
|
||||
|
||||
typedef struct ARC_Sprite ARC_Sprite;
|
||||
|
||||
void ARC_Sprite_Create(ARC_Sprite **sprite, ARC_Spritesheet *spritesheet, ARC_Rect *bounds);
|
||||
|
||||
void ARC_Sprite_Destroy(ARC_Sprite *sprite);
|
||||
|
||||
void ARC_Sprite_Render(ARC_Sprite *sprite, ARC_Renderer *renderer, ARC_Rect *renderBounds);
|
||||
|
||||
ARC_Rect *ARC_Sprite_GetBounds(ARC_Sprite *sprite);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue