diff options
Diffstat (limited to 'apps/plugins/doom/m_menu.c')
-rw-r--r-- | apps/plugins/doom/m_menu.c | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/apps/plugins/doom/m_menu.c b/apps/plugins/doom/m_menu.c index 415ca0852e..14d8474cbf 100644 --- a/apps/plugins/doom/m_menu.c +++ b/apps/plugins/doom/m_menu.c | |||
@@ -16,7 +16,10 @@ | |||
16 | // GNU General Public License for more details. | 16 | // GNU General Public License for more details. |
17 | // | 17 | // |
18 | // $Log$ | 18 | // $Log$ |
19 | // Revision 1.6 2006/04/16 23:14:04 kkurbjun | 19 | // Revision 1.7 2006/12/13 04:44:17 kkurbjun |
20 | // Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet). | ||
21 | // | ||
22 | // Revision 1.6 2006-04-16 23:14:04 kkurbjun | ||
20 | // Fix run so that it stays enabled across level loads. Removed some unused code and added some back in for hopeful future use. | 23 | // Fix run so that it stays enabled across level loads. Removed some unused code and added some back in for hopeful future use. |
21 | // | 24 | // |
22 | // Revision 1.5 2006-04-04 23:58:37 kkurbjun | 25 | // Revision 1.5 2006-04-04 23:58:37 kkurbjun |
@@ -53,7 +56,7 @@ | |||
53 | #include "w_wad.h" | 56 | #include "w_wad.h" |
54 | 57 | ||
55 | #include "r_main.h" | 58 | #include "r_main.h" |
56 | 59 | #include "d_deh.h" | |
57 | #include "hu_stuff.h" | 60 | #include "hu_stuff.h" |
58 | 61 | ||
59 | #include "g_game.h" | 62 | #include "g_game.h" |
@@ -96,7 +99,7 @@ int quickSaveSlot; | |||
96 | // 1 = message to be printed | 99 | // 1 = message to be printed |
97 | int messageToPrint; | 100 | int messageToPrint; |
98 | // ...and here is the message string! | 101 | // ...and here is the message string! |
99 | char* messageString; | 102 | const char* messageString; |
100 | 103 | ||
101 | // message x & y | 104 | // message x & y |
102 | int messx; | 105 | int messx; |
@@ -110,15 +113,6 @@ void (*messageRoutine)(int response); | |||
110 | 113 | ||
111 | #define SAVESTRINGSIZE 24 | 114 | #define SAVESTRINGSIZE 24 |
112 | 115 | ||
113 | char gammamsg[5][26] = | ||
114 | { | ||
115 | GAMMALVL0, | ||
116 | GAMMALVL1, | ||
117 | GAMMALVL2, | ||
118 | GAMMALVL3, | ||
119 | GAMMALVL4 | ||
120 | }; | ||
121 | |||
122 | // we are going to be entering a savegame string | 116 | // we are going to be entering a savegame string |
123 | int saveStringEnter; | 117 | int saveStringEnter; |
124 | int saveSlot; // which slot to save in | 118 | int saveSlot; // which slot to save in |
@@ -233,7 +227,7 @@ void M_WriteText(int x, int y, char *string); | |||
233 | int M_StringWidth(const char* string); | 227 | int M_StringWidth(const char* string); |
234 | int M_StringHeight(const char* string); | 228 | int M_StringHeight(const char* string); |
235 | void M_StartControlPanel(void); | 229 | void M_StartControlPanel(void); |
236 | void M_StartMessage(char *string,void *routine,boolean input); | 230 | void M_StartMessage(const char *string,void *routine,boolean input); |
237 | void M_StopMessage(void); | 231 | void M_StopMessage(void); |
238 | void M_ClearMenus (void); | 232 | void M_ClearMenus (void); |
239 | 233 | ||
@@ -657,11 +651,11 @@ void M_SaveSelect(int choice) | |||
657 | saveSlot = choice; | 651 | saveSlot = choice; |
658 | snprintf(savegamestrings[choice], sizeof(savegamestrings[choice]), | 652 | snprintf(savegamestrings[choice], sizeof(savegamestrings[choice]), |
659 | (gamemode==shareware||gamemode==registered||gamemode==retail) ? | 653 | (gamemode==shareware||gamemode==registered||gamemode==retail) ? |
660 | mapnames[(gameepisode-1)*9+gamemap-1] : (gamemission==doom2) ? | 654 | *mapnames[(gameepisode-1)*9+gamemap-1] : (gamemission==doom2) ? |
661 | mapnames2[gamemap-1] : (gamemission==pack_plut) ? | 655 | *mapnames2[gamemap-1] : (gamemission==pack_plut) ? |
662 | mapnamesp[gamemap-1] : (gamemission==pack_tnt) ? | 656 | *mapnamesp[gamemap-1] : (gamemission==pack_tnt) ? |
663 | mapnamest[gamemap-1] : "Unknown Location", choice); | 657 | *mapnamest[gamemap-1] : "Unknown Location", choice); |
664 | if (!strcmp(savegamestrings[choice],EMPTYSTRING)) | 658 | if (!strcmp(savegamestrings[choice],s_EMPTYSTRING)) |
665 | savegamestrings[choice][0] = 0; | 659 | savegamestrings[choice][0] = 0; |
666 | saveCharIndex = strlen(savegamestrings[choice]); | 660 | saveCharIndex = strlen(savegamestrings[choice]); |
667 | } | 661 | } |
@@ -674,7 +668,7 @@ void M_SaveGame (int choice) | |||
674 | (void)choice; | 668 | (void)choice; |
675 | if (!usergame) | 669 | if (!usergame) |
676 | { | 670 | { |
677 | M_StartMessage(SAVEDEAD,NULL,false); | 671 | M_StartMessage(s_SAVEDEAD,NULL,false); |
678 | return; | 672 | return; |
679 | } | 673 | } |
680 | 674 | ||
@@ -722,7 +716,7 @@ void M_QuickSave(void) | |||
722 | quickSaveSlot = -2; // means to pick a slot now | 716 | quickSaveSlot = -2; // means to pick a slot now |
723 | return; | 717 | return; |
724 | } | 718 | } |
725 | snprintf(tempstring,sizeof(tempstring),QSPROMPT,savegamestrings[quickSaveSlot]); | 719 | snprintf(tempstring,sizeof(tempstring),s_QSPROMPT,savegamestrings[quickSaveSlot]); |
726 | M_StartMessage(tempstring,M_QuickSaveResponse,true); | 720 | M_StartMessage(tempstring,M_QuickSaveResponse,true); |
727 | } | 721 | } |
728 | 722 | ||
@@ -917,7 +911,7 @@ void M_NewGame(int choice) | |||
917 | (void) choice; | 911 | (void) choice; |
918 | if (netgame && !demoplayback) | 912 | if (netgame && !demoplayback) |
919 | { | 913 | { |
920 | M_StartMessage(NEWGAME,NULL,false); | 914 | M_StartMessage(s_NEWGAME,NULL,false); |
921 | return; | 915 | return; |
922 | } | 916 | } |
923 | 917 | ||
@@ -952,7 +946,7 @@ void M_ChooseSkill(int choice) | |||
952 | { | 946 | { |
953 | if (choice == nightmare) | 947 | if (choice == nightmare) |
954 | { | 948 | { |
955 | M_StartMessage(NIGHTMARE,M_VerifyNightmare,true); | 949 | M_StartMessage(s_NIGHTMARE,M_VerifyNightmare,true); |
956 | return; | 950 | return; |
957 | } | 951 | } |
958 | 952 | ||
@@ -969,7 +963,7 @@ void M_Episode(int choice) | |||
969 | if ( (gamemode == shareware) | 963 | if ( (gamemode == shareware) |
970 | && choice) | 964 | && choice) |
971 | { | 965 | { |
972 | M_StartMessage(SWSTRING,NULL,false); | 966 | M_StartMessage(s_SWSTRING,NULL,false); // Ty 03/27/98 - externalized |
973 | M_SetupNextMenu(&ReadDef1); | 967 | M_SetupNextMenu(&ReadDef1); |
974 | return; | 968 | return; |
975 | } | 969 | } |
@@ -1030,9 +1024,9 @@ void M_ChangeMessages(int choice) | |||
1030 | showMessages = 1 - showMessages; | 1024 | showMessages = 1 - showMessages; |
1031 | 1025 | ||
1032 | if (!showMessages) | 1026 | if (!showMessages) |
1033 | players[consoleplayer].message = MSGOFF; | 1027 | players[consoleplayer].message = s_MSGOFF; |
1034 | else | 1028 | else |
1035 | players[consoleplayer].message = MSGON ; | 1029 | players[consoleplayer].message = s_MSGON ; |
1036 | 1030 | ||
1037 | message_dontfuckwithme = true; | 1031 | message_dontfuckwithme = true; |
1038 | } | 1032 | } |
@@ -1066,11 +1060,11 @@ void M_EndGame(int choice) | |||
1066 | 1060 | ||
1067 | if (netgame) | 1061 | if (netgame) |
1068 | { | 1062 | { |
1069 | M_StartMessage(NETEND,NULL,false); | 1063 | M_StartMessage(s_NETEND,NULL,false); |
1070 | return; | 1064 | return; |
1071 | } | 1065 | } |
1072 | 1066 | ||
1073 | M_StartMessage(ENDGAME,M_EndGameResponse,true); | 1067 | M_StartMessage(s_ENDGAME,M_EndGameResponse,true); |
1074 | } | 1068 | } |
1075 | 1069 | ||
1076 | 1070 | ||
@@ -1153,9 +1147,9 @@ void M_QuitDOOM(int choice) | |||
1153 | // We pick index 0 which is language sensitive, | 1147 | // We pick index 0 which is language sensitive, |
1154 | // or one at random, between 1 and maximum number. | 1148 | // or one at random, between 1 and maximum number. |
1155 | if (language != english ) | 1149 | if (language != english ) |
1156 | snprintf(endstring,sizeof(endstring),"%s\n\n"DOSY, endmsg[0] ); | 1150 | snprintf(endstring,sizeof(endstring),"%s\n\n%s",s_DOSY, endmsg[0] ); |
1157 | else | 1151 | else |
1158 | snprintf(endstring,sizeof(endstring),"%s\n\n%s", endmsg[gametic%(NUM_QUITMESSAGES-1)+1], DOSY); | 1152 | snprintf(endstring,sizeof(endstring),"%s\n\n%s", endmsg[gametic%(NUM_QUITMESSAGES-1)+1], s_DOSY); |
1159 | 1153 | ||
1160 | M_StartMessage(endstring,M_QuitResponse,true); | 1154 | M_StartMessage(endstring,M_QuitResponse,true); |
1161 | } | 1155 | } |
@@ -1256,7 +1250,7 @@ M_DrawSelCell | |||
1256 | 1250 | ||
1257 | void | 1251 | void |
1258 | M_StartMessage | 1252 | M_StartMessage |
1259 | ( char* string, | 1253 | ( const char* string, |
1260 | void* routine, | 1254 | void* routine, |
1261 | boolean input ) | 1255 | boolean input ) |
1262 | { | 1256 | { |