2 * Copyright (C) 2021-2023 Mt.ZERO Software, Harry Godden - All Rights Reserved
14 k_world_geo_type_solid
= 0,
15 k_world_geo_type_nonsolid
= 1,
16 k_world_geo_type_water
= 2
21 k_world_purpose_client
25 typedef struct world_instance world_instance
;
27 static void skaterift_world_get_save_path( enum world_purpose which
,
30 /* submodule headers */
31 #include "world_entity.h"
32 #include "world_gate.h"
33 #include "world_gen.h"
34 #include "world_info.h"
35 #include "world_load.h"
36 #include "world_physics.h"
37 #include "world_render.h"
38 #include "world_sfd.h"
39 #include "world_volumes.h"
40 #include "world_water.h"
41 #include "world_audio.h"
42 #include "world_routes.h"
44 /* console variables */
46 static f32 k_day_length
= 30.0f
; /* minutes */
47 static i32 k_debug_light_indices
= 0,
48 k_debug_light_complexity
= 0,
52 struct world_instance
{
54 * -------------------------------------------------------
59 k_world_status_unloaded
= 0,
60 k_world_status_loading
= 1,
61 k_world_status_loaded
= 2,
62 k_world_status_unloading
= 3 /* dont spawn sounds and stuff */
79 struct ub_world_lighting
{
87 v4f g_nightsky_colour
;
99 float g_shadow_length
;
100 float g_shadow_spread
;
104 float g_sunset_phase
;
107 int g_shadow_samples
;
110 int g_debug_complexity
;
116 GLuint tbo_light_entities
,
120 float probabilities
[3];
123 struct framebuffer heightmap
;
126 * Dynamically allocated when world_load is called.
128 * the following arrays index somewhere into this linear
130 * --------------------------------------------------------------------------
141 struct world_surface
{
150 mdl_array_ptr ent_spawn
,
173 ent_gate
*rendering_gate
;
176 * ----------------------------------------------------
180 scene_context scene_geo
,
184 /* spacial mappings */
190 glmesh mesh_route_lines
;
194 u32 cubemap_cooldown
, cubemap_side
;
199 struct world_static
{
201 * Allocated as system memory
202 * --------------------------------------------------------------------------
206 u32 current_run_version
;
207 double time
, rewind_from
, rewind_to
, last_use
;
209 u32 active_trigger_volumes
[8];
210 u32 active_trigger_volume_count
;
212 world_instance instances
[4];
214 u32 focused_entity
; /* like skateshop, challenge.. */
219 ent_objective
*challenge_target
;
222 addon_reg
*addon_hub
,
225 enum world_loader_state
{
227 k_world_loader_preload
,
234 static void world_init(void);
235 static world_instance
*world_current_instance(void);
236 static void world_set_active_instance( u32 index
);