Path: blob/master/SonicMania/Objects/SPZ/EggJankenPart.c
338 views
// ---------------------------------------------------------------------1// RSDK Project: Sonic Mania2// Object Description: EggJankenPart Object3// Object Author: Christian Whitehead/Simon Thomley/Hunter Bridges4// Decompiled by: Rubberduckycooly & RMGRich5// ---------------------------------------------------------------------67#include "Game.h"89ObjectEggJankenPart *EggJankenPart = NULL;1011void EggJankenPart_Update(void)12{13RSDK_THIS(EggJankenPart);1415self->position.x += self->velocity.x;16self->position.y += self->velocity.y;17self->velocity.y += 0x3800;1819self->rotation += self->angle;2021if (!RSDK.CheckOnScreen(self, NULL))22destroyEntity(self);23}2425void EggJankenPart_LateUpdate(void) {}2627void EggJankenPart_StaticUpdate(void) {}2829void EggJankenPart_Draw(void)30{31RSDK_THIS(EggJankenPart);3233if (Zone->timer & 1)34RSDK.DrawSprite(&self->animator, NULL, false);35}3637void EggJankenPart_Create(void *data)38{39RSDK_THIS(EggJankenPart);4041RSDK.SetSpriteAnimation(EggJankenPart->aniFrames, 6, &self->animator, true, 0);4243self->active = ACTIVE_BOUNDS;44self->updateRange.x = 0x800000;45self->updateRange.y = 0x800000;46self->visible = true;47self->drawGroup = Zone->objectDrawGroup[0] + 1;48self->drawFX |= FX_ROTATE | FX_FLIP;4950self->animator.frameID = VOID_TO_INT(data);51}5253void EggJankenPart_StageLoad(void) { EggJankenPart->aniFrames = RSDK.LoadSpriteAnimation("SPZ2/EggJanken.bin", SCOPE_STAGE); }5455#if GAME_INCLUDE_EDITOR56void EggJankenPart_EditorDraw(void)57{58RSDK_THIS(EggJankenPart);59RSDK.DrawSprite(&self->animator, NULL, false);60}6162void EggJankenPart_EditorLoad(void) { EggJankenPart->aniFrames = RSDK.LoadSpriteAnimation("SPZ2/EggJanken.bin", SCOPE_STAGE); }63#endif6465void EggJankenPart_Serialize(void) {}666768