• Advertisement
Sign in to follow this  

Allegro Question (cursor)

This topic is 3780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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:
show_mouse(screen); 

     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: http://alleg.sourceforge.net/stabledocs/en/alleg004.html)

Share this post


Link to post
Share on other sites
Advertisement
void set_mouse_sprite(BITMAP *crosshair);

i think...

But how do i fix it, if i take out void, i get an error.

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:

set_mouse_sprite(crosshair);

Compare and contrast.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement