mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 13:50:48 +00:00
- fixed a few fixed/float parameter mixups.
This commit is contained in:
parent
5a2eac8f15
commit
58eb64a7e0
7 changed files with 26 additions and 27 deletions
|
@ -388,7 +388,7 @@ void ADynamicLight::UpdateLocation()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void ADynamicLight::SetOrigin(fixed_t x, fixed_t y, fixed_t z, bool moving)
|
void ADynamicLight::SetOrigin(double x, double y, double z, bool moving)
|
||||||
{
|
{
|
||||||
Super::SetOrigin(x, y, z, moving);
|
Super::SetOrigin(x, y, z, moving);
|
||||||
LinkLight();
|
LinkLight();
|
||||||
|
|
|
@ -82,7 +82,7 @@ public:
|
||||||
size_t PointerSubstitution (DObject *old, DObject *notOld);
|
size_t PointerSubstitution (DObject *old, DObject *notOld);
|
||||||
|
|
||||||
void BeginPlay();
|
void BeginPlay();
|
||||||
void SetOrigin (fixed_t x, fixed_t y, fixed_t z, bool moving = false);
|
void SetOrigin (double x, double y, double z, bool moving = false);
|
||||||
void PostBeginPlay();
|
void PostBeginPlay();
|
||||||
void Destroy();
|
void Destroy();
|
||||||
void Activate(AActor *activator);
|
void Activate(AActor *activator);
|
||||||
|
|
|
@ -944,7 +944,7 @@ void gl_RenderModel(GLSprite * spr)
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void gl_RenderHUDModel(pspdef_t *psp, fixed_t ofsx, fixed_t ofsy)
|
void gl_RenderHUDModel(pspdef_t *psp, float ofsX, float ofsY)
|
||||||
{
|
{
|
||||||
AActor * playermo=players[consoleplayer].camera;
|
AActor * playermo=players[consoleplayer].camera;
|
||||||
FSpriteModelFrame *smf = gl_FindModelFrame(playermo->player->ReadyWeapon->GetClass(), psp->state->sprite, psp->state->GetFrame(), false);
|
FSpriteModelFrame *smf = gl_FindModelFrame(playermo->player->ReadyWeapon->GetClass(), psp->state->sprite, psp->state->GetFrame(), false);
|
||||||
|
@ -975,8 +975,8 @@ void gl_RenderHUDModel(pspdef_t *psp, fixed_t ofsx, fixed_t ofsy)
|
||||||
gl_RenderState.mViewMatrix.translate(smf->xoffset / smf->xscale, smf->zoffset / smf->zscale, smf->yoffset / smf->yscale);
|
gl_RenderState.mViewMatrix.translate(smf->xoffset / smf->xscale, smf->zoffset / smf->zscale, smf->yoffset / smf->yscale);
|
||||||
|
|
||||||
// [BB] Weapon bob, very similar to the normal Doom weapon bob.
|
// [BB] Weapon bob, very similar to the normal Doom weapon bob.
|
||||||
gl_RenderState.mViewMatrix.rotate(FIXED2FLOAT(ofsx)/4, 0, 1, 0);
|
gl_RenderState.mViewMatrix.rotate(ofsX/4, 0, 1, 0);
|
||||||
gl_RenderState.mViewMatrix.rotate(-FIXED2FLOAT(ofsy-WEAPONTOP)/4, 1, 0, 0);
|
gl_RenderState.mViewMatrix.rotate(-ofsY-WEAPONTOP/4, 1, 0, 0);
|
||||||
|
|
||||||
// [BB] For some reason the jDoom models need to be rotated.
|
// [BB] For some reason the jDoom models need to be rotated.
|
||||||
gl_RenderState.mViewMatrix.rotate(90.f, 0, 1, 0);
|
gl_RenderState.mViewMatrix.rotate(90.f, 0, 1, 0);
|
||||||
|
|
|
@ -365,7 +365,7 @@ FSpriteModelFrame * gl_FindModelFrame(const PClass * ti, int sprite, int frame,
|
||||||
|
|
||||||
void gl_RenderModel(GLSprite * spr);
|
void gl_RenderModel(GLSprite * spr);
|
||||||
// [BB] HUD weapon model rendering functions.
|
// [BB] HUD weapon model rendering functions.
|
||||||
void gl_RenderHUDModel(pspdef_t *psp, fixed_t ofsx, fixed_t ofsy);
|
void gl_RenderHUDModel(pspdef_t *psp, float ofsx, float ofsy);
|
||||||
bool gl_IsHUDModelForPlayerAvailable (player_t * player);
|
bool gl_IsHUDModelForPlayerAvailable (player_t * player);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -191,13 +191,13 @@ private:
|
||||||
bool DoHorizon(seg_t * seg,sector_t * fs, vertex_t * v1,vertex_t * v2);
|
bool DoHorizon(seg_t * seg,sector_t * fs, vertex_t * v1,vertex_t * v2);
|
||||||
|
|
||||||
bool SetWallCoordinates(seg_t * seg, FTexCoordInfo *tci, float ceilingrefheight,
|
bool SetWallCoordinates(seg_t * seg, FTexCoordInfo *tci, float ceilingrefheight,
|
||||||
int topleft,int topright, int bottomleft,int bottomright, int texoffset);
|
fixed_t topleft, fixed_t topright, fixed_t bottomleft, fixed_t bottomright, fixed_t t_ofs);
|
||||||
|
|
||||||
void DoTexture(int type,seg_t * seg,int peg,
|
void DoTexture(int type,seg_t * seg,int peg,
|
||||||
int ceilingrefheight,int floorrefheight,
|
fixed_t ceilingrefheight,fixed_t floorrefheight,
|
||||||
int CeilingHeightstart,int CeilingHeightend,
|
fixed_t CeilingHeightstart,fixed_t CeilingHeightend,
|
||||||
int FloorHeightstart,int FloorHeightend,
|
fixed_t FloorHeightstart,fixed_t FloorHeightend,
|
||||||
int v_offset);
|
fixed_t v_offset);
|
||||||
|
|
||||||
void DoMidTexture(seg_t * seg, bool drawfogboundary,
|
void DoMidTexture(seg_t * seg, bool drawfogboundary,
|
||||||
sector_t * front, sector_t * back,
|
sector_t * front, sector_t * back,
|
||||||
|
|
|
@ -395,7 +395,7 @@ bool GLWall::DoHorizon(seg_t * seg,sector_t * fs, vertex_t * v1,vertex_t * v2)
|
||||||
|
|
||||||
if (viewz > fs->GetPlaneTexZ(sector_t::floor))
|
if (viewz > fs->GetPlaneTexZ(sector_t::floor))
|
||||||
{
|
{
|
||||||
zbottom[1] = zbottom[0] = FIXED2FLOAT(fs->GetPlaneTexZ(sector_t::floor));
|
zbottom[1] = zbottom[0] = fs->GetPlaneTexZF(sector_t::floor);
|
||||||
if (fs->GetTexture(sector_t::floor) == skyflatnum)
|
if (fs->GetTexture(sector_t::floor) == skyflatnum)
|
||||||
{
|
{
|
||||||
SkyPlane(fs, sector_t::floor, false);
|
SkyPlane(fs, sector_t::floor, false);
|
||||||
|
@ -428,7 +428,7 @@ bool GLWall::DoHorizon(seg_t * seg,sector_t * fs, vertex_t * v1,vertex_t * v2)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
bool GLWall::SetWallCoordinates(seg_t * seg, FTexCoordInfo *tci, float texturetop,
|
bool GLWall::SetWallCoordinates(seg_t * seg, FTexCoordInfo *tci, float texturetop,
|
||||||
int topleft,int topright, int bottomleft,int bottomright, int t_ofs)
|
fixed_t topleft, fixed_t topright, fixed_t bottomleft, fixed_t bottomright, fixed_t t_ofs)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -597,10 +597,10 @@ void GLWall::CheckTexturePosition()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
void GLWall::DoTexture(int _type,seg_t * seg, int peg,
|
void GLWall::DoTexture(int _type,seg_t * seg, int peg,
|
||||||
int ceilingrefheight,int floorrefheight,
|
fixed_t ceilingrefheight,fixed_t floorrefheight,
|
||||||
int topleft,int topright,
|
fixed_t topleft,fixed_t topright,
|
||||||
int bottomleft,int bottomright,
|
fixed_t bottomleft,fixed_t bottomright,
|
||||||
int v_offset)
|
fixed_t v_offset)
|
||||||
{
|
{
|
||||||
if (topleft<=bottomleft && topright<=bottomright) return;
|
if (topleft<=bottomleft && topright<=bottomright) return;
|
||||||
|
|
||||||
|
@ -1428,15 +1428,15 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector)
|
||||||
topplane = frontsector->ceilingplane;
|
topplane = frontsector->ceilingplane;
|
||||||
bottomplane = frontsector->floorplane;
|
bottomplane = frontsector->floorplane;
|
||||||
|
|
||||||
ffh1 = segfront->floorplane.ZatPointFixed(v1);
|
zfloor[0] = segfront->floorplane.ZatPoint(v1);
|
||||||
ffh2 = segfront->floorplane.ZatPointFixed(v2);
|
zfloor[1] = segfront->floorplane.ZatPoint(v2);
|
||||||
zfloor[0] = FIXED2FLOAT(ffh1);
|
ffh1 = FLOAT2FIXED(zfloor[0]);
|
||||||
zfloor[1] = FIXED2FLOAT(ffh2);
|
ffh2 = FLOAT2FIXED(zfloor[1]);
|
||||||
|
|
||||||
fch1 = segfront->ceilingplane.ZatPointFixed(v1);
|
zceil[0] = segfront->ceilingplane.ZatPoint(v1);
|
||||||
fch2 = segfront->ceilingplane.ZatPointFixed(v2);
|
zceil[1] = segfront->ceilingplane.ZatPoint(v2);
|
||||||
zceil[0] = FIXED2FLOAT(fch1);
|
fch1 = FLOAT2FIXED(zceil[0]);
|
||||||
zceil[1] = FIXED2FLOAT(fch2);
|
fch2 = FLOAT2FIXED(zceil[1]);
|
||||||
|
|
||||||
if (seg->linedef->special == Line_Horizon)
|
if (seg->linedef->special == Line_Horizon)
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,9 +104,8 @@ typedef double vtype;
|
||||||
|
|
||||||
struct vertex_t
|
struct vertex_t
|
||||||
{
|
{
|
||||||
//private:
|
private:
|
||||||
DVector2 p;
|
DVector2 p;
|
||||||
//fixed_t x, y;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue