large reduction, redoing things
[carveJwlIkooP6JGAAIwe30JlM.git] / model.h
diff --git a/model.h b/model.h
index 6134fc50dd9d9df836d09022fcfb8121d2bb63cd..6f99fb61d77044d489147a9fa9a9a32b97569a3a 100644 (file)
--- a/model.h
+++ b/model.h
@@ -29,29 +29,21 @@ typedef struct mdl_context mdl_context;
 
 enum classtype
 {
-   k_classtype_none                 = 0,
-   k_classtype_gate                 = 1,
-   k_classtype_spawn                = 3,
-   k_classtype_water                = 4,
-   k_classtype_route_node           = 8,
-   k_classtype_route                = 9,
-   k_classtype_bone                 = 10,
-   k_classtype_skeleton             = 11,
-   k_classtype_skin                 = 12,
-   k_classtype_audio                = 14,
-   k_classtype_trigger              = 100,
-   k_classtype_logic_achievement    = 101,
-   k_classtype_logic_relay          = 102,
-   k_classtype_logic_script         = 103,
-
-   k_classtype_logic_wire           = 105,
-   k_classtype_soundscape           = 106,
-   k_classtype_logic_chances        = 107,
-   k_classtype_particle_box         = 108,
-   k_classtype_signal_splitter      = 109,
-
-   k_classtype_world_light          = 200,
-   k_classtype_nonlocal_gate        = 300
+   k_classtype_none                 = 000,
+   k_classtype_bone                 = 001,
+   k_classtype_skeleton             = 002,
+   k_classtype_skin                 = 003,
+   k_classtype_world_light          = 004,
+
+   k_classtype_gate                 = 100,
+   k_classtype_nonlocal_gate        = 101,
+   k_classtype_spawn                = 200,
+   k_classtype_water                = 300,
+   k_classtype_route                = 400,
+   k_classtype_route_node           = 401,
+   k_classtype_audio                = 500,
+   k_classtype_audio_sprite         = 502,
+   k_classtype_volume_audio         = 600,
 };
 
 enum mdl_shader
@@ -203,35 +195,7 @@ struct mdl_file_header
  * Entity data structures
  */
 
-struct classtype_gate
-{
-   u32 target;
-   v3f dims;
-};
-
-struct classtype_spawn
-{
-   u32 pstr_alias;
-};
-
-struct classtype_water
-{
-   u32 temp;
-};
-
-struct classtype_route_node
-{
-   u32 target, target1;
-};
-
-struct classtype_route
-{
-   u32 id_start;
-   u32 pstr_name;
-   v3f colour;
-};
-
-struct classtype_bone
+struct classtype_bone            /* 001 */
 {
    u32 flags,
        ik_target,
@@ -243,7 +207,7 @@ struct classtype_bone
    float conet;
 };
 
-struct classtype_skeleton
+struct classtype_skeleton        /* 002 */
 {
    u32 channels,
        ik_count,
@@ -252,103 +216,80 @@ struct classtype_skeleton
        anim_count;
 };
 
-struct classtype_skin
+struct classtype_skin            /* 003 */
 {
    u32 skeleton;
 };
 
-struct classtype_trigger
+struct classtype_world_light     /* 004 */
 {
-   u32 target;
+   enum light_type 
+   {
+      k_light_type_point,
+      k_light_type_spot,
+      k_light_type_point_nighttime_only,
+      k_light_type_spot_nighttime_only
+   } 
+   type;
+
+   v4f colour; /* RGB, Energy */
+   float angle, range;
 };
 
-struct classtype_particle_box
+
+struct classtype_gate            /* 100, 101 */
 {
    u32 target;
-   float rate;
+   v3f dims;
 };
 
-struct classtype_signal_splitter
+struct classtype_spawn           /* 200 */
 {
-   u32 next[4];
+   u32 pstr_alias;
 };
 
-struct classtype_logic_relay
+struct classtype_water           /* 300 */
 {
-   u32 targets[4];
+   u32 temp;
 };
 
-struct classtype_logic_achievement
+struct classtype_route           /* 400 */
 {
+   u32 id_start;
    u32 pstr_name;
+   v3f colour;
 };
 
-struct classtype_audio
+struct classtype_route_node      /* 401 */
 {
-   u32 pstr_file,
-       flags;
-
-   float volume;
+   u32 target, target1;
 };
 
-struct classtype_world_light
+
+struct classtype_audio           /* 500 */
 {
-   enum light_type 
-   {
-      k_light_type_point,
-      k_light_type_spot,
-      k_light_type_point_nighttime_only,
-      k_light_type_spot_nighttime_only
-   } 
-   type;
+   u32 pstr_file,
+       flags;
 
-   v4f colour; /* RGB, Energy */
-   float angle, range;
+   float volume;
 };
 
-struct classtype_logic_wire
+struct classtype_audio_sprite    /* 501 */
 {
-   u32 next,
-       function;
-
-   union mdl_128bit_union
-   {
-      float _f32;
-      u32   _u32;
-      i32   _i32;
-      v4f   _v4f;
-   }
-   data;
+   u32 audio,
+       category;
 
-   enum mdl_128bit_datatype
-   {
-      k_mdl_128bit_datatype_nothing = 0u,
-      k_mdl_128bit_datatype_integer = 1u,
-      k_mdl_128bit_datatype_number  = 2u,
-      k_mdl_128bit_datatype_target  = 3u,
-      k_mdl_128bit_datatype_string  = 4u,
-      k_mdl_128bit_datatype_vec2    = 5u,
-      k_mdl_128bit_datatype_vec3    = 6u,
-      k_mdl_128bit_datatype_vec4    = 7u
-   }
-   data_type;
-
-   u32 enabled;
+   float probability;
 };
 
-struct classtype_soundscape
+struct classtype_volume_audio    /* 600 */
 {
-   u32 max_instances,
-       allow_transitions;
-
-   float transition_duration;
-   u32 label;
+   u32 category;
 };
 
-struct classtype_logic_chances
+struct classtype_volume_event    /* 601 */
 {
-   u32 targets[2];
-   float p;
+   u32 event;
 };
 
 #pragma pack(pop)