- Unbreak previously broken themes
- Verbose error message helping with themes problems
--- a/QTfrontend/game.cpp Fri Sep 19 19:58:57 2008 +0000
+++ b/QTfrontend/game.cpp Fri Sep 19 20:34:41 2008 +0000
@@ -186,7 +186,7 @@
}
case 'E': {
int size = msg.size();
- emit ErrorMessage(QString().append(msg.mid(2)).left(size - 4));
+ emit ErrorMessage(QString("Last two engine messages:\n") + QString().append(msg.mid(2)).left(size - 4));
return;
}
case 'K': {
--- a/hedgewars/uConsole.pas Fri Sep 19 19:58:57 2008 +0000
+++ b/hedgewars/uConsole.pas Fri Sep 19 20:34:41 2008 +0000
@@ -206,7 +206,7 @@
i:= (CurrLine + cLinesCount - 2) mod cLinesCount;
Result:= ConsoleLines[i].s;
-//Result:= Result + #10;
+Result:= Result + #10;
i:= (CurrLine + cLinesCount - 1) mod cLinesCount;
Result:= Result + ConsoleLines[i].s;
--- a/hedgewars/uLandObjects.pas Fri Sep 19 19:58:57 2008 +0000
+++ b/hedgewars/uLandObjects.pas Fri Sep 19 20:34:41 2008 +0000
@@ -347,6 +347,13 @@
i, ii: LongInt;
vobcount: Longword;
c1, c2: TSDL_Color;
+
+ procedure CheckRect(Width, Height, x, y, w, h: LongWord);
+ begin
+ if (x + w > Width) then OutError('Object''s rectangle exceeds image: x + w (' + inttostr(x) + ' + ' + inttostr(w) + ') > Width (' + inttostr(Width) + ')', true);
+ if (y + h > Height) then OutError('Object''s rectangle exceeds image: y + h (' + inttostr(y) + ' + ' + inttostr(h) + ') > Height (' + inttostr(Height) + ')', true);
+ end;
+
begin
s:= Pathz[ptCurrTheme] + '/' + cThemeCFGFilename;
WriteLnToConsole('Reading objects info...');
@@ -381,14 +388,14 @@
with inland do
begin
Read(f, x, y, w, h);
- TryDo((x + w <= Width) and (y + h <=Height), 'Object''s rectangle exceeds image', true)
+ CheckRect(Width, Height, x, y, w, h)
end;
Read(f, rectcnt);
for ii:= 1 to rectcnt do
with outland[ii] do
begin
Read(f, x, y, w, h);
- TryDo((x + w <= Width) and (y + h <=Height), 'Object''s rectangle exceeds image', true);
+ CheckRect(Width, Height, x, y, w, h)
end;
Maxcnt:= 3;
ReadLn(f)
--- a/share/hedgewars/Data/Themes/Bath/theme.cfg Fri Sep 19 19:58:57 2008 +0000
+++ b/share/hedgewars/Data/Themes/Bath/theme.cfg Fri Sep 19 20:34:41 2008 +0000
@@ -6,11 +6,11 @@
15
6
Toothbrush
-120 245 8 16 1 90 6 65 220
+120 245 8 15 1 90 6 65 220
Toothbrush_g
85 243 10 11 1 89 13 97 211
Toothbrush_b
-113 245 8 16 1 84 6 66 218
+113 245 8 15 1 84 6 66 218
Duck
102 253 20 4 1 48 142 150 107
Duck2
--- a/share/hedgewars/Data/Themes/Freeway/theme.cfg Fri Sep 19 19:58:57 2008 +0000
+++ b/share/hedgewars/Data/Themes/Freeway/theme.cfg Fri Sep 19 20:34:41 2008 +0000
@@ -8,7 +8,7 @@
Tire
83 215 92 35 1 0 0 250 190
AppleSmall
-40 0 25 1 1 0 35 100 75
+40 0 25 1 1 0 35 100 65
4
TireDirt
2
--- a/share/hedgewars/Data/Themes/Island/theme.cfg Fri Sep 19 19:58:57 2008 +0000
+++ b/share/hedgewars/Data/Themes/Island/theme.cfg Fri Sep 19 20:34:41 2008 +0000
@@ -6,7 +6,7 @@
9
4
plant1
-10 192 60 2 1 33 0 150 152
+10 192 60 2 1 33 0 149 152
plant2
55 218 30 2 1 0 0 240 175
plant3
--- a/share/hedgewars/Data/Themes/Sheep/theme.cfg Fri Sep 19 19:58:57 2008 +0000
+++ b/share/hedgewars/Data/Themes/Sheep/theme.cfg Fri Sep 19 20:34:41 2008 +0000
@@ -16,7 +16,7 @@
mouton4
148 245 162 20 1 0 0 440 205
barriere
-34 190 300 25 1 0 0 440 140
+34 190 300 10 1 0 0 381 140
rocher
16 90 69 3 1 0 0 110 65
8
--- a/share/hedgewars/Data/Themes/hell/theme.cfg Fri Sep 19 19:58:57 2008 +0000
+++ b/share/hedgewars/Data/Themes/hell/theme.cfg Fri Sep 19 20:34:41 2008 +0000
@@ -8,7 +8,7 @@
plant1
83 215 92 35 1 0 0 250 190
plant2
-118 115 45 20 1 0 0 160 110
+118 115 41 20 1 0 0 159 110
plant3
0 115 70 40 1 8 0 60 100
plant4
--- a/share/hedgewars/Data/Themes/nature/theme.cfg Fri Sep 19 19:58:57 2008 +0000
+++ b/share/hedgewars/Data/Themes/nature/theme.cfg Fri Sep 19 20:34:41 2008 +0000
@@ -10,7 +10,7 @@
plant2
0 85 25 25 2 0 0 170 70 50 70 120 40
plant3
-40 0 25 1 1 0 35 100 75
+40 0 25 1 1 0 35 100 65
plant4
98 10 2 25 1 0 0 70 110
0