+ glmesh mesh_gate_surface;
+
+ double sky_time, sky_rate, sky_target_rate;
+
+ /* water rendering */
+ struct
+ {
+ struct framebuffer fbreflect, fbdepth;
+
+ boxf depthbounds;
+ int depth_computed;
+
+ float height;
+ int enabled;
+ v4f plane;
+ }
+ water;
+
+ /* split flap display */
+ struct
+ {
+ mdl_submesh *sm_module, *sm_card;
+ glmesh mesh_base, mesh_display;
+
+ u32 w, h;
+ float *buffer;
+ }
+ sfd;
+
+ /* timing bars, fixed maximum amount */
+ struct route_ui_bar
+ {
+ GLuint vao, vbo, ebo;
+
+ u32 indices_head;
+ u32 vertex_head;
+
+ struct route_ui_segment
+ {
+ float length;
+ u32 vertex_start, vertex_count,
+ index_start, index_count, notches;
+ }
+ segments[k_max_ui_segments];
+
+ u32 segment_start, segment_count, fade_start, fade_count;
+ double fade_timer_start;
+ float xpos;
+ }
+ ui_bars[16];
+
+ v3f render_gate_pos;
+ int active_route_board;
+ int in_trigger;
+
+ /* This is a small flag we use to changelevel.
+ * It will not be cleared until all sounds stop playing
+ */
+ int switching_to_new_world;
+ char world_name[ 64 ];
+
+ /*
+ * Dynamically allocated when world_load is called.
+ *
+ * the following arrays index somewhere into this linear
+ * allocator
+ *
+ * (world_gen.h)
+ * --------------------------------------------------------------------------
+ */
+ void *dynamic_vgl,
+ *audio_vgl; /* sub buffer of the audio buffer */
+
+ /*
+ * Main world .mdl
+ */
+ mdl_context *meta;
+
+ /*
+ * Materials / textures
+ */
+
+ GLuint *textures;
+ u32 texture_count;
+
+ struct world_material
+ {
+ mdl_material info;
+ mdl_submesh sm_geo,
+ sm_no_collide;
+ }
+ * materials;
+ u32 material_count;
+
+ /*
+ * Named safe places to respawn
+ */
+ struct respawn_point
+ {
+ v3f co;
+ v4f q;
+ const char *name;
+ }
+ * spawns;
+ u32 spawn_count;
+
+ /*
+ * Audio player entities
+ */
+ struct world_audio_thing
+ {
+ v3f pos;
+ float volume;
+ u32 flags;
+
+ audio_player player;
+ audio_clip temp_embedded_clip;
+ }
+ * audio_things;
+ u32 audio_things_count;