source: Daodan/src/Oni/OBJt.h@ 1007

Last change on this file since 1007 was 992, checked in by alloc, 11 years ago

Daodan: Removed unused MSVC tree, build folders; reorganized source layout; removed Flatline from current Daodan

File size: 2.4 KB
Line 
1#ifndef ONI_H
2#error Do not include this file directly, include Oni/Oni.h instead!
3#endif
4
5#ifndef OBJT_H
6#define OBJT_H
7
8// Used by function definition below: OBJrObjectType_EnumerateObjects
9typedef char ( ONICALL *OBJtEnumCallback_Object)(void *inObject, int inUserData);
10
11typedef struct OBJtMethods
12{
13 void* rNew;
14 void* rSetDefaults;
15 void* rDelete;
16 void* rIsInvalid;
17 void* rLevelBegin;
18 void* rLevelEnd;
19
20 void* rDraw;
21 void* rEnumerate;
22 void* rGetBoundingSphere;
23 void* rOSDGetName;
24 void* rOSDSetName;
25 void* rIntersectsLine;
26 void* rUpdatePosition;
27
28 void* rGetOSD;
29 void* rGetOSDWriteSize;
30 void* rSetOSD;
31
32 void* rWrite;
33 void* rRead;
34
35 void* rSearch;
36
37 void* rGetClassVisible;
38 void* rSetClassVisible;
39
40 void* rGetUniqueOSD;
41} OBJtMethods;
42
43//typedef OBJtObjectType;
44
45typedef struct OBJtObject
46{
47 uint32_t object_type;
48 uint32_t object_id;
49 uint32_t flags;
50 M3tPoint3D position;
51 M3tPoint3D rotation;
52 OBJtMethods* methods;
53 void* mechanics_class; //ONtMechanicsClass* mechanics_class;
54 uint32_t object_data[0];
55} OBJtObject;
56
57#define OBJcMaxNameLength 63
58#define OBJcMaxNoteChars 127
59#define SLcScript_MaxNameLength (32)
60
61typedef struct OBJtOSD_TriggerVolume
62{
63 char name[OBJcMaxNameLength];
64 char entry_script[SLcScript_MaxNameLength];
65 char inside_script[SLcScript_MaxNameLength];
66 char exit_script[SLcScript_MaxNameLength];
67
68 // TODO: +1 in orig, why do we have to shift here?
69 char note[OBJcMaxNoteChars + 2];
70
71 M3tPoint3D scale;
72 int32_t id;
73 int32_t parent_id;
74
75 M3tBoundingVolume volume;
76 M3tBoundingSphere sphere;// not written to disk
77 uint32_t team_mask;
78
79 uint32_t authored_flags;
80 uint32_t in_game_flags;// not written to disk
81 char cur_entry_script[SLcScript_MaxNameLength];// not written to disk
82 char cur_inside_script[SLcScript_MaxNameLength];// not written to disk
83 char cur_exit_script[SLcScript_MaxNameLength];// not written to disk
84} OBJtOSD_TriggerVolume;
85
86typedef struct OBJtOSD_All
87{
88 union
89 {
90 //OBJtOSD_Combat combat_osd;
91 //OBJtOSD_Character character_osd;
92 //OBJtOSD_PatrolPath patrolpath_osd;
93 //OBJtOSD_Flag flag_osd;
94 //OBJtOSD_Furniture furniture_osd;
95 //OBJtOSD_Particle particle_osd;
96 //OBJtOSD_PowerUp powerup_osd;
97 //OBJtOSD_Sound sound_osd;
98 OBJtOSD_TriggerVolume trigger_volume_osd;
99 //OBJtOSD_Weapon weapon_osd;
100 //OBJtOSD_Trigger trigger_osd;
101 //OBJtOSD_Turret turret_osd;
102 //OBJtOSD_Console console_osd;
103 //OBJtOSD_Door door_osd;
104 //OBJtOSD_Melee melee_osd;
105 //OBJtOSD_Neutral neutral_osd;
106 } osd;
107} OBJtOSD_All;
108
109#endif
Note: See TracBrowser for help on using the repository browser.