ScummVM API documentation
defs.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * Additional copyright for this file:
8 * Copyright (C) 1994-1998 Revolution Software Ltd.
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#ifndef SWORD2_DEFS_H
25#define SWORD2_DEFS_H
26
27#define SIZE 0x10000 // 65536 items per section
28#define NuSIZE 0xffff // & with this
29
30// Return codes
31
32enum {
33 // Generic error codes
34 RD_OK = 0x00000000,
35 RDERR_UNKNOWN = 0x00000001,
36 RDERR_OUTOFMEMORY = 0x00000003,
37 RDERR_INVALIDFILENAME = 0x00000004,
38
39 // Drawing error codes
40 RDERR_DECOMPRESSION = 0x00010007,
41
42 // Sprite drawing error codes
43 RDERR_NOTIMPLEMENTED = 0x00060001,
44 RDERR_NOTCLOSED = 0x00050005,
45 RDERR_NOTOPEN = 0x00050006,
46
47 // Menubar error codes
48 RDERR_INVALIDMENU = 0x00060000,
49 RDERR_INVALIDPOCKET = 0x00060001,
50 RDERR_INVALIDCOMMAND = 0x00060002,
51
52 // Palette fading error codes
53 RDERR_FADEINCOMPLETE = 0x00070000,
54
55 // Sound engine error codes
56 RDERR_SPEECHPLAYING = 0x00080004,
57 RDERR_SPEECHNOTPLAYING = 0x00080005,
58 RDERR_INVALIDWAV = 0x00080006,
59 RDERR_FXALREADYOPEN = 0x00080009,
60 RDERR_FXNOTOPEN = 0x0008000B,
61 RDERR_INVALIDID = 0x0008000D
62};
63
64// Text ids for the control panel etc.
65
66enum {
67 TEXT_OK = 0x08EB0000,
68 TEXT_CANCEL = 0x08EB0001,
69 TEXT_RESTORE = 0x08EB0002,
70 TEXT_SAVE = 0x08EB0003,
71 TEXT_QUIT = 0x08EB0004,
72 TEXT_RESTART = 0x08EB0005,
73 TEXT_OPTIONS = 0x08EB000A,
74 TEXT_SUBTITLES = 0x08EB000B,
75 TEXT_OBJECT_LABELS = 0x08EB000C,
76 TEXT_MUSIC_VOLUME = 0x08EB000E,
77 TEXT_SPEECH_VOLUME = 0x08EB000F,
78 TEXT_FX_VOLUME = 0x08EB0010,
79 TEXT_GFX_QUALITY = 0x08EB0011,
80 TEXT_REVERSE_STEREO = 0x08EB0015,
81 TEXT_RESTORE_CANT_OPEN = 0x0CBA017E,
82 TEXT_RESTORE_INCOMPATIBLE = 0x0CBA017F,
83 TEXT_RESTORE_FAILED = 0x0CBA0181,
84 TEXT_SAVE_CANT_OPEN = 0x0CBA0182,
85 TEXT_SAVE_FAILED = 0x0CBA0184
86};
87
88// Always 8 (George object used for Nico player character as well)
89#define CUR_PLAYER_ID 8
90
91// Global variable references
92
93enum {
94 ID = 0,
95 RESULT = 1,
96 PLAYER_ACTION = 2,
97 // CUR_PLAYER_ID = 3,
98 PLAYER_ID = 305,
99 TALK_FLAG = 13,
100
101 MOUSE_X = 4,
102 MOUSE_Y = 5,
103 LEFT_BUTTON = 109,
104 RIGHT_BUTTON = 110,
105 CLICKED_ID = 178,
106
107 IN_SUBJECT = 6,
108 COMBINE_BASE = 7,
109 OBJECT_HELD = 14,
110
111 SPEECH_ID = 9,
112 INS1 = 10,
113 INS2 = 11,
114 INS3 = 12,
115 INS4 = 60,
116 INS5 = 61,
117 INS_COMMAND = 59,
118
119 PLAYER_FEET_X = 141,
120 PLAYER_FEET_Y = 142,
121 PLAYER_CUR_DIR = 937,
122
123 // for debug.cpp
124 LOCATION = 62,
125
126 // so scripts can force scroll offsets
127 SCROLL_X = 345,
128 SCROLL_Y = 346,
129
130 EXIT_CLICK_ID = 710,
131 EXIT_FADING = 713,
132
133 SYSTEM_TESTING_ANIMS = 912,
134 SYSTEM_TESTING_TEXT = 1230,
135 SYSTEM_WANT_PREVIOUS_LINE = 1245,
136
137 // 1=on 0=off (set in fnAddHuman and fnNoHuman)
138 MOUSE_AVAILABLE = 686,
139
140 // used in fnChoose
141 AUTO_SELECTED = 1115,
142
143 // see fnStartConversation and fnChooser
144 CHOOSER_COUNT_FLAG = 15,
145
146 // signifies a demo mode
147 DEMO = 1153,
148
149 // Indicates to script whether this is the Playstation version.
150 // PSXFLAG = 1173,
151
152 // for the poor PSX so it knows what language is running.
153 // GAME_LANGUAGE = 111,
154
155 // 1 = dead
156 DEAD = 1256,
157
158 // If set indicates that the speech anim is to run through only once.
159 SPEECHANIMFLAG = 1278,
160
161 // for the engine
162 SCROLL_OFFSET_X = 1314
163};
164
165// Resource IDs
166
167enum {
168 // mouse mointers - It's pretty much safe to do it like this
169 NORMAL_MOUSE_ID = 17,
170 SCROLL_LEFT_MOUSE_ID = 1440,
171 SCROLL_RIGHT_MOUSE_ID = 1441,
172
173 // Console Font - does not use game text - only English required
174 CONSOLE_FONT_ID = 340,
175
176 // Speech Font
177 ENGLISH_SPEECH_FONT_ID = 341,
178 FINNISH_SPEECH_FONT_ID = 956,
179 POLISH_SPEECH_FONT_ID = 955,
180
181 // Control Panel Font (and un-selected savegame descriptions)
182 ENGLISH_CONTROLS_FONT_ID = 2005,
183 FINNISH_CONTROLS_FONT_ID = 959,
184 POLISH_CONTROLS_FONT_ID = 3686,
185
186 // Red Font (for selected savegame descriptions)
187 // BS2 doesn't draw selected savegames in red, so I guess this is a
188 // left-over from BS1
189 ENGLISH_RED_FONT_ID = 2005, // 1998 // Redfont
190 FINNISH_RED_FONT_ID = 959, // 960 // FinRedFn
191 POLISH_RED_FONT_ID = 3686, // 3688 // PolRedFn
192
193 // Control panel palette resource id
194 CONTROL_PANEL_PALETTE = 261,
195
196 // res id's of the system menu icons
197 OPTIONS_ICON = 344,
198 QUIT_ICON = 335,
199 SAVE_ICON = 366,
200 RESTORE_ICON = 364,
201 RESTART_ICON = 342,
202
203 // conversation exit icon, 'EXIT' menu icon (used in fnChoose)
204 EXIT_ICON = 65
205};
206
207#endif