summaryrefslogtreecommitdiff
blob: aea4d2ee3189c324c75308e434e142c355031b86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
--- 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),