diff --git a/Makefile.mac b/Makefile.mac index 59422f8c..e603ebd9 100644 --- a/Makefile.mac +++ b/Makefile.mac @@ -37,7 +37,7 @@ hyper.o: *.cpp language-data.cpp $(CXX) $(CXXFLAGS) -O2 -c hyper.cpp langen: langen.cpp language-??.cpp language-ptbr.cpp - $(CXX) $(CXXFLAGS) -O0 -Wno-embedded-directive langen.cpp -o langen + $(CXX) $(CXXFLAGS) -O0 langen.cpp -o langen language-data.cpp: langen ./langen > language-data.cpp diff --git a/Makefile.mgw b/Makefile.mgw index f91e1020..55267393 100644 --- a/Makefile.mgw +++ b/Makefile.mgw @@ -35,7 +35,7 @@ hyper.res: hyper.rc hr-icon.ico windres hyper.rc -O coff -o hyper.res langen.exe: langen.cpp language-??.cpp language-ptbr.cpp - $(CXX) $(CXXFLAGS) -O0 -Wno-embedded-directive langen.cpp -o langen + $(CXX) $(CXXFLAGS) -O0 langen.cpp -o langen language-data.cpp: langen.exe ./langen.exe > language-data.cpp diff --git a/langen.cpp b/langen.cpp index 9f82f779..26eee3bb 100644 --- a/langen.cpp +++ b/langen.cpp @@ -2,11 +2,6 @@ // Copyright (C) 2011-2018 Zeno Rogue, see 'hyper.cpp' for details -#define GEN_M 0 -#define GEN_F 1 -#define GEN_N 2 -#define GEN_O 3 - #include #include #include @@ -14,6 +9,17 @@ #include #include +#define GEN_M 0 +#define GEN_F 1 +#define GEN_N 2 +#define GEN_O 3 + +#if MAC + #define IF_MAC(y,z) y +#else + #define IF_MAC(y,z) z +#endif + template int isize(const T& x) { return x.size(); } #define NUMLAN 7 diff --git a/language-cz.cpp b/language-cz.cpp index 2931bf14..be50ebda 100644 --- a/language-cz.cpp +++ b/language-cz.cpp @@ -5192,27 +5192,17 @@ S("The game starts in the Icy Lands. Collect the Ice Diamonds " S("Hypersian Rug model", "Model hyperského koberce") S( "New players think that the action of HyperRogue takes place on a sphere. " -#if NORUG - "This is not true -- try the Tutorial in the native desktop version shows " - "the surface HyperRogue actually takes place on.", -#else "This is not true -- the next slide will show the surface HyperRogue " "actually takes place on.\n\n" "Use arrow keys to rotate the model, and Page Up/Down to zoom.\n\n" "If you do not see anything, press '5' to try a safer renderer.", -#endif "Noví hráči si často myslí, že se HyperRogue odehrává na povrchu koule. " -#if NORUG - "Není to pravda -- Tutoriál v desktopové verzi ti může ukázat povrch, " - "na jakém se HyperRogue opravdu odehrává." -#else "Není to pravda -- další snímek ti ukáže povrch, na jakém se " "HyperRogue opravdu odehrává.\n\n" "Model můžeš otáčet šipkami a zoomovat klávesami Page Up/Down.\n\n" "Pokud nic nevidíš, stiskni klávesu '5' pro aktivaci bezpečnějšího rendereru." -#endif ) S("Expansion", "Expanze") @@ -5294,23 +5284,23 @@ S( "it will appear to go slower -- this is because you are running " "in a straight line, and the Running Dog has to run in a curve " "called an equidistant.\n\n" -#if ISMAC - "Remember that you can click with right Shift on anything to get more information.", -#else - "Remember that you can right click on anything to get more information.", -#endif +IF_MAC( + "Remember that you can click with right Shift on anything to get more information." +, + "Remember that you can right click on anything to get more information." +), "Chceš-li se dozvědět víc o přímkách, běž dál a měl bys najít Zemi " "věčného pohybu. Pokus se tam běžet po přímce, zatímco vedle tebe běží " "Běžící pes. I když běží stejně rychle jako ty, bude se zdát, že je " "pomalejší -- to proto, že ty běžíš po přímce, zatímco Běžící pes musí " "běžet po křivce zvané 'ekvidistanta'.\n\n" -#if ISMAC +IF_MAC( "Nezapomeň, že pokud na cokoli klikneš s pravým shiftem, můžeš o tom " "získat víc informací." -#else +, "Nezapomeň, že pokud na cokoli klikneš pravým tlačítkem, můžeš o tom " "získat víc informací." -#endif +) ) S("Equidistants", "Ekvidistanty") diff --git a/language-pl.cpp b/language-pl.cpp index e25839cf..48b6e19c 100644 --- a/language-pl.cpp +++ b/language-pl.cpp @@ -5134,27 +5134,17 @@ S("The game starts in the Icy Lands. Collect the Ice Diamonds " S("Hypersian Rug model", "Model Hiperskiego Dywanu") S( "New players think that the action of HyperRogue takes place on a sphere. " -#if NORUG - "This is not true -- the Tutorial in the native desktop version shows " - "the surface HyperRogue actually takes place on.", -#else "This is not true -- the next slide will show the surface HyperRogue " "actually takes place on.\n\n" "Use arrow keys to rotate the model, and Page Up/Down to zoom.\n\n" "If you do not see anything, press '5' to try a safer renderer.", -#endif "Nowi gracze myślą, że akcja HyperRogue toczy się na sferze. " -#if NORUG - "To nieprawda -- Podręcznik w komputerowej wersji wykonywalnej " - "pokazuje powierzchnię, na której w rzeczywistości toczy się rozgrywka." -#else "To nieprawda -- kolejny slajd pokazuje powierzchnię, " "na której toczy się gra. " "Obracaj modelem strzałkami, Page Up/Down by skalować.\n\n" "Jeśli nic nie widzisz, naciśnij '5' dla bezpieczniejszego renderera." -#endif ) S("Expansion", "Ekspansja") @@ -5232,22 +5222,22 @@ S( "it will appear to go slower -- this is because you are running " "in a straight line, and the Running Dog has to run in a curve " "called an equidistant.\n\n" -#if ISMAC - "Remember that you can click with right Shift on anything to get more information.", -#else - "Remember that you can right click on anything to get more information.", -#endif +IF_MAC( + "Remember that you can click with right Shift on anything to get more information." +, + "Remember that you can right click on anything to get more information." +), "By dowiedzieć się więcej o liniach prostych, " "podróżuj dalej, aż znajdziesz Krainę Wiecznego Ruchu. " "Biegnij w linii prostej z Psem biegnącym obok. " "Mimo że Pies biegnie z tą samą prędkością, nie będzie " "w stanie Cię dogonić -- ponieważ Ty ruszasz się w linii prostej, " "a Pies biegnie po krzywej zwanej ekwidystantą.\n\n" -#if ISMAC +IF_MAC( "Pamiętaj, że możesz klikać z prawym Shiftem na różnych elementach gry, by dowiedzieć się o nich więcej." -#else +, "Pamiętaj, że możesz klikać prawym przyciskiem na różnych elementach gry, by dowiedzieć się o nich więcej." -#endif +) ) S("Equidistants", "Ekwidystanty") diff --git a/language-ptbr.cpp b/language-ptbr.cpp index ef6a7f81..c2683101 100644 --- a/language-ptbr.cpp +++ b/language-ptbr.cpp @@ -5215,27 +5215,16 @@ S("The game starts in the Icy Lands. Collect the Ice Diamonds " S("Hypersian Rug model", "Model Hiperskiego Dywanu") S( "New players think that the action of HyperRogue takes place on a sphere. " -#ifdef MOBWEB - "This is not true -- the Tutorial in the native desktop version shows " - "the surface HyperRogue actually takes place on.", -#else "This is not true -- the next slide will show the surface HyperRogue " "actually takes place on.\n\n" "Use arrow keys to rotate the model, and Page Up/Down to zoom.\n\n" "If you do not see anything, press '5' to try a safer renderer.", -#endif - "Nowi gracze myślą, że akcja HyperRogue toczy się na sferze. " -#ifdef MOBWEB - "To nieprawda -- Podręcznik w komputerowej wersji wykonywalnej " - "pokazuje powierzchnię, na której w rzeczywistości toczy się rozgrywka." -#else "To nieprawda -- kolejny slajd pokazuje powierzchnię, " "na której toczy się gra. " "Obracaj modelem strzałkami, Page Up/Down by skalować.\n\n" "Jeśli nic nie widzisz, naciśnij '5' dla bezpieczniejszego renderera." -#endif ) S("Expansion", "Ekspansja") @@ -5313,22 +5302,22 @@ S( "it will appear to go slower -- this is because you are running " "in a straight line, and the Running Dog has to run in a curve " "called an equidistant.\n\n" -#ifdef MAC - "Remember that you can click with right Shift on anything to get more information.", -#else - "Remember that you can right click on anything to get more information.", -#endif +IF_MAC( + "Remember that you can click with right Shift on anything to get more information." +, + "Remember that you can right click on anything to get more information." +), "By dowiedzieć się więcej o liniach prostych, " "podróżuj dalej, aż znajdziesz Krainę Wiecznego Ruchu. " "Biegnij w linii prostej z Psem biegnącym obok. " "Mimo że Pies biegnie z tą samą prędkością, nie będzie " "w stanie Cię dogonić -- ponieważ Ty ruszasz się w linii prostej, " "a Pies biegnie po krzywej zwanej ekwidystantą.\n\n" -#ifdef MAC +IF_MAC( "Pamiętaj, że możesz klikać z prawym Shiftem na różnych elementach gry, by dowiedzieć się o nich więcej." -#else +, "Pamiętaj, że możesz klikać prawym przyciskiem na różnych elementach gry, by dowiedzieć się o nich więcej." -#endif +) ) S("Equidistants", "Ekwidystanty") diff --git a/language-ru.cpp b/language-ru.cpp index 2e6fdff2..3e6b0279 100644 --- a/language-ru.cpp +++ b/language-ru.cpp @@ -5290,25 +5290,14 @@ S("The game starts in the Icy Lands. Collect the Ice Diamonds " S("Hypersian Rug model", "Модель Гиперсидского ковра") S( "New players think that the action of HyperRogue takes place on a sphere. " -#if NORUG - "This is not true -- the Tutorial in the native desktop version shows " - "the surface HyperRogue actually takes place on.", -#else "This is not true -- the next slide will show the surface HyperRogue " "actually takes place on.\n\n" "Use arrow keys to rotate the model, and Page Up/Down to zoom.\n\n" "If you do not see anything, press '5' to try a safer renderer.", -#endif "Новички иногда думают, что действие в HyperRogue происходит на сфере. " -#if NORUG "Это неправда -- Руководство в компьютерной версии покажет тебе " "настоящую поверхность HyperRogue." -#else - "Это неправда -- на следующем слайде показана настоящая поверхность HyperRogue.\n\n" - "Используйте стрелки, чтобы поворачивать модель, и Page Up/Down, чтобы менять размер.\n\n" - "Если ничего не видно, нажми '5' для безопасного визуализатора." -#endif ) S("Expansion", "Расширение") @@ -5387,11 +5376,11 @@ S( "it will appear to go slower -- this is because you are running " "in a straight line, and the Running Dog has to run in a curve " "called an equidistant.\n\n" -#if ISMAC - "Remember that you can click with right Shift on anything to get more information.", -#else - "Remember that you can right click on anything to get more information.", -#endif +IF_MAC( + "Remember that you can click with right Shift on anything to get more information." +, + "Remember that you can right click on anything to get more information." +), "Чтобы узнать больше о прямых линиях, " "найди Землю вечного движения. " "Попробуй двигаться по прямой вместе с собакой, бегущей рядом. "