Removed advent.info and added to .gitignore
[open-adventure.git] / common.h
1 #ifndef COMMON_H
2 #define COMMON_H
3 /* maximum size limits shared by dungeon compiler and runtime */
4
5 extern const char advent_to_ascii[128];
6 extern const char ascii_to_advent[128];
7
8 enum bugtype {
9    TOO_MANY_VOCABULARY_WORDS,                             // 4
10    REQUIRED_VOCABULARY_WORD_NOT_FOUND,                    // 5
11    INVALID_SECTION_NUMBER_IN_DATABASE,                    // 9
12    SPECIAL_TRAVEL_500_GT_L_GT_300_EXCEEDS_GOTO_LIST = 20, // 20
13    RAN_OFF_END_OF_VOCABULARY_TABLE,                       // 21
14    VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3,       // 22
15    INTRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST,            // 23
16    TRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST,              // 24
17    CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION,           // 25
18    LOCATION_HAS_NO_TRAVEL_ENTRIES,                        // 26
19    HINT_NUMBER_EXCEEDS_GOTO_LIST,                         // 27
20    TOO_MANY_PARAMETERS_GIVEN_TO_SETPRM,                   // 28
21    SPEECHPART_NOT_TRANSITIVE_OR_INTRANSITIVE_OR_UNKNOWN=99, // 99
22    ACTION_RETURNED_PHASE_CODE_BEYOND_END_OF_SWITCH,       // 100
23 };
24
25 /* Alas, declaring this static confuses the coverage analyzer */
26 void bug(enum bugtype, const char *) __attribute__((__noreturn__));
27
28 #define BUG(x) bug(x, #x)
29
30 #endif