Eliminate directives inside macro expansions, for the benefit of MSVC.

This commit is contained in:
Arthur O'Dwyer 2018-06-26 22:41:56 -07:00
parent 87dc7dcd62
commit 00e1db9f05
7 changed files with 42 additions and 78 deletions

View File

@ -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

View File

@ -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

View File

@ -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 <map>
#include <string>
#include <cstdio>
@ -14,6 +9,17 @@
#include <cstdlib>
#include <set>
#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<class T> int isize(const T& x) { return x.size(); }
#define NUMLAN 7

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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."
),
"Чтобы узнать больше о прямых линиях, "
"найди Землю вечного движения. "
"Попробуй двигаться по прямой вместе с собакой, бегущей рядом. "