mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 17:51:27 +00:00
Merge branch 'public_flatsprite' of git@git.magicalgirl.moe:Sryder/SRB2.git
# Conflicts: # src/hardware/hw_main.c
This commit is contained in:
commit
fffa3db5a8
1 changed files with 15 additions and 18 deletions
|
@ -5256,13 +5256,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
I_Error("sprframes NULL for sprite %d\n", thing->sprite);
|
I_Error("sprframes NULL for sprite %d\n", thing->sprite);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (sprframe->rotate != SRF_SINGLE)
|
|
||||||
{
|
|
||||||
if (thing->player)
|
if (thing->player)
|
||||||
ang = R_PointToAngle (thing->x, thing->y) - thing->player->frameangle;
|
ang = R_PointToAngle (thing->x, thing->y) - thing->player->frameangle;
|
||||||
else
|
else
|
||||||
ang = R_PointToAngle (thing->x, thing->y) - thing->angle;
|
ang = R_PointToAngle (thing->x, thing->y) - thing->angle;
|
||||||
}
|
|
||||||
|
|
||||||
if (sprframe->rotate == SRF_SINGLE)
|
if (sprframe->rotate == SRF_SINGLE)
|
||||||
{
|
{
|
||||||
|
@ -5271,7 +5268,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
lumpoff = sprframe->lumpid[0]; //Fab: see note above
|
lumpoff = sprframe->lumpid[0]; //Fab: see note above
|
||||||
flip = sprframe->flip; // Will only be 0x00 or 0xFF
|
flip = sprframe->flip; // Will only be 0x00 or 0xFF
|
||||||
|
|
||||||
if (papersprite && (R_PointToAngle (thing->x, thing->y) - thing->angle < ANGLE_180))
|
if (papersprite && ang < ANGLE_180)
|
||||||
{
|
{
|
||||||
if (flip)
|
if (flip)
|
||||||
flip = 0;
|
flip = 0;
|
||||||
|
@ -5292,24 +5289,24 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
//Fab: lumpid is the index for spritewidth,spriteoffset... tables
|
//Fab: lumpid is the index for spritewidth,spriteoffset... tables
|
||||||
lumpoff = sprframe->lumpid[rot];
|
lumpoff = sprframe->lumpid[rot];
|
||||||
flip = sprframe->flip & (1<<rot);
|
flip = sprframe->flip & (1<<rot);
|
||||||
|
|
||||||
|
if (papersprite && ang < ANGLE_180)
|
||||||
|
{
|
||||||
|
if (flip)
|
||||||
|
flip = 0;
|
||||||
|
else
|
||||||
|
flip = 1<<rot;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES)
|
if (thing->skin && ((skin_t *)thing->skin)->flags & SF_HIRES)
|
||||||
this_scale = this_scale * FIXED_TO_FLOAT(((skin_t *)thing->skin)->highresscale);
|
this_scale = this_scale * FIXED_TO_FLOAT(((skin_t *)thing->skin)->highresscale);
|
||||||
|
|
||||||
if (papersprite)
|
if (papersprite)
|
||||||
{
|
|
||||||
if (flip && sprframe->rotate != SRF_SINGLE)
|
|
||||||
{
|
|
||||||
rightsin = FIXED_TO_FLOAT(FINESINE((thing->angle+ANGLE_180)>>ANGLETOFINESHIFT));
|
|
||||||
rightcos = FIXED_TO_FLOAT(FINECOSINE((thing->angle+ANGLE_180)>>ANGLETOFINESHIFT));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
rightsin = FIXED_TO_FLOAT(FINESINE((thing->angle)>>ANGLETOFINESHIFT));
|
rightsin = FIXED_TO_FLOAT(FINESINE((thing->angle)>>ANGLETOFINESHIFT));
|
||||||
rightcos = FIXED_TO_FLOAT(FINECOSINE((thing->angle)>>ANGLETOFINESHIFT));
|
rightcos = FIXED_TO_FLOAT(FINECOSINE((thing->angle)>>ANGLETOFINESHIFT));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rightsin = FIXED_TO_FLOAT(FINESINE((viewangle + ANGLE_90)>>ANGLETOFINESHIFT));
|
rightsin = FIXED_TO_FLOAT(FINESINE((viewangle + ANGLE_90)>>ANGLETOFINESHIFT));
|
||||||
|
|
Loading…
Reference in a new issue