Misc. code fixes.
This commit is contained in:
parent
df6bda4629
commit
5282345dc6
|
@ -37,6 +37,7 @@ extern void clearControls(void);
|
|||
extern void restoreGameState(void);
|
||||
extern void initWorld(void);
|
||||
extern void initTitle(void);
|
||||
extern void awardTrophy(char *id);
|
||||
|
||||
extern App app;
|
||||
extern Colors colors;
|
||||
|
|
|
@ -24,6 +24,7 @@ void initAtlasTest(void)
|
|||
{
|
||||
int test;
|
||||
|
||||
dev.debug = 1;
|
||||
dev.cheatStatic = 0;
|
||||
dev.cheatBlind = 0;
|
||||
dev.cheatNoEnemies = 0;
|
||||
|
@ -34,6 +35,8 @@ void initAtlasTest(void)
|
|||
|
||||
loadGame();
|
||||
|
||||
saveGame();
|
||||
|
||||
test = 1;
|
||||
|
||||
switch (test)
|
||||
|
|
|
@ -23,9 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
extern void initWorld(void);
|
||||
extern void initHub(void);
|
||||
extern void loadGame(void);
|
||||
extern void saveGame(void);
|
||||
extern void initOptions(void);
|
||||
extern void initPostMission(void);
|
||||
extern void stopMusic(void);
|
||||
|
||||
extern App app;
|
||||
extern Dev dev;
|
||||
extern Game game;
|
||||
|
|
|
@ -21,8 +21,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "player.h"
|
||||
|
||||
static void doDebugControls(void);
|
||||
static void compareQuadtree(void);
|
||||
static int last = 0;
|
||||
|
||||
void doPlayer(void)
|
||||
{
|
||||
|
@ -67,31 +65,4 @@ static void doDebugControls(void)
|
|||
|
||||
app.keyboard[SDL_SCANCODE_0] = 0;
|
||||
}
|
||||
|
||||
if (last < SDL_GetTicks())
|
||||
{
|
||||
compareQuadtree();
|
||||
|
||||
last = SDL_GetTicks() + 1000;
|
||||
}
|
||||
}
|
||||
|
||||
static void compareQuadtree(void)
|
||||
{
|
||||
Entity **candidates, *e;
|
||||
int numCandidates, numEnts;
|
||||
|
||||
candidates = getAllEntsWithin(0, 0, MAP_WIDTH * MAP_TILE_SIZE, MAP_HEIGHT * MAP_TILE_SIZE, NULL);
|
||||
|
||||
numEnts = 0;
|
||||
|
||||
/* counting entities to draw */
|
||||
for (numCandidates = 0, e = candidates[numCandidates] ; e != NULL ; e = candidates[++numCandidates]) {};
|
||||
|
||||
for (e = world.entityHead.next ; e != NULL ; e = e->next) {numEnts++;}
|
||||
|
||||
if (numCandidates > numEnts)
|
||||
{
|
||||
printf("WARNING: numEnts=%d, numCandidates=%d\n", numEnts, numCandidates);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue