change list_size to ARRAY_LEN
[carveJwlIkooP6JGAAIwe30JlM.git] / network.c
index 27048fb8886231e58bd785863fd7915e5d360c22..0869612fca9a91e6fafd93cd41f7713fa4910470 100644 (file)
--- a/network.c
+++ b/network.c
@@ -57,7 +57,7 @@ static void on_auth_ticket_recieved( void *result, void *context ){
    
    if( SteamAPI_ISteamUser_GetEncryptedAppTicket( hSteamUser, 
             network_client.app_symmetric_key,
-            vg_list_size(network_client.app_symmetric_key),
+            VG_ARRAY_LEN(network_client.app_symmetric_key),
             &network_client.app_key_length )){
       vg_success( "  Loaded app ticket\n" );
    }
@@ -316,7 +316,7 @@ static void network_disconnect(void){
    network_client.remote = 0;
    network_client.state = k_ESteamNetworkingConnectionState_None;
 
-   for( int i=0; i<vg_list_size(netplayers.list); i++ ){
+   for( int i=0; i<VG_ARRAY_LEN(netplayers.list); i++ ){
       netplayers.list[i].active = 0;
    }
 }
@@ -372,7 +372,7 @@ void network_status_string( vg_str *str, u32 *colour )
 
 void render_server_status_gui(void)
 {
-   render_fb_bind( gpipeline.fb_workshop_preview, 0 );
+   vg_framebuffer_bind( g_render.fb_network_status, 1.0f );
 
    vg_ui_set_screen( 128, 48 );
    ui_context *ctx = &vg_ui.ctx;
@@ -397,7 +397,7 @@ void render_server_status_gui(void)
    ui_flush( ctx, k_ui_shader_colour, NULL );
    
    skaterift.rt_textures[ k_skaterift_rt_server_status ] =
-      gpipeline.fb_workshop_preview->attachments[0].id;
+      g_render.fb_network_status->attachments[0].id;
 }
 
 static void on_server_connect_status( CallbackMsg_t *msg ){
@@ -533,7 +533,7 @@ static void poll_remote_connection(void){
    for( int i=0; i<10; i++ ){
       len = SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnConnection(
             hSteamNetworkingSockets, network_client.remote, 
-            messages, vg_list_size(messages));
+            messages, VG_ARRAY_LEN(messages));
 
       if( len <= 0 )
          return;