Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Rubberduckycooly
GitHub Repository: Rubberduckycooly/RSDKv5-Decompilation
Path: blob/master/RSDKv5/RSDK/Scene/Legacy/v3/ObjectLegacyv3.hpp
1182 views
1
2
namespace Legacy
3
{
4
5
namespace v3
6
{
7
#define LEGACY_v3_ENTITY_COUNT (0x4A0)
8
#define LEGACY_v3_TEMPENTITY_START (LEGACY_v3_ENTITY_COUNT - 0x80)
9
#define LEGACY_v3_OBJECT_COUNT (0x100)
10
11
struct Entity {
12
int32 XPos;
13
int32 YPos;
14
int32 values[8];
15
int32 scale;
16
int32 rotation;
17
int32 animationTimer;
18
int32 animationSpeed;
19
uint8 type;
20
uint8 propertyValue;
21
uint8 state;
22
uint8 priority;
23
uint8 drawOrder;
24
uint8 direction;
25
uint8 inkEffect;
26
uint8 alpha;
27
uint8 animation;
28
uint8 prevAnimation;
29
uint8 frame;
30
};
31
32
enum ObjectTypes {
33
OBJ_TYPE_BLANKOBJECT = 0 // 0 is always blank obj
34
};
35
36
enum ObjectPriority {
37
// The entity is active if the entity is on screen or within 128 pixels of the screen borders on any axis
38
PRIORITY_BOUNDS,
39
// The entity is always active, unless the stage state is PAUSED or FROZEN
40
PRIORITY_ACTIVE,
41
// Same as PRIORITY_ACTIVE, the entity even runs when the stage state is PAUSED or FROZEN
42
PRIORITY_ALWAYS,
43
// 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 matter
44
PRIORITY_XBOUNDS,
45
// Same as PRIORITY_BOUNDS, however the entity's type will be set to BLANK OBJECT when it becomes inactive
46
PRIORITY_BOUNDS_DESTROY,
47
// Never Active.
48
PRIORITY_INACTIVE,
49
};
50
51
extern int32 objectLoop;
52
extern int32 curObjectType;
53
extern Entity objectEntityList[LEGACY_v3_ENTITY_COUNT];
54
55
extern char typeNames[LEGACY_v3_OBJECT_COUNT][0x40];
56
57
void ProcessStartupObjects();
58
void ProcessObjects();
59
void ProcessPausedObjects();
60
61
void SetObjectTypeName(const char *objectName, int32 objectID);
62
} // namespace v3
63
64
} // namespace Legacy
65