20
20
#include "fehler.h"
21
21
#include "version.h"
24
25
#define anz_packs 7
25
26
const char * packs_merkmale[anz_packs+1] = {
26
27
"main", "all", "game", "extreme", "nofx", "weird", "unfinished", 0};
27
28
const char * packs_namen[anz_packs] = {
28
_("Standard"),_("All levels"),_("Games"),_("Extremes"),_("No FX"),
29
_("Weird"),_("Unfinished")};
29
// TRANSLATORS: Name of a level track
31
// TRANSLATORS: Name of a level track
33
// TRANSLATORS: Name of a level track
35
// TRANSLATORS: Name of a level track
37
// TRANSLATORS: Name of a level track
39
// TRANSLATORS: Name of a level track
41
// TRANSLATORS: Name of a level track
30
43
const char * packs_infos[anz_packs] = {
31
_("A selection of levels for the common taste"),
32
_("All levels except the unfinished ones"),
33
_("Levels simulating board games or other computer games"),
34
_("Levels setting records such as `fastest dropping ceiling'"),
35
_("Plain levels without any disturbing tweaks to the rules"),
36
_("Levels interpreting the general theme of cuyo more broadly"),
37
_("Works in progress")
44
N_("A selection of levels for the common taste"),
45
N_("All levels except the unfinished ones"),
46
N_("Levels simulating board games or other computer games"),
47
N_("Levels setting records such as `fastest dropping ceiling'"),
48
N_("Plain levels without any disturbing tweaks to the rules"),
49
N_("Levels interpreting the general theme of cuyo more broadly"),
50
N_("Works in progress")
39
Dimension Version::gLevelpack =
40
Dimension(anz_packs,packs_merkmale,packs_namen,packs_infos);
52
Dimension Version::gLevelpack = Dimension();
44
56
#define anz_schwer 3
45
57
const char * schwer_merkmale[anz_schwer+1] = {"easy", "", "hard"};
46
const char * schwer_namen[anz_schwer+1] = {_("Easy"),_("Normal"),_("Hard")};
58
const char * schwer_namen[anz_schwer+1] = {
59
// TRANSLATORS: Name of a difficulty setting
61
// TRANSLATORS: Name of a difficulty setting
63
// TRANSLATORS: Name of a difficulty setting
47
65
const char * schwer_infos[anz_schwer+1] = {
52
Dimension Version::gSchwierig =
53
Dimension(anz_schwer,schwer_merkmale,schwer_namen,schwer_infos);
70
Dimension Version::gSchwierig = Dimension();
184
201
for (; !gefunden && i!=e; ++i)
185
202
gefunden = differenz(*i,version).size()==0; /* Teilmengentest */
204
/* TRANSLATORS: The composition "%s%s" is programming specific and
205
should not be translated. */
187
206
throw Fehler(_("%s lacks version %s%s"), schluessel.data(),
188
207
schluessel.data(), setToString(version).data());
249
Dimension::Dimension(int g,
268
Dimension::Dimension() : mInitialized(false) {
271
void Dimension::init(int g,
250
272
const char * const * const m,
251
273
const char * const * const n,
252
const char * const * const i) : mGroesse(g) {
274
const char * const * const i) {
253
276
for (int j=0; j<mGroesse; j++) {
254
277
mMerkmale.push_back(m[j]);
255
mProsaNamen.push_back(n[j]);
256
mErklaerungen.push_back(i[j]);
278
mProsaNamen.push_back(_(n[j]));
279
mErklaerungen.push_back(_(i[j]));
260
284
int Dimension::suchMerkmal(const Str & merkmal) {
286
throw(iFehler(_("Uninitialized dimension")));
261
287
for (int i=0; i<mGroesse; i++)
262
288
if (mMerkmale[i]==merkmal)
372
void Version::init() {
373
gLevelpack.init(anz_packs,packs_merkmale,packs_namen,packs_infos);
374
gSchwierig.init(anz_schwer,schwer_merkmale,schwer_namen,schwer_infos);
346
377
const set<Str> Version::auspraegungen(int dim) {
347
378
set<Str> ret = set<Str>();
348
379
CASSERT((dim>=0) && (dim<anzahl_dim));
439
VersionMapIntern::VersionMapIntern() : mGeprueft(), mVerzeichnis() {}
470
VersionMapIntern::VersionMapIntern() : mGeprueft(), mGut(), mVerzeichnis() {}
441
472
void VersionMapIntern::neuerEintragIntern(const Str & schluessel,
442
473
const Version & version,
444
475
if (geprueft(schluessel))
476
/* TRANSLATORS: The composition "%s%s" is programming specific and
477
should not be translated. */
445
478
throw Fehler(_("%s was already accessed, new version %s%s is not allowed"),
446
479
schluessel.data(),
447
480
schluessel.data(), version.toString().data());
515
548
void VersionMapIntern::assertWohlgeformt(const Str & schluessel,
516
bool defaultVorhanden) {
517
if (geprueft(schluessel))
549
bool defaultVorhanden) const {
550
if (geprueft(schluessel)) {
551
if (mGut.find(schluessel)==mGut.end())
552
throw Fehler(_("Previous problem with %s still persists"),
520
557
/* Schonmal den Pr�fstempel verteilen, vielleicht vergessen wir's sonst.
521
558
Insbesondere, wenn die Pr�fung nicht bestanden wird (Der Stempel sagt
561
602
set<Str> version = *i1;
562
603
if (testeAusschoepfendRedundant(*i1,versionen,leer,
563
604
Version::gAusschoepfend.begin()))
605
/* TRANSLATORS: The composition "%s%s" is programming specific and
606
should not be translated. */
564
607
throw Fehler(_("%s%s eclipsed by more specialized versions"),
565
608
schluessel.data(), setToString(version).data());