I've managed to make a small test program which simulates an HUD.
It works fine on the PC in Flamebird but will not work on my 2x.
Can anybody point me to what I'm doing wrong ??
Cheers
PROGRAM HUD2;
// a test and demo
GLOBAL
int g_Bg;
int COMPASS_X;
int COMPASS_Y;
int COMPASS_ANGLE;
int direction;
int maxleft;
int maxright;
BEGIN // Start
set_mode(320, 240, 16);
LOAD_FPG("plumb.fpg"); // Load graphics file
g_Bg = LOAD_PNG("background.png");
COMPASS_X = 155;
COMPASS_Y = 37;
direction = 1; // 1 = Left 2 = right
maxleft=30500;
maxright= -30500;
X=160;
Y=125;
GRAPH=4;
ANGLE=0;
COMPASS_ANGLE=0;
put_screen(0, g_Bg);
While ( !key(_esc) )
if(direction==1)ANGLE-=250;end
if(direction==2)ANGLE+=250;end
if(ANGLE==maxright)direction=2;end
if(ANGLE==maxleft)direction=1;end
COMPASS_ANGLE = ANGLE;
compass(COMPASS_X,COMPASS_Y,COMPASS_ANGLE);
FRAME; // Update screen
END
END
process compass(x,y,ANGLE)
begin
GRAPH=3;
frame;
end
It works fine on the PC in Flamebird but will not work on my 2x.
Can anybody point me to what I'm doing wrong ??
Cheers
PROGRAM HUD2;
// a test and demo
GLOBAL
int g_Bg;
int COMPASS_X;
int COMPASS_Y;
int COMPASS_ANGLE;
int direction;
int maxleft;
int maxright;
BEGIN // Start
set_mode(320, 240, 16);
LOAD_FPG("plumb.fpg"); // Load graphics file
g_Bg = LOAD_PNG("background.png");
COMPASS_X = 155;
COMPASS_Y = 37;
direction = 1; // 1 = Left 2 = right
maxleft=30500;
maxright= -30500;
X=160;
Y=125;
GRAPH=4;
ANGLE=0;
COMPASS_ANGLE=0;
put_screen(0, g_Bg);
While ( !key(_esc) )
if(direction==1)ANGLE-=250;end
if(direction==2)ANGLE+=250;end
if(ANGLE==maxright)direction=2;end
if(ANGLE==maxleft)direction=1;end
COMPASS_ANGLE = ANGLE;
compass(COMPASS_X,COMPASS_Y,COMPASS_ANGLE);
FRAME; // Update screen
END
END
process compass(x,y,ANGLE)
begin
GRAPH=3;
frame;
end