00001
00004
00005 #ifndef CROGUE_H
00006 #define CROGUE_H
00007
00008 #include "config.h"
00009
00010 #include "machdep.h"
00011
00012
00013 #define isNull(a) ((a).offset == 0)
00014
00015
00016 #define MDESC(a) find_monster_description(a)
00017 #define MATTACK(a, b) (MDESC(a)->attacks[b])
00018
00019 #define MAPDESC_CURRENT (*w->current_map)
00020 #define TILEDESC(a) (w->tiledescs[(a).type])
00021
00022 #define ITEMDESCN(a) (*((itemdesc*)deref_file_ptr( w->itemdescs[a] )))
00023 #define ITEMDESC(a) (ITEMDESCN((a).type))
00024 #define INVENTORY(a) (w->plr.inventory[(a)])
00025
00026 #define MAPSPEC(a) (MAPDESC_CURRENT.ext[a])
00027 #define TILESPEC(x,y) MAPSPEC(w->t[(y)][(x)].special)
00028
00029
00030
00031
00032
00033
00034 #define DATA_WRAP_PTR(a) a
00035 #define CONST const
00036 #ifdef PALMOS
00037 #define ECONST
00038 #else
00039 #define ECONST const
00040 #endif
00041
00042 #include "util.h"
00043 #include "rle.h"
00044 #include "huffman.h"
00045 #include "map.h"
00046 #include "items.h"
00047 #include "monst.h"
00048 #include "ui.h"
00049 #include "keyboard.h"
00050 #include "timer.h"
00051 #include "player.h"
00052 #include "score.h"
00053 #include "options.h"
00054 #include "constdata.h"
00055 #include "world.h"
00056 #include "interpret.h"
00057
00058 #ifndef CPROTO
00059 #include "automatic.h"
00060 #include "dll_import.h"
00061 #include "dll_export.h"
00062 #endif
00063
00064
00065 #ifdef REGISTERVAR
00066 register world *w asm("a4");
00067 extern world *w_non_reg;
00068 #else
00069 extern world *w;
00070 #endif
00071
00072
00073 #ifdef IS_CALCULATOR
00074 extern const uchar tiles_5x5[128*5];
00075 extern const uchar tiles_7x7[128*7];
00076 #define blacktile 1
00077 #define whitetile 2
00078 #else
00079 extern ECONST uchar tiles[128];
00080
00081 #endif
00082
00083 extern const schar dir[8][2];
00084
00085
00086 #ifndef CPROTO
00087 extern const import_functions body_functions;
00088 #ifndef SEG
00089 # define SEG(a)
00090 #endif
00091 #include "proto.h"
00092 #endif
00093
00094 #endif //CROGUE_H
00095