Debugging stuff.

This commit is contained in:
Steve 2018-02-25 12:36:34 +00:00
parent 68fff35e1a
commit 443255baea
6 changed files with 6 additions and 3 deletions

View File

@ -654,6 +654,7 @@ static SDL_Rect *getCurrentSprite(void)
if (world.bob->spriteFrame >= s->numFrames)
{
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", world.bob->name, world.bob->type, world.bob->spriteFrame, s->numFrames);
world.bob->spriteFrame = 0;
}

View File

@ -191,6 +191,7 @@ static SDL_Rect *getCurrentSprite(void)
if (self->spriteFrame >= s->numFrames)
{
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames);
self->spriteFrame = 0;
}

View File

@ -414,6 +414,7 @@ static SDL_Rect *getCurrentSprite(void)
if (self->spriteFrame >= s->numFrames)
{
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames);
self->spriteFrame = 0;
}

View File

@ -172,6 +172,7 @@ static SDL_Rect *getCurrentSprite(void)
if (self->spriteFrame >= s->numFrames)
{
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames);
self->spriteFrame = 0;
}

View File

@ -290,6 +290,7 @@ static SDL_Rect *getCurrentSprite(void)
if (self->spriteFrame >= s->numFrames)
{
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "WARNING: %s (%d) bad sprite frames - %d > %d\n", self->name, self->type, self->spriteFrame, s->numFrames);
self->spriteFrame = 0;
}

View File

@ -90,10 +90,8 @@ static void compareQuadtree(void)
for (e = world.entityHead.next ; e != NULL ; e = e->next) {numEnts++;}
printf("numEnts=%d, numCandidates=%d\n", numEnts, numCandidates);
if (numCandidates > numEnts)
{
exit(1);
printf("WARNING: numEnts=%d, numCandidates=%d\n", numEnts, numCandidates);
}
}