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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef TINSEL_DW_H
24 #define TINSEL_DW_H
25 
26 #include "common/scummsys.h"
27 #include "common/endian.h"
28 
29 namespace Tinsel {
30 
31 /** scene handle data type */
32 typedef uint32		SCNHANDLE;
33 
34 /** polygon handle */
35 typedef int HPOLYGON;
36 
37 
38 #define	EOS_CHAR		'\0'		// string terminator
39 #define	LF_CHAR			'\x0a'		// line feed
40 
41 // file names
42 #define	MIDI_FILE		"midi.dat"	// all MIDI sequences
43 #define	INDEX_FILENAME		"index"		// name of index file
44 #define PSX_INDEX_FILENAME	"index.dat" // name of index file in psx version
45 
46 #define	NO_SCNHANDLES		300		// number of memory handles for scenes
47 #define	MASTER_SCNHANDLE	0		// master scene memory handle
48 
49 // the minimum value a integer number can have
50 #define	MIN_INT   (1 << (8*sizeof(int) - 1))
51 #define	MIN_INT16 (-32767)
52 
53 // the maximum value a integer number can have
54 #define	MAX_INT	(~MIN_INT)
55 
56 // inventory object handle (if there are inventory objects)
57 #define	INV_OBJ_SCNHANDLE (TinselV0 ? (2 << SCNHANDLE_SHIFT) : (1 << SCNHANDLE_SHIFT))
58 
59 #define FIELD_WORLD	0
60 #define FIELD_STATUS	1
61 
62 #define ZSHIFT 10
63 
64 // We don't set the Z position for print and talk text
65 // i.e. it gets a Z position of 0
66 
67 #define Z_INV_BRECT	10	// Inventory background rectangle
68 #define Z_INV_MFRAME	15	// Inventory window frame
69 #define Z_INV_HTEXT	15	// Inventory heading text
70 #define Z_INV_ICONS	16	// Icons in inventory
71 #define Z_INV_ITEXT	995	// Icon text
72 
73 #define Z_INV_RFRAME	22	// Re-sizing frame
74 
75 #define Z_CURSOR	1000	// Cursor
76 #define Z_CURSORTRAIL	999	// Cursor trails
77 #define Z_ACURSOR	990	// Auxillary cursor
78 
79 #define Z_TAG_TEXT	995	// In front of auxillary cursor
80 
81 #define Z_MDGROOVE	20
82 #define Z_MDSLIDER	21
83 
84 #define Z_TOPPLAY	100
85 
86 #define Z_TOPW_TEXT	Z_TAG_TEXT
87 
88 // Started a collection of assorted maximum numbers here:
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
101 enum 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
118