Fixes for many low-severity compiler warnings (#576)
* Fixes for many low-severity compiler warnings Mostly a lot of pedantic things like end-of-file newlines and commas on the last enum value. However some fixes like the weak v-tables warnings fixes might help with code gen. It's unclear if the linker is able to elide multiple copies of the same type's v-table in different translation units, (sometimes it can) but these fixes ensure we don't have to rely on it.
This commit is contained in:
parent
ea7bfbee70
commit
5111139558
@ -27,7 +27,7 @@ enum duDebugDrawPrimitives
|
||||
DU_DRAW_POINTS,
|
||||
DU_DRAW_LINES,
|
||||
DU_DRAW_TRIS,
|
||||
DU_DRAW_QUADS,
|
||||
DU_DRAW_QUADS
|
||||
};
|
||||
|
||||
/// Abstract debug draw interface.
|
||||
@ -197,15 +197,15 @@ class duDisplayList : public duDebugDraw
|
||||
int m_size;
|
||||
int m_cap;
|
||||
|
||||
bool m_depthMask;
|
||||
duDebugDrawPrimitives m_prim;
|
||||
float m_primSize;
|
||||
bool m_depthMask;
|
||||
|
||||
void resize(int cap);
|
||||
|
||||
public:
|
||||
duDisplayList(int cap = 512);
|
||||
~duDisplayList();
|
||||
virtual ~duDisplayList();
|
||||
virtual void depthMask(bool state);
|
||||
virtual void begin(duDebugDrawPrimitives prim, float size = 1.0f);
|
||||
virtual void vertex(const float x, const float y, const float z, unsigned int color);
|
||||
|
@ -27,7 +27,7 @@ enum DrawNavMeshFlags
|
||||
{
|
||||
DU_DRAWNAVMESH_OFFMESHCONS = 0x01,
|
||||
DU_DRAWNAVMESH_CLOSEDLIST = 0x02,
|
||||
DU_DRAWNAVMESH_COLOR_TILES = 0x04,
|
||||
DU_DRAWNAVMESH_COLOR_TILES = 0x04
|
||||
};
|
||||
|
||||
void duDebugDrawNavMesh(struct duDebugDraw* dd, const dtNavMesh& mesh, unsigned char flags);
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
struct duFileIO
|
||||
{
|
||||
virtual ~duFileIO() = 0;
|
||||
virtual ~duFileIO();
|
||||
virtual bool isWriting() const = 0;
|
||||
virtual bool isReading() const = 0;
|
||||
virtual bool write(const void* ptr, const size_t size) = 0;
|
||||
@ -39,5 +39,4 @@ bool duReadCompactHeightfield(struct rcCompactHeightfield& chf, duFileIO* io);
|
||||
|
||||
void duLogBuildTimes(rcContext& ctx, const int totalTileUsec);
|
||||
|
||||
|
||||
#endif // RECAST_DUMP_H
|
||||
|
@ -530,9 +530,9 @@ duDisplayList::duDisplayList(int cap) :
|
||||
m_color(0),
|
||||
m_size(0),
|
||||
m_cap(0),
|
||||
m_depthMask(true),
|
||||
m_prim(DU_DRAW_LINES),
|
||||
m_primSize(1.0f)
|
||||
m_primSize(1.0f),
|
||||
m_depthMask(true)
|
||||
{
|
||||
if (cap < 8)
|
||||
cap = 8;
|
||||
|
@ -25,10 +25,9 @@
|
||||
#include "RecastAlloc.h"
|
||||
#include "RecastDump.h"
|
||||
|
||||
|
||||
duFileIO::~duFileIO()
|
||||
{
|
||||
// Empty
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
static void ioprintf(duFileIO* io, const char* format, ...)
|
||||
|
@ -99,7 +99,7 @@ static const int DT_MAX_AREAS = 64;
|
||||
enum dtTileFlags
|
||||
{
|
||||
/// The navigation mesh owns the tile memory and is responsible for freeing it.
|
||||
DT_TILE_FREE_DATA = 0x01,
|
||||
DT_TILE_FREE_DATA = 0x01
|
||||
};
|
||||
|
||||
/// Vertex flags returned by dtNavMeshQuery::findStraightPath.
|
||||
@ -107,32 +107,32 @@ enum dtStraightPathFlags
|
||||
{
|
||||
DT_STRAIGHTPATH_START = 0x01, ///< The vertex is the start position in the path.
|
||||
DT_STRAIGHTPATH_END = 0x02, ///< The vertex is the end position in the path.
|
||||
DT_STRAIGHTPATH_OFFMESH_CONNECTION = 0x04, ///< The vertex is the start of an off-mesh connection.
|
||||
DT_STRAIGHTPATH_OFFMESH_CONNECTION = 0x04 ///< The vertex is the start of an off-mesh connection.
|
||||
};
|
||||
|
||||
/// Options for dtNavMeshQuery::findStraightPath.
|
||||
enum dtStraightPathOptions
|
||||
{
|
||||
DT_STRAIGHTPATH_AREA_CROSSINGS = 0x01, ///< Add a vertex at every polygon edge crossing where area changes.
|
||||
DT_STRAIGHTPATH_ALL_CROSSINGS = 0x02, ///< Add a vertex at every polygon edge crossing.
|
||||
DT_STRAIGHTPATH_ALL_CROSSINGS = 0x02 ///< Add a vertex at every polygon edge crossing.
|
||||
};
|
||||
|
||||
|
||||
/// Options for dtNavMeshQuery::initSlicedFindPath and updateSlicedFindPath
|
||||
enum dtFindPathOptions
|
||||
{
|
||||
DT_FINDPATH_ANY_ANGLE = 0x02, ///< use raycasts during pathfind to "shortcut" (raycast still consider costs)
|
||||
DT_FINDPATH_ANY_ANGLE = 0x02 ///< use raycasts during pathfind to "shortcut" (raycast still consider costs)
|
||||
};
|
||||
|
||||
/// Options for dtNavMeshQuery::raycast
|
||||
enum dtRaycastOptions
|
||||
{
|
||||
DT_RAYCAST_USE_COSTS = 0x01, ///< Raycast should calculate movement cost along the ray and fill RaycastHit::cost
|
||||
DT_RAYCAST_USE_COSTS = 0x01 ///< Raycast should calculate movement cost along the ray and fill RaycastHit::cost
|
||||
};
|
||||
|
||||
enum dtDetailTriEdgeFlags
|
||||
{
|
||||
DT_DETAIL_EDGE_BOUNDARY = 0x01, ///< Detail triangle edge is part of the poly boundary
|
||||
DT_DETAIL_EDGE_BOUNDARY = 0x01 ///< Detail triangle edge is part of the poly boundary
|
||||
};
|
||||
|
||||
|
||||
@ -146,7 +146,7 @@ enum dtPolyTypes
|
||||
/// The polygon is a standard convex polygon that is part of the surface of the mesh.
|
||||
DT_POLYTYPE_GROUND = 0,
|
||||
/// The polygon is an off-mesh connection consisting of two vertices.
|
||||
DT_POLYTYPE_OFFMESH_CONNECTION = 1,
|
||||
DT_POLYTYPE_OFFMESH_CONNECTION = 1
|
||||
};
|
||||
|
||||
|
||||
|
@ -152,7 +152,7 @@ struct dtRaycastHit
|
||||
class dtPolyQuery
|
||||
{
|
||||
public:
|
||||
virtual ~dtPolyQuery() { }
|
||||
virtual ~dtPolyQuery();
|
||||
|
||||
/// Called for each batch of unique polygons touched by the search area in dtNavMeshQuery::queryPolygons.
|
||||
/// This can be called multiple times for a single query.
|
||||
|
@ -25,7 +25,7 @@ enum dtNodeFlags
|
||||
{
|
||||
DT_NODE_OPEN = 0x01,
|
||||
DT_NODE_CLOSED = 0x02,
|
||||
DT_NODE_PARENT_DETACHED = 0x04, // parent of the node is not adjacent. Found using raycast.
|
||||
DT_NODE_PARENT_DETACHED = 0x04 // parent of the node is not adjacent. Found using raycast.
|
||||
};
|
||||
|
||||
typedef unsigned short dtNodeIndex;
|
||||
|
@ -117,6 +117,11 @@ void dtFreeNavMeshQuery(dtNavMeshQuery* navmesh)
|
||||
dtFree(navmesh);
|
||||
}
|
||||
|
||||
dtPolyQuery::~dtPolyQuery()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// @class dtNavMeshQuery
|
||||
@ -630,6 +635,8 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~dtFindNearestPolyQuery();
|
||||
|
||||
dtPolyRef nearestRef() const { return m_nearestRef; }
|
||||
const float* nearestPoint() const { return m_nearestPoint; }
|
||||
bool isOverPoly() const { return m_overPoly; }
|
||||
@ -672,6 +679,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
dtFindNearestPolyQuery::~dtFindNearestPolyQuery()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
/// @par
|
||||
///
|
||||
/// @note If the search box does not intersect any polygons the search will
|
||||
@ -847,6 +859,8 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~dtCollectPolysQuery();
|
||||
|
||||
int numCollected() const { return m_numCollected; }
|
||||
bool overflowed() const { return m_overflow; }
|
||||
|
||||
@ -868,6 +882,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
dtCollectPolysQuery::~dtCollectPolysQuery()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
/// @par
|
||||
///
|
||||
/// If no polygons are found, the function will return #DT_SUCCESS with a
|
||||
|
@ -66,7 +66,7 @@ enum CrowdAgentState
|
||||
{
|
||||
DT_CROWDAGENT_STATE_INVALID, ///< The agent is not in a valid state.
|
||||
DT_CROWDAGENT_STATE_WALKING, ///< The agent is traversing a normal navigation mesh polygon.
|
||||
DT_CROWDAGENT_STATE_OFFMESH, ///< The agent is traversing an off-mesh connection.
|
||||
DT_CROWDAGENT_STATE_OFFMESH ///< The agent is traversing an off-mesh connection.
|
||||
};
|
||||
|
||||
/// Configuration parameters for a crowd agent.
|
||||
@ -108,7 +108,7 @@ enum MoveRequestState
|
||||
DT_CROWDAGENT_TARGET_REQUESTING,
|
||||
DT_CROWDAGENT_TARGET_WAITING_FOR_QUEUE,
|
||||
DT_CROWDAGENT_TARGET_WAITING_FOR_PATH,
|
||||
DT_CROWDAGENT_TARGET_VELOCITY,
|
||||
DT_CROWDAGENT_TARGET_VELOCITY
|
||||
};
|
||||
|
||||
/// Represents an agent managed by a #dtCrowd object.
|
||||
@ -188,7 +188,7 @@ enum UpdateFlags
|
||||
DT_CROWD_OBSTACLE_AVOIDANCE = 2,
|
||||
DT_CROWD_SEPARATION = 4,
|
||||
DT_CROWD_OPTIMIZE_VIS = 8, ///< Use #dtPathCorridor::optimizePathVisibility() to optimize the agent path.
|
||||
DT_CROWD_OPTIMIZE_TOPO = 16, ///< Use dtPathCorridor::optimizePathTopology() to optimize the agent path.
|
||||
DT_CROWD_OPTIMIZE_TOPO = 16 ///< Use dtPathCorridor::optimizePathTopology() to optimize the agent path.
|
||||
};
|
||||
|
||||
struct dtCrowdAgentDebugInfo
|
||||
|
@ -3,16 +3,13 @@
|
||||
|
||||
#include "DetourStatus.h"
|
||||
|
||||
|
||||
|
||||
typedef unsigned int dtObstacleRef;
|
||||
|
||||
typedef unsigned int dtCompressedTileRef;
|
||||
|
||||
/// Flags for addTile
|
||||
enum dtCompressedTileFlags
|
||||
{
|
||||
DT_COMPRESSEDTILE_FREE_DATA = 0x01, ///< Navmesh owns the tile memory and should free it.
|
||||
DT_COMPRESSEDTILE_FREE_DATA = 0x01 ///< Navmesh owns the tile memory and should free it.
|
||||
};
|
||||
|
||||
struct dtCompressedTile
|
||||
@ -32,14 +29,14 @@ enum ObstacleState
|
||||
DT_OBSTACLE_EMPTY,
|
||||
DT_OBSTACLE_PROCESSING,
|
||||
DT_OBSTACLE_PROCESSED,
|
||||
DT_OBSTACLE_REMOVING,
|
||||
DT_OBSTACLE_REMOVING
|
||||
};
|
||||
|
||||
enum ObstacleType
|
||||
{
|
||||
DT_OBSTACLE_CYLINDER,
|
||||
DT_OBSTACLE_BOX, // AABB
|
||||
DT_OBSTACLE_ORIENTED_BOX, // OBB
|
||||
DT_OBSTACLE_ORIENTED_BOX // OBB
|
||||
};
|
||||
|
||||
struct dtObstacleCylinder
|
||||
@ -97,13 +94,10 @@ struct dtTileCacheParams
|
||||
|
||||
struct dtTileCacheMeshProcess
|
||||
{
|
||||
virtual ~dtTileCacheMeshProcess() { }
|
||||
|
||||
virtual void process(struct dtNavMeshCreateParams* params,
|
||||
unsigned char* polyAreas, unsigned short* polyFlags) = 0;
|
||||
virtual ~dtTileCacheMeshProcess();
|
||||
virtual void process(struct dtNavMeshCreateParams* params, unsigned char* polyAreas, unsigned short* polyFlags) = 0;
|
||||
};
|
||||
|
||||
|
||||
class dtTileCache
|
||||
{
|
||||
public:
|
||||
@ -219,7 +213,7 @@ private:
|
||||
enum ObstacleRequestAction
|
||||
{
|
||||
REQUEST_ADD,
|
||||
REQUEST_REMOVE,
|
||||
REQUEST_REMOVE
|
||||
};
|
||||
|
||||
struct ObstacleRequest
|
||||
|
@ -78,7 +78,7 @@ struct dtTileCachePolyMesh
|
||||
|
||||
struct dtTileCacheAlloc
|
||||
{
|
||||
virtual ~dtTileCacheAlloc() {}
|
||||
virtual ~dtTileCacheAlloc();
|
||||
|
||||
virtual void reset() {}
|
||||
|
||||
@ -95,7 +95,7 @@ struct dtTileCacheAlloc
|
||||
|
||||
struct dtTileCacheCompressor
|
||||
{
|
||||
virtual ~dtTileCacheCompressor() { }
|
||||
virtual ~dtTileCacheCompressor();
|
||||
|
||||
virtual int maxCompressedSize(const int bufferSize) = 0;
|
||||
virtual dtStatus compress(const unsigned char* buffer, const int bufferSize,
|
||||
|
@ -239,6 +239,11 @@ const dtTileCacheObstacle* dtTileCache::getObstacleByRef(dtObstacleRef ref)
|
||||
return ob;
|
||||
}
|
||||
|
||||
dtTileCacheMeshProcess::~dtTileCacheMeshProcess()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
dtStatus dtTileCache::addTile(unsigned char* data, const int dataSize, unsigned char flags, dtCompressedTileRef* result)
|
||||
{
|
||||
// Make sure the data is in right format.
|
||||
|
@ -23,6 +23,15 @@
|
||||
#include "DetourTileCacheBuilder.h"
|
||||
#include <string.h>
|
||||
|
||||
dtTileCacheAlloc::~dtTileCacheAlloc()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
dtTileCacheCompressor::~dtTileCacheCompressor()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
template<class T> class dtFixedArray
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ enum rcLogCategory
|
||||
{
|
||||
RC_LOG_PROGRESS = 1, ///< A progress log entry.
|
||||
RC_LOG_WARNING, ///< A warning log entry.
|
||||
RC_LOG_ERROR, ///< An error log entry.
|
||||
RC_LOG_ERROR ///< An error log entry.
|
||||
};
|
||||
|
||||
/// Recast performance timer categories.
|
||||
@ -101,7 +101,6 @@ enum rcTimerLabel
|
||||
class rcContext
|
||||
{
|
||||
public:
|
||||
|
||||
/// Contructor.
|
||||
/// @param[in] state TRUE if the logging and performance timers should be enabled. [Default: true]
|
||||
inline rcContext(bool state = true) : m_logEnabled(state), m_timerEnabled(state) {}
|
||||
@ -140,9 +139,8 @@ public:
|
||||
inline int getAccumulatedTime(const rcTimerLabel label) const { return m_timerEnabled ? doGetAccumulatedTime(label) : -1; }
|
||||
|
||||
protected:
|
||||
|
||||
/// Clears all log entries.
|
||||
virtual void doResetLog() {}
|
||||
virtual void doResetLog();
|
||||
|
||||
/// Logs a message.
|
||||
/// @param[in] category The category of the message.
|
||||
@ -564,7 +562,7 @@ static const int RC_AREA_BORDER = 0x20000;
|
||||
enum rcBuildContoursFlags
|
||||
{
|
||||
RC_CONTOUR_TESS_WALL_EDGES = 0x01, ///< Tessellate solid (impassable) edges during contour simplification.
|
||||
RC_CONTOUR_TESS_AREA_EDGES = 0x02, ///< Tessellate edges between areas during contour simplification.
|
||||
RC_CONTOUR_TESS_AREA_EDGES = 0x02 ///< Tessellate edges between areas during contour simplification.
|
||||
};
|
||||
|
||||
/// Applied to the region id field of contour vertices in order to extract the region id.
|
||||
|
@ -94,6 +94,11 @@ void rcContext::log(const rcLogCategory category, const char* format, ...)
|
||||
doLog(category, msg, len);
|
||||
}
|
||||
|
||||
void rcContext::doResetLog()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
rcHeightfield* rcAllocHeightfield()
|
||||
{
|
||||
return rcNew<rcHeightfield>(RC_ALLOC_PERM);
|
||||
|
@ -284,7 +284,7 @@ static unsigned short getHeight(const float fx, const float fy, const float fz,
|
||||
enum EdgeValues
|
||||
{
|
||||
EV_UNDEF = -1,
|
||||
EV_HULL = -2,
|
||||
EV_HULL = -2
|
||||
};
|
||||
|
||||
static int findEdge(const int* edges, int nedges, int s, int t)
|
||||
|
@ -29,7 +29,7 @@ struct rcChunkyTriMeshNode
|
||||
|
||||
struct rcChunkyTriMesh
|
||||
{
|
||||
inline rcChunkyTriMesh() : nodes(0), nnodes(0), tris(0), ntris(0), maxTrisPerChunk(0) {};
|
||||
inline rcChunkyTriMesh() : nodes(0), nnodes(0), tris(0), ntris(0), maxTrisPerChunk(0) {}
|
||||
inline ~rcChunkyTriMesh() { delete [] nodes; delete [] tris; }
|
||||
|
||||
rcChunkyTriMeshNode* nodes;
|
||||
|
@ -122,7 +122,7 @@ class CrowdTool : public SampleTool
|
||||
TOOLMODE_CREATE,
|
||||
TOOLMODE_MOVE_TARGET,
|
||||
TOOLMODE_SELECT,
|
||||
TOOLMODE_TOGGLE_POLYS,
|
||||
TOOLMODE_TOGGLE_POLYS
|
||||
};
|
||||
ToolMode m_mode;
|
||||
|
||||
|
@ -43,7 +43,7 @@ class NavMeshTesterTool : public SampleTool
|
||||
TOOLMODE_DISTANCE_TO_WALL,
|
||||
TOOLMODE_FIND_POLYS_IN_CIRCLE,
|
||||
TOOLMODE_FIND_POLYS_IN_SHAPE,
|
||||
TOOLMODE_FIND_LOCAL_NEIGHBOURHOOD,
|
||||
TOOLMODE_FIND_LOCAL_NEIGHBOURHOOD
|
||||
};
|
||||
|
||||
ToolMode m_toolMode;
|
||||
@ -110,4 +110,5 @@ public:
|
||||
void drawAgent(const float* pos, float r, float h, float c, const unsigned int col);
|
||||
};
|
||||
|
||||
#endif // NAVMESHTESTERTOOL_H
|
||||
#endif // NAVMESHTESTERTOOL_H
|
||||
|
||||
|
@ -29,4 +29,5 @@ typedef __int64 TimeVal;
|
||||
TimeVal getPerfTime();
|
||||
int getPerfTimeUsec(const TimeVal duration);
|
||||
|
||||
#endif // PERFTIMER_H
|
||||
#endif // PERFTIMER_H
|
||||
|
||||
|
@ -47,7 +47,7 @@ enum SamplePolyAreas
|
||||
SAMPLE_POLYAREA_ROAD,
|
||||
SAMPLE_POLYAREA_DOOR,
|
||||
SAMPLE_POLYAREA_GRASS,
|
||||
SAMPLE_POLYAREA_JUMP,
|
||||
SAMPLE_POLYAREA_JUMP
|
||||
};
|
||||
enum SamplePolyFlags
|
||||
{
|
||||
@ -69,12 +69,12 @@ enum SamplePartitionType
|
||||
{
|
||||
SAMPLE_PARTITION_WATERSHED,
|
||||
SAMPLE_PARTITION_MONOTONE,
|
||||
SAMPLE_PARTITION_LAYERS,
|
||||
SAMPLE_PARTITION_LAYERS
|
||||
};
|
||||
|
||||
struct SampleTool
|
||||
{
|
||||
virtual ~SampleTool() {}
|
||||
virtual ~SampleTool();
|
||||
virtual int type() = 0;
|
||||
virtual void init(class Sample* sample) = 0;
|
||||
virtual void reset() = 0;
|
||||
@ -88,7 +88,7 @@ struct SampleTool
|
||||
};
|
||||
|
||||
struct SampleToolState {
|
||||
virtual ~SampleToolState() {}
|
||||
virtual ~SampleToolState();
|
||||
virtual void init(class Sample* sample) = 0;
|
||||
virtual void reset() = 0;
|
||||
virtual void handleRender() = 0;
|
||||
|
@ -27,7 +27,7 @@ class TestCase
|
||||
enum TestType
|
||||
{
|
||||
TEST_PATHFIND,
|
||||
TEST_RAYCAST,
|
||||
TEST_RAYCAST
|
||||
};
|
||||
|
||||
struct Test
|
||||
@ -111,4 +111,4 @@ private:
|
||||
TestCase& operator=(const TestCase&);
|
||||
};
|
||||
|
||||
#endif // TESTCASE_H
|
||||
#endif // TESTCASE_H
|
||||
|
@ -47,4 +47,5 @@ void drawGraph(const GraphParams* p, const ValueHistory* graph,
|
||||
int idx, const char* label, const unsigned int col);
|
||||
|
||||
|
||||
#endif // VALUEHISTORY_H
|
||||
#endif // VALUEHISTORY_H
|
||||
|
||||
|
@ -22,14 +22,14 @@
|
||||
enum imguiMouseButton
|
||||
{
|
||||
IMGUI_MBUT_LEFT = 0x01,
|
||||
IMGUI_MBUT_RIGHT = 0x02,
|
||||
IMGUI_MBUT_RIGHT = 0x02
|
||||
};
|
||||
|
||||
enum imguiTextAlign
|
||||
{
|
||||
IMGUI_ALIGN_LEFT,
|
||||
IMGUI_ALIGN_CENTER,
|
||||
IMGUI_ALIGN_RIGHT,
|
||||
IMGUI_ALIGN_RIGHT
|
||||
};
|
||||
|
||||
inline unsigned int imguiRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
|
||||
@ -68,7 +68,7 @@ enum imguiGfxCmdType
|
||||
IMGUI_GFXCMD_TRIANGLE,
|
||||
IMGUI_GFXCMD_LINE,
|
||||
IMGUI_GFXCMD_TEXT,
|
||||
IMGUI_GFXCMD_SCISSOR,
|
||||
IMGUI_GFXCMD_SCISSOR
|
||||
};
|
||||
|
||||
struct imguiGfxRect
|
||||
|
@ -23,4 +23,5 @@ bool imguiRenderGLInit(const char* fontpath);
|
||||
void imguiRenderGLDestroy();
|
||||
void imguiRenderGLDraw();
|
||||
|
||||
#endif // IMGUI_RENDER_GL_H
|
||||
#endif // IMGUI_RENDER_GL_H
|
||||
|
||||
|
@ -55,10 +55,10 @@ void scanDirectoryAppend(const string& path, const string& ext, vector<string>&
|
||||
return;
|
||||
}
|
||||
|
||||
int extLen = strlen(ext.c_str());
|
||||
size_t extLen = strlen(ext.c_str());
|
||||
while ((current = readdir(dp)) != 0)
|
||||
{
|
||||
int len = strlen(current->d_name);
|
||||
size_t len = strlen(current->d_name);
|
||||
if (len > extLen && strncmp(current->d_name + len - extLen, ext.c_str(), extLen) == 0)
|
||||
{
|
||||
filelist.push_back(current->d_name);
|
||||
|
@ -35,6 +35,16 @@
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
SampleTool::~SampleTool()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
SampleToolState::~SampleToolState()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
unsigned int SampleDebugDraw::areaToCol(unsigned int area)
|
||||
{
|
||||
switch(area)
|
||||
|
@ -184,7 +184,7 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
GLCheckerTexture g_tex;
|
||||
static GLCheckerTexture g_tex;
|
||||
|
||||
|
||||
void DebugDrawGL::depthMask(bool state)
|
||||
|
@ -109,6 +109,8 @@ static int calcLayerBufferSize(const int gridWidth, const int gridHeight)
|
||||
|
||||
struct FastLZCompressor : public dtTileCacheCompressor
|
||||
{
|
||||
virtual ~FastLZCompressor();
|
||||
|
||||
virtual int maxCompressedSize(const int bufferSize)
|
||||
{
|
||||
return (int)(bufferSize* 1.05f);
|
||||
@ -129,6 +131,11 @@ struct FastLZCompressor : public dtTileCacheCompressor
|
||||
}
|
||||
};
|
||||
|
||||
FastLZCompressor::~FastLZCompressor()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
struct LinearAllocator : public dtTileCacheAlloc
|
||||
{
|
||||
unsigned char* buffer;
|
||||
@ -141,10 +148,7 @@ struct LinearAllocator : public dtTileCacheAlloc
|
||||
resize(cap);
|
||||
}
|
||||
|
||||
~LinearAllocator()
|
||||
{
|
||||
dtFree(buffer);
|
||||
}
|
||||
virtual ~LinearAllocator();
|
||||
|
||||
void resize(const size_t cap)
|
||||
{
|
||||
@ -176,6 +180,12 @@ struct LinearAllocator : public dtTileCacheAlloc
|
||||
}
|
||||
};
|
||||
|
||||
LinearAllocator::~LinearAllocator()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
dtFree(buffer);
|
||||
}
|
||||
|
||||
struct MeshProcess : public dtTileCacheMeshProcess
|
||||
{
|
||||
InputGeom* m_geom;
|
||||
@ -184,6 +194,8 @@ struct MeshProcess : public dtTileCacheMeshProcess
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~MeshProcess();
|
||||
|
||||
inline void init(InputGeom* geom)
|
||||
{
|
||||
m_geom = geom;
|
||||
@ -228,8 +240,10 @@ struct MeshProcess : public dtTileCacheMeshProcess
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
MeshProcess::~MeshProcess()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
static const int MAX_LAYERS = 32;
|
||||
|
||||
@ -494,7 +508,7 @@ enum DrawDetailType
|
||||
DRAWDETAIL_AREAS,
|
||||
DRAWDETAIL_REGIONS,
|
||||
DRAWDETAIL_CONTOURS,
|
||||
DRAWDETAIL_MESH,
|
||||
DRAWDETAIL_MESH
|
||||
};
|
||||
|
||||
void drawDetail(duDebugDraw* dd, dtTileCache* tc, const int tx, const int ty, int type)
|
||||
@ -667,9 +681,6 @@ void drawObstacles(duDebugDraw* dd, const dtTileCache* tc)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class TempObstacleHilightTool : public SampleTool
|
||||
{
|
||||
Sample_TempObstacles* m_sample;
|
||||
@ -687,9 +698,7 @@ public:
|
||||
m_hitPos[0] = m_hitPos[1] = m_hitPos[2] = 0;
|
||||
}
|
||||
|
||||
virtual ~TempObstacleHilightTool()
|
||||
{
|
||||
}
|
||||
virtual ~TempObstacleHilightTool();
|
||||
|
||||
virtual int type() { return TOOL_TILE_HIGHLIGHT; }
|
||||
|
||||
@ -764,6 +773,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TempObstacleHilightTool::~TempObstacleHilightTool()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
class TempObstacleCreateTool : public SampleTool
|
||||
{
|
||||
@ -775,9 +788,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~TempObstacleCreateTool()
|
||||
{
|
||||
}
|
||||
virtual ~TempObstacleCreateTool();
|
||||
|
||||
virtual int type() { return TOOL_TEMP_OBSTACLE; }
|
||||
|
||||
@ -819,9 +830,10 @@ public:
|
||||
virtual void handleRenderOverlay(double* /*proj*/, double* /*model*/, int* /*view*/) { }
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
TempObstacleCreateTool::~TempObstacleCreateTool()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
Sample_TempObstacles::Sample_TempObstacles() :
|
||||
m_keepInterResults(false),
|
||||
|
@ -87,9 +87,7 @@ public:
|
||||
m_hitPos[0] = m_hitPos[1] = m_hitPos[2] = 0;
|
||||
}
|
||||
|
||||
virtual ~NavMeshTileTool()
|
||||
{
|
||||
}
|
||||
virtual ~NavMeshTileTool();
|
||||
|
||||
virtual int type() { return TOOL_TILE_EDIT; }
|
||||
|
||||
@ -172,8 +170,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
NavMeshTileTool::~NavMeshTileTool()
|
||||
{
|
||||
// Defined out of line to fix the weak v-tables warning
|
||||
}
|
||||
|
||||
Sample_TileMesh::Sample_TileMesh() :
|
||||
m_keepInterResults(false),
|
||||
|
@ -135,7 +135,6 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
return -1;
|
||||
}
|
||||
|
||||
float t = 0.0f;
|
||||
float timeAcc = 0.0f;
|
||||
Uint32 prevFrameTime = SDL_GetTicks();
|
||||
int mousePos[2] = {0, 0};
|
||||
@ -354,8 +353,6 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
Uint32 time = SDL_GetTicks();
|
||||
float dt = (time - prevFrameTime) / 1000.0f;
|
||||
prevFrameTime = time;
|
||||
|
||||
t += dt;
|
||||
|
||||
// Hit test mesh.
|
||||
if (processHitTest && geom && sample)
|
||||
|
Loading…
x
Reference in New Issue
Block a user