Sign in to follow this  

Allegro Question (cursor)

Recommended Posts

Ok, ive been messing with allegro lately, and im trying to learn more about the mouse functions, so far i havent had much luck. I tried setting a custom cursor, with:

     BITMAP *buffer = create_bitmap(640, 480);  //dk if i even need this line
          BITMAP *crosshair = load_bitmap("crosshair.bmp", NULL); 
   void set_mouse_sprite(BITMAP *crosshair);
But it didn't work, any suggestions? And one more question, how would i make it so that i can have a GUI in Allegro, like a game menu, or would i have to use something different then allegro. Thanks FOr any help! (what i was using:

Share this post

Link to post
Share on other sites
A good first step would be to read up on functions again, but quickly:
a function declaration:

void set_mouse_sprite(BITMAP *crosshair);

a function definition:

void set_mouse_sprite(BITMAP *crosshair)
// stuff

a function call:


Compare and contrast.

Share this post

Link to post
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

Sign in to follow this