mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Fix remaining casts to vec2_t/vec3_t
git-svn-id: https://svn.eduke32.com/eduke32@7973 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/build.cpp
This commit is contained in:
parent
32edf9a747
commit
f76ca0a361
11 changed files with 29 additions and 29 deletions
|
@ -621,7 +621,7 @@ void editorSetup2dSideView(void)
|
||||||
m32_sidesin = sintable[m32_sideelev&2047];
|
m32_sidesin = sintable[m32_sideelev&2047];
|
||||||
m32_sidecos = sintable[(m32_sideelev+512)&2047];
|
m32_sidecos = sintable[(m32_sideelev+512)&2047];
|
||||||
|
|
||||||
rotatepoint(zerovec, *(vec2_t *) &m32_viewplane, -m32_sideang, (vec2_t *) &m32_viewplane);
|
rotatepoint(zerovec, m32_viewplane.vec2, -m32_sideang, &m32_viewplane.vec2);
|
||||||
m32_viewplane.x = mulscale14(m32_viewplane.x, m32_sidecos);
|
m32_viewplane.x = mulscale14(m32_viewplane.x, m32_sidecos);
|
||||||
m32_viewplane.y = mulscale14(m32_viewplane.y, m32_sidecos);
|
m32_viewplane.y = mulscale14(m32_viewplane.y, m32_sidecos);
|
||||||
m32_viewplane.z = m32_sidesin>>5;
|
m32_viewplane.z = m32_sidesin>>5;
|
||||||
|
@ -641,7 +641,7 @@ static void editorGet2dSideViewDistance(int16_t sw, int16_t sect)
|
||||||
p = &v;
|
p = &v;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
p = (vec3_t *) &sprite[sw-MAXWALLS];
|
p = &sprite[sw-MAXWALLS].pos;
|
||||||
|
|
||||||
m32_sidedist[sw] = p->x*m32_viewplane.x + p->y*m32_viewplane.y + (p->z>>4)*m32_viewplane.z;
|
m32_sidedist[sw] = p->x*m32_viewplane.x + p->y*m32_viewplane.y + (p->z>>4)*m32_viewplane.z;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1483,7 +1483,7 @@ int pushmove(vec3_t *const vect, int16_t *const sectnum,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i=startwall, wal=(uwallptr_t)&wall[startwall]; i!=endwall; i+=dir, wal+=dir)
|
for (i=startwall, wal=(uwallptr_t)&wall[startwall]; i!=endwall; i+=dir, wal+=dir)
|
||||||
if (clipinsidebox((vec2_t *)vect, i, walldist-4) == 1)
|
if (clipinsidebox(&vect->vec2, i, walldist-4) == 1)
|
||||||
{
|
{
|
||||||
int j = 0;
|
int j = 0;
|
||||||
if (wal->nextsector < 0 || wal->cstat&dawalclipmask) j = 1;
|
if (wal->nextsector < 0 || wal->cstat&dawalclipmask) j = 1;
|
||||||
|
@ -1521,10 +1521,10 @@ int pushmove(vec3_t *const vect, int16_t *const sectnum,
|
||||||
{
|
{
|
||||||
vect->x = (vect->x) + dx; vect->y = (vect->y) + dy;
|
vect->x = (vect->x) + dx; vect->y = (vect->y) + dy;
|
||||||
bad2--; if (bad2 == 0) break;
|
bad2--; if (bad2 == 0) break;
|
||||||
} while (clipinsidebox((vec2_t *)vect, i, walldist-4) != 0);
|
} while (clipinsidebox(&vect->vec2, i, walldist-4) != 0);
|
||||||
bad = -1;
|
bad = -1;
|
||||||
k--; if (k <= 0) return bad;
|
k--; if (k <= 0) return bad;
|
||||||
clipupdatesector(*(vec2_t *)vect, sectnum, walldist);
|
clipupdatesector(vect->vec2, sectnum, walldist);
|
||||||
if (*sectnum < 0) return -1;
|
if (*sectnum < 0) return -1;
|
||||||
}
|
}
|
||||||
else if (bitmap_test(clipsectormap, wal->nextsector) == 0)
|
else if (bitmap_test(clipsectormap, wal->nextsector) == 0)
|
||||||
|
@ -2139,7 +2139,7 @@ int32_t hitscan(const vec3_t *sv, int16_t sectnum, int32_t vx, int32_t vy, int32
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
restart_grand:
|
restart_grand:
|
||||||
#endif
|
#endif
|
||||||
*(vec2_t *)&hit->pos = hitscangoal;
|
hit->pos.vec2 = hitscangoal;
|
||||||
|
|
||||||
clipsectorlist[0] = sectnum;
|
clipsectorlist[0] = sectnum;
|
||||||
tempshortcnt = 0;
|
tempshortcnt = 0;
|
||||||
|
|
|
@ -10789,7 +10789,7 @@ int32_t setsprite(int16_t spritenum, const vec3_t *newpos)
|
||||||
int16_t tempsectnum = sprite[spritenum].sectnum;
|
int16_t tempsectnum = sprite[spritenum].sectnum;
|
||||||
|
|
||||||
if ((void const *) newpos != (void *) &sprite[spritenum])
|
if ((void const *) newpos != (void *) &sprite[spritenum])
|
||||||
*(vec3_t *) &sprite[spritenum] = *newpos;
|
sprite[spritenum].pos = *newpos;
|
||||||
|
|
||||||
updatesector(newpos->x,newpos->y,&tempsectnum);
|
updatesector(newpos->x,newpos->y,&tempsectnum);
|
||||||
|
|
||||||
|
@ -10806,7 +10806,7 @@ int32_t setspritez(int16_t spritenum, const vec3_t *newpos)
|
||||||
int16_t tempsectnum = sprite[spritenum].sectnum;
|
int16_t tempsectnum = sprite[spritenum].sectnum;
|
||||||
|
|
||||||
if ((void const *)newpos != (void *)&sprite[spritenum])
|
if ((void const *)newpos != (void *)&sprite[spritenum])
|
||||||
*(vec3_t *) &sprite[spritenum] = *newpos;
|
sprite[spritenum].pos = *newpos;
|
||||||
|
|
||||||
updatesectorz(newpos->x,newpos->y,newpos->z,&tempsectnum);
|
updatesectorz(newpos->x,newpos->y,newpos->z,&tempsectnum);
|
||||||
|
|
||||||
|
|
|
@ -1246,7 +1246,7 @@ void A_MoveDummyPlayers(void)
|
||||||
|
|
||||||
SX(spriteNum) += (pPlayer->pos.x-pPlayer->opos.x);
|
SX(spriteNum) += (pPlayer->pos.x-pPlayer->opos.x);
|
||||||
SY(spriteNum) += (pPlayer->pos.y-pPlayer->opos.y);
|
SY(spriteNum) += (pPlayer->pos.y-pPlayer->opos.y);
|
||||||
setsprite(spriteNum, (vec3_t *)&sprite[spriteNum]);
|
setsprite(spriteNum, &sprite[spriteNum].pos);
|
||||||
|
|
||||||
next_sprite:
|
next_sprite:
|
||||||
spriteNum = nextSprite;
|
spriteNum = nextSprite;
|
||||||
|
@ -1852,7 +1852,7 @@ ACTOR_STATIC void G_MoveStandables(void)
|
||||||
ps->opos.y = ps->pos.y = pSprite->y-(sintable[fix16_to_int(ps->q16ang)&2047]>>6);
|
ps->opos.y = ps->pos.y = pSprite->y-(sintable[fix16_to_int(ps->q16ang)&2047]>>6);
|
||||||
ps->opos.z = ps->pos.z = pSprite->z+(2<<8);
|
ps->opos.z = ps->pos.z = pSprite->z+(2<<8);
|
||||||
|
|
||||||
setsprite(ps->i, (vec3_t *)ps);
|
setsprite(ps->i, &ps->pos);
|
||||||
ps->cursectnum = sprite[ps->i].sectnum;
|
ps->cursectnum = sprite[ps->i].sectnum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2027,7 +2027,7 @@ ACTOR_STATIC void G_MoveStandables(void)
|
||||||
while (hitDist > 0)
|
while (hitDist > 0)
|
||||||
{
|
{
|
||||||
j = A_Spawn(spriteNum,LASERLINE);
|
j = A_Spawn(spriteNum,LASERLINE);
|
||||||
setsprite(j,(vec3_t *)&sprite[j]);
|
setsprite(j,&sprite[j].pos);
|
||||||
sprite[j].hitag = pSprite->hitag;
|
sprite[j].hitag = pSprite->hitag;
|
||||||
actor[j].t_data[1] = sprite[j].z;
|
actor[j].t_data[1] = sprite[j].z;
|
||||||
|
|
||||||
|
@ -6384,7 +6384,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
{
|
{
|
||||||
sprite[sectSprite].x+=vect.x;
|
sprite[sectSprite].x+=vect.x;
|
||||||
sprite[sectSprite].y+=vect.y;
|
sprite[sectSprite].y+=vect.y;
|
||||||
setsprite(sectSprite,(vec3_t *)&sprite[sectSprite]);
|
setsprite(sectSprite,&sprite[sectSprite].pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7054,7 +7054,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
actor[k].bpos.z += sprite[k].z;
|
actor[k].bpos.z += sprite[k].z;
|
||||||
|
|
||||||
changespritesect(k,sprite[j].sectnum);
|
changespritesect(k,sprite[j].sectnum);
|
||||||
setsprite(k,(vec3_t *)&sprite[k]);
|
setsprite(k,&sprite[k].pos);
|
||||||
|
|
||||||
actor[k].floorz = sector[sprite[j].sectnum].floorz;
|
actor[k].floorz = sector[sprite[j].sectnum].floorz;
|
||||||
actor[k].ceilingz = sector[sprite[j].sectnum].ceilingz;
|
actor[k].ceilingz = sector[sprite[j].sectnum].ceilingz;
|
||||||
|
@ -7267,7 +7267,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
sprite[sectSprite].x += vect.x;
|
sprite[sectSprite].x += vect.x;
|
||||||
sprite[sectSprite].y += vect.y;
|
sprite[sectSprite].y += vect.y;
|
||||||
|
|
||||||
setsprite(sectSprite, (vec3_t *)&sprite[sectSprite]);
|
setsprite(sectSprite, &sprite[sectSprite].pos);
|
||||||
|
|
||||||
if (sector[sprite[sectSprite].sectnum].floorstat & 2 && sprite[sectSprite].statnum == STAT_ZOMBIEACTOR)
|
if (sector[sprite[sectSprite].sectnum].floorstat & 2 && sprite[sectSprite].statnum == STAT_ZOMBIEACTOR)
|
||||||
A_Fall(sectSprite);
|
A_Fall(sectSprite);
|
||||||
|
@ -7290,7 +7290,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
pPlayer->opos.y = pPlayer->pos.y;
|
pPlayer->opos.y = pPlayer->pos.y;
|
||||||
|
|
||||||
pPlayer->pos.z += PHEIGHT;
|
pPlayer->pos.z += PHEIGHT;
|
||||||
setsprite(pPlayer->i, (vec3_t *)pPlayer);
|
setsprite(pPlayer->i, &pPlayer->pos);
|
||||||
pPlayer->pos.z -= PHEIGHT;
|
pPlayer->pos.z -= PHEIGHT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7401,7 +7401,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
sprite[sectSprite].x += vect.x >> 2;
|
sprite[sectSprite].x += vect.x >> 2;
|
||||||
sprite[sectSprite].y += vect.y >> 2;
|
sprite[sectSprite].y += vect.y >> 2;
|
||||||
|
|
||||||
setsprite(sectSprite, (vec3_t *)&sprite[sectSprite]);
|
setsprite(sectSprite, &sprite[sectSprite].pos);
|
||||||
|
|
||||||
if (sector[sprite[sectSprite].sectnum].floorstat & 2)
|
if (sector[sprite[sectSprite].sectnum].floorstat & 2)
|
||||||
if (sprite[sectSprite].statnum == STAT_ZOMBIEACTOR)
|
if (sprite[sectSprite].statnum == STAT_ZOMBIEACTOR)
|
||||||
|
@ -7439,7 +7439,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
k = A_Spawn(spriteNum, SMALLSMOKE);
|
k = A_Spawn(spriteNum, SMALLSMOKE);
|
||||||
sprite[k].xvel = 96+(krand()&127);
|
sprite[k].xvel = 96+(krand()&127);
|
||||||
A_SetSprite(k, CLIPMASK0);
|
A_SetSprite(k, CLIPMASK0);
|
||||||
setsprite(k, (vec3_t *) &sprite[k]);
|
setsprite(k, &sprite[k].pos);
|
||||||
if (rnd(16))
|
if (rnd(16))
|
||||||
A_Spawn(spriteNum, EXPLOSION2);
|
A_Spawn(spriteNum, EXPLOSION2);
|
||||||
}
|
}
|
||||||
|
@ -7517,7 +7517,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
||||||
sprite[j].y += x;
|
sprite[j].y += x;
|
||||||
sprite[j].z += pSprite->zvel;
|
sprite[j].z += pSprite->zvel;
|
||||||
|
|
||||||
setsprite(j, (vec3_t *)&sprite[j]);
|
setsprite(j, &sprite[j].pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5473,7 +5473,7 @@ static void Keys3d(void)
|
||||||
int16_t cb, fb;
|
int16_t cb, fb;
|
||||||
yax_getbunches(sprite[sp].sectnum, &cb, &fb);
|
yax_getbunches(sprite[sp].sectnum, &cb, &fb);
|
||||||
if (cb >= 0 || fb >= 0)
|
if (cb >= 0 || fb >= 0)
|
||||||
setspritez(sp, (vec3_t *)&sprite[sp]);
|
setspritez(sp, &sprite[sp].pos);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (k==0)
|
if (k==0)
|
||||||
|
|
|
@ -1640,7 +1640,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
||||||
case WATERSPLASH2__STATIC:
|
case WATERSPLASH2__STATIC:
|
||||||
if (spriteNum >= 0)
|
if (spriteNum >= 0)
|
||||||
{
|
{
|
||||||
setsprite(newSprite, (vec3_t *)&sprite[spriteNum]);
|
setsprite(newSprite, &sprite[spriteNum].pos);
|
||||||
pSprite->xrepeat = pSprite->yrepeat = 8+(krand()&7);
|
pSprite->xrepeat = pSprite->yrepeat = 8+(krand()&7);
|
||||||
}
|
}
|
||||||
else pSprite->xrepeat = pSprite->yrepeat = 16+(krand()&15);
|
else pSprite->xrepeat = pSprite->yrepeat = 16+(krand()&15);
|
||||||
|
@ -1964,7 +1964,7 @@ int A_Spawn(int spriteNum, int tileNum)
|
||||||
sprite[findSprite].pos = pSprite->pos;
|
sprite[findSprite].pos = pSprite->pos;
|
||||||
sprite[findSprite].shade = pSprite->shade;
|
sprite[findSprite].shade = pSprite->shade;
|
||||||
|
|
||||||
setsprite(findSprite, (vec3_t *) &sprite[findSprite]);
|
setsprite(findSprite, &sprite[findSprite].pos);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
findSprite = nextspritestat[findSprite];
|
findSprite = nextspritestat[findSprite];
|
||||||
|
|
|
@ -645,7 +645,7 @@ GAMEEXEC_STATIC void VM_Move(void)
|
||||||
if (deadflag || (vm.pActor->bpos.x != vm.pSprite->x) || (vm.pActor->bpos.y != vm.pSprite->y))
|
if (deadflag || (vm.pActor->bpos.x != vm.pSprite->x) || (vm.pActor->bpos.y != vm.pSprite->y))
|
||||||
{
|
{
|
||||||
vm.pActor->bpos.vec2 = vm.pSprite->pos.vec2;
|
vm.pActor->bpos.vec2 = vm.pSprite->pos.vec2;
|
||||||
setsprite(vm.spriteNum, (vec3_t *)vm.pSprite);
|
setsprite(vm.spriteNum, &vm.pSprite->pos);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1158,10 +1158,10 @@ static int32_t A_ShootHardcoded(int spriteNum, int projecTile, int shootAng, vec
|
||||||
int const spawnedSprite = A_Spawn(spriteNum, projecTile);
|
int const spawnedSprite = A_Spawn(spriteNum, projecTile);
|
||||||
sprite[spawnedSprite].ang
|
sprite[spawnedSprite].ang
|
||||||
= (getangle(hitwal->x - wall[hitwal->point2].x, hitwal->y - wall[hitwal->point2].y) + 1536) & 2047;
|
= (getangle(hitwal->x - wall[hitwal->point2].x, hitwal->y - wall[hitwal->point2].y) + 1536) & 2047;
|
||||||
*(vec3_t *)&sprite[spawnedSprite] = hitData.pos;
|
sprite[spawnedSprite].pos = hitData.pos;
|
||||||
sprite[spawnedSprite].cstat |= (krand() & 4);
|
sprite[spawnedSprite].cstat |= (krand() & 4);
|
||||||
A_SetSprite(spawnedSprite, CLIPMASK0);
|
A_SetSprite(spawnedSprite, CLIPMASK0);
|
||||||
setsprite(spawnedSprite, (vec3_t *)&sprite[spawnedSprite]);
|
setsprite(spawnedSprite, &sprite[spawnedSprite].pos);
|
||||||
if (PN(spriteNum) == OOZFILTER || PN(spriteNum) == NEWBEAST)
|
if (PN(spriteNum) == OOZFILTER || PN(spriteNum) == NEWBEAST)
|
||||||
sprite[spawnedSprite].pal = 6;
|
sprite[spawnedSprite].pal = 6;
|
||||||
}
|
}
|
||||||
|
@ -5430,7 +5430,7 @@ HORIZONLY:;
|
||||||
if (pPlayer->cursectnum >= 0)
|
if (pPlayer->cursectnum >= 0)
|
||||||
{
|
{
|
||||||
pPlayer->pos.z += PHEIGHT;
|
pPlayer->pos.z += PHEIGHT;
|
||||||
*(vec3_t *)&sprite[pPlayer->i] = pPlayer->pos;
|
sprite[pPlayer->i].pos = pPlayer->pos;
|
||||||
pPlayer->pos.z -= PHEIGHT;
|
pPlayer->pos.z -= PHEIGHT;
|
||||||
|
|
||||||
changespritesect(pPlayer->i, pPlayer->cursectnum);
|
changespritesect(pPlayer->i, pPlayer->cursectnum);
|
||||||
|
|
|
@ -678,7 +678,7 @@ void P_ResetMultiPlayer(int playerNum)
|
||||||
a.bpos = p.opos = p.pos;
|
a.bpos = p.opos = p.pos;
|
||||||
p.bobpos = p.pos.vec2;
|
p.bobpos = p.pos.vec2;
|
||||||
|
|
||||||
*(vec3_t *)&s = p.pos;
|
s.pos = p.pos;
|
||||||
|
|
||||||
updatesector(p.pos.x, p.pos.y, &p.cursectnum);
|
updatesector(p.pos.x, p.pos.y, &p.cursectnum);
|
||||||
setsprite(p.i, &tmpvect);
|
setsprite(p.i, &tmpvect);
|
||||||
|
|
|
@ -839,7 +839,7 @@ int A_PlaySound(int soundNum, int spriteNum)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return (unsigned)spriteNum >= MAXSPRITES ? S_PlaySound(soundNum) :
|
return (unsigned)spriteNum >= MAXSPRITES ? S_PlaySound(soundNum) :
|
||||||
S_PlaySound3D(soundNum, spriteNum, (vec3_t *)&sprite[spriteNum]);
|
S_PlaySound3D(soundNum, spriteNum, &sprite[spriteNum].pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void S_StopEnvSound(int sndNum, int sprNum)
|
void S_StopEnvSound(int sndNum, int sprNum)
|
||||||
|
@ -928,7 +928,7 @@ void S_Update(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
c = (vec3_t *)&sprite[ud.camerasprite];
|
c = &sprite[ud.camerasprite].pos;
|
||||||
cs = sprite[ud.camerasprite].sectnum;
|
cs = sprite[ud.camerasprite].sectnum;
|
||||||
ca = sprite[ud.camerasprite].ang;
|
ca = sprite[ud.camerasprite].ang;
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,7 +343,7 @@ int32_t A_PlaySound(uint32_t num, int32_t i)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_PlaySound3D(num,i, (vec3_t *)&sprite[i]);
|
return S_PlaySound3D(num,i, &sprite[i].pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void S_StopSound(int32_t num)
|
void S_StopSound(int32_t num)
|
||||||
|
|
Loading…
Reference in a new issue