I believe the DarkSDK has no debug version anyway - however, saying that a debug version of the following works fine here :
#include <stdio.h>
//#include <afx.h>
#include "DarkSDK.h"
typedef struct __XY {
int x;
int y;
} __XY;
struct __XY xy[]={
{0,-1},
{1,-1},
{1,0},
{1,1},
{0,1},
{-1,1},
{-1,0},
{-1,-1}
};
int reverse(int dir)
{
int nDir;
nDir=dir+4;
if (nDir>7)
{
nDir-=8;
}
return (nDir);
}
void move(bool forward,int *cX,int *cY,int *cDir)
{
register int loop,index,x,y,rDir;
DWORD col;
rDir=reverse(*(cDir));
for (loop=0; loop<8; loop++)
{
x=*(cX)+(xy[loop].x)*(forward ? 1 : -1);
y=*(cY)+(xy[loop].y)*(forward ? 1 : -1);
col=dbPoint(x,y) & 0x00FFFFFF;
if (col && loop!=rDir)
{
{
char t[256];
sprintf(t,"[%d]",loop,rDir);
dbText(0,0,t);
}
*(cX)=x;
*(cY)=y;
*(cDir)=loop;
return;
}
}
}
void DarkSDK ( void )
{
int x,y,dir;
dbSetDisplayMode(640,480,32);
dbLine(100,100,200,100);
dbLine(200,100,200,200);
dbLine(200,200,100,200);
dbLine(100,100,100,200);
dbSetTextOpaque();
x=101;
y=100;
dir=2;
while (LoopSDK())
{
if (dbEscapeKey()) return;
dbSync();
if (dbRightKey())
{
move(true,&x,&y,&dir);
}
else
if (dbLeftKey())
{
move(false,&x,&y,&dir);
}
dbDot(x,y,dbRGB(255,0,255));
}
}
Its possible that some of your Debug module parameters aren't correct.