diff --git a/src/gl/dynlights/a_dynlight.cpp b/src/gl/dynlights/a_dynlight.cpp index f9e11a2f2..05488bb3c 100644 --- a/src/gl/dynlights/a_dynlight.cpp +++ b/src/gl/dynlights/a_dynlight.cpp @@ -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); LinkLight(); diff --git a/src/gl/dynlights/gl_dynlight.h b/src/gl/dynlights/gl_dynlight.h index aa3f28ae2..12ec600cd 100644 --- a/src/gl/dynlights/gl_dynlight.h +++ b/src/gl/dynlights/gl_dynlight.h @@ -82,7 +82,7 @@ public: size_t PointerSubstitution (DObject *old, DObject *notOld); 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 Destroy(); void Activate(AActor *activator); diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index a33a91604..a03a73931 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -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; 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); // [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(-FIXED2FLOAT(ofsy-WEAPONTOP)/4, 1, 0, 0); + gl_RenderState.mViewMatrix.rotate(ofsX/4, 0, 1, 0); + gl_RenderState.mViewMatrix.rotate(-ofsY-WEAPONTOP/4, 1, 0, 0); // [BB] For some reason the jDoom models need to be rotated. gl_RenderState.mViewMatrix.rotate(90.f, 0, 1, 0); diff --git a/src/gl/models/gl_models.h b/src/gl/models/gl_models.h index 0159d2667..a99f81322 100644 --- a/src/gl/models/gl_models.h +++ b/src/gl/models/gl_models.h @@ -365,7 +365,7 @@ FSpriteModelFrame * gl_FindModelFrame(const PClass * ti, int sprite, int frame, void gl_RenderModel(GLSprite * spr); // [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); #endif diff --git a/src/gl/scene/gl_wall.h b/src/gl/scene/gl_wall.h index 3308904e9..b36248004 100644 --- a/src/gl/scene/gl_wall.h +++ b/src/gl/scene/gl_wall.h @@ -191,13 +191,13 @@ private: bool DoHorizon(seg_t * seg,sector_t * fs, vertex_t * v1,vertex_t * v2); 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, - int ceilingrefheight,int floorrefheight, - int CeilingHeightstart,int CeilingHeightend, - int FloorHeightstart,int FloorHeightend, - int v_offset); + fixed_t ceilingrefheight,fixed_t floorrefheight, + fixed_t CeilingHeightstart,fixed_t CeilingHeightend, + fixed_t FloorHeightstart,fixed_t FloorHeightend, + fixed_t v_offset); void DoMidTexture(seg_t * seg, bool drawfogboundary, sector_t * front, sector_t * back, diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index 73732c209..d1cc5943c 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -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)) { - 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) { 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, - 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, - int ceilingrefheight,int floorrefheight, - int topleft,int topright, - int bottomleft,int bottomright, - int v_offset) + fixed_t ceilingrefheight,fixed_t floorrefheight, + fixed_t topleft,fixed_t topright, + fixed_t bottomleft,fixed_t bottomright, + fixed_t v_offset) { 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; bottomplane = frontsector->floorplane; - ffh1 = segfront->floorplane.ZatPointFixed(v1); - ffh2 = segfront->floorplane.ZatPointFixed(v2); - zfloor[0] = FIXED2FLOAT(ffh1); - zfloor[1] = FIXED2FLOAT(ffh2); + zfloor[0] = segfront->floorplane.ZatPoint(v1); + zfloor[1] = segfront->floorplane.ZatPoint(v2); + ffh1 = FLOAT2FIXED(zfloor[0]); + ffh2 = FLOAT2FIXED(zfloor[1]); - fch1 = segfront->ceilingplane.ZatPointFixed(v1); - fch2 = segfront->ceilingplane.ZatPointFixed(v2); - zceil[0] = FIXED2FLOAT(fch1); - zceil[1] = FIXED2FLOAT(fch2); + zceil[0] = segfront->ceilingplane.ZatPoint(v1); + zceil[1] = segfront->ceilingplane.ZatPoint(v2); + fch1 = FLOAT2FIXED(zceil[0]); + fch2 = FLOAT2FIXED(zceil[1]); if (seg->linedef->special == Line_Horizon) { diff --git a/src/r_defs.h b/src/r_defs.h index 6cf07b817..3fe0885a1 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -104,9 +104,8 @@ typedef double vtype; struct vertex_t { -//private: +private: DVector2 p; - //fixed_t x, y; public: