27 #ifndef ICB_PX_ANIMS_H_ 28 #define ICB_PX_ANIMS_H_ 30 #include "engines/icb/common/px_common.h" 32 #include "common/endian.h" 36 #define PXANIM_SCHEMA 5 38 #define PXANIM_TAG "Peas" 40 #define ORG_STRING "ORG" 42 #define INT_STRING "INT" 43 #define OBJ_STRING "OBJ" 47 #define INT0_TYPE 2 // Forced export of INT marker on frame 0 of anim 62 static uint32 GetType(
PXmarker_PC *marker) {
return FROM_LE_32(marker->m_type); }
63 static void GetPan(
PXmarker_PC *marker,
float *pan) { *pan = FROM_LE_32(marker->m_pan); }
64 static void GetXYZ(
PXmarker_PC *marker,
float *x,
float *y,
float *z);
69 int16 left_foot_distance;
70 int16 right_foot_distance;
89 static uint8 GetType(
PXmarker_PSX *marker) {
return marker->m_type; }
91 static void GetXYZ(
PXmarker_PSX *marker,
float *x,
float *y,
float *z);
94 inline void PXmarker_PSX_Object::GetPan(
PXmarker_PSX *marker,
float *pan) {
95 *pan = (float)(((FROM_LE_32(marker->y6z15pan11) & 0x7FF) << 1)) / 4096.0f;
98 inline void PXmarker_PSX_Object::GetXYZ(
PXmarker_PSX *marker,
float *x,
float *y,
float *z) {
101 ix = ((marker->x8 << 7) | (FROM_LE_16(marker->x7y9) >> 9));
105 iy = (((FROM_LE_16(marker->x7y9) & 0x1FF) << 6) | (FROM_LE_32(marker->y6z15pan11) >> 26));
109 iz = ((FROM_LE_32(marker->y6z15pan11) >> 11) & 0x7FFF);
120 int16 left_foot_distance;
121 int16 right_foot_distance;
148 if (FROM_LE_32(anim->schema) == PXANIM_SCHEMA - 1) {
149 int32 nFrames = anim->frame_qty;
150 anim->frame_qty = (uint8)nFrames;
152 anim->schema = TO_LE_32(PXANIM_SCHEMA);
156 inline void ConvertPXanim(
PXanim_PC *anim) {
158 if (FROM_LE_32(anim->schema) == PXANIM_SCHEMA - 1) {
159 int32 nFrames = anim->frame_qty;
160 anim->frame_qty = (uint8)nFrames;
162 anim->schema = TO_LE_32(PXANIM_SCHEMA);
172 #endif // _library__PX_ANIMS_H_ Definition: px_anims.h:79
Definition: px_anims.h:60
Definition: px_anims.h:138
Definition: px_anims.h:119
Definition: px_anims.h:68
Definition: px_anims.h:53
Definition: px_anims.h:87
Definition: px_anims.h:130