mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Added some notes related to FEETADJUST for reference, made another tweak
This commit is contained in:
parent
ee0bab2941
commit
340eee8691
2 changed files with 7 additions and 4 deletions
|
@ -10,7 +10,7 @@
|
||||||
/// \brief Patch rotation.
|
/// \brief Patch rotation.
|
||||||
|
|
||||||
#include "r_patchrotation.h"
|
#include "r_patchrotation.h"
|
||||||
#include "r_things.h" // FEETADJUST
|
#include "r_things.h" // FEETADJUST (todo: is this needed anymore? -- Monster Iestyn 21 Sep 2023 )
|
||||||
#include "z_zone.h"
|
#include "z_zone.h"
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "r_main.h" // R_PointToAngle
|
#include "r_main.h" // R_PointToAngle
|
||||||
|
@ -69,15 +69,13 @@ patch_t *Patch_GetRotatedSprite(
|
||||||
boolean flip,
|
boolean flip,
|
||||||
void *info, INT32 rotationangle)
|
void *info, INT32 rotationangle)
|
||||||
{
|
{
|
||||||
rotsprite_t *rotsprite;
|
rotsprite_t *rotsprite = sprite->rotated[spriteangle];
|
||||||
spriteinfo_t *sprinfo = (spriteinfo_t *)info;
|
spriteinfo_t *sprinfo = (spriteinfo_t *)info;
|
||||||
INT32 idx = rotationangle;
|
INT32 idx = rotationangle;
|
||||||
|
|
||||||
if (rotationangle < 1 || rotationangle >= ROTANGLES)
|
if (rotationangle < 1 || rotationangle >= ROTANGLES)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
rotsprite = sprite->rotated[spriteangle];
|
|
||||||
|
|
||||||
if (rotsprite == NULL)
|
if (rotsprite == NULL)
|
||||||
{
|
{
|
||||||
rotsprite = RotatedPatch_Create(ROTANGLES);
|
rotsprite = RotatedPatch_Create(ROTANGLES);
|
||||||
|
|
|
@ -337,6 +337,11 @@ boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef, UINT16
|
||||||
spritecachedinfo[numspritelumps].height = height<<FRACBITS;
|
spritecachedinfo[numspritelumps].height = height<<FRACBITS;
|
||||||
|
|
||||||
// BP: we cannot use special tric in hardware mode because feet in ground caused by z-buffer
|
// BP: we cannot use special tric in hardware mode because feet in ground caused by z-buffer
|
||||||
|
// Monster Iestyn (21 Sep 2023): the above comment no longer makes sense in context!!! So I give an explanation here!
|
||||||
|
// FEETADJUST was originally an OpenGL-exclusive hack from Doom Legacy to avoid the player's feet being clipped as
|
||||||
|
// a result of rendering partially under the ground, but sometime before SRB2 2.1's release this was changed to apply
|
||||||
|
// to the software renderer as well.
|
||||||
|
// TODO: kill FEETADJUST altogether somehow and somehow fix OpenGL not to clip sprites that are partially underground (if possible)?
|
||||||
spritecachedinfo[numspritelumps].topoffset += FEETADJUST;
|
spritecachedinfo[numspritelumps].topoffset += FEETADJUST;
|
||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue