#include <DarkGDK.h>
#include "Physics.h"
#include "KeyMonitor.h"
#include "Planet.h"
#include "Ship.h"
#define M_MENU 99
#define M_GAME 100
void DarkGDK()
{
dbAutoCamOff();
dbSetDisplayMode(1024, 768, 32);
dbSetWindowPosition(0,0);
//dbSetWindowOff();
dbSyncOn();
dbSyncRate(60);
dbLoadImage("stars.jpg", 1);
dbMakeObjectCube(10, 200000);
dbSetObjectCull(10, false);
dbSetObjectLight(10, false);
dbLoadImage("space.png", 2);
dbTextureObject(10, 2);
dbMakeObjectCube(12, 5);
dbPositionObject(12, 20, 0, 0);
dbSetCameraRange(1.0f, 6000000);
Ship fighter(0, 0, 0, "", false, 0.0f, 5.0f, 0.0f, 25.0f);
int mode = M_MENU;
KeyMonitor q_mon(16);
while (LoopGDK())
{
dbCLS(0);
if (mode == M_MENU)
{
dbPasteImage(1, 0,0, dbScreenWidth(),dbScreenHeight());
}
else if (mode == M_GAME)
{
dbHideSprite(1);
fighter.input_focus = q_mon.Check();
}
fighter.Update();
dbSync();
}
}
What the heck? Ok. It doesn't paste stars.jpg when it should... it won't change input_focus on fighter when it should.
It NEVER pastes stars.jpg even if I put it directly under the loop. What the heck is going on?