mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- tabified animatesprites_d.cpp and animatesprites_r.cpp.
This commit is contained in:
parent
99b4a64a67
commit
f0ef7a1322
2 changed files with 1523 additions and 1521 deletions
|
@ -333,48 +333,49 @@ void animatesprites_d(int x,int y,int a,int smoothratio)
|
||||||
|
|
||||||
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1 && ud.showweapons && sprite[ps[p].i].extra > 0 && ps[p].curr_weapon > 0)
|
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1 && ud.showweapons && sprite[ps[p].i].extra > 0 && ps[p].curr_weapon > 0)
|
||||||
{
|
{
|
||||||
memcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)t,sizeof(spritetype));
|
auto newtspr = &tsprite[spritesortcnt];
|
||||||
|
memcpy(newtspr, t, sizeof(spritetype));
|
||||||
|
|
||||||
tsprite[spritesortcnt].statnum = 99;
|
newtspr->statnum = 99;
|
||||||
|
|
||||||
tsprite[spritesortcnt].yrepeat = ( t->yrepeat>>3 );
|
newtspr->yrepeat = (t->yrepeat >> 3);
|
||||||
if (t->yrepeat < 4) t->yrepeat = 4;
|
if (t->yrepeat < 4) t->yrepeat = 4;
|
||||||
|
|
||||||
tsprite[spritesortcnt].shade = t->shade;
|
newtspr->shade = t->shade;
|
||||||
tsprite[spritesortcnt].cstat = 0;
|
newtspr->cstat = 0;
|
||||||
|
|
||||||
switch (ps[p].curr_weapon)
|
switch (ps[p].curr_weapon)
|
||||||
{
|
{
|
||||||
case PISTOL_WEAPON: tsprite[spritesortcnt].picnum = FIRSTGUNSPRITE; break;
|
case PISTOL_WEAPON: newtspr->picnum = FIRSTGUNSPRITE; break;
|
||||||
case SHOTGUN_WEAPON: tsprite[spritesortcnt].picnum = SHOTGUNSPRITE; break;
|
case SHOTGUN_WEAPON: newtspr->picnum = SHOTGUNSPRITE; break;
|
||||||
case CHAINGUN_WEAPON: tsprite[spritesortcnt].picnum = CHAINGUNSPRITE; break;
|
case CHAINGUN_WEAPON: newtspr->picnum = CHAINGUNSPRITE; break;
|
||||||
case RPG_WEAPON: tsprite[spritesortcnt].picnum = RPGSPRITE; break;
|
case RPG_WEAPON: newtspr->picnum = RPGSPRITE; break;
|
||||||
case HANDREMOTE_WEAPON:
|
case HANDREMOTE_WEAPON:
|
||||||
case HANDBOMB_WEAPON: tsprite[spritesortcnt].picnum = HEAVYHBOMB; break;
|
case HANDBOMB_WEAPON: newtspr->picnum = HEAVYHBOMB; break;
|
||||||
case TRIPBOMB_WEAPON: tsprite[spritesortcnt].picnum = TRIPBOMBSPRITE; break;
|
case TRIPBOMB_WEAPON: newtspr->picnum = TRIPBOMBSPRITE; break;
|
||||||
case GROW_WEAPON: tsprite[spritesortcnt].picnum = GROWSPRITEICON; break;
|
case GROW_WEAPON: newtspr->picnum = GROWSPRITEICON; break;
|
||||||
case SHRINKER_WEAPON: tsprite[spritesortcnt].picnum = SHRINKERSPRITE; break;
|
case SHRINKER_WEAPON: newtspr->picnum = SHRINKERSPRITE; break;
|
||||||
case FREEZE_WEAPON: tsprite[spritesortcnt].picnum = FREEZESPRITE; break;
|
case FREEZE_WEAPON: newtspr->picnum = FREEZESPRITE; break;
|
||||||
case FLAMETHROWER_WEAPON: //Twentieth Anniversary World Tour
|
case FLAMETHROWER_WEAPON: //Twentieth Anniversary World Tour
|
||||||
if (isWorldTour())
|
if (isWorldTour())
|
||||||
tsprite[spritesortcnt].picnum = FLAMETHROWERSPRITE; break;
|
newtspr->picnum = FLAMETHROWERSPRITE; break;
|
||||||
case DEVISTATOR_WEAPON: tsprite[spritesortcnt].picnum = DEVISTATORSPRITE; break;
|
case DEVISTATOR_WEAPON: newtspr->picnum = DEVISTATORSPRITE; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->owner >= 0)
|
if (s->owner >= 0)
|
||||||
tsprite[spritesortcnt].z = ps[p].posz-(12<<8);
|
newtspr->z = ps[p].posz - (12 << 8);
|
||||||
else tsprite[spritesortcnt].z = s->z-(51<<8);
|
else newtspr->z = s->z - (51 << 8);
|
||||||
if (ps[p].curr_weapon == HANDBOMB_WEAPON)
|
if (ps[p].curr_weapon == HANDBOMB_WEAPON)
|
||||||
{
|
{
|
||||||
tsprite[spritesortcnt].xrepeat = 10;
|
newtspr->xrepeat = 10;
|
||||||
tsprite[spritesortcnt].yrepeat = 10;
|
newtspr->yrepeat = 10;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tsprite[spritesortcnt].xrepeat = 16;
|
newtspr->xrepeat = 16;
|
||||||
tsprite[spritesortcnt].yrepeat = 16;
|
newtspr->yrepeat = 16;
|
||||||
}
|
}
|
||||||
tsprite[spritesortcnt].pal = 0;
|
newtspr->pal = 0;
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -380,52 +380,53 @@ void animatesprites_r(int x,int y,int a,int smoothratio)
|
||||||
|
|
||||||
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1 && ud.showweapons && sprite[ps[p].i].extra > 0 && ps[p].curr_weapon > 0)
|
if ((display_mirror == 1 || screenpeek != p || s->owner == -1) && ud.multimode > 1 && ud.showweapons && sprite[ps[p].i].extra > 0 && ps[p].curr_weapon > 0)
|
||||||
{
|
{
|
||||||
memcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)t,sizeof(spritetype));
|
auto newtspr = &tsprite[spritesortcnt];
|
||||||
|
memcpy(newtspr, t, sizeof(spritetype));
|
||||||
|
|
||||||
tsprite[spritesortcnt].statnum = 99;
|
newtspr->statnum = 99;
|
||||||
|
|
||||||
tsprite[spritesortcnt].yrepeat = ( t->yrepeat>>3 );
|
newtspr->yrepeat = (t->yrepeat >> 3);
|
||||||
if (t->yrepeat < 4) t->yrepeat = 4;
|
if (t->yrepeat < 4) t->yrepeat = 4;
|
||||||
|
|
||||||
tsprite[spritesortcnt].shade = t->shade;
|
newtspr->shade = t->shade;
|
||||||
tsprite[spritesortcnt].cstat = 0;
|
newtspr->cstat = 0;
|
||||||
|
|
||||||
switch (ps[p].curr_weapon)
|
switch (ps[p].curr_weapon)
|
||||||
{
|
{
|
||||||
case PISTOL_WEAPON: tsprite[spritesortcnt].picnum = FIRSTGUNSPRITE; break;
|
case PISTOL_WEAPON: newtspr->picnum = FIRSTGUNSPRITE; break;
|
||||||
case SHOTGUN_WEAPON: tsprite[spritesortcnt].picnum = SHOTGUNSPRITE; break;
|
case SHOTGUN_WEAPON: newtspr->picnum = SHOTGUNSPRITE; break;
|
||||||
case RIFLEGUN_WEAPON: tsprite[spritesortcnt].picnum = CHAINGUNSPRITE; break;
|
case RIFLEGUN_WEAPON: newtspr->picnum = CHAINGUNSPRITE; break;
|
||||||
case CROSSBOW_WEAPON: tsprite[spritesortcnt].picnum = RPGSPRITE; break;
|
case CROSSBOW_WEAPON: newtspr->picnum = RPGSPRITE; break;
|
||||||
case CHICKEN_WEAPON: tsprite[spritesortcnt].picnum = RPGSPRITE; break;
|
case CHICKEN_WEAPON: newtspr->picnum = RPGSPRITE; break;
|
||||||
case THROWINGDYNAMITE_WEAPON:
|
case THROWINGDYNAMITE_WEAPON:
|
||||||
case DYNAMITE_WEAPON: tsprite[spritesortcnt].picnum = HEAVYHBOMB; break;
|
case DYNAMITE_WEAPON: newtspr->picnum = HEAVYHBOMB; break;
|
||||||
case POWDERKEG_WEAPON: tsprite[spritesortcnt].picnum = TRIPBOMBSPRITE; break;
|
case POWDERKEG_WEAPON: newtspr->picnum = TRIPBOMBSPRITE; break;
|
||||||
case BOWLING_WEAPON: tsprite[spritesortcnt].picnum = 3437; break;
|
case BOWLING_WEAPON: newtspr->picnum = 3437; break;
|
||||||
case THROWSAW_WEAPON: tsprite[spritesortcnt].picnum = SHRINKSPARK; break;
|
case THROWSAW_WEAPON: newtspr->picnum = SHRINKSPARK; break;
|
||||||
case BUZZSAW_WEAPON: tsprite[spritesortcnt].picnum = SHRINKSPARK; break;
|
case BUZZSAW_WEAPON: newtspr->picnum = SHRINKSPARK; break;
|
||||||
case ALIENBLASTER_WEAPON: tsprite[spritesortcnt].picnum = DEVISTATORSPRITE; break;
|
case ALIENBLASTER_WEAPON: newtspr->picnum = DEVISTATORSPRITE; break;
|
||||||
case TIT_WEAPON: tsprite[spritesortcnt].picnum = FREEZESPRITE; break;
|
case TIT_WEAPON: newtspr->picnum = FREEZESPRITE; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->owner >= 0)
|
if (s->owner >= 0)
|
||||||
tsprite[spritesortcnt].z = ps[p].posz-(12<<8);
|
newtspr->z = ps[p].posz - (12 << 8);
|
||||||
else tsprite[spritesortcnt].z = s->z-(51<<8);
|
else newtspr->z = s->z - (51 << 8);
|
||||||
if (ps[p].curr_weapon == HANDBOMB_WEAPON)
|
if (ps[p].curr_weapon == HANDBOMB_WEAPON)
|
||||||
{
|
{
|
||||||
tsprite[spritesortcnt].xrepeat = 10;
|
newtspr->xrepeat = 10;
|
||||||
tsprite[spritesortcnt].yrepeat = 10;
|
newtspr->yrepeat = 10;
|
||||||
}
|
}
|
||||||
else if (ps[p].OnMotorcycle || ps[p].OnBoat)
|
else if (ps[p].OnMotorcycle || ps[p].OnBoat)
|
||||||
{
|
{
|
||||||
tsprite[spritesortcnt].xrepeat = 0;
|
newtspr->xrepeat = 0;
|
||||||
tsprite[spritesortcnt].yrepeat = 0;
|
newtspr->yrepeat = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tsprite[spritesortcnt].xrepeat = 16;
|
newtspr->xrepeat = 16;
|
||||||
tsprite[spritesortcnt].yrepeat = 16;
|
newtspr->yrepeat = 16;
|
||||||
}
|
}
|
||||||
tsprite[spritesortcnt].pal = 0;
|
newtspr->pal = 0;
|
||||||
spritesortcnt++;
|
spritesortcnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue