Jump to content

ajuda-allegro mouse


Recommended Posts

eu estou a fazer um jogo em allegro e quando eu estava a aprender a faze-lo  não percebi uma coisa:

#include <allegro.h>

int main()
   install_mouse();// Instala o mouse
   set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
   BITMAP *bmpMouse = NULL;
   bmpMouse = create_bitmap(100,100);
   bmpMouse = load_bitmap("mouse.bmp",NULL);
   BITMAP *Buffer = NULL;
   Buffer = create_bitmap(640,480);
   while( !key[KEY_ESC] )
textprintf(Buffer,font,0,0,makecol(255,100,200),"Mouse x: %d", mouse_x);
textprintf(Buffer,font,0,10,makecol(255,100,200),"Mouse y: %d", mouse_y);


o que é a funçao:  set_mouse_sprite(bmpMouse);  ?

e a funçao:  blit(Buffer,screen,0,0,0,0,SCREEN_W,SCREEN_H);  ?   

Link to comment
Share on other sites

90% das dúvidas podem ser respondidas neste site : http://alleg.sourceforge.net/stabledocs/en/allegro.html

set_mouse_sprite : altera a imagem do rato


blit : copia uma porção de uma imagem para outra


IRC : sim, é algo que ainda existe >> #p@p
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.