blob: 1cbc4668853e3798a8a2bda354e196ad0893a061 [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:
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()
31#ifdef TPN
32#undef TPN
33#endif
34#define TPN this_player()->name()
35#ifdef TPNC
36#undef TPNC
37#endif
38#define TPNC this_player()->Name()
39#ifdef BSLF
40#undef BSLF
41#endif
42#define BSLF(x) break_string(x, 78, 0, BS_LEAVE_MY_LFS)
43#ifdef BSPS
44#undef BSPS
45#endif
46#define BSPS(x, y) break_string(x, 78, y, BS_LEAVE_MY_LFS)
47#ifdef BSPN
48#undef BSPN
49#endif
50#define BSPN(x, y) break_string(x, 78, y, BS_LEAVE_MY_LFS|BS_PREPEND_INDENT)
51
52// Fuer Verwendung in Defend():
53#define NO_AC AT_HELMET:0,\
54 AT_AMULET:0,\
55 AT_GLOVE:0,\
56 AT_RING:0,\
57 AT_SHIELD:0,\
58 AT_CLOAK:0,\
59 AT_ARMOUR:0,\
60 AT_BELT:0,\
61 AT_TROUSERS:0,\
62 AT_BOOT:0,\
63 P_BODY:0
64
65
66#endif // __FADEN_DEFS_H__