// Nehahra
#define NumberOfNehahraDemos 34
-typedef struct
+typedef struct nehahrademonames_s
{
char *name;
char *desc;
DrawQ_String(menu_x + cx, menu_y + cy, temp, 1, 8, 8, 1, 1, 1, 1, 0);
}
+void M_PrintColored(float cx, float cy, const char *str)
+{
+ DrawQ_ColoredString(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0, NULL);
+}
+
void M_Print(float cx, float cy, const char *str)
{
DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 0, 0, 1, 0);
}
-void M_ItemPrint(float cx, float cy, char *str, int unghosted)
+void M_ItemPrint(float cx, float cy, const char *str, int unghosted)
{
if (unghosted)
DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 1, 1, 1, 1, 0);
DrawQ_String(menu_x + cx, menu_y + cy, str, 0, 8, 8, 0.4, 0.4, 0.4, 1, 0);
}
-void M_DrawPic (float cx, float cy, char *picname)
+void M_DrawPic (float cx, float cy, const char *picname)
{
DrawQ_Pic (menu_x + cx, menu_y + cy, picname, 0, 0, 1, 1, 1, 1, 0);
}
-qbyte identityTable[256];
-qbyte translationTable[256];
+unsigned char identityTable[256];
+unsigned char translationTable[256];
void M_BuildTranslationTable(int top, int bottom)
{
int j;
- qbyte *dest, *source;
+ unsigned char *dest, *source;
for (j = 0; j < 256; j++)
identityTable[j] = j;
// draw left side
cx = x;
cy = y;
- M_DrawPic (cx, cy, "gfx/box_tl.lmp");
+ M_DrawPic (cx, cy, "gfx/box_tl");
for (n = 0; n < height; n++)
{
cy += 8;
- M_DrawPic (cx, cy, "gfx/box_ml.lmp");
+ M_DrawPic (cx, cy, "gfx/box_ml");
}
- M_DrawPic (cx, cy+8, "gfx/box_bl.lmp");
+ M_DrawPic (cx, cy+8, "gfx/box_bl");
// draw middle
cx += 8;
while (width > 0)
{
cy = y;
- M_DrawPic (cx, cy, "gfx/box_tm.lmp");
+ M_DrawPic (cx, cy, "gfx/box_tm");
for (n = 0; n < height; n++)
{
cy += 8;
if (n >= 1)
- M_DrawPic (cx, cy, "gfx/box_mm2.lmp");
+ M_DrawPic (cx, cy, "gfx/box_mm2");
else
- M_DrawPic (cx, cy, "gfx/box_mm.lmp");
+ M_DrawPic (cx, cy, "gfx/box_mm");
}
- M_DrawPic (cx, cy+8, "gfx/box_bm.lmp");
+ M_DrawPic (cx, cy+8, "gfx/box_bm");
width -= 2;
cx += 16;
}
// draw right side
cy = y;
- M_DrawPic (cx, cy, "gfx/box_tr.lmp");
+ M_DrawPic (cx, cy, "gfx/box_tr");
for (n = 0; n < height; n++)
{
cy += 8;
- M_DrawPic (cx, cy, "gfx/box_mr.lmp");
+ M_DrawPic (cx, cy, "gfx/box_mr");
}
- M_DrawPic (cx, cy+8, "gfx/box_br.lmp");
+ M_DrawPic (cx, cy+8, "gfx/box_br");
}
//=============================================================================
}
M_Background(320, 200);
- M_DrawPic (16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic ("gfx/ttl_main.lmp", false);
- M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_main.lmp");
+ M_DrawPic (16, 4, "gfx/qplaque");
+ p = Draw_CachePic ("gfx/ttl_main", false);
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_main");
// Nehahra
if (gamemode == GAME_NEHAHRA)
{
if (NehGameType == TYPE_BOTH)
- M_DrawPic (72, 32, "gfx/mainmenu.lmp");
+ M_DrawPic (72, 32, "gfx/mainmenu");
else if (NehGameType == TYPE_GAME)
- M_DrawPic (72, 32, "gfx/gamemenu.lmp");
+ M_DrawPic (72, 32, "gfx/gamemenu");
else
- M_DrawPic (72, 32, "gfx/demomenu.lmp");
+ M_DrawPic (72, 32, "gfx/demomenu");
}
else
- M_DrawPic (72, 32, "gfx/mainmenu.lmp");
+ M_DrawPic (72, 32, "gfx/mainmenu");
f = (int)(realtime * 10)%6;
- M_DrawPic (54, 32 + m_main_cursor * 20, va("gfx/menudot%i.lmp", f+1));
+ M_DrawPic (54, 32 + m_main_cursor * 20, va("gfx/menudot%i", f+1));
}
M_Background(320, 200);
- M_DrawPic (16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic ("gfx/ttl_sgl.lmp", false);
+ M_DrawPic (16, 4, "gfx/qplaque");
+ p = Draw_CachePic ("gfx/ttl_sgl", false);
// Some mods don't have a single player mode
if (gamemode == GAME_NEXUIZ || gamemode == GAME_GOODVSBAD2 || gamemode == GAME_BATTLEMECH)
{
- M_DrawPic ((320 - p->width) / 2, 4, "gfx/ttl_sgl.lmp");
+ M_DrawPic ((320 - p->width) / 2, 4, "gfx/ttl_sgl");
M_DrawTextBox (60, 8 * 8, 23, 4);
if (gamemode == GAME_NEXUIZ)
{
int f;
- M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_sgl.lmp");
- M_DrawPic (72, 32, "gfx/sp_menu.lmp");
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_sgl");
+ M_DrawPic (72, 32, "gfx/sp_menu");
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", f+1));
}
}
M_Background(320, 200);
- p = Draw_CachePic ("gfx/p_load.lmp", false);
- M_DrawPic ( (320-p->width)/2, 4, "gfx/p_load.lmp" );
+ p = Draw_CachePic ("gfx/p_load", false);
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/p_load" );
for (i=0 ; i< MAX_SAVEGAMES; i++)
M_Print(16, 32 + 8*i, m_filenames[i]);
M_Background(320, 200);
- p = Draw_CachePic ("gfx/p_save.lmp", false);
- M_DrawPic ( (320-p->width)/2, 4, "gfx/p_save.lmp");
+ p = Draw_CachePic ("gfx/p_save", false);
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/p_save");
for (i=0 ; i<MAX_SAVEGAMES ; i++)
M_Print(16, 32 + 8*i, m_filenames[i]);
}
M_Background(320, 200);
- M_DrawPic (16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic ("gfx/p_multi.lmp", false);
- M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
- M_DrawPic (72, 32, "gfx/mp_menu.lmp");
+ M_DrawPic (16, 4, "gfx/qplaque");
+ p = Draw_CachePic ("gfx/p_multi", false);
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi");
+ M_DrawPic (72, 32, "gfx/mp_menu");
f = (int)(realtime * 10)%6;
- M_DrawPic (54, 32 + m_multiplayer_cursor * 20, va("gfx/menudot%i.lmp", f+1));
+ M_DrawPic (54, 32 + m_multiplayer_cursor * 20, va("gfx/menudot%i", f+1));
}
}
static int menuplyr_width, menuplyr_height, menuplyr_top, menuplyr_bottom, menuplyr_load;
-static qbyte *menuplyr_pixels;
+static unsigned char *menuplyr_pixels;
static unsigned int *menuplyr_translated;
typedef struct ratetable_s
M_Background(320, 200);
- M_DrawPic (16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic ("gfx/p_multi.lmp", false);
- M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
+ M_DrawPic (16, 4, "gfx/qplaque");
+ p = Draw_CachePic ("gfx/p_multi", false);
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi");
M_Print(64, 40, "Your name");
M_DrawTextBox (160, 32, 16, 1);
- M_Print(168, 40, setup_myname);
+ M_PrintColored(168, 40, setup_myname);
if (gamemode != GAME_GOODVSBAD2)
{
// LordHavoc: rewrote this code greatly
if (menuplyr_load)
{
- qbyte *data, *f;
+ unsigned char *data, *f;
+ fs_offset_t filesize;
menuplyr_load = false;
menuplyr_top = -1;
menuplyr_bottom = -1;
- if ((f = FS_LoadFile("gfx/menuplyr.lmp", tempmempool, true)))
+ if ((f = FS_LoadFile("gfx/menuplyr.lmp", tempmempool, true, &filesize)))
{
- data = LoadLMP (f, 0, 0, true);
+ data = LoadLMP (f, filesize, 0, 0, true);
menuplyr_width = image_width;
menuplyr_height = image_height;
Mem_Free(f);
- menuplyr_pixels = Mem_Alloc(cl_mempool, menuplyr_width * menuplyr_height);
- menuplyr_translated = Mem_Alloc(cl_mempool, menuplyr_width * menuplyr_height * 4);
+ menuplyr_pixels = (unsigned char *)Mem_Alloc(cl_mempool, menuplyr_width * menuplyr_height);
+ menuplyr_translated = (unsigned int *)Mem_Alloc(cl_mempool, menuplyr_width * menuplyr_height * 4);
memcpy(menuplyr_pixels, data, menuplyr_width * menuplyr_height);
Mem_Free(data);
}
M_BuildTranslationTable(menuplyr_top*16, menuplyr_bottom*16);
for (i = 0;i < menuplyr_width * menuplyr_height;i++)
menuplyr_translated[i] = palette_complete[translationTable[menuplyr_pixels[i]]];
- Draw_NewPic("gfx/menuplyr.lmp", menuplyr_width, menuplyr_height, true, (qbyte *)menuplyr_translated);
+ Draw_NewPic("gfx/menuplyr", menuplyr_width, menuplyr_height, true, (unsigned char *)menuplyr_translated);
}
- M_DrawPic(160, 48, "gfx/bigbox.lmp");
- M_DrawPic(172, 56, "gfx/menuplyr.lmp");
+ M_DrawPic(160, 48, "gfx/bigbox");
+ M_DrawPic(172, 56, "gfx/menuplyr");
}
if (setup_cursor == 0)
break;
default:
- if (ascii < 32 || ascii > 126)
+ if (ascii < 32)
break;
if (setup_cursor == 0)
{
}
-#define OPTIONS_ITEMS 39
+#define OPTIONS_ITEMS 40
int options_cursor;
Cvar_SetValueQuick (&scr_screenshot_jpeg, !scr_screenshot_jpeg.integer);
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&scr_screenshot_jpeg_quality, bound(0, scr_screenshot_jpeg_quality.value + dir * 0.1, 1));
+ else if (options_cursor == optnum++)
+ Cvar_SetValueQuick (&scr_screenshot_gamma, bound(0.1, scr_screenshot_gamma.value + dir * 0.1, 4));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&r_sky, !r_sky.integer);
else if (options_cursor == optnum++)
int opty;
int optcursor;
-void M_Options_PrintCommand(char *s, int enabled)
+void M_Options_PrintCommand(const char *s, int enabled)
{
if (opty >= 32)
{
optnum++;
}
-void M_Options_PrintCheckbox(char *s, int enabled, int yes)
+void M_Options_PrintCheckbox(const char *s, int enabled, int yes)
{
if (opty >= 32)
{
optnum++;
}
-void M_Options_PrintSlider(char *s, int enabled, float value, float minvalue, float maxvalue)
+void M_Options_PrintSlider(const char *s, int enabled, float value, float minvalue, float maxvalue)
{
if (opty >= 32)
{
M_Background(320, bound(200, 32 + OPTIONS_ITEMS * 8, vid_conheight.integer));
- M_DrawPic(16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic("gfx/p_option.lmp", false);
- M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
+ M_DrawPic(16, 4, "gfx/qplaque");
+ p = Draw_CachePic("gfx/p_option", false);
+ M_DrawPic((320-p->width)/2, 4, "gfx/p_option");
optnum = 0;
optcursor = options_cursor;
M_Options_PrintSlider( " Field of View", true, scr_fov.integer, 1, 170);
M_Options_PrintCheckbox(" JPEG screenshots", jpeg_dll != NULL, scr_screenshot_jpeg.integer);
M_Options_PrintSlider( " JPEG quality", jpeg_dll != NULL, scr_screenshot_jpeg_quality.value, 0, 1);
+ M_Options_PrintSlider( " Screenshot Gamma", jpeg_dll != NULL, scr_screenshot_gamma.value, 0.1, 4);
M_Options_PrintCheckbox(" Sky", true, r_sky.integer);
M_Options_PrintCheckbox(" Dithering", true, gl_dither.integer);
M_Options_PrintSlider( "Anisotropic Filter", gl_support_anisotropy, gl_texture_anisotropy.integer, 1, gl_max_anisotropy);
M_Background(320, bound(200, 32 + OPTIONS_EFFECTS_ITEMS * 8, vid_conheight.integer));
- M_DrawPic(16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic("gfx/p_option.lmp", false);
- M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
+ M_DrawPic(16, 4, "gfx/qplaque");
+ p = Draw_CachePic("gfx/p_option", false);
+ M_DrawPic((320-p->width)/2, 4, "gfx/p_option");
optcursor = options_effects_cursor;
optnum = 0;
M_Background(320, bound(200, 32 + OPTIONS_GRAPHICS_ITEMS * 8, vid_conheight.integer));
- M_DrawPic(16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic("gfx/p_option.lmp", false);
- M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
+ M_DrawPic(16, 4, "gfx/qplaque");
+ p = Draw_CachePic("gfx/p_option", false);
+ M_DrawPic((320-p->width)/2, 4, "gfx/p_option");
optcursor = options_graphics_cursor;
optnum = 0;
M_Background(320, 256);
- M_DrawPic(16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic("gfx/p_option.lmp", false);
- M_DrawPic((320-p->width)/2, 4, "gfx/p_option.lmp");
+ M_DrawPic(16, 4, "gfx/qplaque");
+ p = Draw_CachePic("gfx/p_option", false);
+ M_DrawPic((320-p->width)/2, 4, "gfx/p_option");
optcursor = options_colorcontrol_cursor;
optnum = 0;
DrawQ_Fill(menu_x, menu_y + opty, 320, 4 + 64 + 8 + 64 + 4, 0, 0, 0, 1, 0);opty += 4;
s = (float) 312 / 2 * vid.width / vid_conwidth.integer;
t = (float) 4 / 2 * vid.height / vid_conheight.integer;
- DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 1,0,0,1, s,0, 1,0,0,1, 0,t, 1,0,0,1, s,t, 1,0,0,1, 0);opty += 4;
+ DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern", 312, 4, 0,0, 1,0,0,1, s,0, 1,0,0,1, 0,t, 1,0,0,1, s,t, 1,0,0,1, 0);opty += 4;
DrawQ_SuperPic(menu_x + 4, menu_y + opty, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 1,0,0,1, 0,1, 0,0,0,1, 1,1, 1,0,0,1, 0);opty += 4;
- DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 0,1,0,1, s,0, 0,1,0,1, 0,t, 0,1,0,1, s,t, 0,1,0,1, 0);opty += 4;
+ DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern", 312, 4, 0,0, 0,1,0,1, s,0, 0,1,0,1, 0,t, 0,1,0,1, s,t, 0,1,0,1, 0);opty += 4;
DrawQ_SuperPic(menu_x + 4, menu_y + opty, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 0,1,0,1, 0,1, 0,0,0,1, 1,1, 0,1,0,1, 0);opty += 4;
- DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 0,0,1,1, s,0, 0,0,1,1, 0,t, 0,0,1,1, s,t, 0,0,1,1, 0);opty += 4;
+ DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern", 312, 4, 0,0, 0,0,1,1, s,0, 0,0,1,1, 0,t, 0,0,1,1, s,t, 0,0,1,1, 0);opty += 4;
DrawQ_SuperPic(menu_x + 4, menu_y + opty, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 0,0,1,1, 0,1, 0,0,0,1, 1,1, 0,0,1,1, 0);opty += 4;
- DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern.tga", 312, 4, 0,0, 1,1,1,1, s,0, 1,1,1,1, 0,t, 1,1,1,1, s,t, 1,1,1,1, 0);opty += 4;
+ DrawQ_SuperPic(menu_x + 4, menu_y + opty, "gfx/colorcontrol/ditherpattern", 312, 4, 0,0, 1,1,1,1, s,0, 1,1,1,1, 0,t, 1,1,1,1, s,t, 1,1,1,1, 0);opty += 4;
DrawQ_SuperPic(menu_x + 4, menu_y + opty, NULL , 312, 4, 0,0, 0,0,0,1, 1,0, 1,1,1,1, 0,1, 0,0,0,1, 1,1, 1,1,1,1, 0);opty += 4;
c = menu_options_colorcontrol_correctionvalue.value; // intensity value that should be matched up to a 50% dither to 'correct' quake
opty += 8;
x = 4;
DrawQ_Fill(menu_x + x, menu_y + opty, 64, 48, c, 0, 0, 1, 0);
- DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,0,0,1, s,0, 1,0,0,1, 0,t, 1,0,0,1, s,t, 1,0,0,1, 0);
- DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,0,0,1, u,0, 1,0,0,1, 0,v, 1,0,0,1, u,v, 1,0,0,1, 0);
+ DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 1,0,0,1, s,0, 1,0,0,1, 0,t, 1,0,0,1, s,t, 1,0,0,1, 0);
+ DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 1,0,0,1, u,0, 1,0,0,1, 0,v, 1,0,0,1, u,v, 1,0,0,1, 0);
x += 80;
DrawQ_Fill(menu_x + x, menu_y + opty, 64, 48, 0, c, 0, 1, 0);
- DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,1,0,1, s,0, 0,1,0,1, 0,t, 0,1,0,1, s,t, 0,1,0,1, 0);
- DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,1,0,1, u,0, 0,1,0,1, 0,v, 0,1,0,1, u,v, 0,1,0,1, 0);
+ DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 0,1,0,1, s,0, 0,1,0,1, 0,t, 0,1,0,1, s,t, 0,1,0,1, 0);
+ DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 0,1,0,1, u,0, 0,1,0,1, 0,v, 0,1,0,1, u,v, 0,1,0,1, 0);
x += 80;
DrawQ_Fill(menu_x + x, menu_y + opty, 64, 48, 0, 0, c, 1, 0);
- DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,0,1,1, s,0, 0,0,1,1, 0,t, 0,0,1,1, s,t, 0,0,1,1, 0);
- DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 0,0,1,1, u,0, 0,0,1,1, 0,v, 0,0,1,1, u,v, 0,0,1,1, 0);
+ DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 0,0,1,1, s,0, 0,0,1,1, 0,t, 0,0,1,1, s,t, 0,0,1,1, 0);
+ DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 0,0,1,1, u,0, 0,0,1,1, 0,v, 0,0,1,1, u,v, 0,0,1,1, 0);
x += 80;
DrawQ_Fill(menu_x + x, menu_y + opty, 64, 48, c, c, c, 1, 0);
- DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,1,1,1, s,0, 1,1,1,1, 0,t, 1,1,1,1, s,t, 1,1,1,1, 0);
- DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern.tga", 16, 16, 0,0, 1,1,1,1, u,0, 1,1,1,1, 0,v, 1,1,1,1, u,v, 1,1,1,1, 0);
+ DrawQ_SuperPic(menu_x + x + 16, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 1,1,1,1, s,0, 1,1,1,1, 0,t, 1,1,1,1, s,t, 1,1,1,1, 0);
+ DrawQ_SuperPic(menu_x + x + 32, menu_y + opty + 16, "gfx/colorcontrol/ditherpattern", 16, 16, 0,0, 1,1,1,1, u,0, 1,1,1,1, 0,v, 1,1,1,1, u,v, 1,1,1,1, 0);
}
int keys[NUMKEYS];
int y;
cachepic_t *p;
- char keystring[1024];
+ char keystring[MAX_INPUTLINE];
M_Background(320, 48 + 8 * numcommands);
- p = Draw_CachePic ("gfx/ttl_cstm.lmp", false);
- M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_cstm.lmp");
+ p = Draw_CachePic ("gfx/ttl_cstm", false);
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/ttl_cstm");
if (bind_grab)
M_Print(12, 32, "Press a key or button for this action");
M_Background(320, 200);
- M_DrawPic(16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic("gfx/vidmodes.lmp", false);
- M_DrawPic((320-p->width)/2, 4, "gfx/vidmodes.lmp");
+ M_DrawPic(16, 4, "gfx/qplaque");
+ p = Draw_CachePic("gfx/vidmodes", false);
+ M_DrawPic((320-p->width)/2, 4, "gfx/vidmodes");
// Resolution
M_Print(16, video_cursor_table[0], " Resolution");
void M_Help_Draw (void)
{
M_Background(320, 200);
- M_DrawPic (0, 0, va("gfx/help%i.lmp", help_page));
+ M_DrawPic (0, 0, va("gfx/help%i", help_page));
}
case 'N':
if (wasInMenus)
{
- m_state = m_quit_prevstate;
+ m_state = (enum m_state_e)m_quit_prevstate;
m_entersound = true;
}
else
M_Background(320, 200);
- M_DrawPic (16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic ("gfx/p_multi.lmp", false);
+ M_DrawPic (16, 4, "gfx/qplaque");
+ p = Draw_CachePic ("gfx/p_multi", false);
basex = (320-p->width)/2;
- M_DrawPic (basex, 4, "gfx/p_multi.lmp");
+ M_DrawPic (basex, 4, "gfx/p_multi");
if (StartingGame)
startJoin = "New Game";
break;
default:
- if (ascii < 32 || ascii > 126)
+ if (ascii < 32)
break;
if (lanConfig_cursor == 2)
//=============================================================================
/* GAME OPTIONS MENU */
-typedef struct
+typedef struct level_s
{
char *name;
char *description;
} level_t;
-typedef struct
+typedef struct episode_s
{
char *description;
int firstLevel;
int levels;
} episode_t;
-typedef struct
+typedef struct gamelevels_s
{
char *gamename;
level_t *levels;
gamelevels_t openquartzgame = {"OpenQuartz", openquartzlevels, openquartzepisodes, 3};
gamelevels_t defeatindetail2game = {"Defeat In Detail 2", defeatindetail2levels, defeatindetail2episodes, 1};
-typedef struct
+typedef struct gameinfo_s
{
gamemode_t gameid;
gamelevels_t *notregistered;
{GAME_BATTLEMECH, &battlemechgame, &battlemechgame},
{GAME_OPENQUARTZ, &openquartzgame, &openquartzgame},
{GAME_DEFEATINDETAIL2, &defeatindetail2game, &defeatindetail2game},
- {-1, &sharewarequakegame, ®isteredquakegame} // final fallback
+ {(gamemode_t)-1, &sharewarequakegame, ®isteredquakegame} // final fallback
};
gamelevels_t *lookupgameinfo(void)
M_Background(320, 200);
- M_DrawPic (16, 4, "gfx/qplaque.lmp");
- p = Draw_CachePic ("gfx/p_multi.lmp", false);
- M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi.lmp");
+ M_DrawPic (16, 4, "gfx/qplaque");
+ p = Draw_CachePic ("gfx/p_multi", false);
+ M_DrawPic ( (320-p->width)/2, 4, "gfx/p_multi");
M_DrawTextBox (152, 32, 10, 1);
M_Print(160, 40, "begin game");
break;
default:
- if (ascii < 32 || ascii > 126)
+ if (ascii < 32)
break;
if (gameoptions_cursor == 9)
{
start = bound(0, slist_cursor - (visible >> 1), serverlist_viewcount - visible);
end = min(start + visible, serverlist_viewcount);
- p = Draw_CachePic("gfx/p_multi.lmp", false);
- M_DrawPic((640 - p->width) / 2, 4, "gfx/p_multi.lmp");
+ p = Draw_CachePic("gfx/p_multi", false);
+ M_DrawPic((640 - p->width) / 2, 4, "gfx/p_multi");
if (end > start)
{
for (n = start;n < end;n++)
{
DrawQ_Fill(menu_x, menu_y + y, 640, 16, n == slist_cursor ? (0.5 + 0.2 * sin(realtime * M_PI)) : 0, 0, 0, 0.5, 0);
- M_Print(0, y, serverlist_viewlist[n]->line1);y += 8;
- M_Print(0, y, serverlist_viewlist[n]->line2);y += 8;
+ M_PrintColored(0, y, serverlist_viewlist[n]->line1);y += 8;
+ M_PrintColored(0, y, serverlist_viewlist[n]->line2);y += 8;
}
}
else if (realtime - masterquerytime < 3)
void MP_Error(const char *format, ...)
{
static qboolean processingError = false;
- char errorstring[4096];
+ char errorstring[MAX_INPUTLINE];
va_list argptr;
va_start (argptr, format);
static cvar_t forceqmenu = { 0, "forceqmenu", "0" };
+void (*MR_Keydown) (int key, char ascii);
+void (*MR_Draw) (void);
+void (*MR_ToggleMenu_f) (void);
+void (*MR_Shutdown) (void);
+
void MR_SetRouting(qboolean forceold)
{
static qboolean m_init = FALSE, mp_init = FALSE;