Make unused_newmenu_userdata_t const
This commit is contained in:
parent
1312008dca
commit
7c76c68255
|
@ -267,8 +267,8 @@ void multi_consistency_error(int reset);
|
||||||
void multi_prep_level(void);
|
void multi_prep_level(void);
|
||||||
int multi_level_sync(void);
|
int multi_level_sync(void);
|
||||||
int multi_endlevel(int *secret);
|
int multi_endlevel(int *secret);
|
||||||
int multi_endlevel_poll1(newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata);
|
int multi_endlevel_poll1(newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *);
|
||||||
int multi_endlevel_poll2( newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata );
|
int multi_endlevel_poll2( newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *);
|
||||||
void multi_send_endlevel_packet();
|
void multi_send_endlevel_packet();
|
||||||
void multi_leave_game(void);
|
void multi_leave_game(void);
|
||||||
void multi_process_bigdata(playernum_t pnum, const ubyte *buf, uint_fast32_t len);
|
void multi_process_bigdata(playernum_t pnum, const ubyte *buf, uint_fast32_t len);
|
||||||
|
|
|
@ -26,8 +26,8 @@ void net_udp_do_frame(int force, int listen);
|
||||||
void net_udp_send_data(const ubyte * ptr, int len, int priority );
|
void net_udp_send_data(const ubyte * ptr, int len, int priority );
|
||||||
void net_udp_leave_game();
|
void net_udp_leave_game();
|
||||||
int net_udp_endlevel(int *secret);
|
int net_udp_endlevel(int *secret);
|
||||||
int net_udp_kmatrix_poll1( newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata );
|
int net_udp_kmatrix_poll1( newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *);
|
||||||
int net_udp_kmatrix_poll2( newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata );
|
int net_udp_kmatrix_poll2( newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *);
|
||||||
void net_udp_send_endlevel_packet();
|
void net_udp_send_endlevel_packet();
|
||||||
void net_udp_dump_player(struct _sockaddr dump_addr, int why);
|
void net_udp_dump_player(struct _sockaddr dump_addr, int why);
|
||||||
void net_udp_disconnect_player(int playernum);
|
void net_udp_disconnect_player(int playernum);
|
||||||
|
|
|
@ -74,8 +74,8 @@ public:
|
||||||
typedef newmenu_subfunction_t<void>::type newmenu_subfunction;
|
typedef newmenu_subfunction_t<void>::type newmenu_subfunction;
|
||||||
|
|
||||||
class unused_newmenu_userdata_t;
|
class unused_newmenu_userdata_t;
|
||||||
static const newmenu_subfunction_t<unused_newmenu_userdata_t>::type unused_newmenu_subfunction = NULL;
|
static const newmenu_subfunction_t<const unused_newmenu_userdata_t>::type unused_newmenu_subfunction = nullptr;
|
||||||
static unused_newmenu_userdata_t *const unused_newmenu_userdata = NULL;
|
static const unused_newmenu_userdata_t *const unused_newmenu_userdata = nullptr;
|
||||||
|
|
||||||
int newmenu_do2(const char *title, const char *subtitle, int nitems, newmenu_item *item, newmenu_subfunction subfunction, void *userdata, int citem, const char *filename);
|
int newmenu_do2(const char *title, const char *subtitle, int nitems, newmenu_item *item, newmenu_subfunction subfunction, void *userdata, int citem, const char *filename);
|
||||||
|
|
||||||
|
|
|
@ -792,7 +792,7 @@ void full_palette_save(void)
|
||||||
#define EXT_MUSIC_TEXT "Audio CD"
|
#define EXT_MUSIC_TEXT "Audio CD"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int free_help(newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata)
|
static int free_help(newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
if (event.type == EVENT_WINDOW_CLOSE)
|
if (event.type == EVENT_WINDOW_CLOSE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -864,7 +864,7 @@ static void change_res();
|
||||||
static void graphics_config();
|
static void graphics_config();
|
||||||
static void do_misc_menu();
|
static void do_misc_menu();
|
||||||
|
|
||||||
static int options_menuset(newmenu *menu,const d_event &event, unused_newmenu_userdata_t *)
|
static int options_menuset(newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
switch (event.type)
|
switch (event.type)
|
||||||
{
|
{
|
||||||
|
@ -1064,7 +1064,7 @@ static void input_config_sensitivity()
|
||||||
}
|
}
|
||||||
|
|
||||||
static int opt_ic_usejoy = 0, opt_ic_usemouse = 0, opt_ic_confkey = 0, opt_ic_confjoy = 0, opt_ic_confmouse = 0, opt_ic_confweap = 0, opt_ic_mouseflightsim = 0, opt_ic_joymousesens = 0, opt_ic_grabinput = 0, opt_ic_mousefsgauge = 0, opt_ic_help0 = 0, opt_ic_help1 = 0, opt_ic_help2 = 0;
|
static int opt_ic_usejoy = 0, opt_ic_usemouse = 0, opt_ic_confkey = 0, opt_ic_confjoy = 0, opt_ic_confmouse = 0, opt_ic_confweap = 0, opt_ic_mouseflightsim = 0, opt_ic_joymousesens = 0, opt_ic_grabinput = 0, opt_ic_mousefsgauge = 0, opt_ic_help0 = 0, opt_ic_help1 = 0, opt_ic_help2 = 0;
|
||||||
static int input_config_menuset(newmenu *menu,const d_event &event, unused_newmenu_userdata_t *)
|
static int input_config_menuset(newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
newmenu_item *items = newmenu_get_items(menu);
|
newmenu_item *items = newmenu_get_items(menu);
|
||||||
int citem = newmenu_get_citem(menu);
|
int citem = newmenu_get_citem(menu);
|
||||||
|
@ -1214,7 +1214,7 @@ int opt_gr_texfilt, opt_gr_brightness, opt_gr_reticlemenu, opt_gr_alphafx, opt_g
|
||||||
#if defined(DXX_BUILD_DESCENT_II)
|
#if defined(DXX_BUILD_DESCENT_II)
|
||||||
int opt_gr_movietexfilt;
|
int opt_gr_movietexfilt;
|
||||||
#endif
|
#endif
|
||||||
static int graphics_config_menuset(newmenu *menu,const d_event &event, unused_newmenu_userdata_t *)
|
static int graphics_config_menuset(newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
newmenu_item *items = newmenu_get_items(menu);
|
newmenu_item *items = newmenu_get_items(menu);
|
||||||
int citem = newmenu_get_citem(menu);
|
int citem = newmenu_get_citem(menu);
|
||||||
|
@ -1597,7 +1597,7 @@ static int get_absolute_path(char *full_path, const char *rel_path)
|
||||||
#define SELECT_SONG(t, s) select_file_recursive(t, GameCfg.CMMiscMusic[s], jukebox_exts, 0, get_absolute_path, GameCfg.CMMiscMusic[s])
|
#define SELECT_SONG(t, s) select_file_recursive(t, GameCfg.CMMiscMusic[s], jukebox_exts, 0, get_absolute_path, GameCfg.CMMiscMusic[s])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int sound_menuset(newmenu *menu,const d_event &event, unused_newmenu_userdata_t *)
|
static int sound_menuset(newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
newmenu_item *items = newmenu_get_items(menu);
|
newmenu_item *items = newmenu_get_items(menu);
|
||||||
int citem = newmenu_get_citem(menu);
|
int citem = newmenu_get_citem(menu);
|
||||||
|
@ -2173,7 +2173,7 @@ static void gamebitmaps_viewer()
|
||||||
event_process();
|
event_process();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sandbox_menuset(newmenu *menu,const d_event &event, unused_newmenu_userdata_t *)
|
static int sandbox_menuset(newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
switch (event.type)
|
switch (event.type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -988,7 +988,7 @@ multi_endlevel(int *secret)
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
int multi_endlevel_poll1( newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata )
|
int multi_endlevel_poll1( newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *userdata)
|
||||||
{
|
{
|
||||||
switch (multi_protocol)
|
switch (multi_protocol)
|
||||||
{
|
{
|
||||||
|
@ -1005,7 +1005,7 @@ int multi_endlevel_poll1( newmenu *menu,const d_event &event, unused_newmenu_use
|
||||||
return 0; // kill warning
|
return 0; // kill warning
|
||||||
}
|
}
|
||||||
|
|
||||||
int multi_endlevel_poll2( newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata )
|
int multi_endlevel_poll2( newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *userdata)
|
||||||
{
|
{
|
||||||
switch (multi_protocol)
|
switch (multi_protocol)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,7 +97,7 @@ static void net_udp_noloss_process_queue(fix64 time);
|
||||||
static void net_udp_send_extras ();
|
static void net_udp_send_extras ();
|
||||||
static void net_udp_broadcast_game_info(ubyte info_upid);
|
static void net_udp_broadcast_game_info(ubyte info_upid);
|
||||||
static void net_udp_process_game_info(ubyte *data, int data_len, struct _sockaddr game_addr, int lite_info);
|
static void net_udp_process_game_info(ubyte *data, int data_len, struct _sockaddr game_addr, int lite_info);
|
||||||
static int net_udp_more_options_handler( newmenu *menu,const d_event &event, unused_newmenu_userdata_t *userdata );
|
static int net_udp_more_options_handler( newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *);
|
||||||
static int net_udp_start_game(void);
|
static int net_udp_start_game(void);
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
|
@ -1102,7 +1102,7 @@ void net_udp_close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send PID_ENDLEVEL in regular intervals and listen for them (host also does the packets for playing clients)
|
// Send PID_ENDLEVEL in regular intervals and listen for them (host also does the packets for playing clients)
|
||||||
int net_udp_kmatrix_poll1( newmenu *,const d_event &event, unused_newmenu_userdata_t *)
|
int net_udp_kmatrix_poll1( newmenu *,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
// Polling loop for End-of-level menu
|
// Polling loop for End-of-level menu
|
||||||
if (event.type != EVENT_WINDOW_DRAW)
|
if (event.type != EVENT_WINDOW_DRAW)
|
||||||
|
@ -1113,7 +1113,7 @@ int net_udp_kmatrix_poll1( newmenu *,const d_event &event, unused_newmenu_userda
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same as above but used when player pressed ESC during kmatrix (host also does the packets for playing clients)
|
// Same as above but used when player pressed ESC during kmatrix (host also does the packets for playing clients)
|
||||||
int net_udp_kmatrix_poll2( newmenu *,const d_event &event, unused_newmenu_userdata_t *)
|
int net_udp_kmatrix_poll2( newmenu *,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
int rval = 0;
|
int rval = 0;
|
||||||
|
|
||||||
|
@ -2770,7 +2770,7 @@ void net_udp_read_endlevel_packet( ubyte *data, int data_len, struct _sockaddr s
|
||||||
/*
|
/*
|
||||||
* Polling loop waiting for sync packet to start game after having sent request
|
* Polling loop waiting for sync packet to start game after having sent request
|
||||||
*/
|
*/
|
||||||
static int net_udp_sync_poll( newmenu *,const d_event &event, unused_newmenu_userdata_t *)
|
static int net_udp_sync_poll( newmenu *,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
static fix64 t1 = 0;
|
static fix64 t1 = 0;
|
||||||
int rval = 0;
|
int rval = 0;
|
||||||
|
@ -2986,7 +2986,7 @@ menu:
|
||||||
Difficulty_level = Netgame.difficulty;
|
Difficulty_level = Netgame.difficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int net_udp_more_options_handler( newmenu *menu,const d_event &event, unused_newmenu_userdata_t *)
|
static int net_udp_more_options_handler( newmenu *menu,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
newmenu_item *menus = newmenu_get_items(menu);
|
newmenu_item *menus = newmenu_get_items(menu);
|
||||||
int citem = newmenu_get_citem(menu);
|
int citem = newmenu_get_citem(menu);
|
||||||
|
@ -3809,7 +3809,7 @@ static int net_udp_wait_for_sync(void)
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int net_udp_request_poll( newmenu *,const d_event &event, unused_newmenu_userdata_t *)
|
static int net_udp_request_poll( newmenu *,const d_event &event, const unused_newmenu_userdata_t *)
|
||||||
{
|
{
|
||||||
// Polling loop for waiting-for-requests menu
|
// Polling loop for waiting-for-requests menu
|
||||||
int num_ready = 0;
|
int num_ready = 0;
|
||||||
|
|
Loading…
Reference in a new issue