|
Program Exit |
Adrian Gabriel
Member #16,135
December 2015
|
Hello, I have a problem. When I try to move a bitmap above an another bitmap, sometimes the program exit without any message.. where is the error.. One bitmap has the coord of my mouse (x,y).. and another is fixed. If I don't move a bitmap above an another bitmap everything it's ok but I need to pass over it in order to increase the "score"... Sorry for my bad english. |
Dizzy Egg
Member #10,824
March 2009
|
Shouldn't you be calling set_target_bitmap(display) or something?
---------------------------------------------------- |
Adrian Gabriel
Member #16,135
December 2015
|
I don't know, I've started to learn allegro 5 three days ago because I need it for a project.. |
Dizzy Egg
Member #10,824
March 2009
|
Try calling al_set_target_bitmap(display), draw your bitmaps onto that, and then flip to the screen...
---------------------------------------------------- |
Adrian Gabriel
Member #16,135
December 2015
|
I've put and I've received this error: http://s11.postimg.org/ymnj43d43/Screen_Shot_20151222171222.png |
Dizzy Egg
Member #10,824
March 2009
|
No, you set your 'display' bitmap as the active bitmap, then draw your 2 small ones on that set_target(display)
---------------------------------------------------- |
SiegeLord
Member #7,827
October 2006
|
You need to wrap the switch (events.keyboard.keycode) { switch in an if statement that verifies that the event type is ALLEGRO_EVENT_KEY_DOWN (or similar keyboard event). "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Adrian Gabriel
Member #16,135
December 2015
|
SOLVED! HUH! THX A LOT ALL!! |
Dizzy Egg
Member #10,824
March 2009
|
Good stuff!
---------------------------------------------------- |
|