void M_SinglePlayer_Draw (void)
{
- int f;
cachepic_t *p;
M_DrawPic (16, 4, "gfx/qplaque.lmp");
p = Draw_CachePic ("gfx/ttl_sgl.lmp");
- M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_sgl.lmp");
- M_DrawPic (72, 32, "gfx/sp_menu.lmp");
- f = (int)(realtime * 10)%6;
+ // BloodBath doesn't have a single player mode
+ if (gamemode == GAME_BLOODBATH)
+ {
+ M_DrawPic ((320 - p->width) / 2, 4, "gfx/ttl_sgl.lmp");
+
+ M_DrawTextBox (60, 8 * 8, 23, 4);
+ M_PrintWhite (102, 10 * 8, "BloodBath is for");
+ M_PrintWhite (83, 11 * 8, "multiplayer play only");
+ }
+ else
+ {
+ int f;
+
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_sgl.lmp");
+ M_DrawPic (72, 32, "gfx/sp_menu.lmp");
+
+ f = (int)(realtime * 10)%6;
- M_DrawPic (54, 32 + m_singleplayer_cursor * 20, va("gfx/menudot%i.lmp", f+1));
+ M_DrawPic (54, 32 + m_singleplayer_cursor * 20, va("gfx/menudot%i.lmp", f+1));
+ }
}
void M_SinglePlayer_Key (int key)
{
+ if (gamemode == GAME_BLOODBATH)
+ {
+ if (key == K_ESCAPE || key == K_ENTER)
+ m_state = m_main;
+ return;
+ }
+
switch (key)
{
case K_ESCAPE:
char *bindnames[][2] =
{
{"+attack", "attack"},
-{"impulse 10", "change weapon"},
+{"impulse 10", "next weapon"},
+{"impulse 12", "previous weapon"},
{"+jump", "jump / swim up"},
{"+forward", "walk forward"},
{"+back", "backpedal"},
#define NUMCOMMANDS (sizeof(bindnames)/sizeof(bindnames[0]))
+/*
+typedef struct binditem_s
+{
+ char *command, *description;
+ struct binditem_s *next;
+}
+binditem_t;
+
+typedef struct bindcategory_s
+{
+ char *name;
+ binditem_t *binds;
+ struct bindcategory_s *next;
+}
+bindcategory_t;
+
+bindcategory_t *bindcategories = NULL;
+
+void M_ClearBinds (void)
+{
+ for (c = bindcategories;c;c = cnext)
+ {
+ cnext = c->next;
+ for (b = c->binds;b;b = bnext)
+ {
+ bnext = b->next;
+ Z_Free(b);
+ }
+ Z_Free(c);
+ }
+ bindcategories = NULL;
+}
+
+void M_AddBindToCategory(bindcategory_t *c, char *command, char *description)
+{
+ for (b = &c->binds;*b;*b = &(*b)->next);
+ *b = Z_Alloc(sizeof(binditem_t) + strlen(command) + 1 + strlen(description) + 1);
+ *b->command = (char *)((*b) + 1);
+ *b->description = *b->command + strlen(command) + 1;
+ strcpy(*b->command, command);
+ strcpy(*b->description, description);
+}
+
+void M_AddBind (char *category, char *command, char *description)
+{
+ for (c = &bindcategories;*c;c = &(*c)->next)
+ {
+ if (!strcmp(category, (*c)->name))
+ {
+ M_AddBindToCategory(*c, command, description);
+ return;
+ }
+ }
+ *c = Z_Alloc(sizeof(bindcategory_t));
+ M_AddBindToCategory(*c, command, description);
+}
+
+void M_DefaultBinds (void)
+{
+ M_ClearBinds();
+ M_AddBind("movement", "+jump", "jump / swim up");
+ M_AddBind("movement", "+forward", "walk forward");
+ M_AddBind("movement", "+back", "backpedal");
+ M_AddBind("movement", "+left", "turn left");
+ M_AddBind("movement", "+right", "turn right");
+ M_AddBind("movement", "+speed", "run");
+ M_AddBind("movement", "+moveleft", "step left");
+ M_AddBind("movement", "+moveright", "step right");
+ M_AddBind("movement", "+strafe", "sidestep");
+ M_AddBind("movement", "+lookup", "look up");
+ M_AddBind("movement", "+lookdown", "look down");
+ M_AddBind("movement", "centerview", "center view");
+ M_AddBind("movement", "+mlook", "mouse look");
+ M_AddBind("movement", "+klook", "keyboard look");
+ M_AddBind("movement", "+moveup", "swim up");
+ M_AddBind("movement", "+movedown", "swim down");
+ M_AddBind("weapons", "+attack", "attack");
+ M_AddBind("weapons", "impulse 10", "next weapon");
+ M_AddBind("weapons", "impulse 12", "previous weapon");
+ M_AddBind("weapons", "impulse 1", "select weapon 1 (axe)");
+ M_AddBind("weapons", "impulse 2", "select weapon 2 (shotgun)");
+ M_AddBind("weapons", "impulse 3", "select weapon 3 (super )");
+ M_AddBind("weapons", "impulse 4", "select weapon 4 (nailgun)");
+ M_AddBind("weapons", "impulse 5", "select weapon 5 (super nailgun)");
+ M_AddBind("weapons", "impulse 6", "select weapon 6 (grenade launcher)");
+ M_AddBind("weapons", "impulse 7", "select weapon 7 (rocket launcher)");
+ M_AddBind("weapons", "impulse 8", "select weapon 8 (lightning gun)");
+}
+*/
+
+
int keys_cursor;
int bind_grab;
m_entersound = true;
}
+#define NUMKEYS 5
-void M_FindKeysForCommand (char *command, int *twokeys)
+void M_FindKeysForCommand (char *command, int *keys)
{
int count;
int j;
char *b;
- twokeys[0] = twokeys[1] = -1;
+ for (j = 0;j < NUMKEYS;j++)
+ keys[j] = -1;
+
count = 0;
for (j=0 ; j<256 ; j++)
continue;
if (!strcmp (b, command) )
{
- twokeys[count] = j;
- count++;
- if (count == 2)
+ keys[count++] = j;
+ if (count == NUMKEYS)
break;
}
}
void M_Keys_Draw (void)
{
- int i, l;
- int keys[2];
- char *name;
- int x, y;
+ int i, j;
+ int keys[NUMKEYS];
+ int y;
cachepic_t *p;
+ char keystring[1024];
p = Draw_CachePic ("gfx/ttl_cstm.lmp");
M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_cstm.lmp");
M_Print (16, y, bindnames[i][1]);
- l = strlen (bindnames[i][0]);
-
M_FindKeysForCommand (bindnames[i][0], keys);
+ // LordHavoc: redesigned to print more than 2 keys, inspired by Tomaz's MiniRacer
if (keys[0] == -1)
- {
- M_Print (140, y, "???");
- }
+ strcpy(keystring, "???");
else
{
- name = Key_KeynumToString (keys[0]);
- M_Print (140, y, name);
- x = strlen(name) * 8;
- if (keys[1] != -1)
+ keystring[0] = 0;
+ for (j = 0;j < NUMKEYS;j++)
{
- M_Print (140 + x + 8, y, "or");
- M_Print (140 + x + 32, y, Key_KeynumToString (keys[1]));
+ if (keys[j] != -1)
+ {
+ if (j > 0)
+ strcat(keystring, " or ");
+ strcat(keystring, Key_KeynumToString (keys[j]));
+ }
}
}
+ M_Print (140, y, keystring);
}
if (bind_grab)
void M_Keys_Key (int k)
{
char cmd[80];
- int keys[2];
+ int keys[NUMKEYS];
if (bind_grab)
{ // defining a key
{
bind_grab = false;
}
- else if (k != '`')
+ else //if (k != '`')
{
sprintf (cmd, "bind \"%s\" \"%s\"\n", Key_KeynumToString (k), bindnames[keys_cursor][0]);
Cbuf_InsertText (cmd);
case K_ENTER: // go into bind mode
M_FindKeysForCommand (bindnames[keys_cursor][0], keys);
S_LocalSound ("misc/menu2.wav");
- if (keys[1] != -1)
+ if (keys[NUMKEYS - 1] != -1)
M_UnbindCommand (bindnames[keys_cursor][0]);
bind_grab = true;
break;
" for trying to quit! ",
" Press Y to get ",
" smacked out. ",
-
+
" Press Y to quit like a ",
" big loser in life. ",
" Press N to stay proud ",
{"Dimension of the Lost", 17, 2}
};
-// these are placeholders for bloodbath developers to fill in more correctly
+// Map list for BloodBath
level_t bloodbathlevels[] =
{
- {"start", "Welcome to BloodBath"},
- {"bb1m1", "Level 1"}
+ {"bb1", "The Stronghold"},
+ {"bb2", "Winter Wonderland"},
+ {"bb3", "Bodies"},
+ {"bb4", "The Tower"},
+ {"bb5", "Click!"},
+ {"bb7", "Midgard"},
+ {"bb8", "Fun With Heads"},
+
+ {"dm1", "Monolith Building #11"},
+ {"dm2", "Power!"},
+ {"dm3", "Area 15"},
+
+ {"cpbb01", "Crypt of Despair"},
+ {"cpbb03", "Unholy Cathedral"},
+
+ {"b2a15", "A15"},
+ {"barena", "Blood Arena"},
+ {"bkeep", "Blood Keep"},
+ {"bstar", "Brownstar"},
+ {"crypt", "The Crypt"},
+
+ {"bb3_2k1", "Bodies Infusion"},
+ {"qbb1", "The Confluence"},
+ {"qbb2", "Kathartic"},
+ {"qbb3", "Caleb's Woodland Retreat"},
+ {"qe1m7", "The House of Chthon"}
};
episode_t bloodbathepisodes[] =
{
- {"Welcome to BloodBath", 0, 1},
- {"BloodBath Episode 1", 1, 1}
+ {"Blood", 0, 7},
+ {"Plasma Pack", 7, 3},
+ {"Cryptic Passage", 10, 2},
+ {"Blood 2", 12, 5},
+ {"BloodBath", 17, 5}
};
gamelevels_t sharewarequakegame = {"Shareware Quake", quakelevels, quakeepisodes, 2};
gamelevels_t hipnoticgame = {"Scourge of Armagon", hipnoticlevels, hipnoticepisodes, 6};
gamelevels_t roguegame = {"Dissolution of Eternity", roguelevels, rogueepisodes, 4};
gamelevels_t nehahragame = {"Nehahra", nehahralevels, nehahraepisodes, 4};
-gamelevels_t bloodbathgame = {"BloodBath", bloodbathlevels, bloodbathepisodes, 2};
+gamelevels_t bloodbathgame = {"BloodBath", bloodbathlevels, bloodbathepisodes, 5};
typedef struct
{
M_Print (160, 56, va("%i", maxplayers) );
M_Print (0, 64, " Game Type");
- if (!coop.integer && !deathmatch.integer)
- Cvar_SetValue("deathmatch", 1);
- if (coop.integer)
- M_Print (160, 64, "Cooperative");
+ if (gamemode == GAME_BLOODBATH)
+ {
+ if (!deathmatch.integer)
+ Cvar_SetValue("deathmatch", 1);
+ if (deathmatch.integer == 2)
+ M_Print (160, 64, "Capture the Flag");
+ else
+ M_Print (160, 64, "Blood Bath");
+ }
else
- M_Print (160, 64, "Deathmatch");
+ {
+ if (!coop.integer && !deathmatch.integer)
+ Cvar_SetValue("deathmatch", 1);
+ if (coop.integer)
+ M_Print (160, 64, "Cooperative");
+ else
+ M_Print (160, 64, "Deathmatch");
+ }
M_Print (0, 72, " Teamplay");
if (gamemode == GAME_ROGUE)
}
M_Print (160, 72, msg);
}
+ else if (gamemode == GAME_BLOODBATH)
+ {
+ char *msg;
+
+ switch (teamplay.integer)
+ {
+ case 0: msg = "Off"; break;
+ case 2: msg = "Friendly Fire"; break;
+ default: msg = "No Friendly Fire"; break;
+ }
+ M_Print (160, 72, msg);
+ }
else
{
char *msg;
break;
case 2:
- if (deathmatch.integer) // changing from deathmatch to coop
+ if (gamemode == GAME_BLOODBATH)
{
- Cvar_SetValueQuick (&coop, 1);
- Cvar_SetValueQuick (&deathmatch, 0);
+ if (deathmatch.integer == 2) // changing from CTF to BloodBath
+ Cvar_SetValueQuick (&deathmatch, 0);
+ else // changing from BloodBath to CTF
+ Cvar_SetValueQuick (&deathmatch, 2);
}
- else // changing from coop to deathmatch
+ else
{
- Cvar_SetValueQuick (&coop, 0);
- Cvar_SetValueQuick (&deathmatch, 1);
+ if (deathmatch.integer) // changing from deathmatch to coop
+ {
+ Cvar_SetValueQuick (&coop, 1);
+ Cvar_SetValueQuick (&deathmatch, 0);
+ }
+ else // changing from coop to deathmatch
+ {
+ Cvar_SetValueQuick (&coop, 0);
+ Cvar_SetValueQuick (&deathmatch, 1);
+ }
}
break;