forked from jflemer/lotr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlotr.h
169 lines (129 loc) · 3.73 KB
/
lotr.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/****************************************************************************
lotr.h
some common definitions
Lord of the Rings game engine
Copyright (C) 2003 Michal Benes
Lord of the Rings game engine is free software;
you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this code; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*****************************************************************************/
#ifndef _LORD_H
#define _LORD_H
#ifdef __amigaos4__
# define AMIGA_OS4
#endif
/* define this to compile The Two Towers - not working */
/* #define TTT */
#ifndef TTT
/* define this to compile the CD version */
/* works only with Fellowship of the Ring */
/* #define CD_VERSION */
/* define this if you want to compile a demo binary */
/* works only with Fellowship of the Ring */
/* #define DEMO 1 */
#endif
/* uncomment for fullscreen */
/* #define FULLSCREEN */
/* not much tested with other dimensions */
/* larger resolution is considered cheating */
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 200
/* Scaling factor for the screen */
#define SCREEN_FACT 2
/* frame time in milliseconds */
#define FRAME_TIME 50
#if !defined(PREFIX)
# define PREFIX
#endif
#ifdef DEMO
# if defined(WIN32)
# define DATA_DIRECTORY "./"
# elif !defined(AMIGA_OS4)
# define DATA_DIRECTORY "./"
# else
# define DATA_DIRECTORY PREFIX "/"
# endif
#else
# if defined(WIN32)
# define GAME_DIRECTORY PREFIX "lotr"
# elif !defined(AMIGA_OS4)
# define GAME_DIRECTORY PREFIX "/share/games/lotr"
# else
# define GAME_DIRECTORY PREFIX "/lotr"
# endif
# ifndef TTT
# ifndef CD_VERSION
# define DATA_DIRECTORY GAME_DIRECTORY
# else
# define DATA_DIRECTORY GAME_DIRECTORY "/cd"
# endif
# else
# define DATA_DIRECTORY GAME_DIRECTORY "/towers"
# endif
#endif
/* should we produce pixel-precise interface ass original
or improve the original a bit */
#define PIXEL_PRECISE 0
/* uncomment to turn on debugging */
/* DEBUG disables SDL parachute
(so that the game creates coredumps on crash) */
/* #define DEBUG */
#ifdef DEBUG
/* enable cheats */
#define ENABLE_CHEATS
/* display command spots */
#define DRAW_SPOTS
/* allow wizard mode */
#define WIZARD_MODE
#endif
#ifndef TRUE
# define TRUE 1
#endif
#ifndef FALSE
# define FALSE 0
#endif
#ifdef EXTENDED
# include "Python.h"
# include "pythonspot.h"
#endif
#ifdef __GNUC__
# define INLINE __inline__
#else
# define INLINE
#endif
#if !defined(_MSC_VER) && !defined(HAVE_UNISTD_H)
# define HAVE_UNISTD_H
#endif
#ifdef __GNUC__
# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
#else
# define ATTRIBUTE_PRINTF(m, n)
#endif
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
#include <SDL_types.h>
#ifdef WIN32
#include <windows.h>
#define HAVE_SDL_MIXER
#endif
#ifdef _MSC_VER
#include <direct.h>
# define bzero(p, s) memset(p, 0, s)
# define snprintf _snprintf
# define getcwd _getcwd
# define close _close
# define unlink _unlink
# define chdir _chdir
#endif
#endif /* _LORD_H */