remove bulleten support, rename vidgles -> videgl

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3756 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2011-03-24 14:35:24 +00:00
parent affdd9d3df
commit cdb6dccb97
18 changed files with 22 additions and 800 deletions

View File

@ -346,7 +346,6 @@ CLIENT_OBJS = \
roq_read.o \
clq2_cin.o \
net_master.o \
r_bulleten.o \
r_part.o \
p_script.o \
p_null.o \

View File

@ -328,9 +328,6 @@ void CL_SupportedFTEExtensions(int *pext1, int *pext2)
#ifdef PEXT_VIEW2
fteprotextsupported |= PEXT_VIEW2;
#endif
#ifdef PEXT_BULLETENS
fteprotextsupported |= PEXT_BULLETENS;
#endif
#ifdef PEXT_ACCURATETIMINGS
fteprotextsupported |= PEXT_ACCURATETIMINGS;
#endif
@ -991,9 +988,6 @@ void CL_ClearState (void)
Cvar_ApplyLatches(CVAR_SERVEROVERRIDE);
Con_DPrintf ("Clearing memory\n");
#ifdef PEXT_BULLETENS
WipeBulletenTextures ();
#endif
if (!serverrunning || !tolocalserver)
{
if (serverrunning)

View File

@ -104,7 +104,7 @@ char *svc_strings[] =
"BAD svc_unused",
"FTE svc_view2",
"FTE svc_lightstylecol",
"FTE svc_bulletentext",
"FTE svc_bulletentext", // obsolete
"FTE svc_lightnings",
"FTE svc_modellistshort",
"FTE svc_ftesetclientpersist",
@ -5211,14 +5211,6 @@ void CL_ParseServerMessage (void)
CDAudio_Resume ();
break;
#ifdef PEXT_BULLETENS
case svcfte_bulletentext:
if (!(cls.fteprotocolextensions & PEXT_BULLETENS))
Host_EndGame("PEXT_BULLETENS is meant to be disabled\n");
Bul_ParseMessage();
break;
#endif
case svc_ftesetclientpersist:
CL_ParseClientPersist();
break;

View File

@ -143,10 +143,6 @@ extern "C" {
#include "vm.h"
#ifdef PEXT_BULLETENS
#include "r_bulleten.h"
#endif
#include "input.h"
#include "keys.h"
#include "console.h"

View File

@ -1,610 +0,0 @@
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// r_bulleten.c
//
//draws new stuff onto the mip each frame!
//text set each frame
#include "quakedef.h"
#ifdef PEXT_BULLETENS
#ifdef GLQUAKE
#include "glquake.h"//hack
#endif
/*
Effects:
0: standard plain background
1: normal texture + scrolling text
2: Sparkling
3: Simply a scrolling texture
4: Ripples (for water) - it is treated as a bulleten, because that way, we can easily hook into it. There is never any text though.
5:
6:
7:
8:
9:
*/
cvar_t bul_text1 = SCVAR("bul_text1", "0Cheesy Forethoug\\nht entertainment");
cvar_t bul_text2 = SCVAR("bul_text2", "2");
cvar_t bul_text3 = SCVAR("bul_text3", "0Join Shubs Army\\nFight for Fear");
cvar_t bul_text4 = SCVAR("bul_text4", "0Need a gun?\\nGoto bobs place!");
cvar_t bul_text5 = SCVAR("bul_text5", "0Beware the fans\\nThey can hurt.");
cvar_t bul_text6 = SCVAR("bul_text6", "2Quake B Arena");
cvar_t bul_scrollspeedx = SCVAR("bul_scrollspeedx", "-20"); //pixels per second
cvar_t bul_scrollspeedy = SCVAR("bul_scrollspeedy", "-10"); //pixels per second
cvar_t bul_backcol = SCVAR("bul_backcolour", "1");
cvar_t bul_textpalette = SCVAR("bul_textpalette", "0");
cvar_t bul_norender = SCVAR("bul_norender", "0");
cvar_t bul_sparkle = SCVAR("bul_sparkle", "7");
cvar_t bul_forcemode = SCVAR("bul_forcemode", "-1");
cvar_t bul_ripplespeed = SCVAR("bul_ripplespeed", "32");
cvar_t bul_rippleamount = SCVAR("bul_rippleamount", "2");
cvar_t bul_nowater = SCVAR("bul_nowater", "1");
int bultextpallete = 0;
bulletentexture_t *bulletentexture;
int nlstrlen(char *str, int *lines) //strlen, but for longest line in string
{
int cl = 0, ol = 0;
if (*str >= '0' && *str <= '9') //used to set an effect
str++;
*lines = 1;
for (;*str;str++,cl++)
{
if (*str == '\\')
{
str++;
if (*str == 'n')
{
if (ol < cl)
ol = cl;
cl = 0;
*lines += 1;
}
}
}
if (cl > ol)
return cl;
return ol;
}
void WipeBulletenTextures(void)
{
bulletentexture_t *a;
// return;
for (a = bulletentexture; a; a=a->next)
{
a->texture = NULL;
}
bulletentexture = NULL;
}
qboolean R_AddBulleten (texture_t *textur)
{
bulletentexture_t *a;
int len;
int lines;
int type;
char *text="";
#ifndef CLIENTONLY
if (isDedicated)
return false;
#endif
if (!Q_strncmp(textur->name,"b_lead",6))
{
type = 0; // name winner
text = bul_text1.string;
}
else if (!Q_strncmp(textur->name,"b_loose",7))
{
type = 1; // name looser
text = bul_text2.string;
}
else if (!Q_strncmp(textur->name, "b_text\0",7))
{
type = 2 + rand() % 6; //random advert (all of these end up the same (first found))
// ;
}
else if (!Q_strncmp(textur->name, "b_text_1",8))
{
type = 2; // advert 1
text = bul_text1.string;
}
else if (!Q_strncmp(textur->name, "b_text_2", 8))
{
type = 3; // advert 2
text = bul_text2.string;
}
else if (!Q_strncmp(textur->name, "b_text_3", 8))
{
type = 4; // advert 3
text = bul_text3.string;
}
else if (!Q_strncmp(textur->name, "b_text_4", 8))
{
type = 5; // advert 4
text = bul_text4.string;
}
else if (!Q_strncmp(textur->name, "b_text_5", 8))
{
type = 6;
text = bul_text5.string;
}
else if (!Q_strncmp(textur->name, "b_text_6", 8))
{
type = 7;
text = bul_text6.string;
}
// water ripples
else if (!Q_strncmp(textur->name,"*", 1) && !bul_nowater.value)
{
type = -1;
text = "";
}
else if (!Q_strncmp(textur->name,"bul_", 4))
{
type = atoi(textur->name+4);
text = "";
}
else // not a bulleten
return false;
for (a = bulletentexture; a; a=a->next)
{
if (a->texture == textur)
return true; //texture address already used
}
if (a == NULL)
{ //not found it, create a new texture
a = Hunk_AllocName(sizeof(struct bulletentexture_s) + ((textur->width) * (textur->height)), "bulleten");
a->next = bulletentexture; //add in first
bulletentexture = a;
len = nlstrlen(text, &lines);
a->texture = textur;
a->bultextleft = (a->texture->width - (len*8)) / 2;
a->bultexttop = (a->texture->height - (lines*8)) / 2;
a->type = type;
a->normaltexture = (qbyte *) a + sizeof(struct bulletentexture_s);
memcpy(a->normaltexture, (qbyte *) textur + textur->offsets[0], textur->width * textur->height);
return true;
}
return false;
}
//user wants to force a world texture into a bulleten board.
void R_BulletenForce_f (void)
{
extern model_t mod_known[];
extern int mod_numknown;
model_t *mod;
texture_t *tx;
char *match = Cmd_Argv(1);
int i, m, s;
for (m=0 , mod=mod_known ; m<mod_numknown ; m++, mod++)
{
if (mod->type == mod_brush && !mod->needload)
{
for (i = 0; i < mod->numtextures; i++)
{
tx = mod->textures[i];
if (!tx)
continue; //happens on e1m2
if (!stricmp(tx->name, match))
{
char *text = "";
int len, lines;
bulletentexture_t *a;
for (a = bulletentexture; a; a=a->next)
{
if (a->texture == tx)
{
a->type = atoi(Cmd_Argv(2));
break; //texture address already used
}
}
if (a == NULL)
{ //not found it, create a new texture
a = Hunk_AllocName(sizeof(struct bulletentexture_s) + ((tx->width) * (tx->height)), "bulleten");
a->next = bulletentexture; //add in first
bulletentexture = a;
len = nlstrlen(text, &lines);
a->texture = tx;
a->bultextleft = (a->texture->width - (len*8)) / 2;
a->bultexttop = (a->texture->height - (lines*8)) / 2;
a->type = atoi(Cmd_Argv(2));
a->normaltexture = (qbyte *) a + sizeof(struct bulletentexture_s);
memcpy(a->normaltexture, (qbyte *) tx + tx->offsets[0], tx->width * tx->height);
for (s = 0; s < mod->numsurfaces; s++)
{
mod->surfaces[s].flags |= SURF_BULLETEN;
}
}
}
}
}
}
}
void R_SetupBulleten (void)
{
bulletentexture_t *a;
int len;
int lines;
player_info_t *s;
char text[256];
if (bul_norender.value || cl.paused || !bulletentexture) //don't scroll when paused
return;
bultextpallete = bul_textpalette.value * 16;
if (bultextpallete < 0) //not the negatives
bultextpallete = 0;
if (bultextpallete > 255 - vid.fullbright) // don't allow shifting into the fullbrights, (compensate for pallete scale
bultextpallete = 0;
Sbar_SortFrags (false); //find who's winning and who's loosing
for (a = bulletentexture; a; a=a->next)
{
if (a->texture != NULL)
{
switch (a->type)
{
case -1:
sprintf(text, "4"); //negative values have no text
break;
case 0: //leader
s = &cl.players[fragsort[0]];
if (!s->name[0])
{
sprintf(text, "0%s", bul_text1.string);
break;
}
if (s->frags == 1)
sprintf(text, "0%s is leading\nwith 1 frag!", s->name);
else
sprintf(text, "0%s is leading\nwith %i frags!", s->name, s->frags);
break;
case 1: //looser
s = &cl.players[fragsort[scoreboardlines-1]];
if (!s->name[0])
{
sprintf(text, bul_text2.string);
break;
}
if (s->frags == 1)
sprintf(text, "0%s is behind\nwith 1 frag!", s->name);
else
sprintf(text, "0%s is behind\nwith %i frags!", s->name, s->frags);
break;
case 2: //an add
sprintf(text, bul_text1.string);
break;
case 3: //another add
sprintf(text, bul_text2.string);
break;
case 4: //yet another add
sprintf(text, bul_text3.string);
break;
case 5:
sprintf(text, bul_text4.string);
break;
case 6:
sprintf(text, bul_text5.string);
break;
case 7:
sprintf(text, bul_text6.string);
break;
case 8:
*text = 0;
break;
default:
sprintf(text, "Unrecognised Bulleten");
break;
}
len = nlstrlen(text, &lines);
#if 1
if (lines*8 <= a->texture->height)
a->bultexttop = (a->texture->height - lines*8)/2;
else
a->bultexttop = ((int)(cl.time * bul_scrollspeedy.value) % (a->texture->height + lines * 8)) - lines * 8;
#else
if (lines*8 <= a->texture->height)
a->bultexttop = (a->texture->height - (lines*8)) / 2;
else
{
a->bultexttop += bul_scrollspeedy.value;
if (a->bultexttop < lines * -8)
a->bultexttop = (signed int) a->texture->height;
if (a->bultexttop > (signed int) a->texture->height)
a->bultexttop = lines * -8;
}
#endif
#if 1
if (len*8 <= a->texture->width)
a->bultextleft = a->texture->width/2 - len*4;
else
a->bultextleft = ((int)(cl.time * bul_scrollspeedx.value) % (a->texture->width + len * 8)) - len * 8;
#else
if (len*8 <= a->texture->width)
a->bultextleft = (a->texture->width - (len*8)) / 2;
else
{
a->bultextleft += bul_scrollspeedx.value;
if (a->bultextleft < len * -8)
a->bultextleft = (signed int) a->texture->width;
if (a->bultextleft > (signed int) a->texture->width)
a->bultextleft = len * -8;
}
#endif
R_MakeBulleten(a->texture, a->bultextleft, a->bultexttop, text, a->normaltexture);
#ifdef GLQUAKE
if (qrenderer == QR_OPENGL)
{
GL_Bind(a->texture->tn.base);
GL_Upload8 ("bulleten", (qbyte *)a->texture + a->texture->offsets[0], a->texture->width, a->texture->height, IF_NOMIPMAP|IF_NOALPHA|IF_NOGAMMA, 0);
}
#endif
}
}
// PR_SwitchProgs(mainprogs);
}
void Draw_CharToMip (int num, qbyte *mip, int x, int y, int width, int height)
{
int row, col;
qbyte *source;
int drawline;
int i;
int s, e;
s = 0;
e = 8;
if (x<0)
s = s - x;
if (x > width - e)
e = width - x;
if (s > e)
return;
if (y >= height)
return;
if (y < -8)
return;
if (!draw_chars)
return;
if (y <= 0)
mip += x;
else
mip += (width*y) + x;
row = num>>4;
col = num&15;
source = draw_chars + (row<<10) + (col<<3);
if (y < 0)
source -= 128*y;
drawline = height-y;
if (drawline > 8)
drawline = 8;
if (y < 0)
drawline += y;
while (drawline--)
{
for (i=s ; i<e ; i++)
if (source[i] != 255 && source[i])
mip[i] = source[i] + bultextpallete;
source += 128;
mip += width;
}
}
void Draw_StringToMip(char *str, qbyte *mip, int x, int y, int width, int height)
{
int nx = x;
for (; *str; str++, nx+=8)
{
if (*str == '\\')
{
str++;
if (!*str)
break;
switch (*str)
{
case 'n':
nx = x-8; // compensate for the 'for' increment
y+=8;
continue;
case '\\':
break;
default:
nx = x-8; // compensate for the 'for' increment
continue;
}
}
Draw_CharToMip(*str, mip, nx, y, width, height);
}
}
void R_MakeBulleten (texture_t *textur, int lefttext, int toptext, char *text, qbyte *background)
{
qbyte bc;
int x;
int y;
int effect;
int progress;
qbyte *mip;
if (*text >= '0' && *text <= '9')
{
effect = *text - '0';
text++;
}
else
effect = 0;
if (bul_forcemode.value != -1.0)
effect = bul_forcemode.value;
switch (effect)
{
default: //solid block colour
bc = bul_backcol.value;
mip = (qbyte *) textur + textur->offsets[0];
Q_memset (mip, bc, textur->width*textur->height);
break;
case 1: //maintain background
mip = (qbyte *) textur + textur->offsets[0];
memcpy (mip, background, textur->width*textur->height);
break;
case 2:
//put in a wierd sparkly effect - interference
bc = bul_sparkle.value;
mip = (qbyte *) textur + textur->offsets[0];
for (x=0; x<textur->width*textur->height; x++, mip++)
*mip = rand() & bc;
break;
case 3: //scrolling mip
progress = (int) (realtime*-bul_scrollspeedx.value) % (textur->width);
mip = (qbyte *) textur + textur->offsets[0] + progress * textur->height;
for (x=0; x<progress; x++, mip++, background++)
*mip = *background;
mip = (qbyte *) textur + textur->offsets[0];
for (; x<textur->width*textur->height; x++, mip++, background++)
*mip = *background;
break;
case 4: //water distortions
mip = (qbyte *) textur + textur->offsets[0];
memcpy (mip, background, textur->width*textur->height);
mip = (qbyte *) textur + textur->offsets[0];
for (y = 0; y < textur->height; y++)
{
for (x = 0; x < textur->width; x++)
{
progress = *mip & 0x0F;
/* assume no full brights.
if ((*mip & 0xF0) == 0xf0)
{
continue;
}
else
*/ if (*mip >= 0x80 && *mip < 0xe0) //backwards ranges
progress = progress - (sin(((x+(sin((y/2+cl.time))*3) + (cl.time*bul_ripplespeed.value))/textur->width) * (2 * 3.14))*bul_rippleamount.value);
else
progress = progress + (sin(((x+(sin((y/2+cl.time))*3) + (cl.time*bul_ripplespeed.value))/textur->width) * (2 * 3.14))*bul_rippleamount.value);
if (progress > 15)
progress = 15;
if (progress < 0)
progress = 0;
*mip = progress | (*mip & 0xF0);
mip++;
}
}
break;
}
if (*text == '\0')
return;
mip = (qbyte *) textur + textur->offsets[0];
Draw_StringToMip (text, mip, lefttext, toptext, textur->width, textur->height);
}
void Bul_ParseMessage(void)
{
cvar_t *cv;
int num;
char *str;
num = MSG_ReadByte ();
str = MSG_ReadString ();
switch (num)
{
default:
case 1: cv = &bul_text1; break;
case 2: cv = &bul_text2; break;
case 3: cv = &bul_text3; break;
case 4: cv = &bul_text4; break;
case 5: cv = &bul_text5; break;
case 6: cv = &bul_text6; break;
}
Cvar_Set(cv, str);
}
#endif //usebulletens

View File

@ -1,39 +0,0 @@
#define MAXBULLETENS 12 //remove limits
extern cvar_t bul_advert1;
extern cvar_t bul_advert2;
extern cvar_t bul_advert3;
extern cvar_t bul_advert4;
extern cvar_t bul_advertvents;
extern cvar_t bul_advertq3;
extern cvar_t bul_scrollspeedx;
extern cvar_t bul_scrollspeedy;
extern cvar_t bul_backcol;
extern cvar_t bul_textpalette;
extern cvar_t bul_norender;
typedef struct bulletentexture_s
{
texture_t *texture;
int bultextleft;
int bultexttop;
int type;
qbyte *normaltexture;
struct bulletentexture_s *next;
} bulletentexture_t;
extern bulletentexture_t *bulletentexture;
extern qbyte *draw_chars; //console text
qboolean R_AddBulleten (texture_t *textur);
void R_MakeBulleten (texture_t *textur, int lefttext, int toptext, char *text, qbyte *background);
//void R_MakeBulleten (texture_t *textur, int lefttext, int toptext, char *text);
void R_SetupBulleten (void);
void Draw_StringToMip(char *str, qbyte *mip, int x, int y, int width, int height);
void Draw_CharToMip (int num, qbyte *mip, int x, int y, int width, int height);
void WipeBulletenTextures(void);
void Bul_ParseMessage(void);

View File

@ -21,9 +21,6 @@ qboolean vid_isfullscreen;
#define VIDCOMMANDGROUP "Video config"
#define GRAPHICALNICETIES "Graphical Nicaties" //or eyecandy, which ever you prefer.
#ifdef PEXT_BULLETENS
#define BULLETENVARS "BulletenBoard controls"
#endif
#define GLRENDEREROPTIONS "GL Renderer Options"
#define SCREENOPTIONS "Screen Options"
@ -194,23 +191,6 @@ cvar_t vid_wndalpha = CVAR ("vid_wndalpha", "1");
cvar_t vid_width = CVARF ("vid_width", "0",
CVAR_ARCHIVE | CVAR_RENDERERLATCH);
extern cvar_t bul_backcol;
extern cvar_t bul_forcemode;
extern cvar_t bul_norender;
extern cvar_t bul_nowater;
extern cvar_t bul_rippleamount;
extern cvar_t bul_ripplespeed;
extern cvar_t bul_scrollspeedx;
extern cvar_t bul_scrollspeedy;
extern cvar_t bul_sparkle;
extern cvar_t bul_text1;
extern cvar_t bul_text2;
extern cvar_t bul_text3;
extern cvar_t bul_text4;
extern cvar_t bul_text5;
extern cvar_t bul_text6;
extern cvar_t bul_textpalette;
extern cvar_t r_dodgytgafiles;
extern cvar_t r_dodgypcxfiles;
extern cvar_t r_drawentities;
@ -227,9 +207,6 @@ extern cvar_t r_waterwarp;
extern cvar_t r_polygonoffset_submodel_factor;
extern cvar_t r_polygonoffset_submodel_offset;
void R_BulletenForce_f (void);
rendererstate_t currentrendererstate;
#if defined(GLQUAKE)
@ -626,29 +603,6 @@ void Renderer_Init(void)
Cvar_Register (&r_replacemodels, GRAPHICALNICETIES);
#ifdef PEXT_BULLETENS
//bulletens
Cvar_Register(&bul_nowater, BULLETENVARS);
Cvar_Register(&bul_rippleamount, BULLETENVARS);
Cvar_Register(&bul_ripplespeed, BULLETENVARS);
Cvar_Register(&bul_forcemode, BULLETENVARS);
Cvar_Register(&bul_sparkle, BULLETENVARS);
Cvar_Register(&bul_textpalette, BULLETENVARS);
Cvar_Register(&bul_scrollspeedy, BULLETENVARS);
Cvar_Register(&bul_scrollspeedx, BULLETENVARS);
Cvar_Register(&bul_backcol, BULLETENVARS);
Cvar_Register(&bul_text6, BULLETENVARS); //reverse order, to get forwards ordered console vars.
Cvar_Register(&bul_text5, BULLETENVARS);
Cvar_Register(&bul_text4, BULLETENVARS);
Cvar_Register(&bul_text3, BULLETENVARS);
Cvar_Register(&bul_text2, BULLETENVARS);
Cvar_Register(&bul_text1, BULLETENVARS);
Cvar_Register(&bul_norender, BULLETENVARS); //find this one first...
Cmd_AddCommand("bul_make", R_BulletenForce_f);
#endif
// misc
Cvar_Register(&con_ocranaleds, "Console controls");
@ -1581,10 +1535,6 @@ TRACE(("dbg: R_ApplyRenderer: isDedicated = true\n"));
}
TRACE(("dbg: R_ApplyRenderer: initing mods\n"));
Mod_Init();
#ifdef PEXT_BULLETENS
TRACE(("dbg: R_ApplyRenderer: initing bulletein boards\n"));
WipeBulletenTextures();
#endif
// host_hunklevel = Hunk_LowMark();

View File

@ -21,10 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "quakedef.h"
#ifndef NOSOUNDASM
#define NOSOUNDASM //since channels per sound card went to 6 (portable_samplegroup_t was changed)
#endif
#define PAINTBUFFER_SIZE 2048
float voicevolumemod = 1;

View File

@ -1413,10 +1413,6 @@ void V_RenderPlayerViews(int plnum)
void V_RenderView (void)
{
int viewnum;
#ifdef PEXT_BULLETENS
//avoid redoing the bulleten boards for rear view as well.
static qboolean alreadyrendering = false;
#endif
R_LessenStains();
@ -1455,22 +1451,11 @@ void V_RenderView (void)
R_PushDlights ();
#ifdef PEXT_BULLETENS
if (!alreadyrendering)
R_SetupBulleten ();
alreadyrendering=true;
#endif
r_secondaryview = 0;
for (viewnum = 0; viewnum < cl.splitclients; viewnum++)
{
V_RenderPlayerViews(viewnum);
}
#ifdef PEXT_BULLETENS
alreadyrendering=false;
#endif
}
//============================================================================

View File

@ -2628,7 +2628,6 @@ lh_extension_t QSG_Extensions[] = {
{"FTE_PEXT_LIGHTSTYLECOL"}, //lightstyles may have colours.
{"DP_ENT_ALPHA"}, //transparent entites
{"FTE_PEXT_VIEW2"}, //secondary view.
{"FTE_PEXT_BULLETENS"}, //bulleten boards (scrolling text on walls)
{"FTE_PEXT_ACURATETIMINGS"}, //allows full interpolation
{"FTE_PEXT_SOUNDDBL"}, //twice the sound indexes
{"FTE_PEXT_FATNESS"}, //entities may be expanded along their vertex normals

View File

@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef SIDEVIEWS
#define PEXT_VIEW2 0x00000010
#endif
//#define PEXT_BULLETENS 0x00000020
//#define PEXT_BULLETENS 0x00000020 //obsolete
#define PEXT_ACCURATETIMINGS 0x00000040
#define PEXT_SOUNDDBL 0x00000080 //revised startsound protocol
#define PEXT_FATNESS 0x00000100 //GL only (or servers)
@ -228,9 +228,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define svcfte_lightstylecol 57
#endif
#ifdef PEXT_BULLETENS
#define svcfte_bulletentext 58
#endif
//#define svcfte_svcremoved 58
//#define svcfte_svcremoved 59

View File

@ -1085,9 +1085,6 @@ TRACE(("dbg: RMod_LoadTextures: inittexturedescs\n"));
R_InitSky (&tn, tx, (char *)mt + mt->offsets[0]);
}
else
#ifdef PEXT_BULLETENS
if (!R_AddBulleten(tx))
#endif
{
/*
RMod_LoadAdvancedTexture(tx->name, &tn.base, &tn.bump, &tn.fullbright, &tn.specular, NULL, NULL);
@ -1326,25 +1323,20 @@ void RMod_NowLoadExternal(void)
if (!TEXVALID(tn.base))
{
#ifdef PEXT_BULLETENS
if (!R_AddBulleten(tx))
#endif
qbyte * data;
data = W_GetTexture(tx->name, &width, &height, &alphaed);
if (data)
{ //data is from temp hunk, so no need to free.
tx->alphaed = alphaed;
}
tn.base = R_LoadHiResTexture(tx->name, loadname, IF_NOALPHA);
if (!TEXVALID(tn.base))
{
qbyte * data;
data = W_GetTexture(tx->name, &width, &height, &alphaed);
if (data)
{ //data is from temp hunk, so no need to free.
tx->alphaed = alphaed;
}
tn.base = R_LoadHiResTexture(tx->name, loadname, IF_NOALPHA);
tn.base = R_LoadHiResTexture(tx->name, "bmodels", IF_NOALPHA);
if (!TEXVALID(tn.base))
{
tn.base = R_LoadHiResTexture(tx->name, "bmodels", IF_NOALPHA);
if (!TEXVALID(tn.base))
tn.base = R_LoadReplacementTexture("light1_4", NULL, IF_NOALPHA); //a fallback. :/
}
tn.base = R_LoadReplacementTexture("light1_4", NULL, IF_NOALPHA); //a fallback. :/
}
}
if (!TEXVALID(tn.bump) && *tx->name != '{' && gl_bumpmappingpossible && cls.allow_bump)

View File

@ -279,7 +279,7 @@ typedef struct
#define SURF_DRAWBACKGROUND 0x00040
#define SURF_UNDERWATER 0x00080
#define SURF_DONTWARP 0x00100
#define SURF_BULLETEN 0x00200
//#define SURF_BULLETEN 0x00200
#define SURF_NOFLAT 0x08000
#define SURF_DRAWALPHA 0x10000

View File

@ -1,4 +1,4 @@
#include "gl_vidgles.h"
#include "gl_videgl.h"
EGLContext eglctx = EGL_NO_CONTEXT;
EGLDisplay egldpy = EGL_NO_DISPLAY;

View File

@ -1,5 +1,5 @@
#ifndef __GL_VIDGLES_H__
#define __GL_VIDGLES_H__
#ifndef __GL_VIDEGL_H__
#define __GL_VIDEGL_H__
#include "quakedef.h"
#include <EGL/egl.h>

View File

@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <GL/glx.h>
#ifdef USE_EGL
#include "gl_vidgles.h"
#include "gl_videgl.h"
#endif
#include <X11/keysym.h>

View File

@ -5079,32 +5079,6 @@ static void QCBUILTIN PF_redstring(progfuncs_t *prinst, struct globalvars_s *pr_
RETURN_TSTRING(buf);
}
#ifdef PEXT_BULLETENS
static void QCBUILTIN PF_bulleten (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
int j;
client_t *client;
char *msg = PF_VarString(prinst, 1, pr_globals);
int board = G_FLOAT(OFS_PARM0);
int msglen = strlen(msg);
// send the data to all relevent clients
for (j = 0, client = svs.clients; j < MAX_CLIENTS; j++, client++)
{
if (client->state < cs_connected) //so a call can be used in client connected.
continue;
if (client->fteprotocolextensions & PEXT_BULLETENS)
{
ClientReliableCheckBlock(client, msglen+1);
ClientReliableWrite_Byte(client, svcfte_bulletentext);
ClientReliableWrite_Byte(client, board);
ClientReliableWrite_String(client, msg);
}
}
}
#endif
#ifdef SVCHAT
void SV_Chat(char *filename, float starttag, edict_t *edict);
static void QCBUILTIN PF_chat (progfuncs_t *prinst, struct globalvars_s *pr_globals)
@ -9040,9 +9014,8 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
{"checkpvs", PF_checkpvs, 0, 0, 0, 240},
{"matchclientname", PF_matchclient, 0, 0, 0, 241},
{"sendpacket", PF_SendPacket, 0, 0, 0, 242}, //void(string dest, string content) sendpacket = #242; (FTE_QC_SENDPACKET)
#ifdef PEXT_BULLETENS
{"bulleten", PF_bulleten, 0, 0, 0, 243},
#endif
// {"bulleten", PF_bulleten, 0, 0, 0, 243}, (removed builtin)
#ifdef SQL
{"sqlconnect", PF_sqlconnect, 0, 0, 0, 250}, // #250 float([string host], [string user], [string pass], [string defaultdb], [string driver]) sqlconnect (FTE_SQL)

View File

@ -3890,9 +3890,6 @@ void SV_InitLocal (void)
#endif
#ifdef PEXT_VIEW2
svs.fteprotocolextensions |= PEXT_VIEW2;
#endif
#ifdef PEXT_BULLETENS
svs.fteprotocolextensions |= PEXT_BULLETENS;
#endif
svs.fteprotocolextensions |= PEXT_ACCURATETIMINGS;
#ifdef PEXT_ZLIBDL