X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world.h;h=809397151e854c64b4508ceaf139a8e0e1c40c88;hb=1b522daa02f28128498b04def4d60b63e590d1f3;hp=622837d778728f42a6c1eb95a6aa2b59ecd9336d;hpb=be8ea6efdbfd9c0fdad97401ed7d92041d8c8778;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world.h b/world.h index 622837d..8093971 100644 --- a/world.h +++ b/world.h @@ -60,7 +60,14 @@ struct world_instance { * ------------------------------------------------------- */ + void *heap; char world_name[ 64 ]; + enum world_status{ + k_world_status_unloaded = 0, + k_world_status_loading = 1, + k_world_status_loaded = 2 + } + status; struct{ boxf depthbounds; @@ -184,12 +191,12 @@ struct world_instance { rb_object rb_geo; }; -VG_STATIC struct world_global{ +struct world_global{ /* * Allocated as system memory * -------------------------------------------------------------------------- */ - void *generic_heap; + void *heap; /* rendering */ glmesh skydome; @@ -250,9 +257,8 @@ VG_STATIC struct world_global{ } text_particles[6*4]; u32 text_particle_count; - } -world_global; +static world_global; VG_STATIC world_instance *get_active_world( void ) { @@ -399,9 +405,8 @@ VG_STATIC void world_init(void) /* Allocate dynamic world memory arena */ u32 max_size = 76*1024*1024; - world_global.generic_heap = vg_create_linear_allocator( vg_mem.rtmemory, - max_size, - VG_MEMORY_SYSTEM ); + world_global.heap = vg_create_linear_allocator( vg_mem.rtmemory, max_size, + VG_MEMORY_SYSTEM ); } typedef struct ent_call ent_call;