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