mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-21 10:20:46 +00:00
Fix warnings
This commit is contained in:
parent
9595bd3b7a
commit
49c327e291
3 changed files with 4 additions and 4 deletions
|
@ -187,7 +187,7 @@ public:
|
|||
std::unique_ptr<TriangleMeshShape> Collision;
|
||||
|
||||
virtual LevelMeshSurface* GetSurface(int index) { return nullptr; }
|
||||
virtual unsigned GetSurfaceIndex(const LevelMeshSurface* surface) const { return unsigned(-1); }
|
||||
virtual unsigned int GetSurfaceIndex(const LevelMeshSurface* surface) const { return 0xffffffff; }
|
||||
virtual int GetSurfaceCount() { return 0; }
|
||||
|
||||
virtual void UpdateLightLists() { }
|
||||
|
|
|
@ -283,7 +283,7 @@ void DoomLevelMesh::CreateLightList()
|
|||
meshlight.Origin = { (float)pos.X, (float)pos.Y, (float)pos.Z };
|
||||
meshlight.RelativeOrigin = meshlight.Origin;
|
||||
meshlight.Radius = (float)light->GetRadius();
|
||||
meshlight.Intensity = light->target->Alpha;
|
||||
meshlight.Intensity = (float)light->target->Alpha;
|
||||
if (light->IsSpot())
|
||||
{
|
||||
meshlight.InnerAngleCos = (float)light->pSpotInnerAngle->Cos();
|
||||
|
@ -320,7 +320,7 @@ void DoomLevelMesh::CreateLightList()
|
|||
std::set<LevelMeshPortal, RecursivePortalComparator> touchedPortals;
|
||||
touchedPortals.insert(Portals[0]);
|
||||
|
||||
for (int i = 0, count = Lights.size(); i < count; ++i) // The array expands as the lights are duplicated/propagated
|
||||
for (int i = 0, count = (int)Lights.size(); i < count; ++i) // The array expands as the lights are duplicated/propagated
|
||||
{
|
||||
PropagateLight(Lights[i].get(), touchedPortals, 0);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
void UpdateLightLists() override;
|
||||
|
||||
LevelMeshSurface* GetSurface(int index) override { return &Surfaces[index]; }
|
||||
unsigned GetSurfaceIndex(const LevelMeshSurface* surface) const { return std::distance(reinterpret_cast<const DoomLevelMeshSurface*>(&Surfaces[0]), reinterpret_cast<const DoomLevelMeshSurface*>(surface)); }
|
||||
unsigned int GetSurfaceIndex(const LevelMeshSurface* surface) const override { return (unsigned int)(ptrdiff_t)(static_cast<const DoomLevelMeshSurface*>(surface) - Surfaces.Data()); }
|
||||
int GetSurfaceCount() override { return Surfaces.Size(); }
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue