123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- #ifndef _INC_ODGEN
- #define _INC_ODGEN
- #ifdef OD_DLL
- #ifdef ODPLAT_WIN32
- #define OD_DLL_NAME "ODOORS62"
- #endif
- #endif
- #ifdef ODPLAT_WIN32
- #define OD_MULTITHREADED
- #endif
- #if defined(ODPLAT_DOS) || defined(ODPLAT_NIX)
- #define OD_TEXTMODE
- #endif
- #ifdef ODPLAT_DOS
- #define INTERRUPT interrupt
- #ifdef _MSC_VER
- #define ASM __asm
- #else
- #define ASM asm
- #endif
- #ifdef __TINY__
- #define SMALLDATA
- #define SMALLCODE
- #endif
- #ifdef __SMALL__
- #define SMALLDATA
- #define SMALLCODE
- #endif
- #ifdef __COMPACT__
- #define LARGEDATA
- #define SMALLCODE
- #endif
- #ifdef __MEDIUM__
- #define SMALLDATA
- #define LARGECODE
- #endif
- #ifdef __LARGE__
- #define LARGEDATA
- #define LARGECODE
- #endif
- #ifdef __HUGE__
- #define LARGEDATA
- #define LARGECODE
- #endif
- #endif
- #define OD_VER_SHORTNAME "OpenDoors"
- #define OD_VER_STATUSLINE " OpenDoors 6.24 - (C) Copyright 1991-2001" \
- " by Brian Pirie "
- #define OD_VER_UNREG_STAT " OpenDoors 6.24 *WARNING* Unregistered Version" \
- " - Limit 1 month trial period! "
- #ifdef ODPLAT_DOS
- #define OD_VER_SIGNON "[OpenDoors 6.24/DOS - " \
- "(C) Copyright 1991-2001 by Brian Pirie]\n\r"
- #define OD_VER_FULLNAME "OpenDoors 6.24/DOS"
- #endif
- #ifdef ODPLAT_WIN32
- #define OD_VER_SIGNON "[OpenDoors 6.24/Win32 - " \
- "(C) Copyright 1991-2001 by Brian Pirie]\n\r"
- #define OD_VER_FULLNAME "OpenDoors 6.24/Win32"
- #endif
- #ifdef ODPLAT_NIX
- #define OD_VER_SIGNON "[OpenDoors 6.24/*nix - " \
- "(C) Copyright 1991-2001 by Brian Pirie]\n\r"
- #define OD_VER_FULLNAME "OpenDoors 6.24/*nix"
- #endif
- #define CONST const
- #ifdef OD_DEBUG
- #define __STR(x) __VAL(x)
- #define __VAL(x) #x
- #ifdef ODPLAT_WIN32
- #define ASSERT(x) if(!(x)) { MessageBox(NULL, __FILE__ ":" \
- __STR(__LINE__) "\n" #x, OD_VER_FULLNAME " - Test condition failed", \
- MB_ICONSTOP | MB_OK)
- #else
- #define ASSERT(x) if(!(x)) { puts(OD_VER_FULLNAME \
- " - Test condition failed:\n" __FILE__ ":" __STR(__LINE__) "\n" #x); \
- exit(1)
- #endif
- #else
- #define ASSERT(x)
- #endif
- #ifdef OD_TRACE
- #include <stdio.h>
- #define TRACE_API 1
- #define TRACE(x, y) printf("[%s]", y);
- #else
- #define TRACE(x, y)
- #endif
- #define OD_SCREEN_WIDTH 80
- #define OD_SCREEN_HEIGHT 25
- #ifndef MIN
- #define MIN(x, y) ((x) > (y)) ? (y) : (x)
- #endif
- #ifndef MAX
- #define MAX(x, y) ((x) > (y)) ? (x) : (y)
- #endif
- #ifndef DIM
- #define DIM(x) (sizeof(x) / sizeof(*x))
- #endif
- #define UNUSED(x) ((void)(x))
- #endif
|