mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 17:40:36 +00:00
Merge branch 'master' of https://github.com/zenorogue/hyperrogue
This commit is contained in:
commit
b39e2295b4
@ -63,7 +63,7 @@ savepng-loc.o: savepng.cpp
|
|||||||
hyper-rogueviz.o: hyper.cpp graph.cpp hyperpoint.cpp geometry.cpp cell.cpp heptagon.cpp game.cpp classes.cpp polygons.cpp language.cpp language-data.cpp achievement.cpp shmup.cpp patterns.cpp mapeditor.cpp netgen.cpp yendor.cpp hyper.h rug.cpp flags.cpp system.cpp landgen.cpp orbs.cpp complex.cpp conformal.cpp menus.cpp init.cpp dialogs.cpp sound.cpp util.cpp ${drogueviz} fieldpattern.cpp ${MAIN} control.cpp commandline.cpp
|
hyper-rogueviz.o: hyper.cpp graph.cpp hyperpoint.cpp geometry.cpp cell.cpp heptagon.cpp game.cpp classes.cpp polygons.cpp language.cpp language-data.cpp achievement.cpp shmup.cpp patterns.cpp mapeditor.cpp netgen.cpp yendor.cpp hyper.h rug.cpp flags.cpp system.cpp landgen.cpp orbs.cpp complex.cpp conformal.cpp menus.cpp init.cpp dialogs.cpp sound.cpp util.cpp ${drogueviz} fieldpattern.cpp ${MAIN} control.cpp commandline.cpp
|
||||||
${CXX} ${PROF} ${MAIN} -c -o hyper-rogueviz.o ${MYFLAGS}
|
${CXX} ${PROF} ${MAIN} -c -o hyper-rogueviz.o ${MYFLAGS}
|
||||||
|
|
||||||
langen: langen.cpp language-cz.cpp language-pl.cpp language-tr.cpp language-ru.cpp language-de.cpp language-ptbr.cpp language-fr.cpp
|
langen: langen.cpp language-cz.cpp language-pl.cpp language-tr.cpp language-ru.cpp language-de.cpp language-ptbr.cpp language-fr.cpp language-zh.cpp
|
||||||
${CXX} langen.cpp -o langen -g
|
${CXX} langen.cpp -o langen -g
|
||||||
|
|
||||||
language-data.cpp: langen
|
language-data.cpp: langen
|
||||||
|
Binary file not shown.
25
langen.cpp
25
langen.cpp
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
template<class T> int isize(const T& x) { return x.size(); }
|
template<class T> int isize(const T& x) { return x.size(); }
|
||||||
|
|
||||||
#define NUMLAN 8
|
#define NUMLAN 9
|
||||||
|
|
||||||
// language generator
|
// language generator
|
||||||
|
|
||||||
@ -290,6 +290,27 @@ void langFR() {
|
|||||||
current_language = "-";
|
current_language = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void langZH() {
|
||||||
|
current_language = "ZH";
|
||||||
|
static std::pair<const char *, const char *> ds[] = {
|
||||||
|
#define S(a,b) { a, b },
|
||||||
|
#define N(a,b,c)
|
||||||
|
#include "language-zh.cpp"
|
||||||
|
#undef N
|
||||||
|
#undef S
|
||||||
|
};
|
||||||
|
static std::pair<const char *, noun2> ns[] = {
|
||||||
|
#define S(a,b)
|
||||||
|
#define N(a,b,c) { a, noun2{ b, c, c, c, c } },
|
||||||
|
#include "language-zh.cpp"
|
||||||
|
#undef N
|
||||||
|
#undef S
|
||||||
|
};
|
||||||
|
for(auto&& elt : ds) d[8].add(elt.first, elt.second);
|
||||||
|
for(auto&& elt : ns) nouns[8].add(elt.first, elt.second);
|
||||||
|
current_language = "-";
|
||||||
|
}
|
||||||
|
|
||||||
int completeness[NUMLAN];
|
int completeness[NUMLAN];
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@ -358,7 +379,7 @@ int main() {
|
|||||||
|
|
||||||
langPL(); langCZ(); langRU();
|
langPL(); langCZ(); langRU();
|
||||||
langTR(); langDE(); langPT();
|
langTR(); langDE(); langPT();
|
||||||
langFR();
|
langFR(); langZH();
|
||||||
|
|
||||||
// verify
|
// verify
|
||||||
compute_completeness(d);
|
compute_completeness(d);
|
||||||
|
9201
language-zh.cpp
Normal file
9201
language-zh.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ EX const string dnameof(eWall w) { return w >= 0 && w < walltypes ? winf[w].name
|
|||||||
EX const string dnameof(eItem i) { return i >= 0 && i < ittypes ? iinf[i].name : hr::format("[ITEM %d]", i); }
|
EX const string dnameof(eItem i) { return i >= 0 && i < ittypes ? iinf[i].name : hr::format("[ITEM %d]", i); }
|
||||||
|
|
||||||
#if HDR
|
#if HDR
|
||||||
#define NUMLAN 8
|
#define NUMLAN 9
|
||||||
|
|
||||||
struct stringpar {
|
struct stringpar {
|
||||||
string v;
|
string v;
|
||||||
@ -303,6 +303,9 @@ void parrep(string& x, string w, stringpar p) {
|
|||||||
rep(x, "%abl"+w, data.abl);
|
rep(x, "%abl"+w, data.abl);
|
||||||
rep(x, "%d"+w, data.abl); // Dativ (which equals Ablative in German)
|
rep(x, "%d"+w, data.abl); // Dativ (which equals Ablative in German)
|
||||||
}
|
}
|
||||||
|
if(l == 8) {
|
||||||
|
rep(x, "%"+w, data.nom);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if(true) {
|
if(true) {
|
||||||
// proper names (R'Lyeh)
|
// proper names (R'Lyeh)
|
||||||
|
Loading…
Reference in New Issue
Block a user