From: havoc Date: Thu, 24 Jul 2003 20:08:50 +0000 (+0000) Subject: added Battlemech (thanks to Todd for submitting the patch, though I replaced his... X-Git-Tag: xonotic-v0.1.0preview~6489 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=692a1e82f81a5ff3899e1061530882a546654cc6;p=xonotic%2Fdarkplaces.git added Battlemech (thanks to Todd for submitting the patch, though I replaced his quit messages) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3321 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/common.c b/common.c index 6e24a238..9520cb3f 100644 --- a/common.c +++ b/common.c @@ -682,6 +682,8 @@ void COM_InitGameType (void) gamemode = GAME_GOODVSBAD2; else if (strstr(name, "teu")) gamemode = GAME_TEU; + else if (strstr(name, "battlemech")) + gamemode = GAME_BATTLEMECH; else gamemode = GAME_NORMAL; @@ -701,6 +703,8 @@ void COM_InitGameType (void) gamemode = GAME_GOODVSBAD2; else if (COM_CheckParm ("-teu")) gamemode = GAME_TEU; + else if (COM_CheckParm ("-battlemech")) + gamemode = GAME_BATTLEMECH; switch(gamemode) { @@ -736,6 +740,10 @@ void COM_InitGameType (void) gamename = "TheEvilUnleashed"; gamedirname = "teu"; break; + case GAME_BATTLEMECH: + gamename = "Battlemech"; + gamedirname = "battlemech"; + break; default: Sys_Error("COM_InitGameType: unknown gamemode %i\n", gamemode); break; diff --git a/common.h b/common.h index 274f0240..9ba0ff96 100644 --- a/common.h +++ b/common.h @@ -170,6 +170,7 @@ extern struct cvar_s registered; #define GAME_TRANSFUSION 5 #define GAME_GOODVSBAD2 6 #define GAME_TEU 7 +#define GAME_BATTLEMECH 8 extern int gamemode; extern char *gamename; diff --git a/menu.c b/menu.c index 3e5a07c4..b00ba289 100644 --- a/menu.c +++ b/menu.c @@ -570,7 +570,7 @@ void M_SinglePlayer_Draw (void) p = Draw_CachePic ("gfx/ttl_sgl.lmp"); // Transfusion doesn't have a single player mode - if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2) + if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2 || gamemode == GAME_BATTLEMECH) { M_DrawPic ((320 - p->width) / 2, 4, "gfx/ttl_sgl.lmp"); @@ -579,6 +579,8 @@ void M_SinglePlayer_Draw (void) M_PrintWhite (95, 10 * 8, "Nexuiz is for"); else if (gamemode == GAME_GOODVSBAD2) M_PrintWhite (95, 10 * 8, "Good Vs Bad 2 is for"); + else if (gamemode == GAME_BATTLEMECH) + M_PrintWhite (95, 10 * 8, "Battlemech is for"); else M_PrintWhite (95, 10 * 8, "Transfusion is for"); M_PrintWhite (83, 11 * 8, "multiplayer play only"); @@ -599,7 +601,7 @@ void M_SinglePlayer_Draw (void) void M_SinglePlayer_Key (int key) { - if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2) + if (gamemode == GAME_TRANSFUSION || gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2 || gamemode == GAME_BATTLEMECH) { if (key == K_ESCAPE || key == K_ENTER) m_state = m_main; @@ -2334,6 +2336,13 @@ int M_ChooseQuitMessage(int request) if (request-- == 0) return M_QuitMessage("you","want to quit?",NULL,NULL,NULL,NULL,NULL,NULL); if (request-- == 0) return M_QuitMessage("Please stop playing","this stupid game",NULL,NULL,NULL,NULL,NULL,NULL); break; + case GAME_BATTLEMECH: + if (request-- == 0) return M_QuitMessage("WHY","?",NULL,NULL,NULL,NULL,NULL,NULL); + if (request-- == 0) return M_QuitMessage("Leave now and your mech","is scrap!",NULL,NULL,NULL,NULL,NULL,NULL); + if (request-- == 0) return M_QuitMessage("Accept Defeat?",NULL,NULL,NULL,NULL,NULL,NULL,NULL); + if (request-- == 0) return M_QuitMessage("Wait!","There are more mechs to","destroy!",NULL,NULL,NULL,NULL,NULL); + if (request-- == 0) return M_QuitMessage("Where's your bloodlust?",NULL,NULL,NULL,NULL,NULL,NULL,NULL); + break; default: if (request-- == 0) return M_QuitMessage("Tired of fragging already?",NULL,NULL,NULL,NULL,NULL,NULL,NULL); if (request-- == 0) return M_QuitMessage("Quit now and forfeit your bodycount?",NULL,NULL,NULL,NULL,NULL,NULL,NULL); @@ -2863,6 +2872,22 @@ episode_t goodvsbad2episodes[] = {"Levels? Bevels!", 0, 8}, }; +level_t battlemechlevels[] = +{ + {"start", "Parking Level"}, + {"dm1", "Hot Dump"}, // 1 + {"dm2", "The Pits"}, + {"dm3", "Dimber Died"}, + {"dm4", "Fire in the Hole"}, + {"dm5", "Clubhouses"}, + {"dm6", "Army go Underground"}, +}; + +episode_t battlemechepisodes[] = +{ + {"Time for Battle", 0, 7}, +}; + gamelevels_t sharewarequakegame = {"Shareware Quake", quakelevels, quakeepisodes, 2}; gamelevels_t registeredquakegame = {"Quake", quakelevels, quakeepisodes, 7}; gamelevels_t hipnoticgame = {"Scourge of Armagon", hipnoticlevels, hipnoticepisodes, 6}; @@ -2870,6 +2895,7 @@ gamelevels_t roguegame = {"Dissolution of Eternity", roguelevels, rogueepisodes, gamelevels_t nehahragame = {"Nehahra", nehahralevels, nehahraepisodes, 4}; gamelevels_t transfusiongame = {"Transfusion", transfusionlevels, transfusionepisodes, 7}; gamelevels_t goodvsbad2game = {"Good Vs. Bad 2", goodvsbad2levels, goodvsbad2episodes, 1}; +gamelevels_t battlemechgame = {"Battlemech", battlemechlevels, battlemechepisodes, 1}; typedef struct { @@ -2887,6 +2913,7 @@ gameinfo_t gamelist[] = {GAME_NEHAHRA, &nehahragame, &nehahragame}, {GAME_TRANSFUSION, &transfusiongame, &transfusiongame}, {GAME_GOODVSBAD2, &goodvsbad2game, &goodvsbad2game}, + {GAME_BATTLEMECH, &battlemechgame, &battlemechgame}, {-1, &sharewarequakegame, ®isteredquakegame} // final fallback };