FS2_Open
Open source remastering of the Freespace 2 engine
stand_gui.cpp File Reference
#include "network/stand_gui.h"
#include "freespace2/freespace.h"
#include "freespace2/freespaceresource.h"
#include "network/multi.h"
#include "network/multimsgs.h"
#include "network/multiutil.h"
#include "mission/missiongoals.h"
#include "cmdline/cmdline.h"
#include "network/multi_kick.h"
#include "network/multi_pmsg.h"
#include "missionui/chatbox.h"
#include "network/multi_endgame.h"
#include "gamesequence/gamesequence.h"
#include "playerman/player.h"
#include "osapi/osregistry.h"
#include "io/timer.h"
#include "globalincs/version.h"
#include "ship/ship.h"
#include "cfile/cfile.h"
#include "fs2netd/fs2netd_client.h"
#include <string>

Go to the source code of this file.

Macros

#define ST_MODE_CREATE   0
 
#define ST_MODE_UPDATE   1
 
#define ST_MODE_REMOVE   2
 
#define MSG_SYSTRAYICON   WM_USER+99
 
#define STP_RESET_ALL   1
 
#define STP_SHUTDOWN   2
 
#define STP_SHOW   3
 
#define STP_RESET_FS2NETD   4
 
#define MAX_STANDALONE_PAGES   5
 
#define STD_STATS_UPDATE_TIME   500
 
#define STD_NG_UPDATE_TIME   100
 
#define CONNECT_PAGE   0
 
#define MULTIPLAYER_PAGE   1
 
#define PLAYER_INFO_PAGE   2
 
#define GODSTUFF_PAGE   3
 
#define DEBUG_PAGE   4
 
#define STANDALONE_MAX_BAN   50
 
#define GOALVIEW_X   5
 
#define GOALVIEW_Y   242
 
#define GOALVIEW_W   160
 
#define GOALVIEW_H   168
 
#define MAX_PLAYER_STAT_FIELDS   14
 
#define STD_ADDSTRING(hwnd, val)   { snprintf(txt,sizeof(txt)-1,"%d",(int)val); SetWindowText(hwnd,txt); }
 
#define GODSTUFF_MAX_ITEMS   19
 

Functions

BOOL CALLBACK std_gen_dialog_proc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void std_create_gen_dialog (char *title)
 
void std_destroy_gen_dialog ()
 
void std_gen_set_text (char *str, int field_num)
 
int std_gen_is_active ()
 
int std_connect_lindex_to_npindex (int index)
 
int std_connect_set_connect_count ()
 
void std_connect_set_host_connect_status ()
 
void std_connect_add_ip_string (char *string)
 
void std_connect_remove_ip_string (char *string)
 
void std_connect_set_ip_string (char *lookup, char *string)
 
void std_connect_kick_player ()
 
void std_connect_update_ping (net_player *p)
 
void std_connect_clear_controls ()
 
void std_connect_set_gamename (char *name)
 
void std_connect_handle_name_change ()
 
void std_connect_handle_passwd_change ()
 
BOOL CALLBACK connect_proc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void std_multi_handle_framecap_scroll (HWND ctrl)
 
void std_multi_init_framecap_slider (HWND hwndDlg)
 
void std_multi_init_multi_controls (HWND hwndDlg)
 
HTREEITEM std_multi_get_goal_item (char *goal_string, int type)
 
void std_multi_set_standalone_missiontime (float mission_time)
 
void std_multi_set_standalone_mission_name (char *mission_name)
 
void std_multi_setup_goal_tree ()
 
void std_multi_add_goals ()
 
void std_multi_update_goals ()
 
void std_multi_set_framerate (float f)
 
void std_multi_clear_controls ()
 
void std_multi_update_netgame_info_controls ()
 
BOOL CALLBACK multi_proc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void std_pinfo_init_player_info_controls (HWND hwndDlg)
 
int std_pinfo_player_is_active (net_player *p)
 
void std_pinfo_display_player_info (net_player *p)
 
int std_pinfo_maybe_update_player_info (net_player *p)
 
void std_pinfo_add_player_list_item (net_player *p)
 
void std_pinfo_remove_player_list_item (net_player *p)
 
void std_pinfo_update_ping (net_player *p)
 
void std_pinfo_clear_controls ()
 
BOOL CALLBACK player_info_proc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void std_gs_init_godstuff_controls (HWND hwndDlg)
 
void std_gs_add_god_player (net_player *p)
 
void std_gs_remove_god_player (net_player *p)
 
void std_gs_send_godstuff_message ()
 
void std_gs_set_framerate (float f)
 
void std_gs_clear_controls ()
 
BOOL CALLBACK godstuff_proc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void std_debug_init_debug_controls (HWND hwndDlg)
 
void std_debug_set_standalone_state_string (char *str)
 
void std_debug_multilog_add_line (const char *str)
 
void std_debug_clear_controls ()
 
BOOL CALLBACK debug_proc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void std_add_player (net_player *p)
 
int std_remove_player (net_player *p)
 
void std_set_standalone_fps (float fps)
 
void std_update_player_ping (net_player *p)
 
void std_reset_standalone_gui ()
 
void std_notify_tracker_login_fail ()
 
void std_do_gui_frame ()
 
void std_tracker_login ()
 
void std_reset_timestamps ()
 
void std_add_chat_text (const char *text, int player_index, int add_id)
 
int std_is_host_passwd ()
 
void std_mutate_sheet ()
 
int std_player_is_banned (const char *name)
 
void std_add_ban (const char *name)
 
void std_init_property_pages ()
 
void std_build_title_string (char *str)
 
HWND std_init_property_sheet (HWND hwndDlg)
 
BOOL CALLBACK std_message_handler_proc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL std_create_standalone_window ()
 
DWORD standalone_process (WORD lparam)
 
void std_init_os ()
 
void std_init_standalone ()
 
void std_deinit_standalone ()
 

Variables

HANDLE Standalone_thread
 
DWORD Standalone_thread_id
 
int Standalone_stats_stamp
 
int Standalone_ng_stamp
 
char Standalone_ban_list [STANDALONE_MAX_BAN][CALLSIGN_LEN+1]
 
int Standalone_ban_count = 0
 
char title_str [512]
 
HWND Multi_std_host_passwd
 
int Multi_std_namechange_force
 
int Lighting_flag
 

Macro Definition Documentation

#define CONNECT_PAGE   0

Definition at line 78 of file stand_gui.cpp.

#define DEBUG_PAGE   4

Definition at line 82 of file stand_gui.cpp.

#define GOALVIEW_H   168

Definition at line 585 of file stand_gui.cpp.

#define GOALVIEW_W   160

Definition at line 584 of file stand_gui.cpp.

#define GOALVIEW_X   5

Definition at line 582 of file stand_gui.cpp.

#define GOALVIEW_Y   242

Definition at line 583 of file stand_gui.cpp.

#define GODSTUFF_MAX_ITEMS   19

Definition at line 1339 of file stand_gui.cpp.

#define GODSTUFF_PAGE   3

Definition at line 81 of file stand_gui.cpp.

#define MAX_PLAYER_STAT_FIELDS   14

Definition at line 1062 of file stand_gui.cpp.

#define MAX_STANDALONE_PAGES   5

Definition at line 66 of file stand_gui.cpp.

#define MSG_SYSTRAYICON   WM_USER+99

Definition at line 52 of file stand_gui.cpp.

#define MULTIPLAYER_PAGE   1

Definition at line 79 of file stand_gui.cpp.

#define PLAYER_INFO_PAGE   2

Definition at line 80 of file stand_gui.cpp.

#define ST_MODE_CREATE   0

Definition at line 48 of file stand_gui.cpp.

#define ST_MODE_REMOVE   2

Definition at line 50 of file stand_gui.cpp.

#define ST_MODE_UPDATE   1

Definition at line 49 of file stand_gui.cpp.

#define STANDALONE_MAX_BAN   50

Definition at line 100 of file stand_gui.cpp.

#define STD_ADDSTRING (   hwnd,
  val 
)    { snprintf(txt,sizeof(txt)-1,"%d",(int)val); SetWindowText(hwnd,txt); }

Definition at line 1070 of file stand_gui.cpp.

#define STD_NG_UPDATE_TIME   100

Definition at line 69 of file stand_gui.cpp.

#define STD_STATS_UPDATE_TIME   500

Definition at line 68 of file stand_gui.cpp.

#define STP_RESET_ALL   1

Definition at line 57 of file stand_gui.cpp.

#define STP_RESET_FS2NETD   4

Definition at line 60 of file stand_gui.cpp.

#define STP_SHOW   3

Definition at line 59 of file stand_gui.cpp.

#define STP_SHUTDOWN   2

Definition at line 58 of file stand_gui.cpp.

Function Documentation

BOOL CALLBACK connect_proc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 487 of file stand_gui.cpp.

BOOL CALLBACK debug_proc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1614 of file stand_gui.cpp.

BOOL CALLBACK godstuff_proc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1460 of file stand_gui.cpp.

BOOL CALLBACK multi_proc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1020 of file stand_gui.cpp.

BOOL CALLBACK player_info_proc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1278 of file stand_gui.cpp.

DWORD standalone_process ( WORD  lparam)

Definition at line 2351 of file stand_gui.cpp.

void std_add_ban ( const char *  name)

Definition at line 1953 of file stand_gui.cpp.

void std_add_chat_text ( const char *  text,
int  player_index,
int  add_id 
)

Definition at line 1809 of file stand_gui.cpp.

void std_add_player ( net_player p)

Unused methods from the original API below, most of this stuff is now done in std_do_gui_frame

Definition at line 1651 of file stand_gui.cpp.

void std_build_title_string ( char *  str)

Definition at line 2036 of file stand_gui.cpp.

void std_connect_add_ip_string ( char *  string)

Definition at line 259 of file stand_gui.cpp.

void std_connect_clear_controls ( )

Definition at line 359 of file stand_gui.cpp.

void std_connect_handle_name_change ( )

Definition at line 407 of file stand_gui.cpp.

void std_connect_handle_passwd_change ( )

Definition at line 438 of file stand_gui.cpp.

void std_connect_kick_player ( )

Definition at line 307 of file stand_gui.cpp.

int std_connect_lindex_to_npindex ( int  index)

Definition at line 454 of file stand_gui.cpp.

void std_connect_remove_ip_string ( char *  string)

Definition at line 269 of file stand_gui.cpp.

int std_connect_set_connect_count ( )

Definition at line 204 of file stand_gui.cpp.

void std_connect_set_gamename ( char *  name)

Definition at line 373 of file stand_gui.cpp.

void std_connect_set_host_connect_status ( )

Definition at line 235 of file stand_gui.cpp.

void std_connect_set_ip_string ( char *  lookup,
char *  string 
)

Definition at line 288 of file stand_gui.cpp.

void std_connect_update_ping ( net_player p)

Definition at line 328 of file stand_gui.cpp.

void std_create_gen_dialog ( char *  title)

Definition at line 128 of file stand_gui.cpp.

BOOL std_create_standalone_window ( )

Definition at line 2231 of file stand_gui.cpp.

void std_debug_clear_controls ( )

Definition at line 1593 of file stand_gui.cpp.

void std_debug_init_debug_controls ( HWND  hwndDlg)

Definition at line 1600 of file stand_gui.cpp.

void std_debug_multilog_add_line ( const char *  str)

Definition at line 1545 of file stand_gui.cpp.

void std_debug_set_standalone_state_string ( char *  str)

Definition at line 1539 of file stand_gui.cpp.

void std_deinit_standalone ( )

Definition at line 2426 of file stand_gui.cpp.

void std_destroy_gen_dialog ( )

Definition at line 148 of file stand_gui.cpp.

void std_do_gui_frame ( )

Definition at line 1761 of file stand_gui.cpp.

BOOL CALLBACK std_gen_dialog_proc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 113 of file stand_gui.cpp.

int std_gen_is_active ( )

Definition at line 188 of file stand_gui.cpp.

void std_gen_set_text ( char *  str,
int  field_num 
)

Definition at line 162 of file stand_gui.cpp.

void std_gs_add_god_player ( net_player p)

Definition at line 1355 of file stand_gui.cpp.

void std_gs_clear_controls ( )

Definition at line 1415 of file stand_gui.cpp.

void std_gs_init_godstuff_controls ( HWND  hwndDlg)

Definition at line 1431 of file stand_gui.cpp.

void std_gs_remove_god_player ( net_player p)

Definition at line 1368 of file stand_gui.cpp.

void std_gs_send_godstuff_message ( )

Definition at line 1382 of file stand_gui.cpp.

void std_gs_set_framerate ( float  f)

Definition at line 1405 of file stand_gui.cpp.

void std_init_os ( )

Definition at line 2409 of file stand_gui.cpp.

void std_init_property_pages ( )

Definition at line 1970 of file stand_gui.cpp.

HWND std_init_property_sheet ( HWND  hwndDlg)

Definition at line 2062 of file stand_gui.cpp.

void std_init_standalone ( )

Definition at line 2416 of file stand_gui.cpp.

int std_is_host_passwd ( )

return 1 if the standalone is host password protected, otherwise 0

Definition at line 1859 of file stand_gui.cpp.

BOOL CALLBACK std_message_handler_proc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 2162 of file stand_gui.cpp.

void std_multi_add_goals ( )

Definition at line 660 of file stand_gui.cpp.

void std_multi_clear_controls ( )

Definition at line 834 of file stand_gui.cpp.

HTREEITEM std_multi_get_goal_item ( char *  goal_string,
int  type 
)

Definition at line 988 of file stand_gui.cpp.

void std_multi_handle_framecap_scroll ( HWND  ctrl)

Definition at line 886 of file stand_gui.cpp.

void std_multi_init_framecap_slider ( HWND  hwndDlg)

Definition at line 903 of file stand_gui.cpp.

void std_multi_init_multi_controls ( HWND  hwndDlg)

Definition at line 927 of file stand_gui.cpp.

void std_multi_set_framerate ( float  f)

Definition at line 824 of file stand_gui.cpp.

void std_multi_set_standalone_mission_name ( char *  mission_name)

Definition at line 614 of file stand_gui.cpp.

void std_multi_set_standalone_missiontime ( float  mission_time)

Definition at line 600 of file stand_gui.cpp.

void std_multi_setup_goal_tree ( )

Definition at line 621 of file stand_gui.cpp.

void std_multi_update_goals ( )

Definition at line 756 of file stand_gui.cpp.

void std_multi_update_netgame_info_controls ( )

Definition at line 862 of file stand_gui.cpp.

void std_mutate_sheet ( )

Definition at line 1865 of file stand_gui.cpp.

void std_notify_tracker_login_fail ( )

Definition at line 1757 of file stand_gui.cpp.

void std_pinfo_add_player_list_item ( net_player p)

Definition at line 1145 of file stand_gui.cpp.

void std_pinfo_clear_controls ( )

Definition at line 1193 of file stand_gui.cpp.

void std_pinfo_display_player_info ( net_player p)

Definition at line 1079 of file stand_gui.cpp.

void std_pinfo_init_player_info_controls ( HWND  hwndDlg)

Definition at line 1212 of file stand_gui.cpp.

int std_pinfo_maybe_update_player_info ( net_player p)

Definition at line 1134 of file stand_gui.cpp.

int std_pinfo_player_is_active ( net_player p)

Definition at line 1257 of file stand_gui.cpp.

void std_pinfo_remove_player_list_item ( net_player p)

Definition at line 1161 of file stand_gui.cpp.

void std_pinfo_update_ping ( net_player p)

Definition at line 1175 of file stand_gui.cpp.

int std_player_is_banned ( const char *  name)

Definition at line 1937 of file stand_gui.cpp.

int std_remove_player ( net_player p)

Definition at line 1674 of file stand_gui.cpp.

void std_reset_standalone_gui ( )

Definition at line 1725 of file stand_gui.cpp.

void std_reset_timestamps ( )

Definition at line 1799 of file stand_gui.cpp.

void std_set_standalone_fps ( float  fps)

Definition at line 1705 of file stand_gui.cpp.

void std_tracker_login ( )

Definition at line 1794 of file stand_gui.cpp.

void std_update_player_ping ( net_player p)

Definition at line 1715 of file stand_gui.cpp.

Variable Documentation

int Lighting_flag

Definition at line 63 of file lighting.cpp.

HWND Multi_std_host_passwd

Definition at line 197 of file stand_gui.cpp.

int Multi_std_namechange_force

Definition at line 198 of file stand_gui.cpp.

int Standalone_ban_count = 0

Definition at line 102 of file stand_gui.cpp.

char Standalone_ban_list[STANDALONE_MAX_BAN][CALLSIGN_LEN+1]

Definition at line 101 of file stand_gui.cpp.

int Standalone_ng_stamp

Definition at line 97 of file stand_gui.cpp.

int Standalone_stats_stamp

Definition at line 94 of file stand_gui.cpp.

HANDLE Standalone_thread

Definition at line 43 of file stand_gui.cpp.

DWORD Standalone_thread_id

Definition at line 44 of file stand_gui.cpp.

char title_str[512]

Definition at line 104 of file stand_gui.cpp.