Path: blob/master/SonicMania/Objects/SPZ/PimPom.c
338 views
// ---------------------------------------------------------------------1// RSDK Project: Sonic Mania2// Object Description: PimPom Object3// Object Author: Christian Whitehead/Simon Thomley/Hunter Bridges4// Decompiled by: Rubberduckycooly & RMGRich5// ---------------------------------------------------------------------67#include "Game.h"89ObjectPimPom *PimPom;1011void PimPom_Update(void)12{13RSDK_THIS(PimPom);1415StateMachine_Run(self->state);16StateMachine_Run(self->stateMove);1718if (self->sfxTimer > 0)19self->sfxTimer--;20}2122void PimPom_LateUpdate(void) {}2324void PimPom_StaticUpdate(void) {}2526void PimPom_Draw(void)27{28RSDK_THIS(PimPom);2930Vector2 drawPos = self->drawPos;31drawPos.x = self->drawPos.x + self->offset.x;32drawPos.y = self->drawPos.y - self->offset.y;3334for (int32 i = self->length; i >= 0; --i) {35RSDK.DrawSprite(&self->animator, &drawPos, false);36drawPos.x -= self->moveAmount.x;37drawPos.y += self->moveAmount.y;38}39}4041void PimPom_Create(void *data)42{43RSDK_THIS(PimPom);4445if (!SceneInfo->inEditor) {46self->active = ACTIVE_BOUNDS;47self->visible = true;4849self->updateRange.x = (40 - (self->length * (self->gap + 24))) << 16;50self->updateRange.y = (40 - (self->length * (self->gap + 24))) << 16;51self->drawGroup = Zone->objectDrawGroup[0] + 1;52self->newAngle = 0x20 * self->angle;53self->angle = 0x20 * self->angle;54self->negAngle = 0x100 - self->angle;55self->rotation = 2 * self->negAngle;5657int32 offset = self->type ? 24 : 8;5859self->offset.x = ((self->length * (offset + self->gap)) << 8) * RSDK.Cos256(self->angle);60self->offset.y = ((self->length * (offset + self->gap)) << 8) * RSDK.Sin256(self->angle);6162self->moveAmount.x = ((offset + self->gap) * RSDK.Cos256(self->angle)) << 9;63self->moveAmount.y = ((offset + self->gap) * RSDK.Sin256(self->angle)) << 9;64self->drawPos = self->position;6566switch (self->type) {67case PIMPOM_SINGLE:68RSDK.SetSpriteAnimation(PimPom->aniFrames, 0, &self->animator, true, self->color);69self->hitbox.left = -8;70self->hitbox.top = -8;71self->hitbox.right = 8;72self->hitbox.bottom = 8;73self->state = PimPom_State_Single;74break;7576case PIMPOM_HORIZONTAL:77switch (self->angle) {78case 0x00: RSDK.SetSpriteAnimation(PimPom->aniFrames, 1, &self->animator, true, 0); break;7980case 0x20:81self->drawFX = FX_FLIP;82self->direction = FLIP_X;83RSDK.SetSpriteAnimation(PimPom->aniFrames, 2, &self->animator, true, 0);84break;8586case 0x40: RSDK.SetSpriteAnimation(PimPom->aniFrames, 3, &self->animator, true, 0); break;87case 0x60: RSDK.SetSpriteAnimation(PimPom->aniFrames, 2, &self->animator, true, 0); break;88default: break;89}9091if (self->gap >= 16) {92self->hitbox.left = -24;93self->hitbox.top = -8;94self->hitbox.right = 24;95self->hitbox.bottom = 8;96self->state = PimPom_State_Horizontal;97}98else {99int32 len = self->length * (self->gap + 24);100self->hitbox.bottom = 8;101self->state = PimPom_State_Horizontal;102self->hitbox.left = -24 - len;103self->hitbox.top = -8;104self->hitbox.right = len + 24;105}106break;107108case PIMPOM_DIAGONAL:109RSDK.SetSpriteAnimation(PimPom->aniFrames, 2, &self->animator, true, 0);110self->drawFX = FX_ROTATE | FX_FLIP;111112self->hitbox.left = -24;113self->hitbox.top = -6;114self->hitbox.right = 24;115self->hitbox.bottom = 6;116self->angle = self->direction == FLIP_X ? 0x20 : 0xE0;117self->negAngle = 0x100 - self->angle;118self->state = PimPom_State_Horizontal;119break;120121case PIMPOM_VERTICAL:122RSDK.SetSpriteAnimation(PimPom->aniFrames, 1, &self->animator, true, 0);123self->drawFX = FX_ROTATE;124125if (self->gap >= 16) {126self->hitbox.left = -24;127self->hitbox.top = -8;128self->hitbox.right = 24;129self->hitbox.bottom = 8;130}131else {132int32 len = self->length * (self->gap + 24);133self->hitbox.bottom = 8;134self->hitbox.left = -24 - len;135self->hitbox.top = -8;136self->hitbox.right = len + 24;137}138139self->state = PimPom_State_Vertical;140break;141142default: break;143}144145self->amplitude.x >>= 10;146self->amplitude.y >>= 10;147148int32 len = 0;149150switch (self->moveType) {151case PIMPOM_MOVE_FIXED:152default:153self->stateMove = PimPom_Move_Fixed;154self->updateRange.x = (self->length * (self->gap + 24) + 88) << 16;155self->updateRange.y = (self->length * (self->gap + 24) + 88) << 16;156break;157158case PIMPOM_MOVE_NORMAL:159len = (self->length * (self->gap + 24) + 88) << 6;160self->updateRange.x = (abs(self->amplitude.x) + len) << 10;161self->updateRange.y = (abs(self->amplitude.y) + len) << 10;162self->stateMove = PimPom_Move_Normal;163break;164165case PIMPOM_MOVE_CIRCLE:166len = (self->length * (self->gap + 24)) << 6;167self->updateRange.x = (abs(self->amplitude.x) + len + 0x1600) << 10;168self->updateRange.y = (abs(self->amplitude.y) + len + 0x1600) << 10;169self->stateMove = PimPom_Move_Circle;170break;171172case PIMPOM_MOVE_TRACK:173len = (self->length * (self->gap + 24)) << 7;174self->updateRange.x = (abs(self->amplitude.x) + len + 0x2C00) << 9;175self->updateRange.y = (abs(self->amplitude.y) + len + 0x2C00) << 9;176self->stateMove = PimPom_Move_Track;177break;178179case PIMPOM_MOVE_PATH:180self->active = ACTIVE_NEVER;181self->stateMove = PimPom_Move_Path;182self->updateRange.x = (self->length * (self->gap + 24) + 88) << 16;183self->updateRange.y = (self->length * (self->gap + 24) + 88) << 16;184break;185}186}187}188189void PimPom_StageLoad(void)190{191PimPom->aniFrames = RSDK.LoadSpriteAnimation("SPZ2/PimPom.bin", SCOPE_STAGE);192193PimPom->sfxPimPom = RSDK.GetSfx("Stage/PimPom.wav");194PimPom->sfxBumper2 = RSDK.GetSfx("Stage/Bumper2.wav");195}196197void PimPom_State_Single(void)198{199RSDK_THIS(PimPom);200201int32 storeX = self->position.x;202int32 storeY = self->position.y;203204self->position.x = self->drawPos.x + self->offset.x;205self->position.y = self->drawPos.y - self->offset.y;206207for (int32 l = 0; l <= self->length; ++l) {208209foreach_active(Player, player)210{211if (Player_CheckBadnikTouch(player, self, &self->hitbox)) {212int32 angle = RSDK.ATan2(player->position.x - self->position.x, player->position.y - self->position.y);213214int32 vel = MAX(abs(player->velocity.y + player->velocity.x) >> 8, 0x600);215216int32 power = RSDK.Rand(0x400, vel);217angle += RSDK.Rand(-6, 6);218219if (player->animator.animationID != ANI_FLY) {220player->velocity.x = power * RSDK.Cos256(angle);221player->groundVel = power * RSDK.Cos256(angle);222}223player->velocity.y = power * RSDK.Sin256(angle);224player->onGround = false;225player->applyJumpCap = false;226227#if MANIA_USE_PLUS228if (player->characterID == ID_MIGHTY && player->state == Player_State_MightyHammerDrop) {229RSDK.SetSpriteAnimation(player->aniFrames, ANI_JUMP, &player->animator, false, 0);230player->state = Player_State_Air;231}232#endif233if (self->sfxTimer < 1) {234RSDK.PlaySfx(PimPom->sfxPimPom, false, 255);235self->sfxTimer = 8;236}237}238}239240self->position.x -= self->moveAmount.x;241self->position.y += self->moveAmount.y;242}243244self->position.x = storeX;245self->position.y = storeY;246}247248void PimPom_State_Horizontal(void)249{250RSDK_THIS(PimPom);251252int32 startX = self->position.x;253int32 startY = self->position.y;254255int32 len = 0;256self->position = self->drawPos;257if (self->gap >= 16) {258self->position.x += self->offset.x;259self->position.y -= self->offset.y;260len = self->length;261}262263for (int32 l = 0; l <= len; ++l) {264foreach_active(Player, player)265{266int32 playerX = player->position.x;267int32 playerY = player->position.y;268int32 playerVelX = player->velocity.x;269int32 playerVelY = player->velocity.y;270271Vector2 originVel = { 0, 0 };272273Zone_RotateOnPivot(&player->position, &self->position, self->negAngle);274Zone_RotateOnPivot(&player->velocity, &originVel, self->negAngle);275276int32 storedVelX = player->velocity.x;277int32 storedVelY = player->velocity.y;278279Hitbox hitbox;280Hitbox *playerHitbox = Player_GetHitbox(player);281if ((((self->angle & 0xFF) - 32) & 0x7F) < 0x40) {282hitbox.top = playerHitbox->left;283hitbox.bottom = playerHitbox->right;284hitbox.left = playerHitbox->top;285hitbox.right = playerHitbox->bottom;286}287else {288hitbox = *playerHitbox;289}290291uint8 side = RSDK.CheckObjectCollisionBox(self, &self->hitbox, player, &hitbox, true);292switch (side) {293case C_NONE:294player->position.x = playerX;295player->position.y = playerY;296player->velocity.x = playerVelX;297player->velocity.y = playerVelY;298break;299300case C_TOP: player->velocity.y = CLAMP(-(storedVelY + (storedVelY >> 4)), -0xE0000, -0x40000); break;301case C_LEFT: player->velocity.x = CLAMP(-storedVelX, -0x80000, -0x20000); break;302case C_RIGHT: player->velocity.x = CLAMP(-storedVelX, 0x20000, 0x80000); break;303case C_BOTTOM: player->velocity.y = CLAMP(-(storedVelY + (storedVelY >> 4)), 0x40000, 0xE0000); break;304305default: break;306}307308if (side != C_NONE) {309#if MANIA_USE_PLUS310if (player->characterID == ID_MIGHTY && player->state == Player_State_MightyHammerDrop) {311RSDK.SetSpriteAnimation(player->aniFrames, ANI_JUMP, &player->animator, false, 0);312player->state = Player_State_Air;313}314#endif315player->onGround = false;316player->applyJumpCap = false;317318Vector2 originVel = { 0, 0 };319320Zone_RotateOnPivot(&player->position, &self->position, self->angle);321Zone_RotateOnPivot(&player->velocity, &originVel, self->angle);322323if (self->sfxTimer <= 0) {324RSDK.PlaySfx(PimPom->sfxBumper2, false, 255);325self->sfxTimer = 8;326}327}328}329330self->position.x -= self->moveAmount.x;331self->position.y += self->moveAmount.y;332}333334self->position.x = startX;335self->position.y = startY;336}337338void PimPom_State_Vertical(void)339{340RSDK_THIS(PimPom);341342int32 spinAngle = Zone->timer * self->spinSpeed;343if (self->direction)344spinAngle = -spinAngle;345346self->angle = (self->newAngle & 0xFF) + (spinAngle >> 1);347self->negAngle = 0x100 - self->angle;348self->rotation = 2 * self->negAngle;349350self->offset.x = ((self->length * (self->gap + 24)) << 8) * RSDK.Cos256(self->angle);351self->offset.y = ((self->length * (self->gap + 24)) << 8) * RSDK.Sin256(self->angle);352353self->moveAmount.x = ((self->gap + 24) * RSDK.Cos256(self->angle)) << 9;354self->moveAmount.y = ((self->gap + 24) * RSDK.Sin256(self->angle)) << 9;355356PimPom_State_Horizontal();357}358359void PimPom_Move_Fixed(void)360{361RSDK_THIS(PimPom);362363self->drawPos.x = self->position.x;364self->drawPos.y = self->position.y;365}366367void PimPom_Move_Normal(void)368{369RSDK_THIS(PimPom);370371int32 drawX = self->drawPos.x;372int32 drawY = self->drawPos.y;373self->drawPos.x = self->position.x + self->amplitude.x * RSDK.Sin1024(self->speed * Zone->timer);374self->drawPos.y = self->position.y + self->amplitude.y * RSDK.Sin1024(self->speed * Zone->timer);375int32 moveX = self->drawPos.x - drawX;376int32 moveY = self->drawPos.y - drawY;377378int32 slot = SceneInfo->entitySlot + 1;379for (int32 i = 0; i < self->numChildren; ++i) {380Entity *child = RSDK_GET_ENTITY_GEN(slot + i);381child->position.x += moveX;382child->position.y += moveY;383}384}385386void PimPom_Move_Circle(void)387{388RSDK_THIS(PimPom);389390int32 drawX = self->drawPos.x;391int32 drawY = self->drawPos.y;392self->drawPos.x = self->position.x + self->amplitude.x * RSDK.Cos1024(self->speed * Zone->timer + 4 * self->angleM);393self->drawPos.y = self->position.y + self->amplitude.y * RSDK.Sin1024(self->speed * Zone->timer + 4 * self->angleM);394int32 moveX = self->drawPos.x - drawX;395int32 moveY = self->drawPos.y - drawY;396397int32 slot = SceneInfo->entitySlot + 1;398for (int32 i = 0; i < self->numChildren; ++i) {399Entity *child = RSDK_GET_ENTITY_GEN(slot + i);400child->position.x += moveX;401child->position.y += moveY;402}403}404405void PimPom_Move_Path(void)406{407RSDK_THIS(PimPom);408409int32 drawX = self->drawPos.x;410int32 drawY = self->drawPos.y;411self->drawPos.x += self->velocity.x;412self->drawPos.y += self->velocity.y;413414Entity *target = RSDK_GET_ENTITY_GEN(self->speed);415416if (self->velocity.x <= 0) {417if (self->drawPos.x < target->position.x)418self->drawPos.x = target->position.x;419}420else if (self->drawPos.x > target->position.x)421self->drawPos.x = target->position.x;422423if (self->velocity.y <= 0) {424if (self->drawPos.y < target->position.y)425self->drawPos.y = target->position.y;426}427else if (self->drawPos.y > target->position.y)428self->drawPos.y = target->position.y;429430int32 moveX = self->drawPos.x - drawX;431int32 moveY = self->drawPos.y - drawY;432433int32 slot = SceneInfo->entitySlot + 1;434for (int32 i = 0; i < self->numChildren; ++i) {435Entity *child = RSDK_GET_ENTITY_GEN(slot + i);436child->position.x += moveX;437child->position.y += moveY;438}439}440441void PimPom_Move_Track(void)442{443RSDK_THIS(PimPom);444445int32 drawX = self->drawPos.x;446int32 drawY = self->drawPos.y;447448if (((Zone->timer >> 9) & 1) == self->direction) {449self->drawPos.x = self->position.x + ((((Zone->timer & 0xFFFF) << 7) * self->amplitude.x) >> 6) - (self->amplitude.x << 15);450self->drawPos.y = self->position.y + ((((Zone->timer & 0xFFFF) << 7) * self->amplitude.y) >> 6) - (self->amplitude.y << 15);451}452else {453self->drawPos.x = self->position.x + (self->amplitude.x << 15) - ((((Zone->timer & 0xFFFF) << 7) * self->amplitude.x) >> 6);454self->drawPos.y = self->position.y + (self->amplitude.y << 15) - ((((Zone->timer & 0xFFFF) << 7) * self->amplitude.y) >> 6);455}456457int32 moveX = self->drawPos.x - drawX;458int32 moveY = self->drawPos.y - drawY;459460int32 slot = SceneInfo->entitySlot + 1;461for (int32 i = 0; i < self->numChildren; ++i) {462Entity *child = RSDK_GET_ENTITY_GEN(slot + i);463child->position.x += moveX;464child->position.y += moveY;465}466}467468#if GAME_INCLUDE_EDITOR469void PimPom_EditorDraw(void)470{471RSDK_THIS(PimPom);472473self->drawFX = FX_NONE;474self->direction = FLIP_NONE;475self->active = ACTIVE_BOUNDS;476self->visible = true;477478self->updateRange.x = (40 - (self->length * (self->gap + 24))) << 16;479self->updateRange.y = (40 - (self->length * (self->gap + 24))) << 16;480self->drawGroup = Zone->objectDrawGroup[0] + 1;481self->newAngle = 0x20 * self->angle;482self->angle = 0x20 * self->angle;483self->negAngle = 0x100 - self->angle;484self->rotation = 2 * self->negAngle;485486int32 offset = self->type ? 24 : 8;487488self->offset.x = ((self->length * (offset + self->gap)) << 8) * RSDK.Cos256(self->angle);489self->offset.y = ((self->length * (offset + self->gap)) << 8) * RSDK.Sin256(self->angle);490491self->moveAmount.x = ((offset + self->gap) * RSDK.Cos256(self->angle)) << 9;492self->moveAmount.y = ((offset + self->gap) * RSDK.Sin256(self->angle)) << 9;493self->drawPos = self->position;494495switch (self->type) {496case PIMPOM_SINGLE:497RSDK.SetSpriteAnimation(PimPom->aniFrames, 0, &self->animator, true, self->color);498self->hitbox.left = -8;499self->hitbox.top = -8;500self->hitbox.right = 8;501self->hitbox.bottom = 8;502self->state = PimPom_State_Single;503break;504505case PIMPOM_HORIZONTAL:506switch (self->angle) {507case 0x00: RSDK.SetSpriteAnimation(PimPom->aniFrames, 1, &self->animator, true, 0); break;508509case 0x20:510self->drawFX = FX_FLIP;511self->direction = FLIP_X;512RSDK.SetSpriteAnimation(PimPom->aniFrames, 2, &self->animator, true, 0);513break;514515case 0x40: RSDK.SetSpriteAnimation(PimPom->aniFrames, 3, &self->animator, true, 0); break;516case 0x60: RSDK.SetSpriteAnimation(PimPom->aniFrames, 2, &self->animator, true, 0); break;517518default: break;519}520break;521522case PIMPOM_DIAGONAL:523RSDK.SetSpriteAnimation(PimPom->aniFrames, 2, &self->animator, true, 0);524self->drawFX = FX_ROTATE | FX_FLIP;525self->angle = self->direction == FLIP_X ? 0x20 : 0xE0;526self->negAngle = 0x100 - self->angle;527break;528529case PIMPOM_VERTICAL:530RSDK.SetSpriteAnimation(PimPom->aniFrames, 1, &self->animator, true, 0);531self->drawFX = FX_ROTATE;532break;533534default: break;535}536537Vector2 amplitude;538amplitude.x = self->amplitude.x >> 10;539amplitude.y = self->amplitude.y >> 10;540541int32 len = 0;542543switch (self->moveType) {544case PIMPOM_MOVE_FIXED:545default:546self->updateRange.x = (self->length * (self->gap + 24) + 88) << 16;547self->updateRange.y = (self->length * (self->gap + 24) + 88) << 16;548break;549550case PIMPOM_MOVE_NORMAL:551len = (self->length * (self->gap + 24) + 88) << 6;552self->updateRange.x = (abs(amplitude.x) + len) << 10;553self->updateRange.y = (abs(amplitude.y) + len) << 10;554break;555556case PIMPOM_MOVE_CIRCLE:557len = (self->length * (self->gap + 24)) << 6;558self->updateRange.x = (abs(amplitude.x) + len + 0x1600) << 10;559self->updateRange.y = (abs(amplitude.y) + len + 0x1600) << 10;560break;561562case PIMPOM_MOVE_TRACK:563len = (self->length * (self->gap + 24)) << 7;564self->updateRange.x = (abs(amplitude.x) + len + 0x2C00) << 9;565self->updateRange.y = (abs(amplitude.y) + len + 0x2C00) << 9;566break;567568case PIMPOM_MOVE_PATH:569self->updateRange.x = (self->length * (self->gap + 24) + 88) << 16;570self->updateRange.y = (self->length * (self->gap + 24) + 88) << 16;571break;572}573574PimPom_Draw();575576if (showGizmos()) {577RSDK_DRAWING_OVERLAY(true);578579Vector2 pos;580switch (self->moveType) {581case PIMPOM_MOVE_NORMAL:582// draw distance previews583self->inkEffect = INK_BLEND;584self->drawPos.x = amplitude.x * RSDK.Sin1024(0x100) + self->position.x;585self->drawPos.y = amplitude.y * RSDK.Sin1024(0x100) + self->position.y;586pos = self->drawPos;587PimPom_Draw();588589self->drawPos.x = amplitude.x * RSDK.Sin1024(0x300) + self->position.x;590self->drawPos.y = amplitude.y * RSDK.Sin1024(0x300) + self->position.y;591PimPom_Draw();592593RSDK.DrawLine(pos.x, pos.y, self->drawPos.x, self->drawPos.y, 0x00FF00, 0, INK_NONE, false);594break;595596case PIMPOM_MOVE_CIRCLE:597// draw distance preview598self->inkEffect = INK_BLEND;599self->drawPos.x = amplitude.x * RSDK.Cos1024(4 * self->angle) + self->position.x;600self->drawPos.y = amplitude.y * RSDK.Sin1024(4 * self->angle) + self->position.y;601602PimPom_Draw();603break;604605case PIMPOM_MOVE_TRACK:606// draw distance preview607self->inkEffect = INK_BLEND;608609// draw distance previews610self->inkEffect = INK_BLEND;611self->drawPos.x = self->position.x + (0x100 * amplitude.x >> 6) - (amplitude.x << 15);612self->drawPos.y = self->position.y + (0x100 * amplitude.y >> 6) - (amplitude.y << 15);613pos = self->drawPos;614PimPom_Draw();615616self->drawPos.x = self->position.x + (amplitude.x << 15) - (0x000 * amplitude.x >> 6);617self->drawPos.y = self->position.y + (amplitude.y << 15) - (0x000 * amplitude.y >> 6);618PimPom_Draw();619620RSDK.DrawLine(pos.x, pos.y, self->drawPos.x, self->drawPos.y, 0x00FF00, 0x00, INK_NONE, false);621break;622623case PIMPOM_MOVE_PATH: {624Entity *target = RSDK_GET_ENTITY_GEN(self->speed);625626if (target)627DrawHelpers_DrawArrow(self->position.x, self->position.y, target->position.x, target->position.y, 0x00FF00, INK_NONE, 0xFF);628break;629}630631default:632case PIMPOM_MOVE_FIXED:633// nothin'634break;635}636637self->inkEffect = INK_NONE;638639int32 slot = SceneInfo->entitySlot + 1;640for (int32 i = 0; i < self->numChildren; ++i) {641Entity *child = RSDK_GET_ENTITY_GEN(slot + i);642643if (child) {644DrawHelpers_DrawArrow(self->position.x, self->position.y, child->position.x, child->position.y, 0xE0E0E0, INK_NONE, 0xFF);645}646}647648RSDK_DRAWING_OVERLAY(false);649}650}651652void PimPom_EditorLoad(void)653{654PimPom->aniFrames = RSDK.LoadSpriteAnimation("SPZ2/PimPom.bin", SCOPE_STAGE);655656RSDK_ACTIVE_VAR(PimPom, type);657RSDK_ENUM_VAR("Single", PIMPOM_SINGLE);658RSDK_ENUM_VAR("Horizontal", PIMPOM_HORIZONTAL);659RSDK_ENUM_VAR("Diagonal", PIMPOM_DIAGONAL);660RSDK_ENUM_VAR("Vertical", PIMPOM_VERTICAL);661662RSDK_ACTIVE_VAR(PimPom, moveType);663RSDK_ENUM_VAR("Fixed", PIMPOM_MOVE_FIXED);664RSDK_ENUM_VAR("Normal", PIMPOM_MOVE_NORMAL);665RSDK_ENUM_VAR("Circle", PIMPOM_MOVE_CIRCLE);666RSDK_ENUM_VAR("Track", PIMPOM_MOVE_TRACK);667RSDK_ENUM_VAR("Path", PIMPOM_MOVE_PATH);668669RSDK_ACTIVE_VAR(PimPom, color);670RSDK_ENUM_VAR("Cyan", PIMPOM_CLR_CYAN);671RSDK_ENUM_VAR("Purple", PIMPOM_CLR_PURPLE);672RSDK_ENUM_VAR("Green", PIMPOM_CLR_GREEN);673674RSDK_ACTIVE_VAR(PimPom, direction);675RSDK_ENUM_VAR("No Flip", FLIP_NONE);676RSDK_ENUM_VAR("Flipped", FLIP_X);677}678#endif679680void PimPom_Serialize(void)681{682RSDK_EDITABLE_VAR(PimPom, VAR_ENUM, type);683RSDK_EDITABLE_VAR(PimPom, VAR_UINT8, color);684RSDK_EDITABLE_VAR(PimPom, VAR_UINT8, direction);685RSDK_EDITABLE_VAR(PimPom, VAR_INT32, angle);686RSDK_EDITABLE_VAR(PimPom, VAR_UINT8, spinSpeed);687RSDK_EDITABLE_VAR(PimPom, VAR_ENUM, moveType);688RSDK_EDITABLE_VAR(PimPom, VAR_VECTOR2, amplitude);689RSDK_EDITABLE_VAR(PimPom, VAR_ENUM, speed);690RSDK_EDITABLE_VAR(PimPom, VAR_INT32, angleM);691RSDK_EDITABLE_VAR(PimPom, VAR_UINT8, length);692RSDK_EDITABLE_VAR(PimPom, VAR_UINT8, gap);693RSDK_EDITABLE_VAR(PimPom, VAR_UINT8, numChildren);694}695696697