Merge lp:~greg1989/s25rttr/very-low-ressources into lp:~flosoft/s25rttr/trunk
- very-low-ressources
- Merge into trunk
Proposed by
Greg
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 6958 | ||||
Proposed branch: | lp:~greg1989/s25rttr/very-low-ressources | ||||
Merge into: | lp:~flosoft/s25rttr/trunk | ||||
Diff against target: |
374 lines (+118/-31) 4 files modified
.project (+11/-0) src/GlobalGameSettings.h (+1/-1) src/dskHostGame.cpp (+23/-21) src/nobHQ.cpp (+83/-9) |
||||
To merge this branch: | bzr merge lp:~greg1989/s25rttr/very-low-ressources | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
FloSoft | Approve | ||
Review via email: mp+44953@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
FloSoft (flosoft) wrote : | # |
merged in rev6958 into nightly/trunk
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file '.project' |
2 | --- .project 1970-01-01 00:00:00 +0000 |
3 | +++ .project 2010-12-31 12:24:58 +0000 |
4 | @@ -0,0 +1,11 @@ |
5 | +<?xml version="1.0" encoding="UTF-8"?> |
6 | +<projectDescription> |
7 | + <name>s25rttr</name> |
8 | + <comment></comment> |
9 | + <projects> |
10 | + </projects> |
11 | + <buildSpec> |
12 | + </buildSpec> |
13 | + <natures> |
14 | + </natures> |
15 | +</projectDescription> |
16 | |
17 | === modified file 'src/GlobalGameSettings.h' |
18 | --- src/GlobalGameSettings.h 2010-07-16 22:00:53 +0000 |
19 | +++ src/GlobalGameSettings.h 2010-12-31 12:24:58 +0000 |
20 | @@ -35,7 +35,7 @@ |
21 | public: |
22 | enum GameSpeed { GS_VERYSLOW = 0,GS_SLOW , GS_NORMAL, GS_FAST, GS_VERYFAST } game_speed; |
23 | enum GameObjective { GO_NONE = 0, GO_TOTALDOMINATION, GO_CONQUER3_4 } game_objective; |
24 | - enum StartWares { SWR_LOW = 0, SWR_NORMAL, SWR_ALOT } start_wares; |
25 | + enum StartWares {SWR_VLOW = 0, SWR_LOW, SWR_NORMAL, SWR_ALOT} start_wares; |
26 | bool lock_teams; |
27 | enum Exploration { EXP_DISABLED = 0, EXP_CLASSIC, EXP_FOGOFWAR, EXP_FOGOFWARE_EXPLORED } exploration; |
28 | bool team_view; |
29 | |
30 | === modified file 'src/dskHostGame.cpp' |
31 | --- src/dskHostGame.cpp 2010-07-16 22:00:53 +0000 |
32 | +++ src/dskHostGame.cpp 2010-12-31 12:24:58 +0000 |
33 | @@ -76,13 +76,13 @@ |
34 | |
35 | // Chatfenster |
36 | AddChatCtrl(1, 20, 310, 360, 218, TC_GREY, NormalFont); |
37 | - // Edit für Chatfenster |
38 | + // Edit f�r Chatfenster |
39 | AddEdit(4, 20, 530, 360, 22, TC_GREY, NormalFont); |
40 | |
41 | // "Spiel starten" |
42 | AddTextButton(2, 600, 560, 180, 22, TC_GREEN2, (GAMECLIENT.IsHost() ? _("Start game") : _("Ready")), NormalFont); |
43 | |
44 | - // "Zurück" |
45 | + // "Zur�ck" |
46 | AddTextButton(3, 400, 560, 180, 22, TC_RED1, _("Return"), NormalFont); |
47 | |
48 | // "Teams sperren" |
49 | @@ -98,7 +98,7 @@ |
50 | |
51 | // umgedrehte Reihenfolge, damit die Listen nicht dahinter sind |
52 | |
53 | - // "Aufklärung" |
54 | + // "Aufkl�rung" |
55 | AddText(30, 400, 405, _("Exploration:"), COLOR_YELLOW, 0, NormalFont); |
56 | combo = AddComboBox(40, 600, 400, 180, 20, TC_GREY, NormalFont, 100, !GAMECLIENT.IsHost()||GAMECLIENT.IsSavegame()); |
57 | combo->AddString(_("Off (all visible)")); |
58 | @@ -109,10 +109,12 @@ |
59 | // "Waren zu Beginn" |
60 | AddText(31, 400, 375, _("Goods at start:"), COLOR_YELLOW, 0, NormalFont); |
61 | combo = AddComboBox(41, 600, 370, 180, 20, TC_GREY, NormalFont, 100, !GAMECLIENT.IsHost()||GAMECLIENT.IsSavegame()); |
62 | + combo->AddString(_("Very Low")); |
63 | combo->AddString(_("Low")); |
64 | combo->AddString(_("Normal")); |
65 | combo->AddString(_("A lot")); |
66 | |
67 | + |
68 | // "Spielziel" |
69 | AddText(32, 400, 345, _("Goals:"), COLOR_YELLOW, 0, NormalFont); |
70 | combo = AddComboBox(42, 600, 340, 180, 20, TC_GREY, NormalFont, 100, !GAMECLIENT.IsHost()||GAMECLIENT.IsSavegame()); |
71 | @@ -140,7 +142,7 @@ |
72 | glArchivItem_Map *map = static_cast<glArchivItem_Map*>(ai.get(0)); |
73 | ctrlPreviewMinimap * preview = AddPreviewMinimap(70,560,40,220,220,map); |
74 | |
75 | - // Titel der Karte, Y-Position relativ je nach Höhe der Minimap festlegen, daher nochmals danach |
76 | + // Titel der Karte, Y-Position relativ je nach H�he der Minimap festlegen, daher nochmals danach |
77 | // verschieben, da diese Position sonst skaliert wird! |
78 | ctrlText * text = AddText(71,670,0,_("Map: ") + GameClient::inst().GetMapTitle(),COLOR_YELLOW,glArchivItem_Font::DF_CENTER,NormalFont); |
79 | text->Move(text->GetX(false),preview->GetY(false)+preview->GetBottom()+10); |
80 | @@ -165,14 +167,14 @@ |
81 | |
82 | /////////////////////////////////////////////////////////////////////////////// |
83 | /** |
84 | - * Größe ändern-Reaktionen die nicht vom Skaling-Mechanismus erfasst werden. |
85 | + * Gr��e �ndern-Reaktionen die nicht vom Skaling-Mechanismus erfasst werden. |
86 | * |
87 | * @author Divan |
88 | */ |
89 | void dskHostGame::Resize_(unsigned short width, unsigned short height) |
90 | { |
91 | - // Text unter der PreviewMinimap verschieben, dessen Höhe von der Höhe der |
92 | - // PreviewMinimap abhängt, welche sich gerade geändert hat. |
93 | + // Text unter der PreviewMinimap verschieben, dessen H�he von der H�he der |
94 | + // PreviewMinimap abh�ngt, welche sich gerade ge�ndert hat. |
95 | ctrlPreviewMinimap *preview = GetCtrl<ctrlPreviewMinimap>(70); |
96 | ctrlText *text = GetCtrl<ctrlText>(71); |
97 | assert(preview); |
98 | @@ -194,7 +196,7 @@ |
99 | unsigned cy = 80 + row * 30; |
100 | TextureColor tc = (row&1 ? TC_GREY : TC_GREEN2); |
101 | |
102 | - // Alle Controls erstmal zerstören (die ganze Gruppe) |
103 | + // Alle Controls erstmal zerst�ren (die ganze Gruppe) |
104 | DeleteCtrl(58 - row); |
105 | // und neu erzeugen |
106 | ctrlGroup *group = AddGroup(58 - row, scale); |
107 | @@ -283,7 +285,7 @@ |
108 | { |
109 | ctrlComboBox *combo = group->AddComboBox(8, 570, cy, 150, 22, tc, NormalFont, 150, !GAMECLIENT.IsHost()); |
110 | |
111 | - // Mit den alten Namen füllen |
112 | + // Mit den alten Namen f�llen |
113 | for(unsigned i = 0; i < GAMECLIENT.GetPlayerCount(); ++i) |
114 | { |
115 | if(GAMECLIENT.GetPlayer(i)->origin_name.length()) |
116 | @@ -299,7 +301,7 @@ |
117 | if(player->ps == PS_KI || player->is_host) |
118 | ping->SetVisible(false); |
119 | |
120 | - // Felder ausfüllen |
121 | + // Felder ausf�llen |
122 | ChangeNation(row,player->nation); |
123 | ChangeTeam(row,player->team); |
124 | ChangePing(row); |
125 | @@ -381,7 +383,7 @@ |
126 | ChangeColor(GAMECLIENT.GetPlayerID(), player->color); |
127 | } |
128 | |
129 | - // Start-Farbe der Minimap ändern |
130 | + // Start-Farbe der Minimap �ndern |
131 | } break; |
132 | |
133 | // Team |
134 | @@ -457,7 +459,7 @@ |
135 | { |
136 | switch(ctrl_id) |
137 | { |
138 | - case 3: // Zurück |
139 | + case 3: // Zur�ck |
140 | { |
141 | if(GAMECLIENT.IsHost()) |
142 | GAMESERVER.Stop(); |
143 | @@ -467,7 +469,7 @@ |
144 | if(LOBBYCLIENT.LoggedIn()) |
145 | WindowManager::inst().Switch(new dskLobby); |
146 | else |
147 | - // Hauptmenü zeigen |
148 | + // Hauptmen� zeigen |
149 | WindowManager::inst().Switch(new dskDirectIP); |
150 | |
151 | } break; |
152 | @@ -604,9 +606,9 @@ |
153 | case 43: // Geschwindigkeit |
154 | case 42: // Ziel |
155 | case 41: // Waren |
156 | - case 40: // Aufklärung |
157 | + case 40: // Aufkl�rung |
158 | { |
159 | - // GameSettings wurden verändert, resetten |
160 | + // GameSettings wurden ver�ndert, resetten |
161 | UpdateGGS(); |
162 | } break; |
163 | } |
164 | @@ -628,7 +630,7 @@ |
165 | case 19: // Team-Sicht |
166 | case 20: // Teams |
167 | { |
168 | - // GameSettings wurden verändert, resetten |
169 | + // GameSettings wurden ver�ndert, resetten |
170 | UpdateGGS(); |
171 | } break; |
172 | } |
173 | @@ -648,14 +650,14 @@ |
174 | ggs.game_objective = static_cast<GlobalGameSettings::GameObjective>(GetCtrl<ctrlComboBox>(42)->GetSelection()); |
175 | // Waren zu Beginn |
176 | ggs.start_wares = static_cast<GlobalGameSettings::StartWares>(GetCtrl<ctrlComboBox>(41)->GetSelection()); |
177 | - // Aufklärung |
178 | + // Aufkl�rung |
179 | ggs.exploration = static_cast<GlobalGameSettings::Exploration>(GetCtrl<ctrlComboBox>(40)->GetSelection()); |
180 | // Teams gesperrt |
181 | ggs.lock_teams = GetCtrl<ctrlCheck>(20)->GetCheck(); |
182 | // Team sicht |
183 | ggs.team_view = GetCtrl<ctrlCheck>(19)->GetCheck(); |
184 | |
185 | - // An Server übermitteln |
186 | + // An Server �bermitteln |
187 | GameServer::inst().ChangeGlobalGameSettings(ggs); |
188 | } |
189 | |
190 | @@ -738,7 +740,7 @@ |
191 | { |
192 | GetCtrl<ctrlGroup>(58-i)->GetCtrl<ColorControlInterface>(4)->SetColor(COLORS[color]); |
193 | |
194 | - // Minimap-Startfarbe ändern |
195 | + // Minimap-Startfarbe �ndern |
196 | if(GetCtrl<ctrlPreviewMinimap>(70)) |
197 | GetCtrl<ctrlPreviewMinimap>(70)->SetPlayerColor(i,COLORS[color]); |
198 | } |
199 | @@ -900,7 +902,7 @@ |
200 | GetCtrl<ctrlComboBox>(42)->SetSelection(static_cast<unsigned short>(ggs.game_objective)); |
201 | // Waren |
202 | GetCtrl<ctrlComboBox>(41)->SetSelection(static_cast<unsigned short>(ggs.start_wares)); |
203 | - // Aufklärung |
204 | + // Aufkl�rung |
205 | GetCtrl<ctrlComboBox>(40)->SetSelection(static_cast<unsigned short>(ggs.exploration)); |
206 | // Teams |
207 | GetCtrl<ctrlCheck>(20)->SetCheck(ggs.lock_teams); |
208 | @@ -966,7 +968,7 @@ |
209 | |
210 | /////////////////////////////////////////////////////////////////////////////// |
211 | /** |
212 | - * (Lobby-)Status: Benutzerdefinierter Fehler (kann auch Conn-Loss o.ä sein) |
213 | + * (Lobby-)Status: Benutzerdefinierter Fehler (kann auch Conn-Loss o.� sein) |
214 | * |
215 | * @author FloSoft |
216 | */ |
217 | |
218 | === modified file 'src/nobHQ.cpp' |
219 | --- src/nobHQ.cpp 2010-12-20 23:02:02 +0000 |
220 | +++ src/nobHQ.cpp 2010-12-31 12:24:58 +0000 |
221 | @@ -45,7 +45,7 @@ |
222 | // Alter mit Bau setzen |
223 | SetAge(); |
224 | |
225 | - // ins Militärquadrat einfügen |
226 | + // ins Milit�rquadrat einf�gen |
227 | gwg->GetMilitarySquare(x,y).push_back(this); |
228 | gwg->RecalcTerritory(this,GetMilitaryRadius(),false,true); |
229 | |
230 | @@ -53,8 +53,79 @@ |
231 | // StartWaren setzen ( provisorisch ) |
232 | switch(GameClient::inst().GetGGS().start_wares) |
233 | { |
234 | + //sehr wenig |
235 | + |
236 | + case 0: |
237 | + goods.goods[GD_BEER] = 0; |
238 | + goods.goods[GD_TONGS] = 1; |
239 | + goods.goods[GD_HAMMER] = 4; |
240 | + goods.goods[GD_AXE] = 1; |
241 | + goods.goods[GD_SAW] = 0; |
242 | + goods.goods[GD_PICKAXE] = 0; |
243 | + goods.goods[GD_SHOVEL] = 1; |
244 | + goods.goods[GD_CRUCIBLE] = 1; |
245 | + goods.goods[GD_RODANDLINE] = 1;//?? |
246 | + goods.goods[GD_SCYTHE] = 2;//?? |
247 | + goods.goods[GD_WATEREMPTY] = 0; |
248 | + goods.goods[GD_WATER] = 0; |
249 | + goods.goods[GD_CLEAVER] = 0; |
250 | + goods.goods[GD_ROLLINGPIN] = 1; |
251 | + goods.goods[GD_BOW] = 0; |
252 | + goods.goods[GD_BOAT] = 0; |
253 | + goods.goods[GD_SWORD] = 0; |
254 | + goods.goods[GD_IRON] = 0; |
255 | + goods.goods[GD_FLOUR] = 0; |
256 | + goods.goods[GD_FISH] = 1; |
257 | + goods.goods[GD_BREAD] = 2; |
258 | + goods.goods[GD_SHIELDROMANS] = 0; |
259 | + goods.goods[GD_WOOD] = 6; |
260 | + goods.goods[GD_BOARDS] = 11; |
261 | + goods.goods[GD_STONES] = 17; |
262 | + goods.goods[GD_SHIELDVIKINGS] = 0; |
263 | + goods.goods[GD_SHIELDAFRICANS] = 0; |
264 | + goods.goods[GD_GRAIN] = 0; |
265 | + goods.goods[GD_COINS] = 0; |
266 | + goods.goods[GD_GOLD] = 0; |
267 | + goods.goods[GD_IRONORE] = 4; |
268 | + goods.goods[GD_COAL] = 4; |
269 | + goods.goods[GD_MEAT] = 0; |
270 | + goods.goods[GD_HAM] = 0; |
271 | + goods.goods[GD_SHIELDJAPANESE] = 0; |
272 | + |
273 | + goods.people[JOB_HELPER] = 13; |
274 | + goods.people[JOB_WOODCUTTER] = 2; |
275 | + goods.people[JOB_FISHER] = 0; |
276 | + goods.people[JOB_FORESTER] = 1; |
277 | + goods.people[JOB_CARPENTER] = 1; |
278 | + goods.people[JOB_STONEMASON] = 1; |
279 | + goods.people[JOB_HUNTER] = 1; |
280 | + goods.people[JOB_FARMER] = 0; |
281 | + goods.people[JOB_MILLER] = 0; |
282 | + goods.people[JOB_BAKER] = 0; |
283 | + goods.people[JOB_BUTCHER] = 0; |
284 | + goods.people[JOB_MINER] = 2; |
285 | + goods.people[JOB_BREWER] = 0; |
286 | + goods.people[JOB_PIGBREEDER] = 0; |
287 | + goods.people[JOB_DONKEYBREEDER] = 0; |
288 | + goods.people[JOB_IRONFOUNDER] = 0; |
289 | + goods.people[JOB_MINTER] = 0; |
290 | + goods.people[JOB_METALWORKER] = 0; |
291 | + goods.people[JOB_ARMORER] = 1; |
292 | + goods.people[JOB_BUILDER] = 2; |
293 | + goods.people[JOB_PLANER] = 1; |
294 | + goods.people[JOB_PRIVATE] = 13; |
295 | + goods.people[JOB_PRIVATEFIRSTCLASS] = 0; |
296 | + goods.people[JOB_SERGEANT] = 0; |
297 | + goods.people[JOB_OFFICER] = 0; |
298 | + goods.people[JOB_GENERAL] = 0; |
299 | + goods.people[JOB_GEOLOGIST] = 2; |
300 | + goods.people[JOB_SHIPWRIGHT] = 0; |
301 | + goods.people[JOB_SCOUT] = 1; |
302 | + goods.people[JOB_PACKDONKEY] = 2; |
303 | + break; |
304 | + |
305 | // Wenig |
306 | - case 0: |
307 | + case 1: |
308 | |
309 | goods.goods[GD_BEER] = 0; |
310 | goods.goods[GD_TONGS] = 0; |
311 | @@ -125,7 +196,7 @@ |
312 | break; |
313 | |
314 | // Mittel |
315 | - case 1: |
316 | + case 2: |
317 | |
318 | goods.goods[GD_BEER] = 6; |
319 | goods.goods[GD_TONGS] = 0; |
320 | @@ -196,7 +267,7 @@ |
321 | break; |
322 | |
323 | // Viel |
324 | - case 2: |
325 | + case 3: |
326 | goods.goods[GD_BEER] = 12; |
327 | goods.goods[GD_TONGS] = 0; |
328 | goods.goods[GD_HAMMER] = 32; |
329 | @@ -264,6 +335,9 @@ |
330 | goods.people[JOB_SCOUT] = 4; |
331 | goods.people[JOB_PACKDONKEY] = 16; |
332 | break; |
333 | + |
334 | + |
335 | + |
336 | } |
337 | |
338 | real_goods = goods; |
339 | @@ -280,10 +354,10 @@ |
340 | Destroy_nobBaseWarehouse(); |
341 | |
342 | // Land drumherum neu berechnen (nur wenn es schon besetzt wurde!) |
343 | - // Nach dem BaseDestroy erst, da in diesem erst das Feuer gesetzt, die Straße gelöscht wird usw. |
344 | + // Nach dem BaseDestroy erst, da in diesem erst das Feuer gesetzt, die Stra�e gel�scht wird usw. |
345 | gwg->RecalcTerritory(this,MILITARY_RADIUS[GetSize()],true, false); |
346 | |
347 | - // Wieder aus dem Militärquadrat rauswerfen |
348 | + // Wieder aus dem Milit�rquadrat rauswerfen |
349 | gwg->GetMilitarySquare(x,y).erase(this); |
350 | } |
351 | |
352 | @@ -294,7 +368,7 @@ |
353 | |
354 | nobHQ::nobHQ(SerializedGameData * sgd, const unsigned obj_id) : nobBaseWarehouse(sgd,obj_id) |
355 | { |
356 | - // ins Militärquadrat einfügen |
357 | + // ins Milit�rquadrat einf�gen |
358 | gwg->GetMilitarySquare(x,y).push_back(this); |
359 | |
360 | // Startpos setzen |
361 | @@ -304,11 +378,11 @@ |
362 | |
363 | void nobHQ::Draw(int x,int y) |
364 | { |
365 | - // Gebäude an sich zeichnen |
366 | + // Geb�ude an sich zeichnen |
367 | DrawBaseBuilding(x,y); |
368 | |
369 | |
370 | - // 4 Fähnchen zeichnen |
371 | + // 4 F�hnchen zeichnen |
372 | for(unsigned i = min<unsigned>(GetSoldiersCount()+ |
373 | reserve_soldiers_available[0]+reserve_soldiers_available[1]+reserve_soldiers_available[2]+reserve_soldiers_available[3]+reserve_soldiers_available[4] |
374 | ,4);i;--i) |
Hi,
please clean up your files (you killed all german "umlauts" because of stupid eclipse utf-8 file handling)
I'm back in a few days, then I will merge your changes. I hope you can cleanup the patch until then