mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
ROR support... mostly working but obviously not finished yet
git-svn-id: https://svn.eduke32.com/eduke32@1450 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
28e5528417
commit
8d930bf35d
9 changed files with 1630 additions and 1535 deletions
BIN
polymer/eduke32/ror.map
Normal file
BIN
polymer/eduke32/ror.map
Normal file
Binary file not shown.
|
@ -365,7 +365,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
|
|||
|
||||
if (sprite[spritenum].statnum == 4)
|
||||
retval =
|
||||
clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),8L,(4<<8),(4<<8),cliptype);
|
||||
clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),(int32_t)(sprite[spritenum].clipdist<<2),(4<<8),(4<<8),cliptype);
|
||||
else
|
||||
retval =
|
||||
clipmove((vec3_t *)&sprite[spritenum],&dasectnum,((change->x*TICSPERFRAME)<<11),((change->y*TICSPERFRAME)<<11),(int32_t)(sprite[spritenum].clipdist<<2),(4<<8),(4<<8),cliptype);
|
||||
|
@ -380,8 +380,60 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
|
|||
daz = sprite[spritenum].z + ((change->z*TICSPERFRAME)>>3);
|
||||
if ((daz > ActorExtra[spritenum].ceilingz) && (daz <= ActorExtra[spritenum].floorz))
|
||||
sprite[spritenum].z = daz;
|
||||
else if (retval == 0)
|
||||
return(16384+dasectnum);
|
||||
else if (retval == 0) retval = 16384+dasectnum;
|
||||
|
||||
if (retval == (16384+dasectnum))
|
||||
if (sprite[spritenum].statnum == STAT_PROJECTILE)
|
||||
{
|
||||
int32_t i, nexti;
|
||||
|
||||
TRAVERSE_SPRITE_STAT(headspritestat[STAT_TRANSPORT], i, nexti)
|
||||
if (sprite[i].sectnum == dasectnum)
|
||||
{
|
||||
switch (sector[dasectnum].lotag)
|
||||
{
|
||||
case 1:
|
||||
if (daz >= ActorExtra[spritenum].floorz)
|
||||
{
|
||||
if (totalclock > ActorExtra[spritenum].temp_data[9])
|
||||
{
|
||||
ActorExtra[spritenum].temp_data[9] = totalclock + (TICSPERFRAME<<2);
|
||||
|
||||
sprite[spritenum].x += (sprite[OW].x-SX);
|
||||
sprite[spritenum].y += (sprite[OW].y-SY);
|
||||
sprite[spritenum].z = sector[sprite[OW].sectnum].ceilingz - daz + sector[sprite[i].sectnum].floorz;
|
||||
|
||||
ActorExtra[spritenum].bposx = sprite[spritenum].x;
|
||||
ActorExtra[spritenum].bposy = sprite[spritenum].y;
|
||||
ActorExtra[spritenum].bposz = sprite[spritenum].z;
|
||||
|
||||
changespritesect(spritenum,sprite[OW].sectnum);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
case 2:
|
||||
if (daz <= ActorExtra[spritenum].ceilingz)
|
||||
{
|
||||
if (totalclock > ActorExtra[spritenum].temp_data[9])
|
||||
{
|
||||
ActorExtra[spritenum].temp_data[9] = totalclock + (TICSPERFRAME<<2);
|
||||
sprite[spritenum].x += (sprite[OW].x-SX);
|
||||
sprite[spritenum].y += (sprite[OW].y-SY);
|
||||
sprite[spritenum].z = sector[sprite[OW].sectnum].floorz - daz + sector[sprite[i].sectnum].ceilingz;
|
||||
|
||||
ActorExtra[spritenum].bposx = sprite[spritenum].x;
|
||||
ActorExtra[spritenum].bposy = sprite[spritenum].y;
|
||||
ActorExtra[spritenum].bposz = sprite[spritenum].z;
|
||||
|
||||
changespritesect(spritenum,sprite[OW].sectnum);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(retval);
|
||||
}
|
||||
|
@ -2788,7 +2840,7 @@ static void G_MoveWeapons(void)
|
|||
}
|
||||
|
||||
|
||||
if (s->picnum == RPG && s->yvel >= 0 && sprite[s->yvel].sectnum < MAXSECTORS)
|
||||
if (s->picnum == RPG && s->yvel >= 0)
|
||||
if (FindDistance2D(s->x-sprite[s->yvel].x,s->y-sprite[s->yvel].y) < 256)
|
||||
j = 49152|s->yvel;
|
||||
|
||||
|
@ -3136,7 +3188,7 @@ static void G_MoveTransports(void)
|
|||
k = 0;
|
||||
|
||||
if (onfloorz && sectlotag == 1 && g_player[p].ps->on_ground &&
|
||||
g_player[p].ps->posz > (sector[sect].floorz-1080) &&
|
||||
g_player[p].ps->posz >= sector[sect].floorz &&
|
||||
(TEST_SYNC_KEY(g_player[p].sync->bits, SK_CROUCH) || g_player[p].ps->poszv > 2048))
|
||||
// if( onfloorz && sectlotag == 1 && g_player[p].ps->posz > (sector[sect].floorz-(6<<8)) )
|
||||
{
|
||||
|
@ -3151,12 +3203,15 @@ static void G_MoveTransports(void)
|
|||
g_player[p].ps->oposz = g_player[p].ps->posz =
|
||||
sector[sprite[OW].sectnum].ceilingz;
|
||||
|
||||
/*
|
||||
g_player[p].ps->posxv = 4096-(krand()&8192);
|
||||
g_player[p].ps->posyv = 4096-(krand()&8192);
|
||||
// g_player[p].ps->poszv += 1080;
|
||||
*/
|
||||
if (TEST_SYNC_KEY(g_player[p].sync->bits, SK_CROUCH))
|
||||
g_player[p].ps->poszv += 512;
|
||||
}
|
||||
|
||||
if (onfloorz && sectlotag == 2 && g_player[p].ps->posz < (sector[sect].ceilingz+1080) && g_player[p].ps->poszv == 0)
|
||||
if (onfloorz && sectlotag == 2 && g_player[p].ps->posz <= sector[sect].ceilingz /*&& g_player[p].ps->poszv == 0*/)
|
||||
{
|
||||
k = 1;
|
||||
// if( sprite[j].extra <= 0) break;
|
||||
|
@ -3172,14 +3227,15 @@ static void G_MoveTransports(void)
|
|||
|
||||
g_player[p].ps->jumping_toggle = 1;
|
||||
g_player[p].ps->jumping_counter = 0;
|
||||
g_player[p].ps->poszv = 0;
|
||||
// g_player[p].ps->poszv += 1024;
|
||||
}
|
||||
|
||||
if (k == 1)
|
||||
{
|
||||
vec3_t vect;
|
||||
g_player[p].ps->oposx = g_player[p].ps->posx += sprite[OW].x-SX;
|
||||
g_player[p].ps->oposy = g_player[p].ps->posy += sprite[OW].y-SY;
|
||||
g_player[p].ps->bobposx = g_player[p].ps->oposx = g_player[p].ps->posx += sprite[OW].x-SX;
|
||||
g_player[p].ps->bobposy = g_player[p].ps->oposy = g_player[p].ps->posy += sprite[OW].y-SY;
|
||||
|
||||
if (sprite[OW].owner != OW)
|
||||
g_player[p].ps->transporter_hold = -2;
|
||||
|
@ -3215,13 +3271,14 @@ static void G_MoveTransports(void)
|
|||
if (sprite[j].extra > 0)
|
||||
goto JBOLT;
|
||||
}
|
||||
case 4:
|
||||
// case 4:
|
||||
case 5:
|
||||
case 12:
|
||||
case 13:
|
||||
|
||||
ll = klabs(sprite[j].zvel);
|
||||
|
||||
if (totalclock > ActorExtra[j].temp_data[9])
|
||||
{
|
||||
warpspriteto = 0;
|
||||
if (ll && sectlotag == 2 && sprite[j].z < (sector[sect].ceilingz+ll))
|
||||
|
@ -3259,7 +3316,7 @@ static void G_MoveTransports(void)
|
|||
case PLAYERONWATER__STATIC:
|
||||
if (sectlotag == 2)
|
||||
{
|
||||
sprite[j].cstat &= 32767;
|
||||
sprite[j].cstat &= 32768;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -3329,9 +3386,11 @@ static void G_MoveTransports(void)
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
ActorExtra[j].temp_data[9] = totalclock + (TICSPERFRAME<<2);
|
||||
|
||||
sprite[j].x += (sprite[OW].x-SX);
|
||||
sprite[j].y += (sprite[OW].y-SY);
|
||||
sprite[j].z = sector[sprite[OW].sectnum].ceilingz+ll;
|
||||
sprite[j].z = sector[sprite[OW].sectnum].ceilingz;
|
||||
|
||||
ActorExtra[j].bposx = sprite[j].x;
|
||||
ActorExtra[j].bposy = sprite[j].y;
|
||||
|
@ -3341,9 +3400,10 @@ static void G_MoveTransports(void)
|
|||
|
||||
break;
|
||||
case 2:
|
||||
ActorExtra[j].temp_data[9] = totalclock + (TICSPERFRAME<<2);
|
||||
sprite[j].x += (sprite[OW].x-SX);
|
||||
sprite[j].y += (sprite[OW].y-SY);
|
||||
sprite[j].z = sector[sprite[OW].sectnum].floorz-ll;
|
||||
sprite[j].z = sector[sprite[OW].sectnum].floorz;
|
||||
|
||||
ActorExtra[j].bposx = sprite[j].x;
|
||||
ActorExtra[j].bposy = sprite[j].y;
|
||||
|
@ -4302,7 +4362,7 @@ static void G_MoveActors(void)
|
|||
if (j >= 0)
|
||||
{
|
||||
t[3] = 1;
|
||||
t[4] = 0;
|
||||
t[2] = 0;
|
||||
l = 0;
|
||||
s->xvel = 0;
|
||||
goto DETONATEB;
|
||||
|
@ -4354,7 +4414,7 @@ static void G_MoveActors(void)
|
|||
if (t[3] == 0 && (s->picnum == BOUNCEMINE || s->picnum == MORTER) && (j || x < 844))
|
||||
{
|
||||
t[3] = 1;
|
||||
t[4] = 0;
|
||||
t[2] = 0;
|
||||
l = 0;
|
||||
s->xvel = 0;
|
||||
goto DETONATEB;
|
||||
|
@ -4423,9 +4483,9 @@ DETONATEB:
|
|||
|
||||
if (t[6] == 3)
|
||||
{
|
||||
t[4]++;
|
||||
t[2]++;
|
||||
|
||||
if (t[4] == 2)
|
||||
if (t[2] == 2)
|
||||
{
|
||||
x = s->extra;
|
||||
m = 0;
|
||||
|
@ -4457,7 +4517,7 @@ DETONATEB:
|
|||
goto BOLT;
|
||||
}
|
||||
|
||||
if (t[4] > 20)
|
||||
if (t[2] > 20)
|
||||
{
|
||||
if (s->owner != i || ud.respawn_items == 0)
|
||||
{
|
||||
|
@ -7861,8 +7921,9 @@ void G_MoveWorld(void)
|
|||
ActorExtra[i].lightId = -1;
|
||||
ActorExtra[i].lightptr = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (ActorExtra[i].lightptr != NULL && ActorExtra[i].lightcount)
|
||||
{
|
||||
|
@ -7917,6 +7978,7 @@ void G_MoveWorld(void)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (DynamicTileMap[sprite[i].picnum])
|
||||
{
|
||||
case ATOMICHEALTH__STATIC:
|
||||
|
@ -8024,8 +8086,8 @@ void G_MoveWorld(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!apScriptGameEvent[EVENT_GAME] || A_CheckSpriteFlags(i, SPRITE_NOEVENTCODE))
|
||||
{
|
||||
i = nextspritestat[i];
|
||||
|
|
|
@ -4987,7 +4987,7 @@ static void Keys3d(void)
|
|||
}
|
||||
|
||||
smooshyalign = keystatus[KEYSC_gKP5];
|
||||
repeatpanalign = eitherSHIFT || (bstatus&2);
|
||||
repeatpanalign = (eitherSHIFT || (bstatus&2));
|
||||
|
||||
if (mlook == 2)
|
||||
mlook = 0;
|
||||
|
|
|
@ -4117,190 +4117,167 @@ void G_DrawBackground(void)
|
|||
pus = pub = NUMPAGES;
|
||||
}
|
||||
|
||||
#define SE40
|
||||
|
||||
#ifdef SE40
|
||||
// Floor Over Floor
|
||||
|
||||
// If standing in sector with SE42 or SE44
|
||||
// then draw viewing to SE41 and raise all =hi SE43 cielings.
|
||||
|
||||
// If standing in sector with SE43 or SE45
|
||||
// then draw viewing to SE40 and lower all =hi SE42 floors.
|
||||
|
||||
static void SE40_Draw(int32_t spnum,int32_t x,int32_t y,int32_t z,int32_t a,int32_t h,int32_t smoothratio)
|
||||
{
|
||||
static int32_t tempsectorz[MAXSECTORS];
|
||||
static int32_t tempsectorpicnum[MAXSECTORS];
|
||||
|
||||
int32_t i=0,j=0,k=0;
|
||||
int32_t floor1=0,floor2=0,ok=0,fofmode=0,draw_both=0;
|
||||
int32_t offx,offy,offz;
|
||||
|
||||
if (sprite[spnum].ang!=512) return;
|
||||
|
||||
// Things are a little different now, as we allow for masked transparent
|
||||
// floors and ceilings. So the FOF textures is no longer required
|
||||
// Additionally names.h also defines FOF as 13 which isn't useful for us
|
||||
// so we'll use 562 instead
|
||||
tilesizx[562] = 0;
|
||||
tilesizy[562] = 0;
|
||||
|
||||
floor1=spnum;
|
||||
|
||||
if (sprite[spnum].lotag==42) fofmode=40;
|
||||
if (sprite[spnum].lotag==43) fofmode=41;
|
||||
if (sprite[spnum].lotag==44) fofmode=40;
|
||||
if (sprite[spnum].lotag==45) fofmode=41;
|
||||
|
||||
// fofmode=sprite[spnum].lotag-2;
|
||||
|
||||
// sectnum=sprite[j].sectnum;
|
||||
// sectnum=cursectnum;
|
||||
ok++;
|
||||
|
||||
/* recursive? - Not at the moment
|
||||
for(j=0;j<MAXSPRITES;j++)
|
||||
{
|
||||
if(
|
||||
sprite[j].sectnum==sectnum &&
|
||||
sprite[j].picnum==1 &&
|
||||
sprite[j].lotag==110
|
||||
) { DrawFloorOverFloor(j); break;}
|
||||
}
|
||||
*/
|
||||
|
||||
// if(ok==0) { Message("no fof",RED); return; }
|
||||
|
||||
for (j=headspritestat[15]; j>=0; j=nextspritestat[j])
|
||||
{
|
||||
if (sprite[j].picnum==1 && sprite[j].lotag==fofmode && sprite[j].hitag==sprite[floor1].hitag)
|
||||
{
|
||||
floor1=j;
|
||||
fofmode=sprite[j].lotag;
|
||||
ok++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if(ok==1) { Message("no floor1",RED); return; }
|
||||
|
||||
if (fofmode==40) k=41;
|
||||
else k=40;
|
||||
|
||||
for (j=headspritestat[15]; j>=0; j=nextspritestat[j])
|
||||
{
|
||||
if (sprite[j].picnum==1 && sprite[j].lotag==k && sprite[j].hitag==sprite[floor1].hitag)
|
||||
{
|
||||
floor2=j;
|
||||
ok++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
i=floor1;
|
||||
offx=sprite[floor2].x-sprite[floor1].x;
|
||||
offy=sprite[floor2].y-sprite[floor1].y;
|
||||
offz=0;
|
||||
|
||||
if (sprite[floor2].ang >= 1024)
|
||||
offz = sprite[floor2].z;
|
||||
else if (fofmode==41)
|
||||
offz = sector[sprite[floor2].sectnum].floorz;
|
||||
else
|
||||
offz = sector[sprite[floor2].sectnum].ceilingz;
|
||||
|
||||
if (sprite[floor1].ang >= 1024)
|
||||
offz -= sprite[floor1].z;
|
||||
else if (fofmode==40)
|
||||
offz -= sector[sprite[floor1].sectnum].floorz;
|
||||
else
|
||||
offz -= sector[sprite[floor1].sectnum].ceilingz;
|
||||
|
||||
// if(ok==2) { Message("no floor2",RED); return; }
|
||||
|
||||
for (j=headspritestat[15]; j>=0; j=nextspritestat[j]) // raise ceiling or floor
|
||||
{
|
||||
if (sprite[j].picnum==1 && sprite[j].lotag==k+2 && sprite[j].hitag==sprite[floor1].hitag)
|
||||
{
|
||||
if (k==40)
|
||||
{
|
||||
tempsectorz[sprite[j].sectnum]=sector[sprite[j].sectnum].floorz;
|
||||
sector[sprite[j].sectnum].floorz+=(((z-sector[sprite[j].sectnum].floorz)/32768)+1)*32768;
|
||||
tempsectorpicnum[sprite[j].sectnum]=sector[sprite[j].sectnum].floorpicnum;
|
||||
sector[sprite[j].sectnum].floorpicnum=562;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempsectorz[sprite[j].sectnum]=sector[sprite[j].sectnum].ceilingz;
|
||||
sector[sprite[j].sectnum].ceilingz+=(((z-sector[sprite[j].sectnum].ceilingz)/32768)-1)*32768;
|
||||
tempsectorpicnum[sprite[j].sectnum]=sector[sprite[j].sectnum].ceilingpicnum;
|
||||
sector[sprite[j].sectnum].ceilingpicnum=562;
|
||||
}
|
||||
draw_both = 1;
|
||||
}
|
||||
}
|
||||
|
||||
drawrooms(x+offx,y+offy,z+offz,a,h,sprite[floor2].sectnum);
|
||||
G_DoSpriteAnimations(x,y,a,smoothratio);
|
||||
drawmasks();
|
||||
|
||||
if (draw_both)
|
||||
{
|
||||
for (j=headspritestat[15]; j>=0; j=nextspritestat[j]) // restore ceiling or floor for the draw both sectors
|
||||
{
|
||||
if (sprite[j].picnum==1 &&
|
||||
sprite[j].lotag==k+2 &&
|
||||
sprite[j].hitag==sprite[floor1].hitag)
|
||||
{
|
||||
if (k==40)
|
||||
{
|
||||
sector[sprite[j].sectnum].floorz=tempsectorz[sprite[j].sectnum];
|
||||
sector[sprite[j].sectnum].floorpicnum=tempsectorpicnum[sprite[j].sectnum];
|
||||
}
|
||||
else
|
||||
{
|
||||
sector[sprite[j].sectnum].ceilingz=tempsectorz[sprite[j].sectnum];
|
||||
sector[sprite[j].sectnum].ceilingpicnum=tempsectorpicnum[sprite[j].sectnum];
|
||||
}
|
||||
}// end if
|
||||
}// end for
|
||||
|
||||
// Now re-draw
|
||||
drawrooms(x+offx,y+offy,z+offz,a,h,sprite[floor2].sectnum);
|
||||
G_DoSpriteAnimations(x,y,a,smoothratio);
|
||||
drawmasks();
|
||||
}
|
||||
} // end SE40
|
||||
|
||||
void se40code(int32_t x,int32_t y,int32_t z,int32_t a,int32_t h, int32_t smoothratio)
|
||||
{
|
||||
int32_t i= headspritestat[15];
|
||||
|
||||
while (i >= 0)
|
||||
{
|
||||
int32_t t = sprite[i].lotag;
|
||||
switch (t)
|
||||
{
|
||||
// case 40:
|
||||
// case 41:
|
||||
// SE40_Draw(i,x,y,a,smoothratio);
|
||||
// break;
|
||||
case 42:
|
||||
case 43:
|
||||
case 44:
|
||||
case 45:
|
||||
if (g_player[screenpeek].ps->cursectnum == sprite[i].sectnum)
|
||||
SE40_Draw(i,x,y,z,a,h,smoothratio);
|
||||
break;
|
||||
}
|
||||
i = nextspritestat[i];
|
||||
}
|
||||
}
|
||||
#endif /* SE40 */
|
||||
static int32_t ror_sprite = -1;
|
||||
|
||||
static int32_t oyrepeat=-1;
|
||||
extern float r_ambientlight;
|
||||
|
||||
char ror_protectedsectors[MAXSECTORS];
|
||||
int32_t drawing_ror = 0;
|
||||
|
||||
void G_SE40(int32_t smoothratio)
|
||||
{
|
||||
if (getrendermode() != 4 && ror_sprite != -1)
|
||||
{
|
||||
int32_t x, y, z;
|
||||
int16_t sect;
|
||||
int32_t level = 0;
|
||||
spritetype *sp = &sprite[ror_sprite];
|
||||
int32_t sprite2 = sp->yvel;
|
||||
|
||||
if (klabs(sector[sp->sectnum].floorz - sp->z) < klabs(sector[sprite[sprite2].sectnum].floorz - sprite[sprite2].z))
|
||||
level = 1;
|
||||
|
||||
x = ud.camerax - sp->x;
|
||||
y = ud.cameray - sp->y;
|
||||
z = ud.cameraz - (level ? sector[sp->sectnum].floorz : sector[sp->sectnum].ceilingz);
|
||||
|
||||
sect = sprite[sprite2].sectnum;
|
||||
updatesector(sprite[sprite2].x + x, sprite[sprite2].y + y, §);
|
||||
|
||||
if (sect != -1)
|
||||
{
|
||||
int32_t renderz, picnum;
|
||||
int16_t backupstat[numsectors];
|
||||
int32_t backupz[numsectors];
|
||||
int32_t i;
|
||||
int32_t pix_diff, newz;
|
||||
// initprintf("drawing ror\n");
|
||||
|
||||
if (level)
|
||||
{
|
||||
// renderz = sector[sprite[sprite2].sectnum].ceilingz;
|
||||
renderz = sprite[sprite2].z - (sprite[sprite2].yrepeat * tilesizy[sprite[sprite2].picnum]<<1);
|
||||
picnum = sector[sprite[sprite2].sectnum].ceilingpicnum;
|
||||
sector[sprite[sprite2].sectnum].ceilingpicnum = 562;
|
||||
tilesizx[562] = tilesizy[562] = 0;
|
||||
|
||||
pix_diff = klabs(z) >> 8;
|
||||
newz = - ((pix_diff / 128) + 1) * (128<<8);
|
||||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
backupstat[i] = sector[i].ceilingstat;
|
||||
backupz[i] = sector[i].ceilingz;
|
||||
if (!ror_protectedsectors[i] || (ror_protectedsectors[i] && sp->lotag == 41))
|
||||
{
|
||||
sector[i].ceilingstat = 1;
|
||||
sector[i].ceilingz += newz;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// renderz = sector[sprite[sprite2].sectnum].floorz;
|
||||
renderz = sprite[sprite2].z;
|
||||
picnum = sector[sprite[sprite2].sectnum].floorpicnum;
|
||||
sector[sprite[sprite2].sectnum].floorpicnum = 562;
|
||||
tilesizx[562] = tilesizy[562] = 0;
|
||||
|
||||
pix_diff = klabs(z) >> 8;
|
||||
newz = ((pix_diff / 128) + 1) * (128<<8);
|
||||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
backupstat[i] = sector[i].floorstat;
|
||||
backupz[i] = sector[i].floorz;
|
||||
if (!ror_protectedsectors[i] || (ror_protectedsectors[i] && sp->lotag == 41))
|
||||
{
|
||||
sector[i].floorstat = 1;
|
||||
sector[i].floorz = +newz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
drawrooms(sprite[sprite2].x + x, sprite[sprite2].y + y,
|
||||
z + renderz, ud.cameraang, ud.camerahoriz, sect);
|
||||
drawing_ror = 1 + level;
|
||||
|
||||
// dupe the sprites touching the portal to the other sector
|
||||
|
||||
if (drawing_ror == 2) // viewing from top
|
||||
{
|
||||
int32_t k = headspritesect[sp->sectnum];
|
||||
|
||||
while (k != -1)
|
||||
{
|
||||
if (sprite[k].picnum != SECTOREFFECTOR && (sprite[k].z >= sp->z))
|
||||
{
|
||||
Bmemcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)&sprite[k],sizeof(spritetype));
|
||||
|
||||
tsprite[spritesortcnt].x += (sprite[sp->yvel].x-sp->x);
|
||||
tsprite[spritesortcnt].y += (sprite[sp->yvel].y-sp->y);
|
||||
tsprite[spritesortcnt].z = tsprite[spritesortcnt].z - sp->z + ActorExtra[sp->yvel].ceilingz;
|
||||
tsprite[spritesortcnt].sectnum = sprite[sp->yvel].sectnum;
|
||||
tsprite[spritesortcnt].owner = k;
|
||||
|
||||
//OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z);
|
||||
spritesortcnt++;
|
||||
}
|
||||
k = nextspritesect[k];
|
||||
}
|
||||
}
|
||||
/*
|
||||
else // viewing from bottom
|
||||
{
|
||||
int32_t k = headspritesect[sprite[sp->yvel].sectnum];
|
||||
|
||||
while (k != -1)
|
||||
{
|
||||
if (sprite[k].picnum != SECTOREFFECTOR && (sprite[k].z >= sprite[sp->yvel].z))
|
||||
{
|
||||
Bmemcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)&sprite[k],sizeof(spritetype));
|
||||
|
||||
tsprite[spritesortcnt].x -= (sprite[sp->yvel].x-sp->x);
|
||||
tsprite[spritesortcnt].y -= (sprite[sp->yvel].y-sp->y);
|
||||
tsprite[spritesortcnt].z = tsprite[spritesortcnt].z - sprite[sp->yvel].z + ActorExtra[ror_sprite].ceilingz;
|
||||
tsprite[spritesortcnt].sectnum = sp->sectnum;
|
||||
tsprite[spritesortcnt].owner = k;
|
||||
|
||||
//OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z);
|
||||
spritesortcnt++;
|
||||
}
|
||||
k = nextspritesect[k];
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
G_DoSpriteAnimations(ud.camerax,ud.cameray,ud.cameraang,smoothratio);
|
||||
drawmasks();
|
||||
|
||||
if (level)
|
||||
{
|
||||
sector[sprite[sprite2].sectnum].ceilingpicnum = picnum;
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
sector[i].ceilingstat = backupstat[i];
|
||||
sector[i].ceilingz = backupz[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sector[sprite[sprite2].sectnum].floorpicnum = picnum;
|
||||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
sector[i].floorstat = backupstat[i];
|
||||
sector[i].floorz = backupz[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void G_DrawRooms(int32_t snum,int32_t smoothratio)
|
||||
{
|
||||
int32_t dst,j,fz,cz;
|
||||
|
@ -4343,13 +4320,13 @@ void G_DrawRooms(int32_t snum,int32_t smoothratio)
|
|||
else if (s->yvel > 199) s->yvel = 300;
|
||||
|
||||
ud.cameraang = ActorExtra[ud.camerasprite].tempang+mulscale16((int32_t)(((s->ang+1024-ActorExtra[ud.camerasprite].tempang)&2047)-1024),smoothratio);
|
||||
#ifdef SE40
|
||||
se40code(s->x,s->y,s->z,ud.cameraang,s->yvel,smoothratio);
|
||||
#endif
|
||||
#ifdef POLYMER
|
||||
if (getrendermode() == 4)
|
||||
polymer_setanimatesprites(G_DoSpriteAnimations, s->x, s->y, ud.cameraang, smoothratio);
|
||||
#endif
|
||||
|
||||
G_SE40(smoothratio);
|
||||
|
||||
drawrooms(s->x,s->y,s->z-(4<<8),ud.cameraang,s->yvel,s->sectnum);
|
||||
G_DoSpriteAnimations(s->x,s->y,ud.cameraang,smoothratio);
|
||||
drawmasks();
|
||||
|
@ -4495,9 +4472,6 @@ void G_DrawRooms(int32_t snum,int32_t smoothratio)
|
|||
if (apScriptGameEvent[EVENT_DISPLAYROOMS])
|
||||
X_OnEvent(EVENT_DISPLAYROOMS, g_player[screenpeek].ps->i, screenpeek, -1);
|
||||
|
||||
#ifdef SE40
|
||||
se40code(ud.camerax,ud.cameray,ud.cameraz,ud.cameraang,ud.camerahoriz,smoothratio);
|
||||
#endif
|
||||
if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0)
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
&& (getrendermode() != 4)
|
||||
|
@ -4539,8 +4513,43 @@ void G_DrawRooms(int32_t snum,int32_t smoothratio)
|
|||
polymer_setanimatesprites(G_DoSpriteAnimations, ud.camerax,ud.cameray,ud.cameraang,smoothratio);
|
||||
}
|
||||
#endif
|
||||
G_SE40(smoothratio);
|
||||
|
||||
drawrooms(ud.camerax,ud.cameray,ud.cameraz,ud.cameraang,ud.camerahoriz,ud.camerasect);
|
||||
|
||||
// dupe the sprites touching the portal to the other sector
|
||||
|
||||
if (ror_sprite != -1)
|
||||
{
|
||||
spritetype *sp = &sprite[ror_sprite];
|
||||
|
||||
// viewing from bottom
|
||||
if (drawing_ror == 1)
|
||||
{
|
||||
int32_t k = headspritesect[sp->sectnum];
|
||||
|
||||
while (k != -1)
|
||||
{
|
||||
if (sprite[k].picnum != SECTOREFFECTOR && (sprite[k].z >= sp->z))
|
||||
{
|
||||
Bmemcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)&sprite[k],sizeof(spritetype));
|
||||
|
||||
tsprite[spritesortcnt].x += (sprite[sp->yvel].x-sp->x);
|
||||
tsprite[spritesortcnt].y += (sprite[sp->yvel].y-sp->y);
|
||||
tsprite[spritesortcnt].z = tsprite[spritesortcnt].z - sp->z + ActorExtra[sp->yvel].ceilingz;
|
||||
tsprite[spritesortcnt].sectnum = sprite[sp->yvel].sectnum;
|
||||
tsprite[spritesortcnt].owner = k;
|
||||
|
||||
OSD_Printf("duped sprite of pic %d at %d %d %d\n",tsprite[spritesortcnt].picnum,tsprite[spritesortcnt].x,tsprite[spritesortcnt].y,tsprite[spritesortcnt].z);
|
||||
spritesortcnt++;
|
||||
}
|
||||
k = nextspritesect[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G_DoSpriteAnimations(ud.camerax,ud.cameray,ud.cameraang,smoothratio);
|
||||
drawing_ror = 0;
|
||||
drawmasks();
|
||||
|
||||
if (g_screenCapture == 1)
|
||||
|
@ -4582,7 +4591,7 @@ void G_DrawRooms(int32_t snum,int32_t smoothratio)
|
|||
static void G_DumpDebugInfo(void)
|
||||
{
|
||||
int32_t i,j,x;
|
||||
// FILE * fp=fopen("condebug.log","w");
|
||||
// FILE * fp=fopen("condebug.log","w");
|
||||
|
||||
OSD_Printf("Current gamevar values:\n");
|
||||
for (i=0; i<MAX_WEAPONS; i++)
|
||||
|
@ -6098,7 +6107,23 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
|
||||
switch (sp->lotag)
|
||||
{
|
||||
|
||||
case 40:
|
||||
case 41:
|
||||
sp->cstat = 32;
|
||||
sp->xrepeat = sp->yrepeat = 64;
|
||||
changespritestat(i, STAT_EFFECTOR);
|
||||
for (j=0; j < MAXSPRITES; j++)
|
||||
if (sprite[j].picnum == SECTOREFFECTOR && (sprite[j].lotag == 40 || sprite[j].lotag == 41) &&
|
||||
sprite[j].hitag == sp->hitag && i != j)
|
||||
{
|
||||
// initprintf("found ror match\n");
|
||||
sp->yvel = j;
|
||||
break;
|
||||
}
|
||||
goto SPAWN_END;
|
||||
break;
|
||||
case 46:
|
||||
ror_protectedsectors[sp->sectnum] = 1;
|
||||
case 49:
|
||||
case 50:
|
||||
changespritestat(i, STAT_EFFECTOR);
|
||||
|
@ -6539,22 +6564,8 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
break;
|
||||
}
|
||||
|
||||
switch (sprite[i].lotag)
|
||||
{
|
||||
case 40:
|
||||
case 41:
|
||||
case 42:
|
||||
case 43:
|
||||
case 44:
|
||||
case 45:
|
||||
changespritestat(i,15);
|
||||
break;
|
||||
default:
|
||||
changespritestat(i, STAT_EFFECTOR);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case SEENINE__STATIC:
|
||||
case OOZFILTER__STATIC:
|
||||
|
@ -6676,6 +6687,36 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
|
||||
if (!spritesortcnt) return;
|
||||
|
||||
ror_sprite = -1;
|
||||
|
||||
for (j=spritesortcnt-1; j>=0; j--) //Between drawrooms() and drawmasks()
|
||||
{
|
||||
//is the perfect time to animate sprites
|
||||
t = &tsprite[j];
|
||||
i = t->owner;
|
||||
s = &sprite[i];
|
||||
|
||||
switch (DynamicTileMap[s->picnum])
|
||||
{
|
||||
case SECTOREFFECTOR__STATIC:
|
||||
if (s->lotag == 40 || s->lotag == 41)
|
||||
{
|
||||
t->cstat = 32768;
|
||||
|
||||
if (ror_sprite == -1) ror_sprite = i;
|
||||
}
|
||||
|
||||
if (t->lotag == 27 && ud.recstat == 1)
|
||||
{
|
||||
t->picnum = 11+((totalclock>>3)&1);
|
||||
t->cstat |= 128;
|
||||
}
|
||||
else
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (j=spritesortcnt-1; j>=0; j--)
|
||||
{
|
||||
t = &tsprite[j];
|
||||
|
@ -6779,15 +6820,6 @@ void G_DoSpriteAnimations(int32_t x,int32_t y,int32_t a,int32_t smoothratio)
|
|||
|
||||
switch (DynamicTileMap[s->picnum])
|
||||
{
|
||||
case SECTOREFFECTOR__STATIC:
|
||||
if (t->lotag == 27 && ud.recstat == 1)
|
||||
{
|
||||
t->picnum = 11+((totalclock>>3)&1);
|
||||
t->cstat |= 128;
|
||||
}
|
||||
else
|
||||
t->xrepeat = t->yrepeat = 0;
|
||||
break;
|
||||
case NATURALLIGHTNING__STATIC:
|
||||
t->shade = -127;
|
||||
break;
|
||||
|
@ -7290,7 +7322,7 @@ PALONLY:
|
|||
}
|
||||
*/
|
||||
|
||||
if (t4)
|
||||
if (t4 && t4 != 1)
|
||||
{
|
||||
l = *(((intptr_t *)t4)+2); //For TerminX: was *(int32_t *)(t4+8)
|
||||
|
||||
|
@ -12277,7 +12309,7 @@ static void Net_DoPrediction(void)
|
|||
if (lz >= 0 && (lz&49152) == 49152)
|
||||
{
|
||||
j = lz&(MAXSPRITES-1);
|
||||
if ((sprite[j].cstat&33) == 33)
|
||||
if ((sprite[j].cstat&33) == 33 || (sprite[j].cstat&17) == 17)
|
||||
{
|
||||
psectlotag = 0;
|
||||
spritebridge = 1;
|
||||
|
@ -12358,11 +12390,13 @@ static void Net_DoPrediction(void)
|
|||
if (my.z > (fz-(15<<8)))
|
||||
my.z += ((fz-(15<<8))-my.z)>>1;
|
||||
|
||||
/*
|
||||
if (my.z < (cz+(4<<8)))
|
||||
{
|
||||
my.z = cz+(4<<8);
|
||||
myvel.z = 0;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
else if (p->jetpack_on)
|
||||
|
|
|
@ -1517,7 +1517,7 @@ static int32_t C_GetNextKeyword(void) //Returns its code #
|
|||
*g_scriptPtr = i + (IFELSE_MAGIC<<12);
|
||||
else *g_scriptPtr = i + (g_lineNumber<<12);
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
textptr += l;
|
||||
g_scriptPtr++;
|
||||
|
||||
|
@ -1552,13 +1552,13 @@ static void C_GetNextVarType(int32_t type)
|
|||
{
|
||||
if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: accepted constant %d in place of gamevar.\n",g_szScriptFileName,g_lineNumber,atol(textptr));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=MAXGAMEVARS;
|
||||
if (tolower(textptr[1])=='x')
|
||||
sscanf(textptr+2,"%" PRIxPTR "",g_scriptPtr);
|
||||
else
|
||||
*g_scriptPtr=atoi(textptr);
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
g_scriptPtr++;
|
||||
#if 1
|
||||
while (!ispecial(*textptr) && *textptr != ']') textptr++;
|
||||
|
@ -1616,7 +1616,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
f |= (MAXGAMEVARS<<3);
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=(i|f);
|
||||
C_GetNextVarType(0);
|
||||
C_SkipComments();
|
||||
|
@ -1680,7 +1680,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
return;
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
|
||||
if (i == g_iSpriteVarID)
|
||||
{
|
||||
|
@ -1732,9 +1732,9 @@ static void C_GetNextVarType(int32_t type)
|
|||
{
|
||||
if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug)
|
||||
initprintf("%s:%d: debug: accepted defined label `%s' instead of gamevar.\n",g_szScriptFileName,g_lineNumber,label+(i<<6));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=MAXGAMEVARS;
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=labelcode[i];
|
||||
return;
|
||||
}
|
||||
|
@ -1772,7 +1772,7 @@ static void C_GetNextVarType(int32_t type)
|
|||
if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: accepted gamevar `%s'.\n",g_szScriptFileName,g_lineNumber,label+(g_numLabels<<6));
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=(i|f);
|
||||
}
|
||||
|
||||
|
@ -1831,12 +1831,12 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
}
|
||||
if (labeltype[i] != LABEL_DEFINE && labelcode[i] >= (intptr_t)&script[0] && labelcode[i] < (intptr_t)&script[g_scriptSize])
|
||||
bitptr[(g_scriptPtr-script)>>3] |= (BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
else bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
else bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*(g_scriptPtr++) = labelcode[i];
|
||||
textptr += l;
|
||||
return labeltype[i];
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*(g_scriptPtr++) = 0;
|
||||
textptr += l;
|
||||
el = (char *)C_GetLabelType(type);
|
||||
|
@ -1853,7 +1853,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
{
|
||||
C_ReportError(ERROR_PARAMUNDEFINED);
|
||||
g_numCompilerErrors++;
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = 0;
|
||||
g_scriptPtr++;
|
||||
textptr+=l;
|
||||
|
@ -1883,7 +1883,7 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
|
||||
if (!(g_numCompilerErrors || g_numCompilerWarnings) && g_scriptDebug > 1)
|
||||
initprintf("%s:%d: debug: accepted constant %d.\n",g_szScriptFileName,g_lineNumber,atol(textptr));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
|
||||
if (tolower(textptr[1])=='x')
|
||||
sscanf(textptr+2,"%" PRIxPTR "",g_scriptPtr);
|
||||
|
@ -2075,7 +2075,7 @@ static int32_t C_ParseCommand(void)
|
|||
*g_scriptPtr = labelcode[j];
|
||||
if (labelcode[j] >= (intptr_t)&script[0] && labelcode[j] < (intptr_t)&script[g_scriptSize])
|
||||
bitptr[(g_scriptPtr-script)>>3] |= (BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
else bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
else bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
g_scriptPtr++;
|
||||
return 0;
|
||||
}
|
||||
|
@ -2187,7 +2187,7 @@ static int32_t C_ParseCommand(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=ProjectileLabels[lLabelID].lId;
|
||||
|
||||
//printf("member's flags are: %02Xh\n",PlayerLabels[lLabelID].flags);
|
||||
|
@ -2353,7 +2353,7 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
while (j>-1)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = 0;
|
||||
g_scriptPtr++;
|
||||
j--;
|
||||
|
@ -2385,7 +2385,7 @@ static int32_t C_ParseCommand(void)
|
|||
g_scriptPtr--;
|
||||
j |= *g_scriptPtr;
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = j;
|
||||
|
||||
g_scriptPtr++;
|
||||
|
@ -2430,7 +2430,7 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
for (k=j; k>=0; k--)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = 0;
|
||||
g_scriptPtr++;
|
||||
}
|
||||
|
@ -2639,7 +2639,7 @@ static int32_t C_ParseCommand(void)
|
|||
g_scriptPtr--;
|
||||
k |= *g_scriptPtr;
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = k;
|
||||
g_scriptPtr++;
|
||||
return 0;
|
||||
|
@ -2647,7 +2647,7 @@ static int32_t C_ParseCommand(void)
|
|||
}
|
||||
for (k=j; k<3; k++)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = 0;
|
||||
g_scriptPtr++;
|
||||
}
|
||||
|
@ -2706,7 +2706,7 @@ static int32_t C_ParseCommand(void)
|
|||
}
|
||||
for (k=j; k>=0; k--)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*(g_scriptPtr++) = 0;
|
||||
}
|
||||
}
|
||||
|
@ -2749,7 +2749,7 @@ static int32_t C_ParseCommand(void)
|
|||
g_scriptPtr--;
|
||||
j |= *g_scriptPtr;
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = j;
|
||||
g_scriptPtr++;
|
||||
break;
|
||||
|
@ -2760,7 +2760,7 @@ static int32_t C_ParseCommand(void)
|
|||
{
|
||||
for (i=4-j; i; i--)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*(g_scriptPtr++) = 0;
|
||||
}
|
||||
break;
|
||||
|
@ -2904,7 +2904,7 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
for (j=0; j<4; j++)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*(g_parsingActorPtr+j) = 0;
|
||||
if (j == 3)
|
||||
{
|
||||
|
@ -2915,7 +2915,7 @@ static int32_t C_ParseCommand(void)
|
|||
g_scriptPtr--;
|
||||
j |= *g_scriptPtr;
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = j;
|
||||
g_scriptPtr++;
|
||||
break;
|
||||
|
@ -2926,7 +2926,7 @@ static int32_t C_ParseCommand(void)
|
|||
{
|
||||
for (i=4-j; i; i--)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*(g_scriptPtr++) = 0;
|
||||
}
|
||||
break;
|
||||
|
@ -2979,7 +2979,7 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
while (j > -1)
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = 0;
|
||||
g_scriptPtr++;
|
||||
j--;
|
||||
|
@ -3173,7 +3173,7 @@ static int32_t C_ParseCommand(void)
|
|||
C_ReportError(ERROR_SYMBOLNOTRECOGNIZED);
|
||||
return 0;
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=lLabelID;
|
||||
|
||||
// now at target VAR...
|
||||
|
@ -3308,7 +3308,7 @@ static int32_t C_ParseCommand(void)
|
|||
C_ReportError(ERROR_SYMBOLNOTRECOGNIZED);
|
||||
return 0;
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=lLabelID;
|
||||
|
||||
// now at target VAR...
|
||||
|
@ -3376,7 +3376,7 @@ static int32_t C_ParseCommand(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=PlayerLabels[lLabelID].lId;
|
||||
|
||||
//printf("member's flags are: %02Xh\n",PlayerLabels[lLabelID].flags);
|
||||
|
@ -3457,7 +3457,7 @@ static int32_t C_ParseCommand(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=InputLabels[lLabelID].lId;
|
||||
|
||||
// now at target VAR...
|
||||
|
@ -3507,7 +3507,7 @@ static int32_t C_ParseCommand(void)
|
|||
C_ReportError(ERROR_SYMBOLNOTRECOGNIZED);
|
||||
return 0;
|
||||
}
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=lLabelID;
|
||||
|
||||
// now at target VAR...
|
||||
|
@ -3641,7 +3641,7 @@ static int32_t C_ParseCommand(void)
|
|||
}
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=i; // the ID of the DEF (offset into array...)
|
||||
|
||||
switch (tw)
|
||||
|
@ -3712,7 +3712,7 @@ static int32_t C_ParseCommand(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=ActorLabels[lLabelID].lId;
|
||||
|
||||
//printf("member's flags are: %02Xh\n",ActorLabels[lLabelID].flags);
|
||||
|
@ -3795,7 +3795,7 @@ static int32_t C_ParseCommand(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=TsprLabels[lLabelID].lId;
|
||||
|
||||
//printf("member's flags are: %02Xh\n",ActorLabels[lLabelID].flags);
|
||||
|
@ -3957,7 +3957,7 @@ static int32_t C_ParseCommand(void)
|
|||
i=GetADefID(label+(g_numLabels<<6));
|
||||
if (i > (-1))
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=i;
|
||||
}
|
||||
else
|
||||
|
@ -3969,7 +3969,7 @@ static int32_t C_ParseCommand(void)
|
|||
i=GetADefID(label+(g_numLabels<<6));
|
||||
if (i > (-1))
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=i;
|
||||
}
|
||||
else
|
||||
|
@ -3996,7 +3996,7 @@ static int32_t C_ParseCommand(void)
|
|||
i=GetADefID(label+(g_numLabels<<6));
|
||||
if (i > (-1))
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=i;
|
||||
}
|
||||
else
|
||||
|
@ -4026,7 +4026,7 @@ static int32_t C_ParseCommand(void)
|
|||
i=GetADefID(label+(g_numLabels<<6));
|
||||
if (i > (-1))
|
||||
{
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=i;
|
||||
}
|
||||
else
|
||||
|
@ -4518,12 +4518,12 @@ static int32_t C_ParseCommand(void)
|
|||
|
||||
tempscrptr= g_scriptPtr;
|
||||
tempoffset = (unsigned)(tempscrptr-script);
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=0; // leave spot for end location (for after processing)
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=0; // count of case statements
|
||||
g_caseScriptPtr=g_scriptPtr; // the first case's pointer.
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=0; // leave spot for 'default' location (null if none)
|
||||
|
||||
temptextptr=textptr;
|
||||
|
@ -4561,9 +4561,9 @@ static int32_t C_ParseCommand(void)
|
|||
while (j--)
|
||||
{
|
||||
// leave room for statements
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=0; // value check
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=0; // code offset
|
||||
C_SkipComments();
|
||||
}
|
||||
|
@ -4851,7 +4851,7 @@ repeatcase:
|
|||
j |= *g_scriptPtr;
|
||||
}
|
||||
while (C_GetKeyword() == -1);
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr = j;
|
||||
g_scriptPtr++;
|
||||
break;
|
||||
|
@ -5474,7 +5474,7 @@ repeatcase:
|
|||
else
|
||||
{
|
||||
*(ScriptQuoteRedefinitions[g_numQuoteRedefinitions]+i) = '\0';
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(1<<((g_scriptPtr-script)&7));
|
||||
bitptr[(g_scriptPtr-script)>>3] &= ~(BITPTR_POINTER<<((g_scriptPtr-script)&7));
|
||||
*g_scriptPtr++=g_numQuoteRedefinitions;
|
||||
g_numQuoteRedefinitions++;
|
||||
}
|
||||
|
|
|
@ -2238,11 +2238,6 @@ static int32_t X_DoExecute(register int32_t once)
|
|||
#endif
|
||||
G_DoInterpolations(smoothratio);
|
||||
|
||||
#define SE40
|
||||
|
||||
#ifdef SE40
|
||||
se40code(x,y,z,a,horiz,smoothratio);
|
||||
#endif
|
||||
if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0)
|
||||
#if defined(POLYMER) && defined(USE_OPENGL)
|
||||
&& (getrendermode() != 4)
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20090616";
|
||||
const char *s_buildDate = "20090701";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
|
|
@ -3891,7 +3891,7 @@ void P_ProcessInput(int32_t snum)
|
|||
{
|
||||
j = lz&(MAXSPRITES-1);
|
||||
|
||||
if ((sprite[j].cstat&33) == 33)
|
||||
if ((sprite[j].cstat&33) == 33 || (sprite[j].cstat&17) == 17)
|
||||
{
|
||||
psectlotag = 0;
|
||||
p->footprintcount = 0;
|
||||
|
@ -4356,7 +4356,7 @@ void P_ProcessInput(int32_t snum)
|
|||
if (p->posz > (fz-(15<<8)))
|
||||
p->posz += ((fz-(15<<8))-p->posz)>>1;
|
||||
|
||||
if (p->posz < (cz+(4<<8)))
|
||||
if ((psectlotag != 2 || cz != sector[p->cursectnum].ceilingz) && p->posz < (cz+(4<<8)))
|
||||
{
|
||||
p->posz = cz+(4<<8);
|
||||
p->poszv = 0;
|
||||
|
@ -4456,10 +4456,12 @@ void P_ProcessInput(int32_t snum)
|
|||
{
|
||||
if (p->on_ground == 1)
|
||||
{
|
||||
/*
|
||||
if (p->dummyplayersprite == -1)
|
||||
p->dummyplayersprite =
|
||||
A_Spawn(pi,PLAYERONWATER);
|
||||
sprite[p->dummyplayersprite].pal = sprite[p->i].pal;
|
||||
*/
|
||||
p->footprintcount = 6;
|
||||
if (sector[p->cursectnum].floorpicnum == FLOORSLIME)
|
||||
p->footprintpal = 8;
|
||||
|
@ -4655,7 +4657,7 @@ void P_ProcessInput(int32_t snum)
|
|||
|
||||
p->posz += p->poszv;
|
||||
|
||||
if (p->posz < (cz+(4<<8)))
|
||||
if ((psectlotag != 2 || cz != sector[p->cursectnum].ceilingz) && p->posz < (cz+(4<<8)))
|
||||
{
|
||||
p->jumping_counter = 0;
|
||||
if (p->poszv < 0)
|
||||
|
|
|
@ -881,12 +881,14 @@ static inline void prelevel(char g)
|
|||
int32_t i, nexti, j, startwall, endwall, lotaglist;
|
||||
int32_t lotags[MAXSPRITES];
|
||||
int32_t switchpicnum;
|
||||
|
||||
extern char ror_protectedsectors[MAXSECTORS];
|
||||
|
||||
clearbufbyte(show2dsector,sizeof(show2dsector),0L);
|
||||
clearbufbyte(show2dwall,sizeof(show2dwall),0L);
|
||||
clearbufbyte(show2dsprite,sizeof(show2dsprite),0L);
|
||||
|
||||
Bmemset(ror_protectedsectors, 0, MAXSECTORS);
|
||||
|
||||
resetprestat(0,g);
|
||||
g_numClouds = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue