notstrom | 56afaed | 2018-11-04 18:05:00 +0100 | [diff] [blame] | 1 | #ifndef __TUTORIAL_DEFS_H__ |
| 2 | #define __TUTORIAL_DEFS_H__ |
| 3 | |
| 4 | /* Diese Pragmas sollten heutzutage Pflicht sein. Der Compiler wird durch |
| 5 | sie angewiesen, strenger auf korrekte Typisierung etc. zu achten. Siehe |
| 6 | "man pragma". */ |
| 7 | #pragma strong_types |
| 8 | #pragma save_types |
| 9 | #pragma rtt_checks |
| 10 | |
| 11 | |
| 12 | // Diese Includes braucht man so oft, die kann man eigentlich immer nehmen: |
| 13 | #include <properties.h> |
| 14 | #include <language.h> |
| 15 | #include <moving.h> |
| 16 | |
| 17 | |
| 18 | // Diese Defines brauchen wir auch nahezu staendig: |
| 19 | #ifdef ENV |
| 20 | #undef ENV |
| 21 | #endif |
| 22 | #define ENV environment |
| 23 | #ifdef TO |
| 24 | #undef TO |
| 25 | #endif |
| 26 | #define TO this_object() |
| 27 | #ifdef TP |
| 28 | #undef TP |
| 29 | #endif |
| 30 | #define TP this_player() |
notstrom | 0cfce3e | 2018-11-04 18:16:25 +0100 | [diff] [blame] | 31 | /* Diese Defines nennt jeder Magier anders, ich nenne sie hier mal so, wie |
| 32 | sie auch in meinen Gebieten heissen: */ |
notstrom | 56afaed | 2018-11-04 18:05:00 +0100 | [diff] [blame] | 33 | #ifdef TPN |
| 34 | #undef TPN |
| 35 | #endif |
| 36 | #define TPN this_player()->name() |
| 37 | #ifdef TPNC |
| 38 | #undef TPNC |
| 39 | #endif |
| 40 | #define TPNC this_player()->Name() |
| 41 | #ifdef BSLF |
| 42 | #undef BSLF |
| 43 | #endif |
| 44 | #define BSLF(x) break_string(x, 78, 0, BS_LEAVE_MY_LFS) |
| 45 | #ifdef BSPS |
| 46 | #undef BSPS |
| 47 | #endif |
| 48 | #define BSPS(x, y) break_string(x, 78, y, BS_LEAVE_MY_LFS) |
| 49 | #ifdef BSPN |
| 50 | #undef BSPN |
| 51 | #endif |
| 52 | #define BSPN(x, y) break_string(x, 78, y, BS_LEAVE_MY_LFS|BS_PREPEND_INDENT) |
| 53 | |
| 54 | // Fuer Verwendung in Defend(): |
| 55 | #define NO_AC AT_HELMET:0,\ |
| 56 | AT_AMULET:0,\ |
| 57 | AT_GLOVE:0,\ |
| 58 | AT_RING:0,\ |
| 59 | AT_SHIELD:0,\ |
| 60 | AT_CLOAK:0,\ |
| 61 | AT_ARMOUR:0,\ |
| 62 | AT_BELT:0,\ |
| 63 | AT_TROUSERS:0,\ |
| 64 | AT_BOOT:0,\ |
| 65 | P_BODY:0 |
| 66 | |
| 67 | |
| 68 | #endif // __FADEN_DEFS_H__ |