--- a/src/BurgerSpaceClient.cpp +++ b/src/BurgerSpaceClient.cpp @@ -209,7 +209,7 @@ void -BurgerSpaceClient::loadPixmaps() throw(PixmapLoadError) +BurgerSpaceClient::loadPixmaps() { /* Tiles: */ --- a/src/BurgerSpaceClient.h +++ b/src/BurgerSpaceClient.h @@ -177,7 +177,7 @@ /////////////////////////////////////////////////////////////////////////// - void loadPixmaps() throw(flatzebra::PixmapLoadError); + void loadPixmaps(); void restoreBackground(); void draw(); void displayMessage(int row, const char *msg); --- a/src/BurgerSpaceServer.cpp +++ b/src/BurgerSpaceServer.cpp @@ -733,7 +733,7 @@ BurgerSpaceServer::BurgerSpaceServer(int initLevelNumber, - bool _oldMotionMode) throw(int, string) + bool _oldMotionMode) : theScreenSizeInPixels(SCREEN_WIDTH_IN_PIXELS, SCREEN_HEIGHT_IN_PIXELS), initLevelNo(1), @@ -830,7 +830,7 @@ void -BurgerSpaceServer::displayErrorMessage(const string &msg) throw() +BurgerSpaceServer::displayErrorMessage(const string &msg) { cerr << msg << endl; } @@ -871,7 +871,7 @@ void -BurgerSpaceServer::initializeSprites() throw(PixmapLoadError) +BurgerSpaceServer::initializeSprites() /* Initializes the sprites that appear at the beginning of a level, like the ingredients. @@ -930,7 +930,7 @@ void -BurgerSpaceServer::initializeMisc() throw(string) +BurgerSpaceServer::initializeMisc() /* Initializes things that need to be initialized once, but not at the beginning of each level. @@ -1160,7 +1160,7 @@ void -BurgerSpaceServer::initNextLevel(int levelNo /*= 0*/) throw(int) +BurgerSpaceServer::initNextLevel(int levelNo /*= 0*/) /* Initialize the next level. Increments the current level number if levelNo is zero, or uses levelNo if it is positive. */ @@ -2118,7 +2118,7 @@ if (numDirectionsAllowed == 0) { belowStructure = true; - allowedDirections[UP]++; + allowedDirections[UP] = true; } } @@ -2643,7 +2643,7 @@ static void loadPixmap(const char **xpmData, SDL_Surface *&pixmap, - Couple &pixmapSize) throw(PixmapLoadError) + Couple &pixmapSize) { pixmapSize.zero(); @@ -2661,7 +2661,6 @@ static void loadPixmap(const char **xpmData, PixmapArray &pa, size_t index) - throw(PixmapLoadError) { // Masks are not be relevant with SDL. @@ -2674,7 +2673,7 @@ void -BurgerSpaceServer::loadPixmaps() throw(PixmapLoadError) +BurgerSpaceServer::loadPixmaps() { /* Load the player pixmaps: @@ -2813,7 +2812,7 @@ void -BurgerSpaceServer::loadLevel(int levelNo) throw(string) +BurgerSpaceServer::loadLevel(int levelNo) /* Affects the data member 'theCurrentLevel', which must already be initialized to defined values. 'levelNo' may exceed NUM_LEVELS. --- a/src/BurgerSpaceServer.h +++ b/src/BurgerSpaceServer.h @@ -72,7 +72,7 @@ { public: - BurgerSpaceServer(int initLevelNumber, bool _oldMotionMode) throw(int, std::string); + BurgerSpaceServer(int initLevelNumber, bool _oldMotionMode); void finishInit(); // must be called after constructor -- calls virtual functions @@ -355,7 +355,7 @@ void putSprite(const flatzebra::Sprite &s); void showInstructions(); void initGameParameters(); - void initNextLevel(int levelNo = 0) throw(int); + void initNextLevel(int levelNo = 0); void resetPlay(); int isPositionAtSideOfStructure(flatzebra::Couple pos) const; void animateTemporarySprites(flatzebra::SpriteList &slist) const; @@ -369,11 +369,11 @@ bool ingredientGroupCollidesWithSprite( const flatzebra::Couple groupPos, const flatzebra::Couple groupSize, const flatzebra::Sprite &s) const; - void loadLevel(int levelNo) throw(std::string); - void displayErrorMessage(const std::string &msg) throw(); + void loadLevel(int levelNo); + void displayErrorMessage(const std::string &msg); void createPlayerSprite(); - void initializeSprites() throw(flatzebra::PixmapLoadError); - void initializeMisc() throw(std::string); + void initializeSprites(); + void initializeMisc(); void deleteSprite(flatzebra::Sprite *s) const; void deleteSprites(flatzebra::SpriteList &sl) const; void deleteSprites(IngredientSprite::List &isl) const; @@ -386,7 +386,7 @@ size_t carryEnemiesInList(IngredientGroup &g, flatzebra::SpriteList &slist); size_t releaseCarriedEnemies(IngredientGroup &g); void createScoreSprites(long n, flatzebra::Couple center); - void loadPixmaps() throw(flatzebra::PixmapLoadError); + void loadPixmaps(); void moveEnemyList(flatzebra::SpriteList &slist, int speedFactor); flatzebra::Couple getDistanceToPerfectPos(const flatzebra::Sprite &s) const; bool isSpriteOnFloor(const flatzebra::Sprite &s) const; --- a/src/EnemySprite.cpp +++ b/src/EnemySprite.cpp @@ -29,7 +29,7 @@ EnemySprite::EnemySprite(const PixmapArray &pa, Couple pos, Couple speed, - Couple collBoxPos, Couple collBosSize) throw(int) + Couple collBoxPos, Couple collBosSize) : Sprite(pa, pos, speed, Couple(0, 0), collBoxPos, collBosSize), carryingGroup(NULL), disappearanceTime(0), --- a/src/EnemySprite.h +++ b/src/EnemySprite.h @@ -45,7 +45,7 @@ flatzebra::Couple pos, flatzebra::Couple speed, flatzebra::Couple collBoxPos, - flatzebra::Couple collBosSize) throw(int); + flatzebra::Couple collBosSize); /* Calls Sprite constructor. */ --- a/src/IngredientSprite.h +++ b/src/IngredientSprite.h @@ -42,7 +42,7 @@ IngredientSprite(const flatzebra::PixmapArray &pixmapArray, const flatzebra::Couple &pos, - IngredientGroup *ig) throw(int) + IngredientGroup *ig) : flatzebra::Sprite(pixmapArray, pos, flatzebra::Couple(0, 0), flatzebra::Couple(0, 0), flatzebra::Couple(0, 5), flatzebra::Couple(24, 1)), --- a/src/server.cpp +++ b/src/server.cpp @@ -304,7 +304,7 @@ { public: - BurgerSpaceCommandLineServer(int _initLevelNumber, int _sock, Uint32 _minMSBetweenWrites) throw(int, std::string) + BurgerSpaceCommandLineServer(int _initLevelNumber, int _sock, Uint32 _minMSBetweenWrites) : BurgerSpaceServer(_initLevelNumber, false), sock(_sock), minMSBetweenWrites(_minMSBetweenWrites),