mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-31 05:20:51 +00:00
* Get chat to compile with errormode on.
* Add chat options to the HUD and Sound Option menus.
This commit is contained in:
parent
9109bb1ee7
commit
ad119af07b
5 changed files with 254 additions and 244 deletions
|
@ -1039,14 +1039,14 @@ boolean CON_Responder(event_t *ev)
|
||||||
|
|
||||||
// capslock
|
// capslock
|
||||||
if (key == KEY_CAPSLOCK) // it's a toggle.
|
if (key == KEY_CAPSLOCK) // it's a toggle.
|
||||||
{
|
{
|
||||||
if (capslock)
|
if (capslock)
|
||||||
capslock = false;
|
capslock = false;
|
||||||
else
|
else
|
||||||
capslock = true;
|
capslock = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (capslock ^ shiftdown) // gets capslock to work because capslock is cool
|
if (capslock ^ shiftdown) // gets capslock to work because capslock is cool
|
||||||
key = shiftxform[key];
|
key = shiftxform[key];
|
||||||
|
|
||||||
|
|
|
@ -413,16 +413,17 @@ consvar_t cv_chatwidth = {"chatwidth", "150", CV_SAVE, chatwidth_cons_t, NULL, 0
|
||||||
|
|
||||||
// chatheight
|
// chatheight
|
||||||
static CV_PossibleValue_t chatheight_cons_t[] = {{6, "MIN"}, {22, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t chatheight_cons_t[] = {{6, "MIN"}, {22, "MAX"}, {0, NULL}};
|
||||||
consvar_t cv_chatheight= {"chatheight", "8", CV_SAVE, chatheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_chatheight = {"chatheight", "8", CV_SAVE, chatheight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// chat notifications (do you want to hear beeps? I'd understand if you didn't.)
|
// chat notifications (do you want to hear beeps? I'd understand if you didn't.)
|
||||||
consvar_t cv_chatnotifications= {"chatnotifications", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_chatnotifications = {"chatnotifications", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// chat spam protection (why would you want to disable that???)
|
// chat spam protection (why would you want to disable that???)
|
||||||
consvar_t cv_chatspamprotection= {"chatspamprotection", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_chatspamprotection = {"chatspamprotection", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
// old shit console chat. (mostly exists for stuff like terminal, not because I cared if anyone liked the old chat.)
|
// old shit console chat. (mostly exists for stuff like terminal, not because I cared if anyone liked the old chat.)
|
||||||
consvar_t cv_consolechat= {"consolechat", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
//static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Box"}, {1, "Console"}, {0, NULL}}; -- for menu, but menu disabled...
|
||||||
|
consvar_t cv_consolechat = {"consolechat", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
441
src/hu_stuff.c
441
src/hu_stuff.c
File diff suppressed because it is too large
Load diff
|
@ -20,6 +20,7 @@
|
||||||
#include "m_random.h"
|
#include "m_random.h"
|
||||||
#include "s_sound.h"
|
#include "s_sound.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
|
#include "hu_stuff.h"
|
||||||
#include "k_kart.h"
|
#include "k_kart.h"
|
||||||
|
|
||||||
#include "lua_script.h"
|
#include "lua_script.h"
|
||||||
|
|
39
src/m_menu.c
39
src/m_menu.c
|
@ -1047,7 +1047,7 @@ static menuitem_t OP_MainMenu[] =
|
||||||
{IT_SUBMENU|IT_STRING, NULL, "Video Options...", &OP_VideoOptionsDef, 30},
|
{IT_SUBMENU|IT_STRING, NULL, "Video Options...", &OP_VideoOptionsDef, 30},
|
||||||
{IT_SUBMENU|IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 40},
|
{IT_SUBMENU|IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 40},
|
||||||
|
|
||||||
{IT_SUBMENU|IT_STRING, NULL, "HUD Options...", &OP_HUDOptionsDef, 60},
|
{IT_SUBMENU|IT_STRING, NULL, "HUD Options...", &OP_HUDOptionsDef, 60},
|
||||||
{IT_STRING|IT_CALL, NULL, "Screenshot Options...", M_ScreenshotOptions, 70},
|
{IT_STRING|IT_CALL, NULL, "Screenshot Options...", M_ScreenshotOptions, 70},
|
||||||
|
|
||||||
{IT_SUBMENU|IT_STRING, NULL, "Gameplay Options...", &OP_GameOptionsDef, 90},
|
{IT_SUBMENU|IT_STRING, NULL, "Gameplay Options...", &OP_GameOptionsDef, 90},
|
||||||
|
@ -1334,13 +1334,14 @@ static menuitem_t OP_SoundOptionsMenu[] =
|
||||||
|
|
||||||
{IT_STRING|IT_CALL, NULL, "Restart Audio System", M_RestartAudio, 50},
|
{IT_STRING|IT_CALL, NULL, "Restart Audio System", M_RestartAudio, 50},
|
||||||
|
|
||||||
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 70},
|
{IT_STRING|IT_CVAR, NULL, "Reverse L/R Channels", &stereoreverse, 65},
|
||||||
{IT_STRING|IT_CVAR, NULL, "Surround Sound", &surround, 80},
|
{IT_STRING|IT_CVAR, NULL, "Surround Sound", &surround, 75},
|
||||||
|
|
||||||
|
{IT_STRING|IT_CVAR, NULL, "Chat sounds", &cv_chatnotifications, 90},
|
||||||
{IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 100},
|
{IT_STRING|IT_CVAR, NULL, "Character voices", &cv_kartvoices, 100},
|
||||||
{IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 110},
|
{IT_STRING|IT_CVAR, NULL, "Powerup Warning", &cv_kartinvinsfx, 110},
|
||||||
|
|
||||||
{IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 130},
|
{IT_KEYHANDLER|IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 125},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*static menuitem_t OP_DataOptionsMenu[] =
|
/*static menuitem_t OP_DataOptionsMenu[] =
|
||||||
|
@ -1393,19 +1394,27 @@ static menuitem_t OP_EraseDataMenu[] =
|
||||||
|
|
||||||
static menuitem_t OP_HUDOptionsMenu[] =
|
static menuitem_t OP_HUDOptionsMenu[] =
|
||||||
{
|
{
|
||||||
{IT_STRING | IT_CVAR, NULL, "Show HUD (F3)", &cv_showhud, 10},
|
{IT_STRING | IT_CVAR, NULL, "Show HUD (F3)", &cv_showhud, 10},
|
||||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
||||||
NULL, "HUD Visibility", &cv_translucenthud, 20},
|
NULL, "HUD Visibility", &cv_translucenthud, 20},
|
||||||
|
|
||||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
||||||
NULL, "Minimap Visibility", &cv_kartminimap, 40},
|
NULL, "Minimap Visibility", &cv_kartminimap, 35},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 50},
|
{IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 45},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 60},
|
{IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 55},
|
||||||
|
|
||||||
{IT_STRING | IT_CVAR, NULL, "Console Color", &cons_backcolor, 80},
|
{IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 70},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 90},
|
// highlight info - (GOOD HIGHLIGHT, WARNING HIGHLIGHT) - 80 (see M_DrawHUDOptions)
|
||||||
|
|
||||||
{IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 110},
|
//{IT_STRING | IT_CVAR, NULL, "Chat mode", &cv_consolechat, 95}, -- will ANYONE who doesn't know how to use the console want to touch this
|
||||||
|
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
||||||
|
NULL, "Chat box width", &cv_chatwidth, 95},
|
||||||
|
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
||||||
|
NULL, "Chat box height", &cv_chatheight, 105},
|
||||||
|
{IT_STRING | IT_CVAR, NULL, "Chat fadeout time", &cv_chattime, 115},
|
||||||
|
|
||||||
|
{IT_STRING | IT_CVAR, NULL, "Background Color", &cons_backcolor, 130},
|
||||||
|
{IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 140},
|
||||||
};
|
};
|
||||||
|
|
||||||
static menuitem_t OP_GameOptionsMenu[] =
|
static menuitem_t OP_GameOptionsMenu[] =
|
||||||
|
@ -1420,7 +1429,7 @@ static menuitem_t OP_GameOptionsMenu[] =
|
||||||
{IT_STRING | IT_CVAR, NULL, "Exit Countdown Timer", &cv_countdowntime, 80},
|
{IT_STRING | IT_CVAR, NULL, "Exit Countdown Timer", &cv_countdowntime, 80},
|
||||||
|
|
||||||
//{IT_STRING | IT_CVAR, NULL, "Time Limit", &cv_timelimit, 100},
|
//{IT_STRING | IT_CVAR, NULL, "Time Limit", &cv_timelimit, 100},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Starting Bumpers", &cv_kartbumpers, 100},
|
{IT_STRING | IT_CVAR, NULL, "Starting Bumpers", &cv_kartbumpers, 100},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Karma Comeback", &cv_kartcomeback, 110},
|
{IT_STRING | IT_CVAR, NULL, "Karma Comeback", &cv_kartcomeback, 110},
|
||||||
|
|
||||||
{IT_STRING | IT_CVAR, NULL, "Force Character #", &cv_forceskin, 130},
|
{IT_STRING | IT_CVAR, NULL, "Force Character #", &cv_forceskin, 130},
|
||||||
|
@ -1440,10 +1449,10 @@ static menuitem_t OP_ServerOptionsMenu[] =
|
||||||
|
|
||||||
#ifndef NONET
|
#ifndef NONET
|
||||||
{IT_STRING | IT_CVAR, NULL, "Max Player Count", &cv_maxplayers, 80},
|
{IT_STRING | IT_CVAR, NULL, "Max Player Count", &cv_maxplayers, 80},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Allow Players to Join", &cv_allownewplayer, 90},
|
{IT_STRING | IT_CVAR, NULL, "Allow Players to Join", &cv_allownewplayer, 90},
|
||||||
//{IT_STRING | IT_CVAR, NULL, "Join on Map Change", &cv_joinnextround, 100},
|
//{IT_STRING | IT_CVAR, NULL, "Join on Map Change", &cv_joinnextround, 100},
|
||||||
|
|
||||||
{IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 100},
|
{IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 100},
|
||||||
{IT_STRING | IT_CVAR, NULL, "Attempts to Resynch", &cv_resynchattempts, 110},
|
{IT_STRING | IT_CVAR, NULL, "Attempts to Resynch", &cv_resynchattempts, 110},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -8364,7 +8373,7 @@ static void M_DrawHUDOptions(void)
|
||||||
const char *str1 = " Warning highlight";
|
const char *str1 = " Warning highlight";
|
||||||
const char *str2 = ",";
|
const char *str2 = ",";
|
||||||
const char *str3 = "Good highlight";
|
const char *str3 = "Good highlight";
|
||||||
INT32 x = BASEVIDWIDTH - currentMenu->x + 2, y = currentMenu->y + 120;
|
INT32 x = BASEVIDWIDTH - currentMenu->x + 2, y = currentMenu->y + 80;
|
||||||
INT32 w0 = V_StringWidth(str0, 0), w1 = V_StringWidth(str1, 0), w2 = V_StringWidth(str2, 0), w3 = V_StringWidth(str3, 0);
|
INT32 w0 = V_StringWidth(str0, 0), w1 = V_StringWidth(str1, 0), w2 = V_StringWidth(str2, 0), w3 = V_StringWidth(str3, 0);
|
||||||
M_DrawGenericMenu();
|
M_DrawGenericMenu();
|
||||||
x -= w0;
|
x -= w0;
|
||||||
|
|
Loading…
Reference in a new issue