Тема: Keypressing
Показать сообщение отдельно
Старый 14.11.2010, 03:35   #3
NastyKhan
Оператор ЭВМ
 
Регистрация: 26.09.2010
Сообщений: 29
Написано 0 полезных сообщений
(для 0 пользователей)
Ответ: Keypressing

Hmm.. i was also thinking about it. However I don't know how to use lib_game, and other 'non-standard things'.. any clues with that?

edit:

I downloaded and installed 'game' library into my "..\MidletPascal 3.1\Libs\" folder. Then i added "uses game;" line to my game. Finally i changed the code:


repeat;
drawimage(ship,x,0);
repaint;
delay(10);
key := game.get_key_states;
if (game.get_bit(key, 4)<>0) then x:=x-10;
if (game.get_bit(key, 32)<>0) then x:=x+10;

until false;

Compliation and buliding worked fine. The '*.jar' works. However nothing happens. I think the games freezes from some reason.. But dont know why.

edit2:
I realised than i'm missing "game.init", and "game.show" thingies. However when i put them, i get white blank screen. What are they for anyway?

Please help..

Последний раз редактировалось NastyKhan, 14.11.2010 в 04:51.
(Offline)
 
Ответить с цитированием