medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 575cf888619f43cd1ea28cda3664b6e7e8997bb9
parent 7dfe572306ff26e99da93f937dede61e35ead628
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Dec 25 14:26:12 +0200

Move work queue initialisation to main

Diffstat:
Makefile | 2+-
hm.cc | 3---
main.cc | 3+++
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile @@ -6,7 +6,7 @@ VISITORS := visitors/linear_algebra.h all: $(VISITORS) $(BINS) $(MODULES) test_lockfree # Binary dependencies -medfall: main.o gl.o log.o memory_arena.o renderer.o immediate.o text_renderer.o stb_truetype.o glad.o +medfall: main.o gl.o log.o memory_arena.o renderer.o immediate.o work_queue.o text_renderer.o stb_truetype.o glad.o pp: pp.o log.o memory_arena.o stb_image.o lz4.o lz4hc.o strlcpy.o heightmap.o sound: audio.o mixer.o log.o memory_arena.o wave.o platform_audio_output.o srv: server/main.o rng/well512.o diff --git a/hm.cc b/hm.cc @@ -9,7 +9,6 @@ #include "terrain_manager.h" #include "linear_algebra.h" #include "skybox.h" -#include "work_queue.h" #include "text_renderer.h" #include "pool.h" #include "hashtable.h" @@ -93,8 +92,6 @@ static bool set_nonblocking( int fd ) { } extern "C" GAME_INIT( game_init ) { - workqueue_init( &game->background_tasks, &mem->persistent_arena, 2 ); - game->pos = v3( 1500, 1500, 250 ); game->angles = radians( v3( -90, 45, 0 ) ); terrain_init( &game->tm, "terrains/gta.png.parts", &mem->persistent_arena, &game->background_tasks ); diff --git a/main.cc b/main.cc @@ -14,6 +14,7 @@ #include "intrinsics.h" #include "gl.h" #include "keys.h" +#include "work_queue.h" #include "text_renderer.h" #include "platform_library.h" @@ -110,6 +111,8 @@ int main( int argc, char ** argv ) { GLFWwindow * window = gl_init(); text_renderer_init(); + workqueue_init( &state->background_tasks, &mem.persistent_arena, 2 ); + #if STATIC_GAME game_init( state, &mem ); #else