-
Notifications
You must be signed in to change notification settings - Fork 38
/
common.h
117 lines (95 loc) · 2.58 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//**************************************************************************
//**
//** common.h
//**
//**************************************************************************
#ifndef __COMMON_H__
#define __COMMON_H__
// HEADER FILES ------------------------------------------------------------
// MACROS ------------------------------------------------------------------
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a)))
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef YES
#define YES 1
#endif
#ifndef NO
#define NO 0
#endif
// Increased limits - Ty 03jan2000
// 32 is okay
#define MAX_IDENTIFIER_LENGTH 32
// 32k long quoted string should be okay
#define MAX_QUOTED_LENGTH 32768
// 512 max file name is okay in DOS/Win
#define MAX_FILE_NAME_LENGTH 512
// Was 64
#define MAX_SCRIPT_COUNT 1000
// Was 32
#define MAX_MAP_VARIABLES 128
// Left alone--there's something in the docs about this...
// [RH] Bumped up to 20 for fun.
#define MAX_SCRIPT_VARIABLES 20
// Was 64
#define MAX_WORLD_VARIABLES 256
// [RH] New
#define MAX_GLOBAL_VARIABLES 64
// Was 128
#define MAX_STRINGS 32768
// Don't know what this is
#define DEFAULT_OBJECT_SIZE 65536
// Added Ty 07Jan2000 for error details
#define MAX_STATEMENT_LENGTH 4096
#define MAX_FUNCTION_COUNT 8192
#define MAX_IMPORTS 256
#define MAX_SCRIPT_ARRAYS 255
// Max number of include paths the user can specify
// This includes the "working directory"!
#define MAX_INCLUDE_PATHS 16
// Maximum number of translations that can be used
#define MAX_TRANSLATIONS 32
enum
{
STRLIST_PICS,
STRLIST_FUNCTIONS,
STRLIST_MAPVARS,
STRLIST_NAMEDSCRIPTS,
NUM_STRLISTS
};
// These are just defs and have not been messed with
#define ASCII_SPACE 32
#define ASCII_QUOTE 34
#define ASCII_UNDERSCORE 95
#define EOF_CHARACTER 127
#ifdef __NeXT__
#define DIRECTORY_DELIMITER "/"
#define DIRECTORY_DELIMITER_CHAR ('/')
#else
#define DIRECTORY_DELIMITER "\\"
#define DIRECTORY_DELIMITER_CHAR ('\\')
#endif
#define MAKE4CC(a,b,c,d) ((a)|((b)<<8)|((c)<<16)|((d)<<24))
// TYPES -------------------------------------------------------------------
typedef unsigned int boolean;
typedef unsigned char byte;
typedef signed char S_BYTE;
typedef unsigned char U_BYTE;
typedef signed short S_WORD;
typedef unsigned short U_WORD;
typedef int S_INT;
typedef unsigned int U_INT;
// typedef signed long S_LONG;
// typedef unsigned long U_LONG;
enum ImportModes
{
IMPORT_None,
IMPORT_Importing,
IMPORT_Exporting
};
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
// PUBLIC DATA DECLARATIONS ------------------------------------------------
#endif