Fpg Create


XaMMaX90

Member
Joined
Jun 6, 2006
Messages
216
How to create FPG in windows? FPG.exe don't work for me =(

P.S.
And how i can create massive in fenix?

P.S.S.
And how i can load and draw any picture?
 
1. You have to download FPG Edit. Search for it on sourceforge.net.

2. Massive? Whats that? You mean collisions?

3. You normally take the pictures from a fpg file after loading it but you can also do something like this in a process, I think:

Code:
process test();
  private
	graphic;

  begin
	load("picture1.png",graphic1);	
	graph=graphic;
	...
 
More like this actually

Code:
image = load_png("test.png");
anotherone = load_pcx("test.pcx");

You can then draw them on the screen with Fenix' drawing functions like put or xput, or to another image map with map_put to name a couple.
 
I don't now how on English but on russian it is massive =) On english array i think =)
On pascal it looks like this:

Code:
 TEST:array[1..10] of integer; 
 or 
 test:array of real;

So how it will be on fenix?

P.S.
Shit FPG edit on spanish =( OK let see...
 
Moogle posted on Oct 12 2006 at 03:02 PM said:
More like this actually
Code:
image = load_png("test.png");
anotherone = load_pcx("test.pcx");
Oh, knew you would correct me ^^ I never used that kind of code and vaguely remembered a snippet of you :D But atleast I was close :D hehe.

Arrays in fenix are easy, you define them like normal variables and just put a [x] behind them, where x is the size of the array.
Remember, the 0 counts, so
Code:
int arrayname[9];
for example would range from 0 to 9 giving you ten spaces in the array.

Oh, and you can change FPG Edit to english language:

Utilidades -> Configurar FPG Edit -> Cambiar lenguaje del programa -> english.ini -> 2x Aceptar
 
Last edited by a moderator:
Thank you ! If i would have another ??? then i will ask =)

P.S.
And i am very sorry about my bad english !
 
1)Hey how i can cut #FF00FF from my image in FPG ????

2) What wrong with my code ? After secodn it stop and go again.. and this again and again it only then i launch it on GP2X on comp it is normal=( look
Code:
program line;
private
  drawn;  i;
  fpg;	  int all;
 struct balls[12]; 
 posx;
 posy;
 color; 
 movex;
 movey;	 
 s;								  
 end;

begin
  set_mode(320,240,16);	
  fpg=LOAD_FPG("test.fpg");  
  put(fpg,1,0,0);  
  
  x=30; y=30; all=0;

  from i=1 to 12 step 1:
  balls[i].posx=RAND(20,300);
  balls[i].posy=RAND(20,220);
  balls[i].color=RAND(24,26);	
  balls[i].s=20;
  balls[i].movex=RAND(-4,4);
  balls[i].movey=RAND(-4,4);
  end 
  
  SET_TEXT_COLOR(rgb(255,0,255));
  
  loop		
	if(key(_up))y=y-3;end;
	if(key(_down))y=y+3;end;
	if(key(_left))x=x-3;end;
	if(key(_right))x=x+3;end;   
	delete_draw(drawn);   
	
	
		  
	from i=1 to 12 step 1: 
	drawing_color(balls[i].color);  
	DRAW_CIRCLE(balls[i].posx,balls[i].posy,balls[i].s);	 
	
	if (balls[i].posx-20<0 ) balls[i].movex=-balls[i].movex; end	
	if (balls[i].posx+20>320) balls[i].movex=-balls[i].movex; end
	if (balls[i].posy-20<0) balls[i].movey=-balls[i].movey; end
	if (balls[i].posy+20>240) balls[i].movey=-balls[i].movey; end
											
	if (balls[i].color==70) balls[i].posx=400; end  
	  
	if (balls[i].color==71) balls[i].s=5; balls[i].color=70; end															 
																 
	if (balls[i].color==72) balls[i].s=10; balls[i].color=71; end															 
																 
	if (balls[i].color==73) balls[i].s=15; balls[i].color=72; end
	
	if (balls[i].color<70)																  
	 if (balls[i].posx<=x+30 and balls[i].posx>=x-30 
	 and balls[i].posy<=y+30 and  balls[i].posy>=y-30) all=all+1;  balls[i].movey=0;balls[i].movex=0;balls[i].color=73; end																   
	end
																			  
	balls[i].posx=balls[i].posx+balls[i].movex;
	balls[i].posy=balls[i].posy+balls[i].movey; 
	end								  
	
	DRAWING_COLOR(rgb(255,0,255));
	DRAW_CIRCLE(x,y,20);		 
	put(fpg,3,160,120);  
	
							  
	DELETE_TEXT(0); 
	WRITE(0,262,2,0,"FPS: "+FPS);
	write(0,2,2,0,"Dead balls: "+all);   
	write(0,234,230,0,"Version 0.0.1");
	if (all==12) write(0,125,170,0,"!!!YOU ROCK!!!"); end
	frame;							 
	if(key(_esc)) exit("",0); end
	
   end;
 end;
 
Don't help =( OK i will stop programming of this test =) So how i can cut #FF00FF from image in fenix?
 
Back
Top