update helpers/location to 'frosted' ui
[carveJwlIkooP6JGAAIwe30JlM.git] / player_remote.h
index 5ba0105277bacf456073da567a08c6b6b32be2f1..2d3250c5b0298d439ffcbdb09fd202f41ce823b2 100644 (file)
@@ -1,13 +1,21 @@
-#ifndef PLAYER_REMOTE_H
-#define PLAYER_REMOTE_H
-
+#pragma once
 #include "player.h"
 #include "network.h"
 #include "network_common.h"
+#include "player_render.h"
+#include "player_effects.h"
+#include "player_api.h"
+
+#include "player_skate.h"
+#include "player_walk.h"
+#include "player_dead.h"
+#include "player_basic_info.h"
+#include "player_glide.h"
 
 #define NETWORK_SFX_QUEUE_LENGTH 12
 
-struct {
+struct global_netplayers
+{
    struct network_player {
       int active, isfriend, isblocked;
       u64 steamid;
@@ -23,6 +31,8 @@ struct {
       char username[ NETWORK_USERNAME_MAX ];
       char items[k_netmsg_playeritem_max][ADDON_UID_MAX];
       char chat[ NETWORK_MAX_CHAT ];
+      char region[ NETWORK_REGION_MAX ];
+      u32 region_flags;
       f64 chat_time;
 
       /* ui */
@@ -31,6 +41,9 @@ struct {
 
       u32 down_bytes;
       f32 down_kbs;
+      
+      struct player_effects_data effect_data;
+      bool render_glider;
    }
    list[ NETWORK_MAX_PLAYERS ];
 
@@ -41,7 +54,7 @@ struct {
          f64 timestamp;
          enum player_subsystem subsystem;
 
-         u8 instance_id;
+         u8 flags;
          u16 boundary_hash;
 
          union interp_animdata {
@@ -53,6 +66,8 @@ struct {
             struct player_basic_info_animator __basic;
          } 
          data;
+
+         struct remote_glider_animator data_glider;
       }
       frames[ NETWORK_BUFFERFRAMES ];
 
@@ -62,7 +77,8 @@ struct {
 
    struct net_sfx sfx_queue[ NETWORK_SFX_QUEUE_LENGTH ];
 
-   m4x3f *final_mtx;
+   m4x3f *final_mtx,
+         *glider_mtx;
    struct player_board_pose board_poses[ NETWORK_MAX_PLAYERS ];
 
    u32 up_bytes;
@@ -73,14 +89,20 @@ struct {
    char chat_buffer[ NETWORK_MAX_CHAT ], chat_message[ NETWORK_MAX_CHAT ];
    f64 chat_time;
 }
-static netplayers;
-
-static void player_remote_rx_200_300( SteamNetworkingMessage_t *msg );
-static void remote_player_debug_update(void);
-static void remote_player_send_playerframe(void);
-static void animate_remote_player( u32 index );
-static void render_remote_players( world_instance *world, camera *cam );
-static void relink_all_remote_player_worlds(void);
-static void player_remote_update_friendflags( struct network_player *remote );
-
-#endif /* PLAYER_REMOTE_H */
+extern netplayers;
+
+void player_remote_rx_200_300( SteamNetworkingMessage_t *msg );
+void remote_player_debug_update(void);
+void remote_player_send_playerframe(void);
+void animate_remote_player( u32 index );
+void animate_remote_players(void);
+void render_remote_players( world_instance *world, vg_camera *cam );
+void relink_all_remote_player_worlds(void);
+void player_remote_update_friendflags( struct network_player *remote );
+void remote_players_init(void);
+void remote_sfx_pre_update(void);
+void remote_player_network_imgui( m4x4f pv );
+void remote_players_imgui_world( world_instance *world, m4x4f pv,
+                                 f32 max_dist, int geo_cull );
+void remote_players_imgui_lobby(void);
+void remote_players_chat_imgui(void);