| 1 |
#ifndef _ATYPES_H_ |
| 2 |
#define _ATYPES_H_ |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
#include "sysdep.h" |
| 13 |
#include "acode.h" |
| 14 |
#include "memory.h" |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#define FORWARD |
| 19 |
#define protected |
| 20 |
#define NEW(type) ((type *)allocate(sizeof(type))) |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
#define HERO (header->theHero) |
| 26 |
#define ENTITY (header->entityClassId) |
| 27 |
#define OBJECT (header->objectClassId) |
| 28 |
#define LOCATION (header->locationClassId) |
| 29 |
#define THING (header->thingClassId) |
| 30 |
#define ACTOR (header->actorClassId) |
| 31 |
|
| 32 |
#define MAXPARAMS (header->maxParameters) |
| 33 |
#define MAXINSTANCE (header->instanceMax) |
| 34 |
|
| 35 |
#define pointerTo(x) ((void *)&memory[x]) |
| 36 |
#define addressOf(x) ((((long)x)-((long)memory))/sizeof(Aword)) |
| 37 |
#define stringAt(x) ((char *)pointerTo(x)) |
| 38 |
|
| 39 |
#define ASIZE(x) (sizeof(x)/sizeof(Aword)) |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
#include <stdbool.h> |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
typedef unsigned char uchar; |
| 48 |
|
| 49 |
|
| 50 |
typedef struct VerbEntry { |
| 51 |
Aint code; |
| 52 |
Aaddr alts; |
| 53 |
} VerbEntry; |
| 54 |
|
| 55 |
typedef struct LimEntry { |
| 56 |
Aword atr; |
| 57 |
Aword val; |
| 58 |
Aaddr stms; |
| 59 |
} LimitEntry; |
| 60 |
|
| 61 |
|
| 62 |
extern Aaddr addressAfterTable(Aaddr adr, int size); |
| 63 |
|
| 64 |
#endif |