6 typedef struct ent_spawn ent_spawn
;
7 typedef struct ent_light ent_light
;
8 typedef struct ent_gate ent_gate
;
9 typedef struct ent_route_node ent_route_node
;
10 typedef struct ent_path_index ent_path_index
;
11 typedef struct ent_checkpoint ent_checkpoint
;
12 typedef struct ent_route ent_route
;
13 typedef struct ent_water ent_water
;
14 typedef struct ent_audio_clip ent_audio_clip
;
15 typedef struct volume_particles volume_particles
;
16 typedef struct volume_trigger volume_trigger
;
17 typedef struct ent_volume ent_volume
;
18 typedef struct ent_audio ent_audio
;
19 typedef struct ent_marker ent_marker
;
20 typedef struct ent_traffic ent_traffic
;
21 typedef struct ent_font ent_font
;
22 typedef struct ent_font_variant ent_font_variant
;
23 typedef struct ent_glyph ent_glyph
;
24 typedef struct ent_skateshop ent_skateshop
;
25 typedef struct ent_camera ent_camera
;
26 typedef struct ent_swspreview ent_swspreview
;
39 k_ent_font_variant
= 10,
43 k_ent_swspreview
= 14,
47 static u32
mdl_entity_id_type( u32 entity_id
)
49 return (entity_id
& 0xffff0000) >> 16;
52 static u32
mdl_entity_id_id( u32 entity_id
)
54 return entity_id
& 0x0000ffff;
57 static u32
mdl_entity_id( u32 type
, u32 index
)
59 return (type
& 0xfffff)<<16 | (index
& 0xfffff);
63 k_ent_function_trigger
,
64 k_ent_function_particle_spawn
68 mdl_transform transform
;
73 k_light_type_point
= 0,
78 mdl_transform transform
;
91 k_gate_type_unlinked
= 0,
92 k_gate_type_teleport
= 1,
93 k_gate_type_nonlocal_unlinked
= 2,
94 k_gate_type_nonlocel
= 3
107 m4x3f to_world
, transport
;
118 u16 routes
[4]; /* routes that pass through this gate */
122 struct ent_route_node
{
124 u8 ref_count
, ref_total
;
127 struct ent_path_index
{
131 struct ent_checkpoint
{
140 mdl_transform transform
;
141 u32 official_track_id
;
145 u16 checkpoints_start
,
151 u16 active_checkpoint
,
155 m4x3f board_transform
;
161 mdl_transform transform
;
163 u32 reserved0
, reserved1
;
166 struct ent_audio_clip
{
175 struct volume_particles
{
179 struct volume_trigger
{
184 k_volume_subtype_trigger
,
185 k_volume_subtype_particle
189 mdl_transform transform
;
190 m4x3f to_world
, to_local
;
196 volume_trigger trigger
;
197 volume_particles particles
;
202 mdl_transform transform
;
206 float volume
, crossfade
;
214 mdl_transform transform
;
218 struct ent_skateshop
{
219 mdl_transform transform
;
226 struct ent_swspreview
{
227 u32 id_camera
, id_display
, id_display1
;
231 mdl_transform transform
;
238 u32 index
; /* into the path */
242 mdl_transform transform
;
246 enum ent_menuitem_type
{
247 k_ent_menuitem_type_visual
= 0,
248 k_ent_menuitem_type_event_button
= 1,
249 k_ent_menuitem_type_page_button
= 2,
250 k_ent_menuitem_type_toggle
= 3,
251 k_ent_menuitem_type_slider
= 4,
252 k_ent_menuitem_type_page
= 5
255 typedef struct ent_menuitem ent_menuitem
;
258 id_links
[4]; /* ent_menuitem */
260 mdl_transform transform
;
261 u32 submesh_start
, submesh_count
;
265 u32 id_min
, /* ent_marker */
267 id_handle
, /* ent_menuitem */
278 u32 id_check
, /* ent_menuitem */
285 id_entrypoint
, /* ent_menuitem */
286 id_viewpoint
; /* ent_camera */
292 VG_STATIC ent_marker
*ent_find_marker( mdl_context
*mdl
,
293 mdl_array_ptr
*arr
, const char *alias
)
295 for( u32 i
=0; i
<mdl_arrcount(arr
); i
++ ){
296 ent_marker
*marker
= mdl_arritm( arr
, i
);
298 if( !strcmp( mdl_pstr( mdl
, marker
->pstr_alias
), alias
) ){
306 enum channel_behaviour
{
307 k_channel_behaviour_unlimited
= 0,
308 k_channel_behaviour_discard_if_full
= 1,
309 k_channel_behaviour_crossfade_if_full
= 2
312 enum probability_curve
{
313 k_probability_curve_constant
= 0,
314 k_probability_curve_wildlife_day
= 1,
315 k_probability_curve_wildlife_night
= 2
327 struct ent_font_variant
{
339 typedef struct ent_call ent_call
;
347 #endif /* ENTITY_H */