foliage windy shader
[carveJwlIkooP6JGAAIwe30JlM.git] / respawn.c
index 0e1dc67cd5979893e34e501453b4ba270cf7b978..d8c470a83679fdfaa35d38c5796863313c3602dc 100644 (file)
--- a/respawn.c
+++ b/respawn.c
@@ -1,7 +1,7 @@
 #ifndef RESPAWN_C
 #define RESPAWN_C
 
-#if 0
+#if 1
 #include "respawn.h"
 #include "skaterift.h"
 #include "world.h"
@@ -89,6 +89,7 @@ static void respawn_chooser_pre_update(void){
    if( skaterift.activity != k_skaterift_respawning ) return;
 
    if( button_down( k_srbind_mback ) ){
+      gui_helper_clear();
       srinput.state = k_input_state_resume;
       skaterift.activity = k_skaterift_menu;
       menu.page = 0xffffffff;
@@ -107,24 +108,6 @@ static void respawn_chooser_pre_update(void){
       return;
    }
 
-   if( button_down( k_srbind_world_left ) ){
-      if( respawn_chooser.world_id > 0 )
-         respawn_chooser_setworld( respawn_chooser.world_id-1 );
-   }
-
-   if( button_down( k_srbind_world_right ) ){
-      u32 next = respawn_chooser.world_id+1;
-      if( next < vg_list_size(world_static.instances) )
-         respawn_chooser_setworld( next );
-   }
-
-   if( button_down(k_srbind_home) ){
-      respawn_chooser.home_select ++;
-      if( respawn_chooser.home_select >= vg_list_size(respawn_homes) )
-         respawn_chooser.home_select = 0;
-      respawn_chooser_gohome();
-   }
-
    world_instance *world = &world_static.instances[ respawn_chooser.world_id ];
    v3f *bbx = world->scene_geo.bbx;
    f32 *pos = respawn_chooser.plane_pos;
@@ -190,9 +173,9 @@ static void respawn_chooser_pre_update(void){
    for( u32 i=0; i<mdl_arrcount(&world->ent_challenge); i++ ){
       ent_challenge *challenge = mdl_arritm( &world->ent_challenge, i );
 
-      enum gui_icon icon = k_gui_icon_exclaim;
+      enum gui_icon icon = k_gui_icon_exclaim_2d;
       if( challenge->status )
-         icon = k_gui_icon_tick;
+         icon = k_gui_icon_tick_2d;
 
       respawn_map_draw_icon( cam, icon, challenge->transform.co );
    }
@@ -207,6 +190,13 @@ static void respawn_chooser_pre_update(void){
       }
    }
 
+   for( u32 i=0; i<mdl_arrcount(&world->ent_gate); i++ ){
+      ent_gate *gate = mdl_arritm( &world->ent_gate, i );
+      if( gate->flags & k_ent_gate_nonlocal ){
+         respawn_map_draw_icon( cam, k_gui_icon_rift, gate->co[0] );
+      }
+   }
+
    for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
       ent_route *route = mdl_arritm( &world->ent_route, i );
 
@@ -214,7 +204,7 @@ static void respawn_chooser_pre_update(void){
       v4_copy( route->colour, colour );
       v3_muls( colour, 1.6666f, colour );
       gui_icon_setcolour( colour );
-      respawn_map_draw_icon( cam, k_gui_icon_rift_run, 
+      respawn_map_draw_icon( cam, k_gui_icon_rift_run_2d
                              route->board_transform[3] );
    }
 }
@@ -236,14 +226,11 @@ static void respawn_begin_chooser(void){
    if( gui_new_helper( input_joy_list[k_srjoystick_steer], &text ) )
       vg_strcat( &text, "move" );
 
-   if( gui_new_helper( input_button_list[k_srbind_mleft], &text ) )
-      vg_strcat( &text, "world" );
-
    if( gui_new_helper( input_button_list[k_srbind_maccept], &text ) )
       vg_strcat( &text, "spawn" );
 
-   if( gui_new_helper( input_button_list[k_srbind_home], &text ) )
-      vg_strcat( &text, "home" );
+   if( gui_new_helper( input_button_list[k_srbind_mback], &text ) )
+      vg_strcat( &text, "exit" );
 }
 
 #if 0