X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=inline;f=skaterift.c;h=ba26edd6ed97c61d444c948f1ef7541279c43532;hb=297468e5a3cc8c7805c16fdd615f42f3876eb908;hp=97f6553d7cb438a20d6a8680eb8f1033f63840a1;hpb=d8fc0acce1b39466038284aa6f1941ebe98c8348;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/skaterift.c b/skaterift.c index 97f6553..ba26edd 100644 --- a/skaterift.c +++ b/skaterift.c @@ -9,22 +9,8 @@ * ' ' '--' [] '----- '----- ' ' '---' SOFTWARE * * ============================================================================= - * - * register: shader register & init scheduling - * init: initialization - * update: logic - * render: graphics - * free: resource free - * */ -#define VG_3D -#define VG_STATIC static -//#define VG_STATIC - -//#define VG_MINIMAL_TEST -#ifndef VG_MINIMAL_TEST - #define SR_NETWORKED #include "common.h" @@ -43,6 +29,8 @@ int main( int argc, char *argv[] ) vg_mem.use_libc_malloc = 0; vg_set_mem_quota( 128*1024*1024 ); vg_enter( argc, argv, "Voyager Game Engine" ); + + return 0; } VG_STATIC void highscores_save_at_exit(void*_) @@ -50,9 +38,13 @@ VG_STATIC void highscores_save_at_exit(void*_) highscores_serialize_all(); } -VG_STATIC void vg_preload(void) +VG_STATIC void vg_launch_opt(void) { +} + +VG_STATIC void vg_preload(void) +{ vg_convar_push( (struct vg_convar){ .name = "cl_ui", .data = &cl_ui, @@ -103,6 +95,7 @@ VG_STATIC void vg_load(void) /* 'systems' are completely loaded now */ strcpy( world.world_name, "maps/mp_mtzero.mdl" ); + strcpy( world.world_name, "maps/mp_gridmap.mdl" ); world_load(); vg_console_load_autos(); } @@ -250,6 +243,7 @@ VG_STATIC void render_main_game(void) VG_STATIC void vg_render(void) { glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + glViewport( 0,0, vg.window_x, vg.window_y ); glDisable( GL_DEPTH_TEST ); @@ -258,7 +252,6 @@ VG_STATIC void vg_render(void) render_main_game(); - /* Other shite */ glDisable(GL_BLEND); glDisable( GL_DEPTH_TEST ); @@ -352,11 +345,11 @@ VG_STATIC void run_debug_info(void) player.phys.rb.co[0], player.phys.rb.co[1], player.phys.rb.co[2] ); ui_text( (ui_px [2]){ 0, 40 }, buf, 1, k_text_align_left ); - if( vg.gamepad_ready ) + if( vg_input.controller_handle ) { - for( int i=0; i<6; i++ ) + for( int i=0; i