Allegro Question (cursor)

Started by
3 comments, last by JakeDavis 16 years, 6 months ago
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)
Advertisement
One of your lines is a function declaration. Guess which one.

To make it is hell. To fail is divine.

void set_mouse_sprite(BITMAP *crosshair);

i think...

But how do i fix it, if i take out void, i get an error.
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.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

ooooooo, got it now, thanks dude!

This topic is closed to new replies.

Advertisement