Показать сообщение отдельно
Старый 09.04.2009, 11:33   #1
Snaak
AnyKey`щик
 
Регистрация: 05.04.2009
Сообщений: 4
Написано 2 полезных сообщений
(для 18 пользователей)
Плохо Question from holland :)

Hi guys

I have a question for you, I've been altering the multiline source to make a nice game about hacking, its a sort of a simulator like in the movies where you will have to buy programs, hack in to banks, that kind of thing. I am trying to make a procedure I can just call upon to keep the source code as little as possible, so as you can see procedures gamescreen are questions you can answer, and procedure gamescreen tells what is happening.

Everything seems to be working fine in the emulator, however when I put the compiled java on my Sagem 300c phone after the second question it just shows the storyscreen very shortly and skips trough it right away.

I do not know why that is, I can only guess that it is because the previous click is still in memory?

program HackGame; 
uses text;

var option1, option2 : integer; 
    play, clicked : command;    
    optie1, optie2, verhaal : string;
		key: integer;
		schaambef: integer;

procedure question (optie1, optie2: string);
	begin
  ShowMenu('Select a game', CH_IMPLICIT); 
     
  option1 := MenuAppendString(optie1); 
  option2 := MenuAppendString(optie2); 

  play := CreateCommand('Play', CM_SCREEN, 1); 
  AddCommand(play); 

  repeat Delay(100); until GetClickedCommand = play; 
end;

procedure gamescreen (verhaal: string);
	begin
  	showCanvas;
		text.init;
		text.set_text_par(10, 10, getWidth-10, getHeight-10, 1, 16, 2, 64,verhaal);
		setColor(128,255,0);
		fillRect(0,0,GetWidth,GetHeight);
		setColor(0,128,64);
		text.draw_mult_str;
		Repaint; Delay(100);
		repeat
		setColor(128,255,0);
		fillRect(0,0,GetWidth,GetHeight);
		setColor(0,128,64);
		text.draw_mult_str;
		Repaint; Delay(100);
		key:=KeyToAction(GetKeyPressed);
		if key=GA_UP then text.Mode_Up;
		if key=GA_DOWN then text.Mode_Down;
		if key=GA_LEFT then text.Page_Up;
		if key=GA_RIGHT then text.Page_Down;
		if key=GA_FIRE then schaambef := 1;
	Delay(100); until schaambef = 1;		
	schaambef := 0;
end;


begin 
gamescreen ('blablablablablabla.');
question ('hello there', 'question here');
gamescreen ('another question here');
question ('hello again', 'option two question');
end.
I really need your genius russian coolness here, help a dutch guy out.
(Offline)
 
Ответить с цитированием