What Am I Doing Wrong ?


saboteur

Member
Joined
Nov 17, 2005
Messages
172
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
 
What does it do? Error? Black screen? The obvious thing would be that you didnt copy the fpg file to the SDcard as well.
 
chaozz said:
What does it do? Error? Black screen? The obvious thing would be that you didnt copy the fpg file to the SDcard as well.
Thanks for the reply chaozz.

Sorry I should have stated some other relevant info.

the .fpg and .png are both where they should be.

the start gpe file is correct - tested with other little progs.

all the 2X does is give a blank screen. ??

cheers
 
Last edited by a moderator:
DOH!.

I am such a c**k, I forgot to place the runtime in the folder when I copied stuff to the new folder.

cheers
 
Back
Top