Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Aug 2002
Offline Last Active Mar 20 2012 02:24 PM

#4921549 SDL Help

Posted by on 12 March 2012 - 08:41 PM

gameEvents::screen() is returning an SDL_Surface, are you sure you don't want to return a pointer to an SDL_Surface instead? If you do, that should solve your problem since the code you posted doesn't actually make use of the SDL_Surface.

Any code that actually works with an SDL_Surface will need "SDL.h" included to bring in the definition.

#4918800 Problem with script (no errors but no output?)

Posted by on 03 March 2012 - 01:19 AM

  • At the beginning of the file, include "cstdlib" so that you can access rand() and srand().
  • You have a name conflict in class cDungeon. At line 52 in the constructor you define a variable named aaMaze even though at line 73 you define a data member with the same name. This wouldn't normally be a problem but in this case you try to use both in the constructor and so you're really only using the one you defined at line 52. Fix the name conflict.
Do these 2 things and your code works fine.

Hope that helps Posted Image.