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
|
--- cmn/game_style.h.orig 2012-05-27 06:52:31.000000000 +0900
+++ cmn/game_style.h 2012-05-27 06:53:11.000000000 +0900
@@ -30,12 +30,7 @@
#endif
#endif
-#if X11
-#include <strstream.h>
-#endif
-#if WIN32
-#include <strstrea.h>
-#endif
+#include <sstream>
#include "utils.h"
#include "coord.h"
@@ -44,6 +39,8 @@
#include "intel.h"
+using namespace std;
+
#define SCENARIO_SEALS_TRAPDOORS 2
#define SCENARIO_BONUS_FROGS 12
#define SCENARIO_FLAG_FLAGS 15
@@ -91,7 +88,7 @@
virtual GameStyle *clone() = 0;
- virtual void describe(ostrstream &) = 0;
+ virtual void describe(stringstream &) = 0;
/* EFFECTS: Write a two-line description of the style to the stream. */
virtual GameStyleType get_type() = 0;
@@ -137,7 +134,7 @@
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
int level,
- Boolean &lStrChanged,ostrstream &levelStr,
+ Boolean &lStrChanged,stringstream &levelStr,
Timer &timer,
IPhysicalManagerP);
/* MODIFIES: lStrChanged */
@@ -166,7 +163,7 @@
virtual void new_level(int level,WorldP,LocatorP,
const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP,int humansNum) = 0;
/* MODIFIES: level */
/* EFFECTS: Start a new level. Use levelStr levelTitleStr to
@@ -249,7 +246,7 @@
virtual GameStyleP clone();
- virtual void describe(ostrstream &);
+ virtual void describe(stringstream &);
virtual GameStyleType get_type();
@@ -269,7 +266,7 @@
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
int level,Boolean &lStrChanged,
- ostrstream &levelStr,Timer &timer,
+ stringstream &levelStr,Timer &timer,
IPhysicalManagerP);
virtual Boolean advance_level();
@@ -277,7 +274,7 @@
virtual Boolean award_bonus();
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP,int humansNum);
virtual void new_level_set_timer(Timer &timer);
@@ -305,7 +302,7 @@
virtual GameStyleP clone();
- virtual void describe(ostrstream &);
+ virtual void describe(stringstream &);
virtual GameStyleType get_type();
@@ -314,11 +311,11 @@
virtual void reset(WorldP,LocatorP,const DifficultyLevel &,int enemiesNumNext);
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
IPhysicalManagerP);
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP,int humansNum);
virtual void new_level_set_timer(Timer &timer);
@@ -340,7 +337,7 @@
virtual GameStyleP clone();
- virtual void describe(ostrstream &);
+ virtual void describe(stringstream &);
virtual GameStyleType get_type();
@@ -355,7 +352,7 @@
virtual Boolean game_over_check(int humansPlaying,int enemiesPlaying);
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP,int humansNum);
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
@@ -376,7 +373,7 @@
virtual GameStyleP clone();
- virtual void describe(ostrstream &);
+ virtual void describe(stringstream &);
virtual GameStyleType get_type();
@@ -389,7 +386,7 @@
virtual Boolean game_over_check(int humansPlaying,int enemiesPlaying);
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP,int humansNum);
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
@@ -408,7 +405,7 @@
virtual GameStyleP clone();
- virtual void describe(ostrstream &);
+ virtual void describe(stringstream &);
virtual GameStyleType get_type();
@@ -423,7 +420,7 @@
virtual Boolean game_over_check(int humansPlaying,int enemiesPlaying);
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP,int humansNum);
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
@@ -442,7 +439,7 @@
virtual GameStyleP clone();
- virtual void describe(ostrstream &);
+ virtual void describe(stringstream &);
virtual GameStyleType get_type();
@@ -451,7 +448,7 @@
virtual void reset(WorldP,LocatorP,const DifficultyLevel &dLevel,int);
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP,int humansNum);
virtual void refill_enemies(Boolean enemiesRefill,WorldP,LocatorP,IPhysicalManagerP);
@@ -466,7 +463,7 @@
virtual GameStyleP clone();
- virtual void describe(ostrstream &);
+ virtual void describe(stringstream &);
virtual GameStyleType get_type();
@@ -485,7 +482,7 @@
virtual void reset(WorldP,LocatorP,const DifficultyLevel &,int enemiesNumNext);
virtual int new_level_check(int enemiesPlaying,WorldP,LocatorP,
- int level,Boolean &lStrChanged,ostrstream &levelStr,Timer &timer,
+ int level,Boolean &lStrChanged,stringstream &levelStr,Timer &timer,
IPhysicalManagerP);
virtual Boolean advance_level();
@@ -493,7 +490,7 @@
virtual Boolean award_bonus();
virtual void new_level(int level,WorldP,LocatorP,const DifficultyLevel &dLevel,
- ostrstream &levelStr,ostrstream &levelTitleStr,
+ stringstream &levelStr,stringstream &levelTitleStr,
IPhysicalManagerP manager,int humansNum);
virtual void new_level_set_timer(Timer &timer);
|