a mess but stable
[carveJwlIkooP6JGAAIwe30JlM.git] / player_remote.h
index 2d6200b365c6bbfcc39df8932df95f57ec457bef..3e4b67e773dcad826ff66a7229ac2d4e497eeb80 100644 (file)
@@ -1,14 +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;
@@ -20,7 +27,6 @@ struct {
       int world_match[ k_world_max ];
       u32 location_pstr; /* TODO: valid if active_world set. */
 
-      /* TODO: Compression with server code */
       char username[ NETWORK_USERNAME_MAX ];
       char items[k_netmsg_playeritem_max][ADDON_UID_MAX];
       char chat[ NETWORK_MAX_CHAT ];
@@ -82,14 +88,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( ui_context *ctx, m4x4f pv );
+void remote_players_imgui_world( ui_context *ctx, world_instance *world, 
+                                 m4x4f pv, f32 max_dist, int geo_cull );
+void remote_players_imgui_lobby( ui_context *ctx );
+void remote_players_chat_imgui( ui_context *ctx );