Richard Boegli's CnC_Generals_Zero_Hour Fork
WIP
This is documentation of Richard Boegil's Zero Hour Fork
Loading...
Searching...
No Matches
wstypes.h
Go to the documentation of this file.
1
/*
2
** Command & Conquer Generals Zero Hour(tm)
3
** Copyright 2025 Electronic Arts Inc.
4
**
5
** This program is free software: you can redistribute it and/or modify
6
** it under the terms of the GNU General Public License as published by
7
** the Free Software Foundation, either version 3 of the License, or
8
** (at your option) any later version.
9
**
10
** This program is distributed in the hope that it will be useful,
11
** but WITHOUT ANY WARRANTY; without even the implied warranty of
12
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
** GNU General Public License for more details.
14
**
15
** You should have received a copy of the GNU General Public License
16
** along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
/****************************************************************************\
20
* C O N F I D E N T I A L --- W E S T W O O D S T U D I O S *
21
******************************************************************************
22
Project Name: Carpenter (The RedAlert ladder creator)
23
File Name : wstypes.h
24
Author : Neal Kettler
25
Start Date : June 3, 1997
26
Last Update : June 17, 1997
27
28
Standard type definitions for the sake of portability and readability.
29
\***************************************************************************/
30
31
#ifndef WSTYPES_HEADER
32
#define WSTYPES_HEADER
33
34
#ifdef _REENTRANT
// reentrant = threaded
35
// Headers with non threadsafe libs need to come before my hacky
36
// threadsafe.h otherwise they won't compile
37
38
#include <time.h>
39
#ifndef _WINDOWS
40
#define _POSIX_C_SOURCE 199506L
41
#define _POSIX_PTHREAD_SEMANTICS
42
#define __EXTENSIONS__
43
#endif
44
#include <stdlib.h>
45
#include <stdio.h>
46
#include <
string.h
>
47
#ifndef _WINDOWS
48
#include <unistd.h>
49
#include <sys/time.h>
50
#include <dirent.h>
51
#else
52
#include <time.h>
53
#include <sys/timeb.h>
54
#endif
55
#include "
threadsafe.h
"
// enforce threadsafe-only calls
56
#endif
57
58
#define adelete(X) (delete[](X))
59
60
#ifndef TRUE
61
#define TRUE 1
62
#endif
63
64
#ifndef FALSE
65
#define FALSE 0
66
#endif
67
68
#ifndef MIN
69
#define MIN(x,y) (((x)<(y))?(x):(y))
70
#endif
71
72
#ifndef MAX
73
#define MAX(x,y) (((x)>(y))?(x):(y))
74
#endif
75
76
#ifndef NULL
77
#define NULL 0
78
#endif
79
80
//These are used for readability purposes mostly, when a method takes a
81
// pointer or reference these help specify what will happen to the data
82
// that is sent in.
83
#ifdef IN
84
#undef IN
85
#endif
86
#define IN const
87
#define OUT
88
#define INOUT
89
#define _IN_ const
90
91
// Used to declare a function or method as const or Read Only
92
#define RO const
93
94
typedef
char
bit8
;
95
typedef
char
sint8
;
96
typedef
unsigned
char
uint8
;
97
typedef
signed
short
int
sint16
;
98
typedef
unsigned
short
int
uint16
;
99
typedef
signed
int
sint32
;
100
typedef
unsigned
int
uint32
;
101
102
typedef
float
float32
;
103
typedef
double
float64
;
104
105
#define MAX_BIT8 0x1
106
#define MAX_UINT32 0xFFFFFFFF
107
#define MAX_UINT16 0xFFFF
108
#define MAX_UINT8 0xFF
109
#define MAX_SINT32 0x7FFFFFFF
110
#define MAX_SINT16 0x7FFF
111
#define MAX_SINT8 0x7F
112
113
#ifdef _WINDOWS
114
#define strncasecmp _strnicmp
115
#define strcasecmp _stricmp
116
#endif
117
118
#endif
bit8
char bit8
Definition
wstypes.h:61
uint16
unsigned short uint16
Definition
bittype.h:45
sint8
signed char sint8
Definition
bittype.h:49
float64
double float64
Definition
bittype.h:55
uint32
unsigned long uint32
Definition
bittype.h:46
sint16
signed short sint16
Definition
bittype.h:50
sint32
signed long sint32
Definition
bittype.h:51
float32
float float32
Definition
bittype.h:54
uint8
unsigned char uint8
Definition
bittype.h:44
threadsafe.h
string.h
Code
Tools
matchbot
wlib
wstypes.h
Generated by
1.13.2