Blame src/animation.h

dba3fc
#ifndef HELI_ANIMATION_H
dba3fc
#define HELI_ANIMATION_H
dba3fc
dba3fc
dba3fc
#include "common.h"
1d641c
#include "framebuffer.h"
1d641c
dba3fc
dba3fc
typedef struct _Animation *Animation;
dba3fc
dba3fc
dba3fc
int imageLoad(const char *path, int *outWidth, int *outHeight, unsigned char **outPixels);
ca6bde
int imageLoadFromMemory(const void *data, int size, int *outWidth, int *outHeight, unsigned char **outPixels);
0cbd57
int imageSave(const char *path, int width, int height, const void *pixels);
ba5c91
unsigned int imageToGLTexture(int width, int height, const void *pixels, int wrap);
ba5c91
unsigned int imageToGLTextureEx(int width, int height, const void *pixels, int horWrap, int vertWrap, int smooth, int mipMap);
1d641c
int imageToExistingGLTexture(unsigned int texid, int width, int height, const void *pixels);
0cbd57
int imageFromGLTexture(unsigned int texid, int *outWidth, int *outHeight, unsigned char **outPixels);
1d641c
int imageFromViewport(int *outWidth, int *outHeight, unsigned char **outPixels);
1d641c
int viewportSave(const char *path);
dba3fc
1d641c
unsigned int pixelGet(const void *pixel);
d6f40c
void pixelSet(void *pixel, unsigned int colorCode);
3e7c5f
unsigned int imageGetPixel(int width, int height, const void *pixels, int x, int y);
d6f40c
void imageSetPixel(int width, int height, void *pixels, int x, int y, unsigned int colorCode);
3e7c5f
3e7c5f
dba3fc
Animation createAnimation(const char *path);
f8dca4
Animation createAnimationEx(const char *path, int smooth, int horWrap, int vertWrap);
f8dca4
Animation createAnimationFromGLTexId(unsigned int texid);
ba5c91
Animation createAnimationFromImage(int width, int height, const void *pixels, int wrap);
ba5c91
Animation createAnimationFromImageEx(int width, int height, const void *pixels, int horWrap, int vertWrap, int smooth, int mipMap);
1d641c
Animation createAnimationFromFramebuffer(Framebuffer framebuffer);
1d641c
Animation createAnimationFromViewport();
1d641c
Animation createAnimationFromViewportEx(int horWrap, int vertWrap, int smooth, int mipMap);
dba3fc
Animation createAnimationEmpty();
dba3fc
void animationDestroy(Animation animation);
dba3fc
dba3fc
Animation animationClone(Animation animation);
dba3fc
Animation animationCloneEx(Animation animation, int start, int count);
dba3fc
dba3fc
unsigned int animationGetGLTexId(Animation animation);
3e7c5f
unsigned int animationGetFrameGLTexId(Animation animation, int frame);
0cbd57
void animationGLTexIdSetOwnership(unsigned int texid, int own);
dba3fc
dba3fc
int animationGetFramesCount(Animation animation);
dba3fc
void animationInsert(Animation animation, int index, Animation other);
dba3fc
void animationInsertEx(Animation animation, int index, Animation other, int start, int count);
dba3fc
void animationRemove(Animation animation, int start, int count);
dba3fc
void animationClear(Animation animation);
dba3fc
dba3fc
double animationGetFps(Animation animation);
dba3fc
void animationSetFps(Animation animation, double fps);
dba3fc
dba3fc
int animationIsPlaying(Animation animation);
dba3fc
void animationPlay(Animation animation);
dba3fc
void animationPause(Animation animation);
dba3fc
dba3fc
void animationAddTime(Animation animation, double time);
dba3fc
dba3fc
int animationGetLoop(Animation animation);
dba3fc
void animationSetLoop(Animation animation, int loop);
dba3fc
dba3fc
double animationGetPos(Animation animation);
dba3fc
void animationSetPos(Animation animation, double pos);
dba3fc
int animationGetFrame(Animation animation);
dba3fc
void animationSetFrame(Animation animation, int frame);
dba3fc
void animationNextFrame(Animation animation);
dba3fc
deef1d
dba3fc
#endif
dba3fc