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
;
27 typedef struct ent_worldinfo ent_worldinfo
;
28 typedef struct ent_ccmd ent_ccmd
;
41 k_ent_font_variant
= 10,
45 k_ent_swspreview
= 14,
51 static u32
mdl_entity_id_type( u32 entity_id
){
52 return (entity_id
& 0xffff0000) >> 16;
55 static u32
mdl_entity_id_id( u32 entity_id
){
56 return entity_id
& 0x0000ffff;
59 static u32
mdl_entity_id( u32 type
, u32 index
){
60 return (type
& 0xfffff)<<16 | (index
& 0xfffff);
64 k_ent_function_trigger
,
65 k_ent_function_particle_spawn
69 mdl_transform transform
;
74 k_light_type_point
= 0,
79 mdl_transform transform
;
92 k_gate_type_unlinked
= 0,
93 k_gate_type_teleport
= 1,
94 k_gate_type_nonlocal_unlinked
= 2,
95 k_gate_type_nonlocel
= 3
109 m4x3f to_world
, transport
;
120 u16 routes
[4]; /* routes that pass through this gate */
124 struct ent_route_node
{
126 u8 ref_count
, ref_total
;
129 struct ent_path_index
{
133 struct ent_checkpoint
{
142 mdl_transform transform
;
143 u32 official_track_id
;
147 u16 checkpoints_start
,
153 u16 active_checkpoint
,
157 m4x3f board_transform
;
163 mdl_transform transform
;
165 u32 reserved0
, reserved1
;
168 struct ent_audio_clip
{
177 struct volume_particles
{
181 struct volume_trigger
{
186 k_volume_subtype_trigger
,
187 k_volume_subtype_particle
191 mdl_transform transform
;
192 m4x3f to_world
, to_local
;
198 volume_trigger trigger
;
199 volume_particles particles
;
204 mdl_transform transform
;
208 float volume
, crossfade
;
216 mdl_transform transform
;
221 k_skateshop_type_boardshop
,
222 k_skateshop_type_charshop
,
223 k_skateshop_type_worldshop
226 struct ent_skateshop
{
227 mdl_transform transform
;
252 struct ent_swspreview
{
253 u32 id_camera
, id_display
, id_display1
;
257 mdl_transform transform
;
264 u32 index
; /* into the path */
268 mdl_transform transform
;
272 enum ent_menuitem_type
{
273 k_ent_menuitem_type_visual
= 0,
274 k_ent_menuitem_type_event_button
= 1,
275 k_ent_menuitem_type_page_button
= 2,
276 k_ent_menuitem_type_toggle
= 3,
277 k_ent_menuitem_type_slider
= 4,
278 k_ent_menuitem_type_page
= 5
281 typedef struct ent_menuitem ent_menuitem
;
284 id_links
[4]; /* ent_menuitem */
285 f32 factive
, fvisible
;
287 mdl_transform transform
;
288 u32 submesh_start
, submesh_count
;
290 union{ u64 _u64
; /* force storage for 64bit pointers */
298 u32 id_min
, /* ent_marker */
300 id_handle
, /* ent_menuitem */
311 u32 id_check
, /* ent_menuitem */
313 v3f offset
; /* relative to parent */
319 id_entrypoint
, /* ent_menuitem */
320 id_viewpoint
; /* ent_camera */
326 struct ent_worldinfo
{
327 u32 pstr_name
, pstr_author
, pstr_desc
;
331 VG_STATIC ent_marker
*ent_find_marker( mdl_context
*mdl
,
332 mdl_array_ptr
*arr
, const char *alias
)
334 for( u32 i
=0; i
<mdl_arrcount(arr
); i
++ ){
335 ent_marker
*marker
= mdl_arritm( arr
, i
);
337 if( !strcmp( mdl_pstr( mdl
, marker
->pstr_alias
), alias
) ){
345 enum channel_behaviour
{
346 k_channel_behaviour_unlimited
= 0,
347 k_channel_behaviour_discard_if_full
= 1,
348 k_channel_behaviour_crossfade_if_full
= 2
351 enum probability_curve
{
352 k_probability_curve_constant
= 0,
353 k_probability_curve_wildlife_day
= 1,
354 k_probability_curve_wildlife_night
= 2
366 struct ent_font_variant
{
381 typedef struct ent_call ent_call
;
388 VG_STATIC
void entity_call( world_instance
*world
, ent_call
*call
);
390 #endif /* ENTITY_H */