Allegro Wrapper Help
- Posted by Icy_Viking Jul 04, 2016
- 1548 views
Hello,
I am trying to make a wrapper example of the keyboard example that is found on the Allegro 5 API wiki. I think I have the code right, but it is not working correctly. Anyone help and notice if I'm doing something wrong?
without warning include std/machine.e include EuAllegro.ew atom ret = al_install_system(ALLEGRO_VERSION_INT,0) atom display = 0 atom event = 0 atom key = 0 display = al_create_display(800,600) event = al_create_event_queue() key = al_install_keyboard() al_register_event_source(event,al_get_display_event_source(display)) atom run = 1 al_flip_display() --program should end when ESC is pressed, but it does not happen while run = 1 do al_wait_for_event(event,0) if key = ALLEGRO_KEY_ESCAPE then run = 0 end if end while
https://wiki.allegro.cc/index.php?title=Basic_Keyboard_Example -The link to the keyboard example
Any help is appericated.