Mapster32: don't apply GL fogging to crosshair.

git-svn-id: https://svn.eduke32.com/eduke32@3389 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-01-13 16:40:14 +00:00
parent 56ef10c893
commit 7d2dd223bb
4 changed files with 28 additions and 78 deletions

View file

@ -1051,9 +1051,9 @@ void hash_delete(hashtable_t *t, const char *s);
#ifdef POLYMER
# include "polymer.h"
#else
#ifdef USE_OPENGL
# ifdef USE_OPENGL
# include "polymost.h"
#endif
# endif
#endif
extern void initialize_engine_globals(void);

View file

@ -826,21 +826,6 @@ CANCEL:
return(0);
}
/*
void showmouse(void)
{
int32_t i;
for (i=1;i<=4;i++)
{
plotpixel(searchx+i,searchy,whitecol);
plotpixel(searchx-i,searchy,whitecol);
plotpixel(searchx,searchy-i,whitecol);
plotpixel(searchx,searchy+i,whitecol);
}
}
*/
static int32_t mhk=0;
static void loadmhk(int32_t domessage)
{

View file

@ -14017,12 +14017,6 @@ void plotpixel(int32_t x, int32_t y, char col)
{
palette_t p = getpal(col);
setpolymost2dview(); // JBF 20040205: more efficient setup
// bglBegin(GL_POINTS);
// bglColor4ub(p.r,p.g,p.b,255);
// bglVertex2i(x,y);
// bglEnd();
bglRasterPos4i(x, y, 0, 1);
bglDrawPixels(1, 1, GL_RGB, GL_UNSIGNED_BYTE, &p);
bglRasterPos4i(0, 0, 0, 1);
@ -14031,7 +14025,7 @@ void plotpixel(int32_t x, int32_t y, char col)
#endif
begindrawing(); //{{{
drawpixel_safe((void *)(ylookup[y]+x+frameplace),(int32_t)col);
drawpixel_safe((void *)(ylookup[y]+x+frameplace), col);
enddrawing(); //}}}
}

View file

@ -2922,6 +2922,22 @@ static void ReadPaletteTable(void)
}// end ReadPaletteTable
// XXX: this belongs into some engine header?
static inline void push_nofog(void)
{
#ifdef USE_OPENGL
bglPushAttrib(GL_ENABLE_BIT);
bglDisable(GL_FOG);
#endif
}
static inline void pop_nofog(void)
{
#ifdef USE_OPENGL
bglPopAttrib();
#endif
}
static void m32_showmouse(void)
{
int32_t i, col;
@ -2950,6 +2966,8 @@ static void m32_showmouse(void)
break;
}
push_nofog();
if (col != whitecol)
{
for (i=((xdim > 640)?3:2); i<=((xdim > 640)?7:3); i++)
@ -2986,6 +3004,8 @@ static void m32_showmouse(void)
plotpixel(searchx,searchy+i,whitecol);
}
}
pop_nofog();
}
static int32_t AskIfSure(const char *text)
@ -6011,13 +6031,10 @@ static void Keys3d(void)
j = max((searchy+16)-(ydim-1), 0);
// printext16(searchx+6-i,searchy+6-j,11,-1,tempbuf,0);
printext256(searchx+4+2-i, searchy+4+2-j, 0,-1,tempbuf,!(xdimgame > 640));
printext256(searchx+4-i, searchy+4-j, whitecol,-1,tempbuf,!(xdimgame > 640));
// printext256(searchx+4+2,searchy+4+2,0,-1,tempbuf,!(xdimgame > 640));
// printext256(searchx+4,searchy+4,whitecol,-1,tempbuf,!(xdimgame > 640));
}
if (helpon==1)
{
int32_t small = !(xdimgame > 640);
@ -6091,18 +6108,16 @@ static void Keys3d(void)
//Also choose your own key scan codes
if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(D)) // ' d
/* { ShowHelpText("SectorEffector"); } */
{
skill = (skill+1)%MAXSKILL;
message("%s", SKILLMODE[skill]);
// printext256(1*4,1*8,11,-1,tempbuf,0);
}
if (keystatus[KEYSC_I])
{
keystatus[KEYSC_I] = 0;
if (keystatus[KEYSC_QUOTE])
if (keystatus[KEYSC_QUOTE]) // ' i
{
if (AIMING_AT_SPRITE)
{
@ -6110,7 +6125,7 @@ static void Keys3d(void)
message("Sprite %d made %svisible", searchwall, (sprite[searchwall].cstat&32768) ? "in":"");
}
}
else // ' i
else
{
showinvisibility = !showinvisibility;
#ifndef YAX_ENABLE
@ -6219,19 +6234,7 @@ static void Keys3d(void)
sprite[searchwall].lotag = getnumber256("Sprite lotag: ", sprite[searchwall].lotag, BTAG_MAX, 0+j);
}
}
#if 0
if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(H)) // ' H
{
if (ASSERT_AIMING)
{
int16_t ohitag = AIMED(hitag);
Bsprintf(tempbuf, "%s hitag: ", Typestr_wss[searchstat]);
AIMED(hitag) = getnumber256(tempbuf, ohitag, BTAG_MAX,0);
if (AIMED(hitag) != ohitag)
asksave = 1;
}
}
#endif
if (keystatus[KEYSC_QUOTE] && PRESSED_KEYSC(S)) // ' S
{
if (ASSERT_AIMING)
@ -6252,38 +6255,6 @@ static void Keys3d(void)
usedcount = !usedcount;
}
#if 0
if (keystatus[KEYSC_TAB]) // TAB : USED
{
// usedcount=!usedcount;
count=0;
for (i=0; i<numwalls; i++)
{
if (wall[i].picnum == temppicnum) count++;
if (wall[i].overpicnum == temppicnum) count++;
}
for (i=0; i<numsectors; i++) // JBF 20040307: was numwalls, thanks Semicharm
{
if (sector[i].ceilingpicnum == temppicnum) count++;
if (sector[i].floorpicnum == temppicnum) count++;
}
statnum = 0; //status 1
i = headspritestat[statnum];
while (i != -1)
{
nexti = nextspritestat[i];
//your code goes here
//ex: printf("Sprite %d has a status of 1 (active)\n",i,statnum);
if (sprite[i].picnum == temppicnum) count++;
i = nexti;
}
}
#endif
if (PRESSED_KEYSC(F1)) // F1
{
helpon = !helpon;