mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1107 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4074884ac2
commit
a7da07bcdf
9 changed files with 75 additions and 76 deletions
|
@ -615,7 +615,7 @@ void editinput(void)
|
|||
mousy = (mousy<<16)+mouseysurp;
|
||||
|
||||
if ((unrealedlook && !mskip) &&
|
||||
(((!mlook && (bstatus&2) && !(bstatus&(1|4)))) || ((bstatus&1) && !(bstatus&(2|4)))))
|
||||
(((!mlook && (bstatus&2) && !(bstatus&(1|4)))) || ((bstatus&1) && !(bstatus&(2|4)))))
|
||||
mlook = 3;
|
||||
|
||||
{
|
||||
|
@ -714,9 +714,9 @@ void editinput(void)
|
|||
horiz -= mousy;
|
||||
|
||||
// if (mousy && !(mousy/4))
|
||||
// horiz--;
|
||||
// if (mousx && !(mousx/2))
|
||||
// ang++;
|
||||
// horiz--;
|
||||
// if (mousx && !(mousx/2))
|
||||
// ang++;
|
||||
if (horiz > 299)
|
||||
horiz = 299;
|
||||
if (horiz < -99)
|
||||
|
@ -5336,7 +5336,7 @@ int _getnumber256(char *namestart, int num, int maxnumber, char sign, void *(fun
|
|||
Bsprintf(buffer,"%s",(char *)func((int)danum));
|
||||
printmessage256(0, 9, buffer);
|
||||
}
|
||||
|
||||
|
||||
showframe(1);
|
||||
|
||||
if (ch >= '0' && ch <= '9')
|
||||
|
|
|
@ -10092,11 +10092,11 @@ void setpalettefade(char r, char g, char b, char offset)
|
|||
}
|
||||
|
||||
curpalettefaded[i].b =
|
||||
p.b + (((palfadergb.b - p.b) * offset) >> 6);
|
||||
p.b + (((palfadergb.b - p.b) * offset) >> 6);
|
||||
curpalettefaded[i].g =
|
||||
p.g + (((palfadergb.g - p.g) * offset) >> 6);
|
||||
p.g + (((palfadergb.g - p.g) * offset) >> 6);
|
||||
curpalettefaded[i].r =
|
||||
p.r + (((palfadergb.r - p.r) * offset) >> 6);
|
||||
p.r + (((palfadergb.r - p.r) * offset) >> 6);
|
||||
curpalettefaded[i].f = 0;
|
||||
}
|
||||
|
||||
|
@ -11238,7 +11238,7 @@ void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride)
|
|||
if (show2dwall[i>>3]&pow2char[i&7])
|
||||
if (totalclock & 16)
|
||||
{
|
||||
// col += (2<<2); // JBF 20040116: two braces is all this needed. man I'm a fool sometimes.
|
||||
// col += (2<<2); // JBF 20040116: two braces is all this needed. man I'm a fool sometimes.
|
||||
pointsize += 1;
|
||||
}
|
||||
}
|
||||
|
@ -11247,10 +11247,10 @@ void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride)
|
|||
#if 1
|
||||
do
|
||||
{
|
||||
/* drawline16(halfxdim16+xp1-pointsize,midydim16+yp1+pointsize,halfxdim16+xp1+pointsize,midydim16+yp1+pointsize,col);
|
||||
drawline16(halfxdim16+xp1+pointsize,midydim16+yp1+pointsize,halfxdim16+xp1+pointsize,midydim16+yp1-pointsize,col);
|
||||
drawline16(halfxdim16+xp1+pointsize,midydim16+yp1-pointsize,halfxdim16+xp1-pointsize,midydim16+yp1-pointsize,col);
|
||||
drawline16(halfxdim16+xp1-pointsize,midydim16+yp1-pointsize,halfxdim16+xp1-pointsize,midydim16+yp1+pointsize,col); */
|
||||
/* drawline16(halfxdim16+xp1-pointsize,midydim16+yp1+pointsize,halfxdim16+xp1+pointsize,midydim16+yp1+pointsize,col);
|
||||
drawline16(halfxdim16+xp1+pointsize,midydim16+yp1+pointsize,halfxdim16+xp1+pointsize,midydim16+yp1-pointsize,col);
|
||||
drawline16(halfxdim16+xp1+pointsize,midydim16+yp1-pointsize,halfxdim16+xp1-pointsize,midydim16+yp1-pointsize,col);
|
||||
drawline16(halfxdim16+xp1-pointsize,midydim16+yp1-pointsize,halfxdim16+xp1-pointsize,midydim16+yp1+pointsize,col); */
|
||||
drawcircle16(halfxdim16+xp1, midydim16+yp1, pointsize, col);
|
||||
}
|
||||
while (pointsize--);
|
||||
|
|
|
@ -693,7 +693,7 @@ int mdloadskin(md2model *m, int number, int pal, int surf)
|
|||
if ((int)sk->palette == pal && sk->skinnum == number && sk->surfnum == surf)
|
||||
{
|
||||
skinfile = sk->fn;
|
||||
texidx = &sk->texid[(globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK) ];
|
||||
texidx = &sk->texid[(globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK)];
|
||||
strcpy(fn,skinfile);
|
||||
//OSD_Printf("Using exact match skin (pal=%d,skinnum=%d,surfnum=%d) %s\n",pal,number,surf,skinfile);
|
||||
break;
|
||||
|
@ -713,7 +713,7 @@ int mdloadskin(md2model *m, int number, int pal, int surf)
|
|||
if (skzero)
|
||||
{
|
||||
skinfile = skzero->fn;
|
||||
texidx = &skzero->texid[(globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK) ];
|
||||
texidx = &skzero->texid[(globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK)];
|
||||
strcpy(fn,skinfile);
|
||||
//OSD_Printf("Using def skin 0,0 as fallback, pal=%d\n", pal);
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ int mdloadskin(md2model *m, int number, int pal, int surf)
|
|||
{
|
||||
if ((unsigned)number >= (unsigned)m->numskins) number = 0;
|
||||
skinfile = m->skinfn + number*64;
|
||||
texidx = &m->texid[ number * (HICEFFECTMASK+1) + (globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK) ];
|
||||
texidx = &m->texid[ number * (HICEFFECTMASK+1) + (globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK)];
|
||||
strcpy(fn,m->basepath); strcat(fn,skinfile);
|
||||
//OSD_Printf("Using MD2/MD3 skin (%d) %s, pal=%d\n",number,skinfile,pal);
|
||||
}
|
||||
|
@ -847,23 +847,23 @@ int mdloadskin(md2model *m, int number, int pal, int surf)
|
|||
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);
|
||||
|
||||
if (glinfo.texcompr && glusetexcompr && glusetexcache)
|
||||
if (cachefil < 0)
|
||||
{
|
||||
// save off the compressed version
|
||||
cachead.quality = r_downsize;
|
||||
cachead.xdim = osizx>>cachead.quality;
|
||||
cachead.ydim = osizy>>cachead.quality;
|
||||
|
||||
i = 0;
|
||||
for (j=0;j<31;j++)
|
||||
if (cachefil < 0)
|
||||
{
|
||||
if (xsiz == pow2long[j]) { i |= 1; }
|
||||
if (ysiz == pow2long[j]) { i |= 2; }
|
||||
// save off the compressed version
|
||||
cachead.quality = r_downsize;
|
||||
cachead.xdim = osizx>>cachead.quality;
|
||||
cachead.ydim = osizy>>cachead.quality;
|
||||
|
||||
i = 0;
|
||||
for (j=0;j<31;j++)
|
||||
{
|
||||
if (xsiz == pow2long[j]) { i |= 1; }
|
||||
if (ysiz == pow2long[j]) { i |= 2; }
|
||||
}
|
||||
cachead.flags = (i!=3) | (hasalpha ? 2 : 0);
|
||||
OSD_Printf("No cached tex for %s.\n",fn);
|
||||
writexcache(fn, picfillen, pal<<8, (globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK), &cachead);
|
||||
}
|
||||
cachead.flags = (i!=3) | (hasalpha ? 2 : 0);
|
||||
OSD_Printf("No cached tex for %s.\n",fn);
|
||||
writexcache(fn, picfillen, pal<<8, (globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK), &cachead);
|
||||
}
|
||||
|
||||
return(*texidx);
|
||||
}
|
||||
|
@ -1480,8 +1480,8 @@ static int md3draw(md3model *m, spritetype *tspr)
|
|||
f = m->interpol; g = 1-f;
|
||||
|
||||
if (m->interpol < 0 || m->interpol > 1 ||
|
||||
m->cframe < 0 || m->cframe >= m->numframes ||
|
||||
m->nframe < 0 || m->nframe >= m->numframes)
|
||||
m->cframe < 0 || m->cframe >= m->numframes ||
|
||||
m->nframe < 0 || m->nframe >= m->numframes)
|
||||
{
|
||||
OSD_Printf("Model frame out of bounds!\n");
|
||||
if (m->interpol < 0)
|
||||
|
|
|
@ -1703,23 +1703,23 @@ int gloadtile_hi(int dapic,int dapalnum, int facen, hicreplctyp *hicr, int damet
|
|||
pth->hicr = hicr;
|
||||
|
||||
if (glinfo.texcompr && glusetexcompr && glusetexcache && !(hicr->flags & 1))
|
||||
if (cachefil < 0)
|
||||
{
|
||||
// save off the compressed version
|
||||
if (hicr->flags & 16) cachead.quality = 0;
|
||||
else cachead.quality = r_downsize;
|
||||
cachead.xdim = tsizx>>cachead.quality;
|
||||
cachead.ydim = tsizy>>cachead.quality;
|
||||
x = 0;
|
||||
for (j=0;j<31;j++)
|
||||
if (cachefil < 0)
|
||||
{
|
||||
if (xsiz == pow2long[j]) { x |= 1; }
|
||||
if (ysiz == pow2long[j]) { x |= 2; }
|
||||
// save off the compressed version
|
||||
if (hicr->flags & 16) cachead.quality = 0;
|
||||
else cachead.quality = r_downsize;
|
||||
cachead.xdim = tsizx>>cachead.quality;
|
||||
cachead.ydim = tsizy>>cachead.quality;
|
||||
x = 0;
|
||||
for (j=0;j<31;j++)
|
||||
{
|
||||
if (xsiz == pow2long[j]) { x |= 1; }
|
||||
if (ysiz == pow2long[j]) { x |= 2; }
|
||||
}
|
||||
cachead.flags = (x!=3) | (hasalpha != 255 ? 2 : 0) | (hicr->flags & 16?8:0); // handle nocompress
|
||||
OSD_Printf("No cached tex for tile %d pal %d.\n",dapic,dapalnum);
|
||||
writexcache(fn, picfillen+(dapalnum<<8), dameth, effect, &cachead);
|
||||
}
|
||||
cachead.flags = (x!=3) | (hasalpha != 255 ? 2 : 0) | (hicr->flags & 16?8:0); // handle nocompress
|
||||
OSD_Printf("No cached tex for tile %d pal %d.\n",dapic,dapalnum);
|
||||
writexcache(fn, picfillen+(dapalnum<<8), dameth, effect, &cachead);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -4475,7 +4475,7 @@ RECHECK:
|
|||
{
|
||||
cullcheckcnt++;
|
||||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x+x, tspr->y+y, tspr->z-(j*i)-512, datempsectnum))
|
||||
tspr->x+x, tspr->y+y, tspr->z-(j*i)-512, datempsectnum))
|
||||
return 1;
|
||||
}
|
||||
while (--i > -1);
|
||||
|
@ -4563,24 +4563,24 @@ void polymost_drawsprite(int snum)
|
|||
cullcheckcnt++;
|
||||
|
||||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x, tspr->y, tspr->z,tspr->sectnum))
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
tspr->x, tspr->y, tspr->z,tspr->sectnum))
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, 0, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, -CULL_OFFSET, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(CULL_OFFSET, 0, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
if (polymost_checkcoordinates(CULL_OFFSET, CULL_OFFSET, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, CULL_OFFSET, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(0, 0, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1515,7 +1515,7 @@ int handleevents(void)
|
|||
case SDL_MOUSEBUTTONUP:
|
||||
switch (ev.button.button)
|
||||
{
|
||||
// some of these get reordered to match winlayer
|
||||
// some of these get reordered to match winlayer
|
||||
default:
|
||||
case SDL_BUTTON_LEFT:
|
||||
j = 0; break;
|
||||
|
|
|
@ -752,7 +752,7 @@ char map_dik_code(int scanCode)
|
|||
// ugly table for remapping out of range DIK_ entries will go here
|
||||
// if I can't figure out the layout problem
|
||||
return scanCode;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// initinput() -- init input system
|
||||
|
@ -856,7 +856,7 @@ DWORD WINAPI ProcessMouse()
|
|||
|
||||
t = getticks();
|
||||
result = IDirectInputDevice7_GetDeviceData(lpDID[MOUSE], sizeof(DIDEVICEOBJECTDATA),
|
||||
(LPDIDEVICEOBJECTDATA)&didod, &dwElements, 0);
|
||||
(LPDIDEVICEOBJECTDATA)&didod, &dwElements, 0);
|
||||
|
||||
if (!dwElements || result != DI_OK)
|
||||
break;
|
||||
|
@ -1539,7 +1539,7 @@ static void GetKeyNames(void)
|
|||
tbuf[0] = 0;
|
||||
GetKeyNameText((i>128?(i+128):i)<<16, tbuf, sizeof(keynames[i])-1);
|
||||
// initprintf("%d %15s %15s\n",i,keynames[i],tbuf);
|
||||
if(*tbuf)strncpy(&keynames[i][0], tbuf, sizeof(keynames[i])-1);
|
||||
if (*tbuf)strncpy(&keynames[i][0], tbuf, sizeof(keynames[i])-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4179,14 +4179,14 @@ static LRESULT CALLBACK WndProcCallback(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
|
|||
// someone stole the palette so try and steal it back
|
||||
if (bDDrawInited && bpp == 8 && fullscreen)
|
||||
{
|
||||
int result = IDirectDrawSurface_SetPalette(lpDDSPrimary, lpDDPalette);
|
||||
if (result != DD_OK)
|
||||
{
|
||||
initprintf("Palette set failed: %s\n", GetDDrawError(result));
|
||||
break;
|
||||
}
|
||||
setpalette(0,256);
|
||||
int result = IDirectDrawSurface_SetPalette(lpDDSPrimary, lpDDPalette);
|
||||
if (result != DD_OK)
|
||||
{
|
||||
initprintf("Palette set failed: %s\n", GetDDrawError(result));
|
||||
break;
|
||||
}
|
||||
setpalette(0,256);
|
||||
break;
|
||||
}
|
||||
if (appactive && (HWND)wParam != hWindow) setpalette(0,256);
|
||||
break;
|
||||
|
|
|
@ -2283,17 +2283,17 @@ BOLT:
|
|||
|
||||
static void bounce(int i)
|
||||
{
|
||||
int daang, dax, day, daz, xvect, yvect, zvect;
|
||||
int dax, day, daz = 4096;
|
||||
spritetype *s = &sprite[i];
|
||||
int hitsect = s->sectnum;
|
||||
int k = sector[hitsect].wallptr;
|
||||
int l = wall[k].point2;
|
||||
|
||||
xvect = mulscale10(s->xvel,sintable[(s->ang+512)&2047]);
|
||||
yvect = mulscale10(s->xvel,sintable[s->ang&2047]);
|
||||
zvect = s->zvel;
|
||||
int xvect = mulscale10(s->xvel,sintable[(s->ang+512)&2047]);
|
||||
int yvect = mulscale10(s->xvel,sintable[s->ang&2047]);
|
||||
int zvect = s->zvel;
|
||||
|
||||
daang = getangle(wall[l].x-wall[k].x,wall[l].y-wall[k].y);
|
||||
int daang = getangle(wall[l].x-wall[k].x,wall[l].y-wall[k].y);
|
||||
|
||||
if (s->z < (hittype[i].floorz+hittype[i].ceilingz)>>1)
|
||||
k = sector[hitsect].ceilingheinum;
|
||||
|
@ -2302,7 +2302,6 @@ static void bounce(int i)
|
|||
|
||||
dax = mulscale14(k,sintable[(daang)&2047]);
|
||||
day = mulscale14(k,sintable[(daang+1536)&2047]);
|
||||
daz = 4096;
|
||||
|
||||
k = xvect*dax+yvect*day+zvect*daz;
|
||||
l = dax*dax+day*day+daz*daz;
|
||||
|
|
|
@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include <shellapi.h>
|
||||
#endif
|
||||
|
||||
#define BUILDDATE " 20081017"
|
||||
#define BUILDDATE " 20081019"
|
||||
#define VERSION " 1.2.0devel"
|
||||
|
||||
static int floor_over_floor;
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
char *s_builddate = "20081018";
|
||||
char *s_builddate = "20081019";
|
||||
char *MusicPtr = NULL;
|
||||
int Musicsize;
|
||||
|
||||
|
|
Loading…
Reference in a new issue