Path: blob/master/RSDKv5/RSDK/Scene/Legacy/v4/ObjectLegacyv4.hpp
1182 views
1namespace Legacy2{34namespace v45{6#define LEGACY_v4_ENTITY_COUNT (0x4A0)7#define LEGACY_v4_TEMPENTITY_START (LEGACY_v4_ENTITY_COUNT - 0x80)8#define LEGACY_v4_OBJECT_COUNT (0x100)9#define LEGACY_v4_TYPEGROUP_COUNT (0x103)1011enum ObjectControlModes {12CONTROLMODE_NONE = -1,13CONTROLMODE_NORMAL = 0,14};1516struct TypeGroupList {17int32 entityRefs[LEGACY_v4_ENTITY_COUNT];18int32 listSize;19};2021struct Entity {22int32 xpos;23int32 ypos;24int32 xvel;25int32 yvel;26int32 speed;27int32 values[48];28int32 state;29int32 angle;30int32 scale;31int32 rotation;32int32 alpha;33int32 animationTimer;34int32 animationSpeed;35int32 lookPosX;36int32 lookPosY;37uint16 groupID;38uint8 type;39uint8 propertyValue;40uint8 priority;41uint8 drawOrder;42uint8 direction;43uint8 inkEffect;44uint8 animation;45uint8 prevAnimation;46uint8 frame;47uint8 collisionMode;48uint8 collisionPlane;49int8 controlMode;50uint8 controlLock;51uint8 pushing;52uint8 visible;53uint8 tileCollisions;54uint8 objectInteractions;55uint8 gravity;56uint8 left;57uint8 right;58uint8 up;59uint8 down;60uint8 jumpPress;61uint8 jumpHold;62uint8 scrollTracking;63uint8 floorSensors[5];64};6566enum ObjectTypes {67OBJ_TYPE_BLANKOBJECT = 0 // 0 is always blank obj68};6970enum ObjectGroups {71GROUP_ALL = 0 // 0 is always "all"72};7374enum ObjectPriority {75// The entity is active if the entity is on screen or within 128 pixels of the screen borders on any axis76PRIORITY_BOUNDS,77// The entity is always active, unless the stage state is PAUSED/FROZEN78PRIORITY_ACTIVE,79// Same as PRIORITY_ACTIVE, the entity even runs when the stage state is PAUSED/FROZEN80PRIORITY_ALWAYS,81// Same as PRIORITY_BOUNDS, however it only does checks on the x-axis, so when in bounds on the x-axis, the y position doesn't matter82PRIORITY_XBOUNDS,83// Same as PRIORITY_XBOUNDS, however the entity's type will be set to BLANK OBJECT when it becomes inactive84PRIORITY_XBOUNDS_DESTROY,85// Never Active.86PRIORITY_INACTIVE,87// Same as PRIORITY_BOUNDS, but uses the smaller bounds (32px off screen rather than the normal 128)88PRIORITY_BOUNDS_SMALL,89// Same as PRIORITY_ACTIVE, but uses the smaller bounds in object.outOfBounds90PRIORITY_ACTIVE_SMALL91};9293// Game Objects94extern int32 objectEntityPos;95extern int32 curObjectType;96extern Entity objectEntityList[LEGACY_v4_ENTITY_COUNT * 2];97extern int32 processObjectFlag[LEGACY_v4_ENTITY_COUNT];98extern TypeGroupList objectTypeGroupList[LEGACY_v4_TYPEGROUP_COUNT];99100extern char typeNames[LEGACY_v4_OBJECT_COUNT][0x40];101102extern int32 playerListPos;103104void ProcessStartupObjects();105void ProcessObjects();106void ProcessPausedObjects();107void ProcessFrozenObjects();108void Process2PObjects();109110void SetObjectTypeName(const char *objectName, int32 objectID);111112void ProcessObjectControl(Entity *player);113} // namespace v4114115} // namespace Legacy116117