Showview command updates and a couple of other things

git-svn-id: https://svn.eduke32.com/eduke32@521 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-03-11 00:20:32 +00:00
parent cb77e41236
commit 38810c6561
6 changed files with 65 additions and 10 deletions

View file

@ -52,7 +52,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <windows.h>
#include <shellapi.h>
extern int getversionfromwebsite(char *buffer);
#define BUILDDATE 20070125
#define BUILDDATE 20070310
#define UPDATEINTERVAL 86400 // 24h
#endif
@ -6604,7 +6604,7 @@ void animatesprites(long x,long y,int a,long smoothratio)
}
}
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1)
if ((display_mirror || screenpeek != p || s->owner == -1) && ud.multimode > 1)
{
if (ud.showweapons && sprite[ps[p].i].extra > 0 && ps[p].curr_weapon > 0)
{

View file

@ -3167,13 +3167,17 @@ int getincangle(int a,int na)
na &= 2047;
if (klabs(a-na) < 1024)
{
// OSD_Printf("getincangle() returning %d\n",na-a);
return (na-a);
}
if (na > 1024) na -= 2048;
if (a > 1024) a -= 2048;
na -= 2048;
a -= 2048;
// OSD_Printf("getincangle() returning %d\n",na-a);
return (na-a);
}
@ -4602,6 +4606,7 @@ static int parse(void)
long y1=scale(GetGameVarID(*insptr++,g_i,g_p),ydim,200);
long x2=scale(GetGameVarID(*insptr++,g_i,g_p),xdim,320);
long y2=scale(GetGameVarID(*insptr++,g_i,g_p),ydim,200);
long smoothratio = 65536;
if (x1 > x2) swaplong(&x1,&x2);
if (y1 > y2) swaplong(&y1,&y2);
@ -4614,9 +4619,57 @@ static int parse(void)
glprojectionhacks = 0;
#endif
setview(x1,y1,x2,y2);
drawrooms(x,y,z,a,horiz,sect);
display_mirror = 1; animatesprites(x,y,a,65536L); display_mirror = 0;
#if 0
if (!ud.pause_on && ((ud.show_help == 0 && ud.multimode < 2 && !(ps[myconnectindex].gm&MODE_MENU)) || ud.multimode > 1 || ud.recstat == 2))
smoothratio = min(max((totalclock-ototalclock)*(65536L/TICSPERFRAME),0),65536);
#endif
dointerpolations(smoothratio);
#ifdef SE40
se40code(x,y,z,a,horiz,smoothratio);
#endif
if ((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0)
{
long j, i = 0, k, dst = 0x7fffffff;
for (k=0;k<mirrorcnt;k++)
{
j = klabs(wall[mirrorwall[k]].x-x);
j += klabs(wall[mirrorwall[k]].y-y);
if (j < dst) dst = j, i = k;
}
if (wall[mirrorwall[i]].overpicnum == MIRROR)
{
long tposx,tposy;
short tang;
preparemirror(x,y,z,a,horiz,mirrorwall[i],mirrorsector[i],&tposx,&tposy,&tang);
j = visibility;
visibility = (j>>1) + (j>>2);
drawrooms(tposx,tposy,z,tang,horiz,mirrorsector[i]+MAXSECTORS);
display_mirror = 1;
animatesprites(tposx,tposy,tang,smoothratio);
display_mirror = 0;
drawmasks();
completemirror(); //Reverse screen x-wise in this function
visibility = j;
}
gotpic[MIRROR>>3] &= ~(1<<(MIRROR&7));
}
drawrooms(x,y,z,a,horiz,sect);
display_mirror = 2;
animatesprites(x,y,a,smoothratio);
display_mirror = 0;
drawmasks();
restoreinterpolations();
vscrn();
#if defined(USE_OPENGL) && defined(POLYMOST)
glprojectionhacks = j;

View file

@ -1187,6 +1187,8 @@ static void AddSystemVars()
AddGameVar("myonground",(long)&myonground, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PCHAR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myhardlanding",(long)&myhardlanding, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PCHAR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("myreturntocenter",(long)&myreturntocenter, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PCHAR | GAMEVAR_FLAG_SYNCCHECK);
AddGameVar("display_mirror",(long)&display_mirror, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_PCHAR | GAMEVAR_FLAG_SYNCCHECK);
}
void InitGameVars(void)

View file

@ -231,7 +231,7 @@ char *MV_ErrorString(int ErrorNumber)
Returns the buffer size for the given samplerate.
---------------------------------------------------------------------*/
#define BASEBUFSZ (512+128)
#define BASEBUFSZ (512+256)
static unsigned MV_GetBufferSize(unsigned samplerate)
{
static unsigned lastsr = 0, lastbufsz = 0;

View file

@ -451,14 +451,14 @@ void cacheit(void)
loadtile((short)i);
#if defined(POLYMOST) && defined(USE_OPENGL)
if (useprecache && !KB_KeyPressed(sc_Space))
if (useprecache)
{
if (precachehightile[0][i>>3] & pow2char[i&7])
for (k=0; k<MAXPALOOKUPS; k++)
for (k=0; k<MAXPALOOKUPS && !KB_KeyPressed(sc_Space); k++)
polymost_precache(i,k,0);
if (precachehightile[1][i>>3] & pow2char[i&7])
for (k=0; k<MAXPALOOKUPS; k++)
for (k=0; k<MAXPALOOKUPS && !KB_KeyPressed(sc_Space); k++)
polymost_precache(i,k,1);
}
#endif