blob: d0f4bd5d744cdf168f6ce16ca200946609ed66f6 [file] [log] [blame]
notstrom56afaed2018-11-04 18:05:00 +01001#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:
notstrom7e35c3b2018-11-12 20:32:02 +010019// TODO: einzeln erklaeren, was die tun:
notstrom56afaed2018-11-04 18:05:00 +010020#ifdef ENV
21#undef ENV
22#endif
23#define ENV environment
24#ifdef TO
25#undef TO
26#endif
27#define TO this_object()
28#ifdef TP
29#undef TP
30#endif
31#define TP this_player()
notstrom0cfce3e2018-11-04 18:16:25 +010032/* Diese Defines nennt jeder Magier anders, ich nenne sie hier mal so, wie
33 sie auch in meinen Gebieten heissen: */
notstrom56afaed2018-11-04 18:05:00 +010034#ifdef TPN
35#undef TPN
36#endif
37#define TPN this_player()->name()
38#ifdef TPNC
39#undef TPNC
40#endif
41#define TPNC this_player()->Name()
42#ifdef BSLF
43#undef BSLF
44#endif
45#define BSLF(x) break_string(x, 78, 0, BS_LEAVE_MY_LFS)
46#ifdef BSPS
47#undef BSPS
48#endif
49#define BSPS(x, y) break_string(x, 78, y, BS_LEAVE_MY_LFS)
50#ifdef BSPN
51#undef BSPN
52#endif
53#define BSPN(x, y) break_string(x, 78, y, BS_LEAVE_MY_LFS|BS_PREPEND_INDENT)
54
55// Fuer Verwendung in Defend():
56#define NO_AC AT_HELMET:0,\
57 AT_AMULET:0,\
58 AT_GLOVE:0,\
59 AT_RING:0,\
60 AT_SHIELD:0,\
61 AT_CLOAK:0,\
62 AT_ARMOUR:0,\
63 AT_BELT:0,\
64 AT_TROUSERS:0,\
65 AT_BOOT:0,\
66 P_BODY:0
67
68
69#endif // __FADEN_DEFS_H__