Added more bits to compact neighbour indices, moved region id to rcCompactSpan to save memory.

This commit is contained in:
Mikko Mononen
2010-03-05 09:10:13 +00:00
parent ababd28f59
commit d9d9fa85a5
13 changed files with 2440 additions and 1934 deletions

View File

@@ -179,9 +179,6 @@ void duDebugDrawCompactHeightfieldSolid(duDebugDraw* dd, const rcCompactHeightfi
void duDebugDrawCompactHeightfieldRegions(duDebugDraw* dd, const rcCompactHeightfield& chf)
{
if (!chf.regs)
return;
const float cs = chf.cs;
const float ch = chf.ch;
@@ -200,8 +197,8 @@ void duDebugDrawCompactHeightfieldRegions(duDebugDraw* dd, const rcCompactHeight
const rcCompactSpan& s = chf.spans[i];
const float fy = chf.bmin[1] + (s.y)*ch;
unsigned int color;
if (chf.regs[i])
color = duIntToCol(chf.regs[i], 192);
if (s.reg)
color = duIntToCol(s.reg, 192);
else
color = duRGBA(0,0,0,64);