Path: blob/master/SonicMania/Objects/SPZ/PopcornMachine.h
338 views
#ifndef OBJ_POPCORNMACHINE_H1#define OBJ_POPCORNMACHINE_H23#include "Game.h"45typedef enum {6POPCORNMACHINE_LEFT,7POPCORNMACHINE_RIGHT,8POPCORNMACHINE_BOTH,9} PopcornMachineTypes;1011// Object Class12struct ObjectPopcornMachine {13RSDK_OBJECT14uint16 aniFrames;15Hitbox hitboxEntryL;16Hitbox hitboxEntryR;17int32 unused1;18int32 unused2;19uint16 sfxFanStart;20uint16 sfxShoot;21uint16 sfxPopcornLaunch;22};2324// Entity Class25struct EntityPopcornMachine {26RSDK_ENTITY27StateMachine(state);28uint8 type;29uint8 height;30int32 timer;31EntityPopcornMachine *parent;32EntityPlayer *player;33int32 bounds[PLAYER_COUNT];34Vector2 dispenserHolderPos;35Vector2 dispenserPos;36Animator animator;37Hitbox hitboxSideL;38Hitbox hitboxSideR;39Hitbox hitboxTop;40};4142// Object Struct43extern ObjectPopcornMachine *PopcornMachine;4445// Standard Entity Events46void PopcornMachine_Update(void);47void PopcornMachine_LateUpdate(void);48void PopcornMachine_StaticUpdate(void);49void PopcornMachine_Draw(void);50void PopcornMachine_Create(void *data);51void PopcornMachine_StageLoad(void);52#if GAME_INCLUDE_EDITOR53void PopcornMachine_EditorDraw(void);54void PopcornMachine_EditorLoad(void);55#endif56void PopcornMachine_Serialize(void);5758// Extra Entity Functions59void PopcornMachine_LinkPlayer(EntityPlayer *player);60void PopcornMachine_CheckPlayerCollisions(void);6162void PopcornMachine_State_Idle(void);63void PopcornMachine_State_ShowDispenser(void);64void PopcornMachine_State_Shaking(void);65void PopcornMachine_State_HideDispenser(void);6667void PopcornMachine_StateController_ReadyPlayer(void);68void PopcornMachine_StateController_RisePlayer(void);69void PopcornMachine_StateController_FirePlayer(void);70void PopcornMachine_StateController_HandleFinish(void);7172#endif //! OBJ_POPCORNMACHINE_H737475