Save/resume fail test coverage -- test works in Docker now
[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 #define LOCSIZ          185
6 #define NOBJECTS        100
7 #define HNTSIZ           20
8
9 extern const char advent_to_ascii[128];
10 extern const char ascii_to_advent[128];
11
12 enum bugtype {
13    MESSAGE_LINE_GT_70_CHARACTERS,                         // 0
14    NULL_LINE_IN_MESSAGE,                                  // 1
15    TOO_MANY_WORDS_OF_MESSAGES,                            // 2
16    TOO_MANY_TRAVEL_OPTIONS,                               // 3
17    TOO_MANY_VOCABULARY_WORDS,                             // 4
18    REQUIRED_VOCABULARY_WORD_NOT_FOUND,                    // 5
19    TOO_MANY_RTEXT_MESSAGES,                               // 6
20    TOO_MANY_HINTS,                                        // 7
21    LOCATION_HAS_CONDITION_BIT_BEING_SET_TWICE,            // 8
22    INVALID_SECTION_NUMBER_IN_DATABASE,                    // 9
23    TOO_MANY_LOCATIONS,                                    // 10
24    TOO_MANY_CLASS_OR_TURN_MESSAGES,                       // 11
25    SPECIAL_TRAVEL_500_GT_L_GT_300_EXCEEDS_GOTO_LIST = 20, // 20
26    RAN_OFF_END_OF_VOCABULARY_TABLE,                       // 21
27    VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3,       // 22
28    INTRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST,            // 23
29    TRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST,              // 24
30    CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION,           // 25
31    LOCATION_HAS_NO_TRAVEL_ENTRIES,                        // 26
32    HINT_NUMBER_EXCEEDS_GOTO_LIST,                         // 27
33    TOO_MANY_PARAMETERS_GIVEN_TO_SETPRM,                   // 28
34    SPEECHPART_NOT_TRANSITIVE_OR_INTRANSITIVE_OR_UNKNOWN=99, // 99
35    ACTION_RETURNED_PHASE_CODE_BEYOND_END_OF_SWITCH,       // 100
36 };
37
38 /* Alas, declaring this static confuses the coverage analyzer */
39 void bug(enum bugtype, const char *) __attribute__((__noreturn__));
40
41 #define BUG(x) bug(x, #x)
42
43 #endif