Path: blob/master/SonicMania/Objects/CPZ/ChemicalPool.h
338 views
#ifndef OBJ_CHEMICALPOOL_H1#define OBJ_CHEMICALPOOL_H23#include "Game.h"45typedef enum { CHEMICALPOOL_BLUE, CHEMICALPOOL_GREEN, CHEMICALPOOL_CYAN } ChemicalPoolTypes;67// Object Class8struct ObjectChemicalPool {9RSDK_OBJECT10TABLE(color surfaceColorsFlash[4], { 0xF0F0F0, 0xF0F0F0, 0xE0E0E0, 0xE0E0E0 });11uint16 aniFrames;12int32 surfaceDeformation[0x1000];13int32 deformTable[0x1000];14int32 impactTable[0x1000];15uint16 unused; // exists, it's in the static object, but never used16uint16 sfxChemYellow;17uint16 sfxChemRed;18uint16 sfxChemChange;19};2021// Entity Class22struct EntityChemicalPool {23RSDK_ENTITY24StateMachine(state);25int32 type;26Vector2 size;27int32 changeTimer;28int32 timer;29int32 tileSizeX;30int32 offsetY;31int32 maxDeform;32int32 r;33int32 g;34int32 b;35int32 leftEdge;36int32 rightEdge;37int32 impactPower;38int32 impactPowerSides;39Hitbox hitbox;40Vector2 vertices[66];41color surfaceColors[4];42Animator animator;43};4445// Object Struct46extern ObjectChemicalPool *ChemicalPool;4748// Standard Entity Events49void ChemicalPool_Update(void);50void ChemicalPool_LateUpdate(void);51void ChemicalPool_StaticUpdate(void);52void ChemicalPool_Draw(void);53void ChemicalPool_Create(void *data);54void ChemicalPool_StageLoad(void);55#if GAME_INCLUDE_EDITOR56void ChemicalPool_EditorDraw(void);57void ChemicalPool_EditorLoad(void);58#endif59void ChemicalPool_Serialize(void);6061// Extra Entity Functions62void ChemicalPool_ChangeState(EntityChemicalPool *chemPool, int32 newType, int32 newR, int32 newG, int32 newB);63void ChemicalPool_ProcessDeformations(void);64void ChemicalPool_SetDeform(int32 impactX, int32 impactVelocity);65void ChemicalPool_SpawnDebris(int32 x, int32 y);66void ChemicalPool_SetupColors(void);6768// States69void ChemicalPool_State_HarmfulBlue(void);70void ChemicalPool_State_Green(void);71void ChemicalPool_State_Cyan(void);72void ChemicalPool_State_Changing(void);7374#endif //! OBJ_CHEMICALPOOL_H757677