#ifndef _RSDANIM_H_ #define _RSDANIM_H_ #ifdef AR_DEBUG // ProDev includes #include #include #include #else // Yaroze includes #include #endif #ifndef NULL #define NULL (void*)0L #endif #ifndef _TMD_H_ /* * Just enough of the TMD internals to do what we want... */ typedef struct { short vx; short vy; short vz; short dummy; } TMD_VERTEX; typedef struct { short nx; short ny; short nz; short dummy; } TMD_NORMAL; typedef struct { unsigned char olen; // word length of 2d drawing primitives unsigned char ilen; // Length of packet data section unsigned char flag; unsigned char mode; } TMD_PACKET_HEADER; typedef struct { TMD_VERTEX *vert_top; unsigned long n_vert; TMD_NORMAL *normal_top; unsigned long n_normal; TMD_PACKET_HEADER *primitive_top; unsigned long n_primitive; long scale; } TMD_OBJECT; #endif /* * RsdAnim Animation Library (v3) */ // Type1 movements typedef struct { SVECTOR *mime_data; unsigned short frames; unsigned short scaler; } MIME_MOVEMENT; // Type2 movements typedef struct mime_block { struct mime_block *next; unsigned short start_v; unsigned short num_v; unsigned short scaler; unsigned short dummy; // Pad value for 32bit word alignment of structures SVECTOR mime_data[1]; } MIME_BLOCK; typedef struct { MIME_BLOCK *block_list; int frames; } MIME_SEGMENT; // Handle for accessing type1 & type2 movements typedef struct { int type; union movement_data { MIME_MOVEMENT *movement; MIME_SEGMENT *segments; } md; int frame,n_vert,step; SVECTOR *vectors; SVECTOR *base_vectors; } MIME_HANDLE; MIME_MOVEMENT *LinkMIMe(unsigned long *m); TMD_OBJECT *InitMIMe(GsDOBJ2 *obj, MIME_MOVEMENT *mime, MIME_HANDLE *mh); TMD_OBJECT *InitMIMeX(GsDOBJ2 *obj, MIME_MOVEMENT *mime, MIME_HANDLE *mh, MIME_HANDLE *existing); void ReleaseMIMe(MIME_HANDLE *mh); void ResetMIMe(MIME_HANDLE *mh); int DoMIMe(MIME_HANDLE *mh); #endif