Whitespace cleanup

git-svn-id: https://svn.eduke32.com/eduke32@286 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-08-31 01:56:43 +00:00
parent 138a4ab95f
commit d7a133eefd
5 changed files with 239 additions and 240 deletions

View file

@ -6118,26 +6118,26 @@ killsprite:
i = l;
while (i > 0)
{
i--;
indexes[i] = --spritesortcnt;
depths[i] = (tspriteptr[spritesortcnt]->x - globalposx) * (tspriteptr[spritesortcnt]->x - globalposx) +
(tspriteptr[spritesortcnt]->y - globalposy) * (tspriteptr[spritesortcnt]->y - globalposy);
i--;
indexes[i] = --spritesortcnt;
depths[i] = (tspriteptr[spritesortcnt]->x - globalposx) * (tspriteptr[spritesortcnt]->x - globalposx) +
(tspriteptr[spritesortcnt]->y - globalposy) * (tspriteptr[spritesortcnt]->y - globalposy);
}
// second pass (and possibly more) to z-sort
j = 0;
while (j == 0)
{
j = 1;
for(i=l-1;i>0;i--)
{
if (depths[i] < depths[i-1])
{
swaplong(&indexes[i-1], &indexes[i]);
swaplong(&depths[i-1], &depths[i]);
j = 0;
}
}
j = 1;
for(i=l-1;i>0;i--)
{
if (depths[i] < depths[i-1])
{
swaplong(&indexes[i-1], &indexes[i]);
swaplong(&depths[i-1], &depths[i]);
j = 0;
}
}
}*/
// MASKS PREPROCESSING
@ -6147,45 +6147,45 @@ killsprite:
/*i = k;
while (i > 0)
{
i--;
i--;
// leaf index
maskleaves[i].index = --maskwallcnt;
// leaf index
maskleaves[i].index = --maskwallcnt;
// leaf boundaries
maskleaves[i].p1.x = wall[thewall[maskwall[maskleaves[i].index]]].x - globalposx;
maskleaves[i].p1.y = wall[thewall[maskwall[maskleaves[i].index]]].y - globalposy;
maskleaves[i].p2.x = wall[wall[thewall[maskwall[maskleaves[i].index]]].point2].x - globalposx;
maskleaves[i].p2.y = wall[wall[thewall[maskwall[maskleaves[i].index]]].point2].y - globalposy;
// leaf boundaries
maskleaves[i].p1.x = wall[thewall[maskwall[maskleaves[i].index]]].x - globalposx;
maskleaves[i].p1.y = wall[thewall[maskwall[maskleaves[i].index]]].y - globalposy;
maskleaves[i].p2.x = wall[wall[thewall[maskwall[maskleaves[i].index]]].point2].x - globalposx;
maskleaves[i].p2.y = wall[wall[thewall[maskwall[maskleaves[i].index]]].point2].y - globalposy;
// leaf equations
maskleaves[i].maskeq = equation(maskleaves[i].p1.x, maskleaves[i].p1.y, maskleaves[i].p2.x, maskleaves[i].p2.y);
maskleaves[i].p1eq = equation(0, 0, maskleaves[i].p1.x, maskleaves[i].p1.y);
maskleaves[i].p2eq = equation(0, 0, maskleaves[i].p2.x, maskleaves[i].p2.y);
// leaf equations
maskleaves[i].maskeq = equation(maskleaves[i].p1.x, maskleaves[i].p1.y, maskleaves[i].p2.x, maskleaves[i].p2.y);
maskleaves[i].p1eq = equation(0, 0, maskleaves[i].p1.x, maskleaves[i].p1.y);
maskleaves[i].p2eq = equation(0, 0, maskleaves[i].p2.x, maskleaves[i].p2.y);
// drawing flag
maskleaves[i].drawing = 0;
// drawing flag
maskleaves[i].drawing = 0;
//OSD_Printf("Processed mask - %i\n", i);
//OSD_Printf("Processed mask - %i\n", i);
}
// second pass to connect the leaves together
i = k;
while (i > 0)
{
i--;
i--;
m = 0;
j = k;
while (j > 0)
{
j--;
m = 0;
j = k;
while (j > 0)
{
j--;
if ((i != j) && (wallobstructswall(&maskleaves[i], &maskleaves[j])))
maskleaves[i].branch[m++] = &maskleaves[j];
}
maskleaves[i].branch[m] = NULL;
//OSD_Printf("Processed parents for mask %i\n", i);
if ((i != j) && (wallobstructswall(&maskleaves[i], &maskleaves[j])))
maskleaves[i].branch[m++] = &maskleaves[j];
}
maskleaves[i].branch[m] = NULL;
//OSD_Printf("Processed parents for mask %i\n", i);
}*/
// DRAWING
@ -6193,18 +6193,18 @@ killsprite:
/*i = l - 1;
while (i >= 0)
{
//OSD_Printf("sprite - %i\n", depths[i]);
drawsprite(indexes[i]);
i--;
//OSD_Printf("sprite - %i\n", depths[i]);
drawsprite(indexes[i]);
i--;
}
// this codes draws the remaining (if any) masked walls, meaning those that are directly before the player
while (k > 0)
{
k--;
//OSD_Printf("Beginning drawing process for mask %i\n", k);
//drawmaskleaf(&maskleaves[k]);
drawmaskwall(k);
k--;
//OSD_Printf("Beginning drawing process for mask %i\n", k);
//drawmaskleaf(&maskleaves[k]);
drawmaskwall(k);
}
free(indexes);
free(depths);*/

View file

@ -148,7 +148,7 @@ int loadgldriver(const char *driver)
#ifdef _WIN32
driver = "OPENGL32.DLL";
#elif defined __APPLE__
driver = "/System/Library/Frameworks/OpenGL.framework/OpenGL";
driver = "/System/Library/Frameworks/OpenGL.framework/OpenGL";
#else
driver = "libGL.so";
#endif

View file

@ -347,7 +347,7 @@ void polymer_drawsector(long daposx, long daposy, long daposz, short
wal = &wall[sec->wallptr + i];
}
if (pr_verbosity >= 3) OSD_Printf("PR : Finished drawing sector %i...\n", sectnum);
if (pr_verbosity >= 3) OSD_Printf("PR : Finished drawing sector %i...\n", sectnum);
}
void polymer_drawrooms(long daposx, long daposy, long daposz, short daang, long dahoriz, short dacursectnum)

View file

@ -2879,11 +2879,11 @@ static void polymost_drawalls (long bunch)
if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy);
else if ((oy < cy0) != (oy < cy1))
{ /* cy1 cy0
// / \
//oy---------- oy---------
// / \
// cy0 cy1
*/
// / \
//oy---------- oy---------
// / \
// cy0 cy1
*/
ox = (oy-cy0)*(x1-x0)/(cy1-cy0) + x0;
if (oy < cy0) { domost(ox,oy,x0,oy); domost(x1,cy1,ox,oy); }
else { domost(ox,oy,x0,cy0); domost(x1,oy,ox,oy); }
@ -3840,8 +3840,8 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; }
break;
}
if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal))) && ((tspr->cstat&48) != 0))
if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal))) && ((tspr->cstat&48) != 0))
bglDepthMask(0);
if (((tspr->cstat&2) || (gltexmayhavealpha(tspr->picnum,tspr->pal))) && ((tspr->cstat&48) != 0))
bglDepthMask(0);
#endif
switch((globalorientation>>4)&3)
@ -4228,16 +4228,16 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum,
}
#if 0
if(!nofog)
{
i = klabs(tspr.shade);
if(!nofog)
{
i = klabs(tspr.shade);
bglFogf(GL_FOG_DENSITY,gvisibility/(tspr.shade<0?(shadetable[i]-glnegshadeoffset)*glnegshadescale:1)*(tspr.shade<0?1:shadetable[i]*glshadescale)*((float)((unsigned char)(sector[tspr.sectnum].visibility<240?sector[tspr.sectnum].visibility+16:sector[tspr.sectnum].visibility-239))));
}
}
mddraw(&tspr);
#else
if(!nofog) bglDisable(GL_FOG);
if(!nofog) bglDisable(GL_FOG);
mddraw(&tspr);
if(!nofog) bglEnable(GL_FOG);
if(!nofog) bglEnable(GL_FOG);
#endif
viewingrange = oldviewingrange;
gxyaspect = ogxyaspect;

View file

@ -1786,7 +1786,7 @@ int setvideomode(int x, int y, int c, int fs)
initprintf("Setting video mode %dx%d (%d-bit %s)\n",
x,y,c, ((fs&1) ? "fullscreen" : "windowed"));
if (CreateAppWindow(modenum)) return -1;
if (CreateAppWindow(modenum)) return -1;
if (!gammabrightness) {
float f = 1.0 + ((float)curbrightness / 10.0);
@ -2035,7 +2035,6 @@ void showframe(int w)
bglPushMatrix();
bglLoadIdentity();
bglDisable(GL_ALPHA_TEST);
bglDisable(GL_DEPTH_TEST);
bglDisable(GL_ALPHA_TEST);
bglDisable(GL_TEXTURE_2D);
@ -2957,7 +2956,7 @@ static BOOL CreateAppWindow(int modenum)
}
SetWindowPos(hWindow, HWND_TOP, x, y, w, h, 0);
SetWindowText(hWindow, apptitle);
SetWindowText(hWindow, apptitle);
ShowWindow(hWindow, SW_SHOWNORMAL);
SetForegroundWindow(hWindow);
SetFocus(hWindow);