1 These patches are required to build with a modern GCC; most of them
2 are taken from the Debian package. Upstream has disappeared.
4 diff -r -u einstein-2.0.orig/convert.h einstein-2.0/convert.h
5 --- einstein-2.0.orig/convert.h 2005-08-14 04:40:58.000000000 +0200
6 +++ einstein-2.0/convert.h 2016-03-05 18:25:08.488917021 +0100
13 #include "exceptions.h"
15 diff -r -u einstein-2.0.orig/descr.cpp einstein-2.0/descr.cpp
16 --- einstein-2.0.orig/descr.cpp 2005-08-17 15:42:29.000000000 +0200
17 +++ einstein-2.0/descr.cpp 2016-03-05 18:29:27.960352230 +0100
21 //area.add(parentArea, false);
22 - titleFont = new Font(L"nova.ttf", 26);
23 - buttonFont = new Font(L"laudcn2.ttf", 14);
24 - textFont = new Font(L"laudcn2.ttf", 16);
25 + titleFont = new Font(L"DejaVuSans.ttf", 26);
26 + buttonFont = new Font(L"DejaVuSans.ttf", 14);
27 + textFont = new Font(L"DejaVuSans.ttf", 16);
28 textHeight = (int)(textFont->getHeight(L"A") * 1.0);
29 text = new TextParser(msg(L"rulesText"), *textFont, START_X, START_Y,
30 CLIENT_WIDTH, CLIENT_HEIGHT);
31 diff -r -u einstein-2.0.orig/font.h einstein-2.0/font.h
32 --- einstein-2.0.orig/font.h 2005-08-16 00:33:17.000000000 +0200
33 +++ einstein-2.0/font.h 2016-03-05 18:22:05.563794039 +0100
39 +#include <SDL/SDL_ttf.h>
43 diff -r -u einstein-2.0.orig/formatter.cpp einstein-2.0/formatter.cpp
44 --- einstein-2.0.orig/formatter.cpp 2005-08-14 04:40:58.000000000 +0200
45 +++ einstein-2.0/formatter.cpp 2016-03-05 18:18:41.146882565 +0100
47 if ((c.type == INT_ARG) || (c.type == STRING_ARG) ||
48 (c.type == FLOAT_ARG) || (c.type == DOUBLE_ARG))
50 - int no = (int)c.data;
51 + long no = (long)c.data;
52 args[no - 1] = c.type;
56 std::wstring Formatter::format(std::vector<ArgValue*> &argValues) const
62 for (int i = 0; i < commandsCnt; i++) {
63 Command *cmd = &commands[i];
68 - no = (int)cmd->data - 1;
69 - if (no < (int)argValues.size())
70 + no = (long)cmd->data - 1;
71 + if (no < (long)argValues.size())
72 s += argValues[no]->format(cmd);
75 diff -r -u einstein-2.0.orig/game.cpp einstein-2.0/game.cpp
76 --- einstein-2.0.orig/game.cpp 2005-08-23 00:44:54.000000000 +0200
77 +++ einstein-2.0/game.cpp 2016-03-05 18:29:27.960352230 +0100
79 screen.draw(8, 10, tile);
80 SDL_FreeSurface(tile);
82 - Font titleFont(L"nova.ttf", 28);
83 + Font titleFont(L"DejaVuSans.ttf", 28);
84 titleFont.draw(screen.getSurface(), 20, 20, 255,255,0, true,
85 msg(L"einsteinPuzzle"));
89 lastRun = elapsed = lastUpdate = 0;
91 - font = new Font(L"luximb.ttf", 16);
92 + font = new Font(L"DejaVuSans.ttf", 16);
95 Watch::Watch(std::istream &stream)
97 elapsed = readInt(stream);
100 - font = new Font(L"luximb.ttf", 16);
101 + font = new Font(L"DejaVuSans.ttf", 16);
108 area.add(background, false);
109 - Font font(L"laudcn2.ttf", 16);
110 + Font font(L"DejaVuSans.ttf", 16);
111 area.add(new Window(280, 275, 240, 50, L"greenpattern.bmp", 6));
112 area.add(new Label(&font, 280, 275, 240, 50, Label::ALIGN_CENTER,
113 Label::ALIGN_MIDDLE, 255,255,0, msg(L"paused")));
115 virtual void doAction() {
116 sound->play(L"applause.wav");
118 - Font font(L"laudcn2.ttf", 20);
119 + Font font(L"DejaVuSans.ttf", 20);
120 showMessageWindow(gameArea, L"marble1.bmp",
121 500, 70, &font, 255,0,0, msg(L"won"));
124 sound->play(L"glasbk2.wav");
125 bool restart = false;
126 bool newGame = false;
127 - Font font(L"laudcn2.ttf", 24);
128 - Font btnFont(L"laudcn2.ttf", 14);
129 + Font font(L"DejaVuSans.ttf", 24);
130 + Font btnFont(L"DejaVuSans.ttf", 14);
133 area.add(new Window(220, 240, 360, 140, L"redpattern.bmp", 6));
135 CheatCommand(Area *a) { gameArea = a; };
137 virtual void doAction() {
138 - Font font(L"nova.ttf", 30);
139 + Font font(L"DejaVuSans.ttf", 30);
140 showMessageWindow(gameArea, L"darkpattern.bmp",
141 500, 100, &font, 255,255,255,
144 drawWallpaper(L"rain.bmp");
145 Window window(230, 260, 340, 80, L"greenpattern.bmp", 6);
147 - Font font(L"laudcn2.ttf", 16);
148 + Font font(L"DejaVuSans.ttf", 16);
149 Label label(&font, 280, 275, 240, 50, Label::ALIGN_CENTER,
150 Label::ALIGN_MIDDLE, 255,255,0, msg(L"loading"));
156 - Font btnFont(L"laudcn2.ttf", 14);
157 + Font btnFont(L"DejaVuSans.ttf", 14);
159 area.setTimer(300, watch);
161 diff -r -u einstein-2.0.orig/main.cpp einstein-2.0/main.cpp
162 --- einstein-2.0.orig/main.cpp 2005-09-26 12:32:54.000000000 +0200
163 +++ einstein-2.0/main.cpp 2016-03-05 18:29:27.960352230 +0100
167 #include <SDL_main.h>
168 -#include <SDL_ttf.h>
169 +#include <SDL/SDL_ttf.h>
174 /*static void checkBetaExpire()
176 if (1124832535L + 60L*60L*24L*40L < time(NULL)) {
177 - Font font(L"laudcn2.ttf", 16);
178 + Font font(L"DejaVuSans.ttf", 16);
180 showMessageWindow(&area, L"darkpattern.bmp",
181 700, 100, &font, 255,255,255,
182 diff -r -u einstein-2.0.orig/Makefile einstein-2.0/Makefile
183 --- einstein-2.0.orig/Makefile 2005-09-25 23:20:30.000000000 +0200
184 +++ einstein-2.0/Makefile 2016-03-05 18:14:22.365450608 +0100
188 $(TARGET): $(OBJECTS)
190 + cd res && ../mkres/mkres --source resources.descr --output ../einstein.res
191 $(CXX) $(LNFLAGS) $(OBJECTS) -o $(TARGET)
194 rm -f $(OBJECTS) core* *core $(TARGET) *~
195 + cd res && rm -f einstein.res
196 + cd mkres && make clean
199 @makedepend $(SOURCES) 2> /dev/null
200 diff -r -u einstein-2.0.orig/menu.cpp einstein-2.0/menu.cpp
201 --- einstein-2.0.orig/menu.cpp 2005-09-25 22:51:00.000000000 +0200
202 +++ einstein-2.0/menu.cpp 2016-03-05 18:29:27.960352230 +0100
204 SDL_Surface *title = loadImage(L"nova.bmp");
205 screen.draw(0, 0, title);
206 SDL_FreeSurface(title);
207 - Font font(L"nova.ttf", 28);
208 + Font font(L"DejaVuSans.ttf", 28);
209 std::wstring s(msg(L"einsteinFlowix"));
210 int width = font.getWidth(s);
211 font.draw((screen.getWidth() - width) / 2, 30, 255,255,255, true, s);
212 - Font urlFont(L"luximb.ttf", 16);
213 + Font urlFont(L"DejaVuSans.ttf", 16);
214 s = L"http://games.flowix.com";
215 width = urlFont.getWidth(s);
216 urlFont.draw((screen.getWidth() - width) / 2, 60, 255,255,0, true, s);
219 virtual void doAction() {
221 - Font titleFont(L"nova.ttf", 26);
222 - Font font(L"laudcn2.ttf", 14);
223 - Font urlFont(L"luximb.ttf", 16);
224 + Font titleFont(L"DejaVuSans.ttf", 26);
225 + Font font(L"DejaVuSans.ttf", 14);
226 + Font urlFont(L"DejaVuSans.ttf", 16);
228 #define LABEL(pos, c, f, text) area.add(new Label(&f, 220, pos, 360, 20, \
229 Label::ALIGN_CENTER, Label::ALIGN_MIDDLE, 255,255,c, text));
234 - Font font(L"laudcn2.ttf", 20);
235 + Font font(L"DejaVuSans.ttf", 20);
237 area.add(new MenuBackground());
239 diff -r -u einstein-2.0.orig/mkres/compressor.cpp einstein-2.0/mkres/compressor.cpp
240 --- einstein-2.0.orig/mkres/compressor.cpp 2005-08-14 04:40:58.000000000 +0200
241 +++ einstein-2.0/mkres/compressor.cpp 2016-03-05 18:26:13.194264129 +0100
245 #include "exceptions.h"
249 ResourceCompressor::ResourceCompressor()
250 diff -r -u einstein-2.0.orig/mkres/convert.h einstein-2.0/mkres/convert.h
251 --- einstein-2.0.orig/mkres/convert.h 2005-08-14 04:40:58.000000000 +0200
252 +++ einstein-2.0/mkres/convert.h 2016-03-05 18:25:21.479990669 +0100
259 #include "exceptions.h"
261 diff -r -u einstein-2.0.orig/mkres/main.cpp einstein-2.0/mkres/main.cpp
262 --- einstein-2.0.orig/mkres/main.cpp 2005-08-14 04:40:58.000000000 +0200
263 +++ einstein-2.0/mkres/main.cpp 2016-03-05 18:25:55.062765900 +0100
265 #include "compressor.h"
266 #include "exceptions.h"
271 diff -r -u einstein-2.0.orig/mkres/unicode.cpp einstein-2.0/mkres/unicode.cpp
272 --- einstein-2.0.orig/mkres/unicode.cpp 2005-08-14 04:40:58.000000000 +0200
273 +++ einstein-2.0/mkres/unicode.cpp 2016-03-05 18:26:28.065492890 +0100
277 #include "exceptions.h"
281 /// Returns length of wide character in utf-8
282 diff -r -u einstein-2.0.orig/opensave.cpp einstein-2.0/opensave.cpp
283 --- einstein-2.0.orig/opensave.cpp 2005-08-14 23:33:36.000000000 +0200
284 +++ einstein-2.0/opensave.cpp 2016-03-05 18:29:27.960352230 +0100
286 static void showListWindow(SavesList &list, Command **commands,
287 const std::wstring &title, Area &area, Font *font)
289 - Font titleFont(L"nova.ttf", 26);
290 + Font titleFont(L"DejaVuSans.ttf", 26);
292 area.add(new Window(250, 90, 300, 420, L"blue.bmp"));
293 area.add(new Label(&titleFont, 250, 95, 300, 40, Label::ALIGN_CENTER,
297 area.add(parentArea, false);
298 - Font font(L"laudcn2.ttf", 14);
299 + Font font(L"DejaVuSans.ttf", 14);
306 area.add(parentArea, false);
307 - Font font(L"laudcn2.ttf", 14);
308 + Font font(L"DejaVuSans.ttf", 14);
310 Game *newGame = NULL;
312 diff -r -u einstein-2.0.orig/options.cpp einstein-2.0/options.cpp
313 --- einstein-2.0.orig/options.cpp 2005-09-26 12:33:18.000000000 +0200
314 +++ einstein-2.0/options.cpp 2016-03-05 18:29:27.960352230 +0100
317 void showOptionsWindow(Area *parentArea)
319 - Font titleFont(L"nova.ttf", 26);
320 - Font font(L"laudcn2.ttf", 14);
321 + Font titleFont(L"DejaVuSans.ttf", 26);
322 + Font font(L"DejaVuSans.ttf", 14);
324 bool fullscreen = (getStorage()->get(L"fullscreen", 1) != 0);
325 bool niceCursor = (getStorage()->get(L"niceCursor", 1) != 0);
326 diff -r -u einstein-2.0.orig/res/resources.descr einstein-2.0/res/resources.descr
327 --- einstein-2.0.orig/res/resources.descr 2005-09-25 22:51:14.000000000 +0200
328 +++ einstein-2.0/res/resources.descr 2016-03-05 18:30:08.563704873 +0100
330 { name = "title.bmp" }
331 { name = "marble1.bmp" }
332 { name = "blue.bmp" }
333 - { name = "luximb.ttf" }
334 { name = "redpattern.bmp" }
335 { name = "greenpattern.bmp" }
336 { name = "darkpattern.bmp" }
337 { name = "nova.bmp" }
338 - { name = "nova.ttf" }
339 - { name = "laudcn2.ttf" }
340 + { name = "DejaVuSans.ttf" }
342 { name = "rules.txt", format = "messages" group = "messages" }
343 { name = "rules_ru.txt", format = "messages" group = "messages" }
344 Only in einstein-2.0/res: resources.descr.orig
345 diff -r -u einstein-2.0.orig/sound.h einstein-2.0/sound.h
346 --- einstein-2.0.orig/sound.h 2005-09-24 08:24:20.000000000 +0200
347 +++ einstein-2.0/sound.h 2016-03-05 18:22:19.314931225 +0100
352 -#include <SDL_mixer.h>
353 +#include <SDL/SDL_mixer.h>
357 diff -r -u einstein-2.0.orig/topscores.cpp einstein-2.0/topscores.cpp
358 --- einstein-2.0.orig/topscores.cpp 2005-08-14 23:08:43.000000000 +0200
359 +++ einstein-2.0/topscores.cpp 2016-03-05 18:29:27.970353055 +0100
361 ScoresWindow::ScoresWindow(int x, int y, TopScores *scores, int highlight):
362 Window(x, y, 320, 350, L"blue.bmp")
364 - Font titleFont(L"nova.ttf", 26);
365 - Font entryFont(L"laudcn2.ttf", 14);
366 - Font timeFont(L"luximb.ttf", 14);
367 + Font titleFont(L"DejaVuSans.ttf", 26);
368 + Font entryFont(L"DejaVuSans.ttf", 14);
369 + Font timeFont(L"DejaVuSans.ttf", 14);
371 std::wstring txt = msg(L"topScores");
372 int w = titleFont.getWidth(txt);
377 - Font font(L"laudcn2.ttf", 16);
378 + Font font(L"DejaVuSans.ttf", 16);
379 area.add(parentArea);
380 area.add(new ScoresWindow(240, 125, scores, highlight));
381 ExitCommand exitCmd(area);
386 - Font font(L"laudcn2.ttf", 16);
387 + Font font(L"DejaVuSans.ttf", 16);
388 area.add(parentArea);
389 area.add(new Window(170, 280, 460, 100, L"blue.bmp"));
390 Storage *storage = getStorage();
391 diff -r -u einstein-2.0.orig/unicode.cpp einstein-2.0/unicode.cpp
392 --- einstein-2.0.orig/unicode.cpp 2005-08-14 04:40:58.000000000 +0200
393 +++ einstein-2.0/unicode.cpp 2016-03-05 18:26:55.747780024 +0100
397 #include "exceptions.h"
401 /// Returns length of wide character in utf-8