ScummVM API documentation
dw.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 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef TINSEL_DW_H
23#define TINSEL_DW_H
24
25#include "common/scummsys.h"
26#include "common/endian.h"
27
28namespace Tinsel {
29
31typedef uint32 SCNHANDLE;
32
34typedef int HPOLYGON;
35
36
37#define EOS_CHAR '\0' // string terminator
38#define LF_CHAR '\x0a' // line feed
39
40// file names
41#define MIDI_FILE "midi.dat" // all MIDI sequences
42#define INDEX_FILENAME "index" // name of index file
43#define PSX_INDEX_FILENAME "index.dat" // name of index file in psx version
44
45#define NO_SCNHANDLES 300 // number of memory handles for scenes
46#define MASTER_SCNHANDLE 0 // master scene memory handle
47
48// the minimum value a integer number can have
49#define MIN_INT (1 << (8*sizeof(int) - 1))
50#define MIN_INT16 (-32767)
51
52// the maximum value a integer number can have
53#define MAX_INT (~MIN_INT)
54
55// inventory object handle (if there are inventory objects)
56#define INV_OBJ_SCNHANDLE ((TinselVersion == 0) ? (2 << SCNHANDLE_SHIFT) : (1 << SCNHANDLE_SHIFT))
57
58#define FIELD_WORLD ((TinselVersion == 3) ? 2 : 0)
59#define FIELD_STATUS ((TinselVersion == 3) ? 8 : 1)
60
61#define ZSHIFT 10
62
63// We don't set the Z position for print and talk text
64// i.e. it gets a Z position of 0
65
66#define Z_INV_BRECT 10 // Inventory background rectangle
67#define Z_INV_MFRAME ((TinselVersion == 3) ? 16 : 15) // Inventory window frame
68#define Z_INV_HTEXT 15 // Inventory heading text
69#define Z_INV_ICONS 16 // Icons in inventory
70#define Z_INV_ITEXT 995 // Icon text
71
72#define Z_INV_RFRAME 22 // Re-sizing frame
73
74#define Z_CURSOR 1000 // Cursor
75#define Z_CURSORTRAIL 999 // Cursor trails
76#define Z_ACURSOR 990 // Auxillary cursor
77
78#define Z_TAG_TEXT 995 // In front of auxiliary cursor
79
80#define Z_MDGROOVE 20
81#define Z_MDSLIDER 21
82
83#define Z_TOPPLAY 100
84
85#define Z_TOPW_TEXT Z_TAG_TEXT
86
87// Started a collection of assorted maximum numbers here:
88// TODO: Noir only has two movers - deal with that
89#define MAX_MOVERS 6 // Moving actors using path system
90#define MAX_SAVED_ACTORS 32 // Saved 'Normal' actors
91#define MAX_SAVED_ALIVES 512 // Saves actors'lives
92#define MAX_SAVED_ACTOR_Z 512 // Saves actors' Z-ness
93
94// Legal non-existent entrance number for LoadScene()
95#define NO_ENTRY_NUM (-3458) // Magic unlikely number
96
97
98#define SAMPLETIMEOUT (20*ONE_SECOND)
99
100// Language for the resource strings
101enum LANGUAGE {
102 TXT_ENGLISH, TXT_FRENCH, TXT_GERMAN, TXT_ITALIAN, TXT_SPANISH,
103 TXT_HEBREW, TXT_HUNGARIAN, TXT_JAPANESE, TXT_US,
104 NUM_LANGUAGES
105};
106
107#define MAX_READ_RETRIES 5
108
109// Definitions used for error messages
110#define FILE_IS_CORRUPT "File %s is corrupt"
111#define FILE_READ_ERROR "Error reading file %s"
112#define CANNOT_FIND_FILE "Cannot find file %s"
113#define NO_MEM "Cannot allocate memory for %s!"
114
115} // End of namespace Tinsel
116
117#endif // TINSEL_DW_H
Definition: actors.h:36
uint32 SCNHANDLE
Definition: dw.h:31
int HPOLYGON
Definition: dw.h:34