revert splitclient, fte->fteh2 for hexen 2, fix sw console background drawing

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3174 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2009-04-18 22:55:00 +00:00
parent d96f8e3d77
commit 2f6fb049e4
3 changed files with 21 additions and 23 deletions

View file

@ -1231,8 +1231,6 @@ qboolean CL_SendCmdQ2 (sizebuf_t *buf)
seq_hash = cls.netchan.outgoing_sequence; seq_hash = cls.netchan.outgoing_sequence;
cl.splitclients = 1;
// send this and the previous cmds in the message, so // send this and the previous cmds in the message, so
// if the last packet was dropped, it can be recovered // if the last packet was dropped, it can be recovered
i = cls.netchan.outgoing_sequence & UPDATE_MASK; i = cls.netchan.outgoing_sequence & UPDATE_MASK;

View file

@ -1796,7 +1796,7 @@ const gamemode_info_t gamemode_info[] = {
{"Nexuiz", "nexuiz", "-nexuiz", "nexuiz.exe", NEXCFG, {"data", "ftedata"}, "Nexuiz"}, {"Nexuiz", "nexuiz", "-nexuiz", "nexuiz.exe", NEXCFG, {"data", "ftedata"}, "Nexuiz"},
//supported commercial mods (some are currently only partially supported) //supported commercial mods (some are currently only partially supported)
{"FTE-Hexen2", "hexen", "-hexen2", "data1/pak0.pak", NULL, {"data1", "fte"}, "Hexen II"}, {"FTE-Hexen2", "hexen", "-hexen2", "data1/pak0.pak", NULL, {"data1", "fteh2"}, "Hexen II"},
{"FTE-Quake2", "q2", "-q2", "baseq2/pak0.pak", NULL, {"baseq2", "fteq2"}, "Quake II"}, {"FTE-Quake2", "q2", "-q2", "baseq2/pak0.pak", NULL, {"baseq2", "fteq2"}, "Quake II"},
{"FTE-Quake3", "q3", "-q3", "baseq3/pak0.pk3", NULL, {"baseq3", "fteq3"}, "Quake III Arena"}, {"FTE-Quake3", "q3", "-q3", "baseq3/pak0.pk3", NULL, {"baseq3", "fteq3"}, "Quake III Arena"},

View file

@ -2019,7 +2019,7 @@ Draw_ConsoleBackground
================ ================
*/ */
void SWDraw_ConsoleBackground (int lines) void SWDraw_ConsoleBackground (int firstline, int lastline, qboolean forceopaque)
{ {
int x, y, v, w, h; int x, y, v, w, h;
qbyte *src; qbyte *src;
@ -2029,7 +2029,7 @@ void SWDraw_ConsoleBackground (int lines)
char ver[100]; char ver[100];
// static char saveback[320*8]; // static char saveback[320*8];
if ((!scr_con_forcedraw && !scr_conalpha.value) || !lines) if ((!forceopaque && !scr_conalpha.value) || !lastline)
return; return;
conback = (mpic_t *)SWDraw_SafeCachePic ("gfx/conback.lmp"); conback = (mpic_t *)SWDraw_SafeCachePic ("gfx/conback.lmp");
@ -2054,8 +2054,8 @@ void SWDraw_ConsoleBackground (int lines)
w = conback->width; w = conback->width;
h = conback->height; h = conback->height;
if (lines > vid.conheight) if (lastline > vid.conheight)
lines = vid.conheight; lastline = vid.conheight;
// hack the version number directly into the pic // hack the version number directly into the pic
@ -2077,9 +2077,9 @@ void SWDraw_ConsoleBackground (int lines)
{ {
D_SetTransLevel(scr_conalpha.value, BM_BLEND); D_SetTransLevel(scr_conalpha.value, BM_BLEND);
for (y=0 ; y<lines ; y++, dest += vid.conrowbytes) for (y=0 ; y<lastline ; y++, dest += vid.conrowbytes)
{ {
v = (vid.conheight - lines + y)*h/vid.conheight; v = (vid.conheight - lastline + y)*h/vid.conheight;
src = conback->d.data + v*w; src = conback->d.data + v*w;
f = 0; f = 0;
fstep = w*0x10000/vid.conwidth; fstep = w*0x10000/vid.conwidth;
@ -2098,10 +2098,10 @@ void SWDraw_ConsoleBackground (int lines)
} }
else else
{ {
for (y=0 ; y<lines ; y++, dest += vid.conrowbytes) for (y=0 ; y<lastline ; y++, dest += vid.conrowbytes)
{ {
v = (vid.conheight - lines + y)*h/vid.conheight; v = (vid.conheight - lastline + y)*h/vid.conheight;
src = conback->d.data + v*w; src = conback->d.data + v*w;
if (vid.conwidth == w) if (vid.conwidth == w)
memcpy (dest, src, vid.conwidth); memcpy (dest, src, vid.conwidth);
@ -2129,10 +2129,10 @@ void SWDraw_ConsoleBackground (int lines)
unsigned short *dest16 = (unsigned short *)vid.conbuffer; unsigned short *dest16 = (unsigned short *)vid.conbuffer;
unsigned short *pal = d_8to16table; unsigned short *pal = d_8to16table;
for (y=0 ; y<lines ; y++, dest16 += vid.conrowbytes) for (y=0 ; y<lastline ; y++, dest16 += vid.conrowbytes)
{ {
v = (vid.conheight - lines + y)*h/vid.conheight; v = (vid.conheight - lastline + y)*h/vid.conheight;
src = conback->d.data + v*w; src = conback->d.data + v*w;
// if (vid.conwidth == w) // if (vid.conwidth == w)
// memcpy (dest16, src, vid.conwidth); // memcpy (dest16, src, vid.conwidth);
@ -2172,15 +2172,15 @@ void SWDraw_ConsoleBackground (int lines)
qbyte *src2; qbyte *src2;
int f1, f2; int f1, f2;
int vf, hf; int vf, hf;
for (y=0 ; y<lines ; y++, dest += (vid.conrowbytes<<2)) for (y=0 ; y<lastline ; y++, dest += (vid.conrowbytes<<2))
{ {
v = (vid.conheight - lines + y)*(h-1)/vid.conheight; v = (vid.conheight - lastline + y)*(h-1)/vid.conheight;
src = conback->d.data + v*w; src = conback->d.data + v*w;
v = (vid.conheight - lines + y)*(h-1)/vid.conheight+1; v = (vid.conheight - lastline + y)*(h-1)/vid.conheight+1;
src2 = conback->d.data + v*w; src2 = conback->d.data + v*w;
v = (vid.conheight - lines + y)*(h-1)/vid.conheight; v = (vid.conheight - lastline + y)*(h-1)/vid.conheight;
vf = (((vid.conheight - lines + y)*(h-1.0)/vid.conheight) - v) * 255; vf = (((vid.conheight - lastline + y)*(h-1.0)/vid.conheight) - v) * 255;
f = 0; f = 0;
fstep = (w-1)*0x10000/vid.conwidth; fstep = (w-1)*0x10000/vid.conwidth;
@ -2214,9 +2214,9 @@ void SWDraw_ConsoleBackground (int lines)
if (alpha != 255) //blend it on if (alpha != 255) //blend it on
{ {
for (y=0 ; y<lines ; y++, dest += (vid.conrowbytes<<2)) for (y=0 ; y<lastline ; y++, dest += (vid.conrowbytes<<2))
{ {
v = (vid.conheight - lines + y)*h/vid.conheight; v = (vid.conheight - lastline + y)*h/vid.conheight;
src = conback->d.data + v*w; src = conback->d.data + v*w;
f = 0; f = 0;
@ -2233,9 +2233,9 @@ void SWDraw_ConsoleBackground (int lines)
} }
else //block colour (fast) else //block colour (fast)
{ {
for (y=0 ; y<lines ; y++, p24dest += vid.conrowbytes) for (y=0 ; y<lastline ; y++, p24dest += vid.conrowbytes)
{ {
v = (vid.conheight - lines + y)*h/vid.conheight; v = (vid.conheight - lastline + y)*h/vid.conheight;
src = conback->d.data + v*w; src = conback->d.data + v*w;
f = 0; f = 0;
@ -2260,7 +2260,7 @@ void SWDraw_ConsoleBackground (int lines)
void SWDraw_EditorBackground (int lines) void SWDraw_EditorBackground (int lines)
{ {
SWDraw_ConsoleBackground (lines); SWDraw_ConsoleBackground (0, lines, true);
} }