diff options
Diffstat (limited to 'sword2/driver/animation.h')
-rw-r--r-- | sword2/driver/animation.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sword2/driver/animation.h b/sword2/driver/animation.h new file mode 100644 index 0000000000..889a68d9fd --- /dev/null +++ b/sword2/driver/animation.h @@ -0,0 +1,58 @@ +#ifndef ANIMATION_H +#define ANIMATION_H + +#include <inttypes.h> +#ifdef USE_MPEG2 +extern "C" { + #include <mpeg2dec/mpeg2.h> +} +#endif + +namespace Sword2 { + +#define SQR(x) ((x)*(x)) + +#define SHIFT 3 +#define BITDEPTH (1<<(8-SHIFT)) +#define ROUNDADD (1<<(SHIFT-1)) + +#define BUFFER_SIZE 4096 + + +typedef struct { + + + int palnum; + + unsigned char lookup[2][BITDEPTH*BITDEPTH*BITDEPTH]; + unsigned char * lut; + unsigned char * lut2; + int lutcalcnum; + + int framenum; + + #ifdef USE_MPEG2 + mpeg2dec_t * decoder; + const mpeg2_info_t * info; + #endif + File * mpgfile; + + int curpal; + int cr; + int pos; + + struct { + int cnt; + int end; + unsigned char pal[4*256]; + } palettes[50]; + + unsigned char buffer[BUFFER_SIZE]; + + PlayingSoundHandle bgSound; + +} AnimationState; + +} // End of namespace Sword2 + +#endif |