diff --git a/doomsday/plugins/common/include/hu_msg.h b/doomsday/plugins/common/include/hu_msg.h index 03621a8302..3b6a783c17 100644 --- a/doomsday/plugins/common/include/hu_msg.h +++ b/doomsday/plugins/common/include/hu_msg.h @@ -1,46 +1,30 @@ -/**\file - *\section License - * License: GPL - * Online License Link: http://www.gnu.org/licenses/gpl.html - * - *\author Copyright © 2005-2012 Jaakko Keränen - *\author Copyright © 2005-2012 Daniel Swanson - *\author Copyright © 1993-1996 by id Software, Inc. +/** + * @file hu_msg.h + * Important state change messages. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * @authors Copyright © 2003-2012 Jaakko Keränen + * @authors Copyright © 2006-2012 Daniel Swanson + * @authors Copyright © 1993-1996 by id Software, Inc. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * @par License + * GPL: http://www.gnu.org/licenses/gpl.html * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -/** - * hu_msg.h: Important state change messages. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. This program is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. You should have received a copy of the GNU + * General Public License along with this program; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA */ -#ifndef __HUD_MESSAGE_H__ -#define __HUD_MESSAGE_H__ +#ifndef LIBCOMMON_HUD_MESSAGE_H +#define LIBCOMMON_HUD_MESSAGE_H -#if __JDOOM__ -# include "jdoom.h" -#elif __JDOOM64__ -# include "jdoom64.h" -#elif __JHERETIC__ -# include "jheretic.h" -#elif __JHEXEN__ -# include "jhexen.h" -#elif __JSTRIFE__ -# include "jstrife.h" -#endif +#include "common.h" typedef enum { MSG_CANCEL = -1, @@ -49,7 +33,7 @@ typedef enum { NUM_MESSAGE_RESPONSES } msgresponse_t; -typedef int (C_DECL *msgfunc_t) (msgresponse_t response, void* context); +typedef int (C_DECL *msgfunc_t) (msgresponse_t response, int userValue, void* userPointer); typedef enum { MSG_ANYKEY, @@ -57,17 +41,43 @@ typedef enum { NUM_MESSAGE_TYPES } msgtype_t; +/** + * Called during the PreInit of each game during start up. + * Register Cvars and CCmds for the important messages. + */ void Hu_MsgRegister(void); + +/** + * Called during init. + */ void Hu_MsgInit(void); + +/** + * Called during engine shutdown. + */ void Hu_MsgShutdown(void); +/** + * Updates on Game Tick. + */ void Hu_MsgTicker(void); + +/** + * If an "any key" message is active, respond to the event. + */ int Hu_MsgResponder(event_t* ev); + +/** + * Draw any active message. + */ void Hu_MsgDrawer(void); boolean Hu_IsMessageActive(void); boolean Hu_IsMessageActiveWithCallback(msgfunc_t callback); -void Hu_MsgStart(msgtype_t type, const char* msg, msgfunc_t callback, void* context); +/** + * Begin a new game state message/question. + */ +void Hu_MsgStart(msgtype_t type, const char* msg, msgfunc_t callback, int userValue, void* userPointer); -#endif +#endif /// LIBCOMMON_HUD_MESSAGE_H diff --git a/doomsday/plugins/common/include/p_savedef.h b/doomsday/plugins/common/include/p_savedef.h index b497beff1f..be31c374a0 100644 --- a/doomsday/plugins/common/include/p_savedef.h +++ b/doomsday/plugins/common/include/p_savedef.h @@ -36,6 +36,8 @@ # define SAVEGAMEEXTENSION "dsg" # define SAVEGAME_DEFAULT_DIR "savegame" +# define REBORN_SLOT 9 + #elif __JDOOM64__ # define MY_SAVE_MAGIC 0x1D6420F4 # define MY_CLIENT_SAVE_MAGIC 0x2D6420F4 @@ -47,6 +49,8 @@ # define SAVEGAMEEXTENSION "6sg" # define SAVEGAME_DEFAULT_DIR "savegame" +# define REBORN_SLOT 9 + #elif __JHERETIC__ # define MY_SAVE_MAGIC 0x7D9A12C5 # define MY_CLIENT_SAVE_MAGIC 0x1062AF43 @@ -58,6 +62,8 @@ # define SAVEGAMEEXTENSION "hsg" # define SAVEGAME_DEFAULT_DIR "savegame" +# define REBORN_SLOT 9 + #elif __JHEXEN__ # define HXS_VERSION_TEXT "HXS Ver " // Do not change me! # define HXS_VERSION_TEXT_LENGTH 16 diff --git a/doomsday/plugins/common/src/g_game.c b/doomsday/plugins/common/src/g_game.c index ce12895b25..88bb5f8b40 100644 --- a/doomsday/plugins/common/src/g_game.c +++ b/doomsday/plugins/common/src/g_game.c @@ -1133,7 +1133,7 @@ void G_StartHelp(void) Con_Message("Warning: InFine script 'help' not defined, ignoring.\n"); } -int G_EndGameResponse(msgresponse_t response, void* context) +int G_EndGameResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { @@ -1155,19 +1155,19 @@ void G_EndGame(void) if(!userGame) { - Hu_MsgStart(MSG_ANYKEY, ENDNOGAME, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, ENDNOGAME, NULL, 0, NULL); return; } /* if(IS_NETGAME) { - Hu_MsgStart(MSG_ANYKEY, NETEND, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, NETEND, NULL, 0, NULL); return; } */ - Hu_MsgStart(MSG_YESNO, IS_CLIENT? GET_TXT(TXT_DISCONNECT) : ENDGAME, G_EndGameResponse, NULL); + Hu_MsgStart(MSG_YESNO, IS_CLIENT? GET_TXT(TXT_DISCONNECT) : ENDGAME, G_EndGameResponse, 0, NULL); } void G_DoLoadMap(void) @@ -2688,7 +2688,7 @@ void G_InitNew(skillmode_t skill, uint episode, uint map) G_DoLoadMap(); } -int G_QuitGameResponse(msgresponse_t response, void* context) +int G_QuitGameResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { @@ -2725,7 +2725,7 @@ void G_QuitGame(void) #endif Con_Open(false); - Hu_MsgStart(MSG_YESNO, endString, G_QuitGameResponse, NULL); + Hu_MsgStart(MSG_YESNO, endString, G_QuitGameResponse, 0, NULL); } /** @@ -3356,11 +3356,11 @@ D_CMD(OpenSaveMenu) return true; } -int loadGameConfirmResponse(msgresponse_t response, void* context) +int loadGameConfirmResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { - const int slot = *(int*)context; + const int slot = userValue; G_LoadGame(slot); } return true; @@ -3377,7 +3377,7 @@ D_CMD(LoadGame) if(IS_NETGAME) { S_LocalSound(SFX_QUICKLOAD_PROMPT, NULL); - Hu_MsgStart(MSG_ANYKEY, QLOADNET, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, QLOADNET, NULL, 0, NULL); return false; } @@ -3399,13 +3399,13 @@ D_CMD(LoadGame) dd_snprintf(buf, 80, QLPROMPT, Str_Text(&info->name)); S_LocalSound(SFX_QUICKLOAD_PROMPT, NULL); - Hu_MsgStart(MSG_YESNO, buf, loadGameConfirmResponse, (void*)&slot); + Hu_MsgStart(MSG_YESNO, buf, loadGameConfirmResponse, slot, 0); return true; } else if(!stricmp(argv[1], "quick") || !stricmp(argv[1], "")) { S_LocalSound(SFX_QUICKLOAD_PROMPT, NULL); - Hu_MsgStart(MSG_ANYKEY, QSAVESPOT, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, QSAVESPOT, NULL, 0, NULL); return true; } @@ -3433,17 +3433,13 @@ D_CMD(QuickLoadGame) return DD_Execute(true, "loadgame quick"); } -typedef struct { - int slot; - const char* name; -} savegameconfirmresponse_params_t; - -int saveGameConfirmResponse(msgresponse_t response, void* context) +int saveGameConfirmResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { - savegameconfirmresponse_params_t* p = (savegameconfirmresponse_params_t*)context; - G_SaveGame2(p->slot, p->name); + const int slot = userValue; + const char* name = (const char*)userPointer; + G_SaveGame2(slot, name); } return true; } @@ -3465,14 +3461,14 @@ D_CMD(SaveGame) if(player->playerState == PST_DEAD || Get(DD_PLAYBACK)) { S_LocalSound(SFX_QUICKSAVE_PROMPT, NULL); - Hu_MsgStart(MSG_ANYKEY, SAVEDEAD, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SAVEDEAD, NULL, 0, NULL); return true; } if(G_GameState() != GS_MAP) { S_LocalSound(SFX_QUICKSAVE_PROMPT, NULL); - Hu_MsgStart(MSG_ANYKEY, SAVEOUTMAP, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SAVEOUTMAP, NULL, 0, NULL); return true; } @@ -3492,15 +3488,11 @@ D_CMD(SaveGame) } { - savegameconfirmresponse_params_t p; const gamesaveinfo_t* info = SV_GameSaveInfoForSlot(slot); dd_snprintf(buf, 80, QSPROMPT, Str_Text(&info->name)); - p.slot = slot; - p.name = name; - S_LocalSound(SFX_QUICKSAVE_PROMPT, NULL); - Hu_MsgStart(MSG_YESNO, buf, saveGameConfirmResponse, (void*)&p); + Hu_MsgStart(MSG_YESNO, buf, saveGameConfirmResponse, slot, (void*)name); } return true; } diff --git a/doomsday/plugins/common/src/hu_menu.c b/doomsday/plugins/common/src/hu_menu.c index c4fe41f72c..691970e5ef 100644 --- a/doomsday/plugins/common/src/hu_menu.c +++ b/doomsday/plugins/common/src/hu_menu.c @@ -3668,13 +3668,13 @@ int Hu_MenuChangeWeaponPriority(mn_object_t* obj, mn_actionid_t action, void* pa return 0; } -int Hu_MenuSelectSingleplayer(mn_object_t* obj, mn_actionid_t action, void* paramaters) +int Hu_MenuSelectSingleplayer(mn_object_t* ob, mn_actionid_t action, void* parameters) { if(MNA_ACTIVEOUT != action) return 1; if(IS_NETGAME) { - Hu_MsgStart(MSG_ANYKEY, NEWGAME, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, NEWGAME, NULL, 0, NULL); return 0; } @@ -3832,28 +3832,28 @@ int Hu_MenuSelectAcceptPlayerSetup(mn_object_t* obj, mn_actionid_t action, void* return 0; } -int Hu_MenuSelectQuitGame(mn_object_t* obj, mn_actionid_t action, void* paramaters) +int Hu_MenuSelectQuitGame(mn_object_t* ob, mn_actionid_t action, void* parameters) { if(MNA_ACTIVEOUT != action) return 1; G_QuitGame(); return 0; } -int Hu_MenuSelectEndGame(mn_object_t* obj, mn_actionid_t action, void* paramaters) +int Hu_MenuSelectEndGame(mn_object_t* ob, mn_actionid_t action, void* parameters) { if(MNA_ACTIVEOUT != action) return 1; G_EndGame(); return 0; } -int Hu_MenuSelectLoadGame(mn_object_t* obj, mn_actionid_t action, void* paramaters) +int Hu_MenuSelectLoadGame(mn_object_t* ob, mn_actionid_t action, void* parameters) { if(MNA_ACTIVEOUT != action) return 1; if(!Get(DD_DEDICATED)) { if(IS_CLIENT && !Get(DD_PLAYBACK)) { - Hu_MsgStart(MSG_ANYKEY, LOADNET, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, LOADNET, NULL, 0, NULL); return 0; } } @@ -3863,7 +3863,7 @@ int Hu_MenuSelectLoadGame(mn_object_t* obj, mn_actionid_t action, void* paramate return 0; } -int Hu_MenuSelectSaveGame(mn_object_t* obj, mn_actionid_t action, void* paramaters) +int Hu_MenuSelectSaveGame(mn_object_t* ob, mn_actionid_t action, void* parameters) { player_t* player = &players[CONSOLEPLAYER]; @@ -3873,20 +3873,20 @@ int Hu_MenuSelectSaveGame(mn_object_t* obj, mn_actionid_t action, void* paramate if(IS_CLIENT) { #if __JDOOM__ || __JDOOM64__ - Hu_MsgStart(MSG_ANYKEY, SAVENET, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SAVENET, NULL, 0, NULL); #endif return 0; } if(G_GameState() != GS_MAP) { - Hu_MsgStart(MSG_ANYKEY, SAVEOUTMAP, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SAVEOUTMAP, NULL, 0, NULL); return 0; } if(player->playerState == PST_DEAD) { - Hu_MsgStart(MSG_ANYKEY, SAVEDEAD, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SAVEDEAD, NULL, 0, NULL); return 0; } } @@ -3982,16 +3982,16 @@ int Hu_MenuFocusEpisode(mn_object_t* obj, mn_actionid_t action, void* paramaters return 0; } -int Hu_MenuConfirmOrderCommericalVersion(msgresponse_t response, void* context) +int Hu_MenuConfirmOrderCommericalVersion(msgresponse_t response, int userValue, void* userPointer) { G_StartHelp(); return true; } -int Hu_MenuActivateNotSharewareEpisode(mn_object_t* obj, mn_actionid_t action, void* paramaters) +int Hu_MenuActivateNotSharewareEpisode(mn_object_t* ob, mn_actionid_t action, void* parameters) { if(MNA_ACTIVEOUT != action) return 1; - Hu_MsgStart(MSG_ANYKEY, SWSTRING, Hu_MenuConfirmOrderCommericalVersion, NULL); + Hu_MsgStart(MSG_ANYKEY, SWSTRING, Hu_MenuConfirmOrderCommericalVersion, 0, NULL); return 0; } #endif @@ -4006,7 +4006,7 @@ int Hu_MenuFocusSkillMode(mn_object_t* obj, mn_actionid_t action, void* paramate } #if __JDOOM__ -int Hu_MenuConfirmInitNewGame(msgresponse_t response, void* context) +int Hu_MenuConfirmInitNewGame(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { @@ -4021,7 +4021,7 @@ void Hu_MenuInitNewGame(boolean confirmed) #if __JDOOM__ if(!confirmed && SM_NIGHTMARE == mnSkillmode) { - Hu_MsgStart(MSG_YESNO, NIGHTMARE, Hu_MenuConfirmInitNewGame, NULL); + Hu_MsgStart(MSG_YESNO, NIGHTMARE, Hu_MenuConfirmInitNewGame, 0, NULL); return; } #endif diff --git a/doomsday/plugins/common/src/hu_msg.c b/doomsday/plugins/common/src/hu_msg.c index 7974a3b9c7..5273bf10fa 100644 --- a/doomsday/plugins/common/src/hu_msg.c +++ b/doomsday/plugins/common/src/hu_msg.c @@ -1,35 +1,27 @@ -/**\file hu_msg.c - *\section License - * License: GPL - * Online License Link: http://www.gnu.org/licenses/gpl.html - * - *\author Copyright © 2003-2012 Jaakko Keränen - *\author Copyright © 2005-2012 Daniel Swanson - *\author Copyright © 2006 Jamie Jones - *\author Copyright © 1993-1996 by id Software, Inc. +/** + * @file hu_msg.c + * Important state change messages. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * @authors Copyright © 2003-2012 Jaakko Keränen + * @authors Copyright © 2006-2012 Daniel Swanson + * @authors Copyright © 2006 Jamie Jones + * @authors Copyright © 1993-1996 by id Software, Inc. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * @par License + * GPL: http://www.gnu.org/licenses/gpl.html * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -/** - * Important state change messages. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. This program is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. You should have received a copy of the GNU + * General Public License along with this program; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA */ -// HEADER FILES ------------------------------------------------------------ - #include #include #include @@ -48,22 +40,8 @@ #include "hu_menu.h" #include "hu_stuff.h" -// MACROS ------------------------------------------------------------------ - -// TYPES ------------------------------------------------------------------- - -// EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- - -// PUBLIC FUNCTION PROTOTYPES ---------------------------------------------- - D_CMD(MsgResponse); -// PRIVATE FUNCTION PROTOTYPES --------------------------------------------- - -// EXTERNAL DATA DECLARATIONS ---------------------------------------------- - -// PUBLIC DATA DEFINITIONS ------------------------------------------------- - ccmdtemplate_t msgCCmds[] = { {"messageyes", "", CCmdMsgResponse}, {"messageno", "", CCmdMsgResponse}, @@ -71,8 +49,6 @@ ccmdtemplate_t msgCCmds[] = { {NULL} }; -// PRIVATE DATA DEFINITIONS ------------------------------------------------ - static boolean awaitingResponse; static int messageToPrint; // 1 = message to be printed. static msgresponse_t messageResponse; @@ -80,16 +56,11 @@ static msgresponse_t messageResponse; static msgtype_t msgType; static msgfunc_t msgCallback; static char* msgText; -static void* msgContext; +static int msgUserValue; +static void* msgUserPointer; static char yesNoMessage[160]; -// CODE -------------------------------------------------------------------- - -/** - * Called during the PreInit of each game during start up. - * Register Cvars and CCmds for the important messages. - */ void Hu_MsgRegister(void) { int i; @@ -98,9 +69,6 @@ void Hu_MsgRegister(void) Con_AddCommand(msgCCmds + i); } -/** - * Called during init. - */ void Hu_MsgInit(void) { awaitingResponse = false; @@ -109,12 +77,10 @@ void Hu_MsgInit(void) msgCallback = NULL; msgText = NULL; - msgContext = NULL; + msgUserValue = 0; + msgUserPointer = NULL; } -/** - * Called during engine shutdown. - */ void Hu_MsgShutdown(void) { if(msgText) @@ -222,9 +188,6 @@ static void drawMessage(void) #undef LEADING } -/** - * Draw any active message. - */ void Hu_MsgDrawer(void) { borderedprojectionstate_t bp; @@ -249,9 +212,6 @@ void Hu_MsgDrawer(void) GL_EndBorderedProjection(&bp); } -/** - * Updates on Game Tick. - */ void Hu_MsgTicker(void) { // Check if there has been a response to a message. @@ -262,12 +222,9 @@ void Hu_MsgTicker(void) stopMessage(); if(msgType != MSG_ANYKEY && msgCallback) - msgCallback(messageResponse, msgContext); + msgCallback(messageResponse, msgUserValue, msgUserPointer); } -/** - * If an "any key" message is active, respond to the event. - */ int Hu_MsgResponder(event_t* ev) { if(!messageToPrint || msgType != MSG_ANYKEY) @@ -295,10 +252,7 @@ boolean Hu_IsMessageActiveWithCallback(msgfunc_t callback) return messageToPrint && msgCallback == callback; } -/** - * Begin a new message. - */ -void Hu_MsgStart(msgtype_t type, const char* msg, msgfunc_t callback, void* context) +void Hu_MsgStart(msgtype_t type, const char* msg, msgfunc_t callback, int userValue, void* userPointer) { assert(msg); @@ -308,7 +262,8 @@ void Hu_MsgStart(msgtype_t type, const char* msg, msgfunc_t callback, void* cont msgType = type; msgCallback = callback; - msgContext = context; + msgUserValue = userValue; + msgUserPointer = userPointer; // Take a copy of the message string. msgText = calloc(1, strlen(msg)+1); diff --git a/doomsday/plugins/jdoom/src/m_cheat.c b/doomsday/plugins/jdoom/src/m_cheat.c index 1799ef05ed..4b6548d7b5 100644 --- a/doomsday/plugins/jdoom/src/m_cheat.c +++ b/doomsday/plugins/jdoom/src/m_cheat.c @@ -651,7 +651,7 @@ D_CMD(CheatNoClip) return true; } -static int suicideResponse(msgresponse_t response, void* context) +static int suicideResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { @@ -698,7 +698,7 @@ D_CMD(CheatSuicide) if(!IS_NETGAME || IS_CLIENT) { - Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, NULL); + Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, 0, NULL); return true; } @@ -707,7 +707,7 @@ D_CMD(CheatSuicide) } else { - Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, 0, NULL); } return true; diff --git a/doomsday/plugins/jdoom64/src/m_cheat.c b/doomsday/plugins/jdoom64/src/m_cheat.c index 30ee445b1c..dd99e5f66c 100644 --- a/doomsday/plugins/jdoom64/src/m_cheat.c +++ b/doomsday/plugins/jdoom64/src/m_cheat.c @@ -341,7 +341,7 @@ D_CMD(CheatNoClip) return true; } -static int suicideResponse(msgresponse_t response, void* context) +static int suicideResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { @@ -380,7 +380,7 @@ D_CMD(CheatSuicide) if(!IS_NETGAME || IS_CLIENT) { - Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, NULL); + Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, 0, NULL); return true; } @@ -389,7 +389,7 @@ D_CMD(CheatSuicide) } else { - Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, 0, NULL); } return true; diff --git a/doomsday/plugins/jheretic/src/m_cheat.c b/doomsday/plugins/jheretic/src/m_cheat.c index 48180937c8..519c06b816 100644 --- a/doomsday/plugins/jheretic/src/m_cheat.c +++ b/doomsday/plugins/jheretic/src/m_cheat.c @@ -721,7 +721,7 @@ D_CMD(CheatNoClip) return true; } -static int suicideResponse(msgresponse_t response, void* context) +static int suicideResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { @@ -765,7 +765,7 @@ D_CMD(CheatSuicide) if(!IS_NETGAME || IS_CLIENT) { - Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, NULL); + Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, 0, NULL); return true; } @@ -774,7 +774,7 @@ D_CMD(CheatSuicide) } else { - Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, 0, NULL); } return true; diff --git a/doomsday/plugins/jhexen/src/m_cheat.c b/doomsday/plugins/jhexen/src/m_cheat.c index 360948e563..c6b34d76be 100644 --- a/doomsday/plugins/jhexen/src/m_cheat.c +++ b/doomsday/plugins/jhexen/src/m_cheat.c @@ -945,7 +945,7 @@ D_CMD(CheatNoClip) return true; } -static int suicideResponse(msgresponse_t response, void* context) +static int suicideResponse(msgresponse_t response, int userValue, void* userPointer) { if(response == MSG_YES) { @@ -989,7 +989,7 @@ D_CMD(CheatSuicide) if(!IS_NETGAME || IS_CLIENT) { - Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, NULL); + Hu_MsgStart(MSG_YESNO, SUICIDEASK, suicideResponse, 0, NULL); return true; } @@ -998,7 +998,7 @@ D_CMD(CheatSuicide) } else { - Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, NULL); + Hu_MsgStart(MSG_ANYKEY, SUICIDEOUTMAP, NULL, 0, NULL); } return true;