commit 443b67abbe0f03d84b4366ef4afa7e3230aad359 parent dc27b83e1aaea41c1edb85bc06a4677bb916c4da Author: Michael Savage <mikejsavage@gmail.com> Date: Mon Jun 26 20:03:53 +0300 game_init/game_frame don't need to be extern C anymore Diffstat:
bsp.cc | | | 4 | ++-- |
hm.cc | | | 4 | ++-- |
main.cc | | | 4 | ++-- |
shadow_map.cc | | | 4 | ++-- |
diff --git a/bsp.cc b/bsp.cc @@ -248,7 +248,7 @@ BSP_Leaf & BSP::position_to_leaf( v3 pos ) const { static UB ub_view; -extern "C" GAME_INIT( game_init ) { +GAME_INIT( game_init ) { bsp_init( &game->bsp, "acidwdm2.bsp" ); MemoryArena arena = memarena_push_arena( &mem->persistent_arena, megabytes( 10 ) ); @@ -262,7 +262,7 @@ extern "C" GAME_INIT( game_init ) { ub_view = renderer_new_ub(); } -extern "C" GAME_FRAME( game_frame ) { +GAME_FRAME( game_frame ) { const int fb = input->keys[ KEY_W ] - input->keys[ KEY_S ]; const int lr = input->keys[ KEY_D ] - input->keys[ KEY_A ]; const int dz = input->keys[ KEY_SPACE ] - input->keys[ KEY_LEFTSHIFT ]; diff --git a/hm.cc b/hm.cc @@ -58,7 +58,7 @@ static void load_trees( MemoryArena * arena ) { tree_mesh = load_obj( "models/trees/PineTree.obj", arena ); } -extern "C" GAME_INIT( game_init ) { +GAME_INIT( game_init ) { net_init(); game->pos = v3( 1500, 1500, 250 ); @@ -149,7 +149,7 @@ static Pool< Explosion, 1024 > explosions; static Pool< Player, 1024 > players; static HashTable< Player *, 1024 * 2 > sid_to_player; -extern "C" GAME_FRAME( game_frame ) { +GAME_FRAME( game_frame ) { PROFILE_FUNCTION(); { diff --git a/main.cc b/main.cc @@ -15,8 +15,8 @@ #define GLFW_INCLUDE_NONE #include "libs/glfw/include/GLFW/glfw3.h" -extern "C" GameInit game_init; -extern "C" GameFrame game_frame; +GameInit game_init; +GameFrame game_frame; #if PLATFORM_LINUX #include "autogdb.h" diff --git a/shadow_map.cc b/shadow_map.cc @@ -60,7 +60,7 @@ static void draw_scene( RenderState render_state, bool draw_light = false ) { renderer_draw_mesh( tree_mesh, render_state ); } -extern "C" GAME_INIT( game_init ) { +GAME_INIT( game_init ) { ub_model = renderer_new_ub(); ub_light_view = renderer_new_ub(); ub_view = renderer_new_ub(); @@ -97,7 +97,7 @@ extern "C" GAME_INIT( game_init ) { tree_mesh = load_obj( "models/trees/PineTree.obj", &mem->persistent_arena ); } -extern "C" GAME_FRAME( game_frame ) { +GAME_FRAME( game_frame ) { const float speed = 6.0f; const float angular_speed = 100.0f;