Skip to Content
The Alchemy Project

include/features.h

How the code asks for what an edition has. More…

Included by edition.h.

Macros

NameDescription
#defineWHEN (flag, on, off) WHEN_PICK(flag, on, off)on where the edition has flag (1), off where it has not (0).
#defineWHEN_PICK (flag, on, off) WHEN_PICK_##flag(on, off)
#defineWHEN_PICK_0 (on, off) off
#defineWHEN_PICK_1 (on, off) on
#defineBY_LANGUAGE (ja, en, de, es, fr, it)The value for the edition's language, one given for each.
#defineBY_LANGUAGE_EXPAND (language, ja, en, de, es, fr, it)
#defineBY_LANGUAGE_PICK (language, ja, en, de, es, fr, it)
#defineBY_LANGUAGE_0 (ja, en, de, es, fr, it) ja
#defineBY_LANGUAGE_1 (ja, en, de, es, fr, it) en
#defineBY_LANGUAGE_2 (ja, en, de, es, fr, it) de
#defineBY_LANGUAGE_3 (ja, en, de, es, fr, it) es
#defineBY_LANGUAGE_4 (ja, en, de, es, fr, it) fr
#defineBY_LANGUAGE_5 (ja, en, de, es, fr, it) it
#defineJAPANESE_OR (ja, others)One language's value, and the others' shared one.
#defineENGLISH_OR (en, others)
#defineGERMAN_OR (de, others)
#defineSPANISH_OR (es, others)
#defineFRENCH_OR (fr, others)
#defineITALIAN_OR (it, others)

Description

How the code asks for what an edition has. The same in both games: edition.h sets LANGUAGE and each feature's 0 or 1, and includes this. A feature or fix is asked for by name, #if FEATURE for a block of code and WHEN(FEATURE, on, off) for a single value. What the language itself decides is picked with JAPANESE_OR, BY_LANGUAGE or another of the pickers below. Each expands to the one value the edition takes, so the compiler sees only that. A value given to a picker may not hold a comma.

Macros in detail

WHEN

#define WHEN(flag, on, off) WHEN_PICK(flag, on, off)

on where the edition has flag (1), off where it has not (0).

Definition at line 13 of file features.h.

WHEN_PICK

#define WHEN_PICK(flag, on, off) WHEN_PICK_##flag(on, off)

Definition at line 14 of file features.h.

WHEN_PICK_0

#define WHEN_PICK_0(on, off) off

Definition at line 15 of file features.h.

WHEN_PICK_1

#define WHEN_PICK_1(on, off) on

Definition at line 16 of file features.h.

BY_LANGUAGE

#define BY_LANGUAGE(ja, en, de, es, fr, it)

The value for the edition's language, one given for each.

Definition at line 19 of file features.h.

BY_LANGUAGE_EXPAND

#define BY_LANGUAGE_EXPAND(language, ja, en, de, es, fr, it)

Definition at line 21 of file features.h.

BY_LANGUAGE_PICK

#define BY_LANGUAGE_PICK(language, ja, en, de, es, fr, it)

Definition at line 23 of file features.h.

BY_LANGUAGE_0

#define BY_LANGUAGE_0(ja, en, de, es, fr, it) ja

Definition at line 25 of file features.h.

BY_LANGUAGE_1

#define BY_LANGUAGE_1(ja, en, de, es, fr, it) en

Definition at line 26 of file features.h.

BY_LANGUAGE_2

#define BY_LANGUAGE_2(ja, en, de, es, fr, it) de

Definition at line 27 of file features.h.

BY_LANGUAGE_3

#define BY_LANGUAGE_3(ja, en, de, es, fr, it) es

Definition at line 28 of file features.h.

BY_LANGUAGE_4

#define BY_LANGUAGE_4(ja, en, de, es, fr, it) fr

Definition at line 29 of file features.h.

BY_LANGUAGE_5

#define BY_LANGUAGE_5(ja, en, de, es, fr, it) it

Definition at line 30 of file features.h.

JAPANESE_OR

#define JAPANESE_OR(ja, others)

One language's value, and the others' shared one.

Definition at line 33 of file features.h.

ENGLISH_OR

#define ENGLISH_OR(en, others)

Definition at line 35 of file features.h.

GERMAN_OR

#define GERMAN_OR(de, others)

Definition at line 37 of file features.h.

SPANISH_OR

#define SPANISH_OR(es, others)

Definition at line 39 of file features.h.

FRENCH_OR

#define FRENCH_OR(fr, others)

Definition at line 41 of file features.h.

ITALIAN_OR

#define ITALIAN_OR(it, others)

Definition at line 43 of file features.h.