ScummVM API documentation
multiobj.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 * Multi-part object definitions
21 */
22
23#ifndef TINSEL_MULTIOBJ_H // prevent multiple includes
24#define TINSEL_MULTIOBJ_H
25
26#include "tinsel/dw.h"
27#include "tinsel/object.h"
28
29namespace Tinsel {
30
31struct OBJECT;
32
33#include "common/pack-start.h" // START STRUCT PACKING
34
38struct MULTI_INIT {
40 int32 mulFlags;
41 int32 mulID;
42 int32 mulX;
43 int32 mulY;
44 int32 mulZ;
45 uint32 otherFlags;
46
47 const FRAME *GetFrame() const;
48} PACKED_STRUCT;
49
50#include "common/pack-end.h" // END STRUCT PACKING
51
52/*----------------------------------------------------------------------*\
53|* Multi Object Function Prototypes *|
54\*----------------------------------------------------------------------*/
55
56OBJECT *MultiInitObject( // Initialize a multi-part object
57 const MULTI_INIT *pInitTbl); // pointer to multi-object initialisation table
58
59void MultiInsertObject( // Insert a multi-part object onto a object list
60 OBJECT **pObjList, // list to insert multi-part object onto
61 OBJECT *pInsObj); // head of multi-part object to insert
62
63void MultiDeleteObject( // Delete all the pieces of a multi-part object
64 OBJECT **pObjList, // list to delete multi-part object from
65 OBJECT *pMultiObj); // multi-part object to be deleted
66
67void MultiDeleteObjectIfExists( // Delete all the pieces of a multi-part object (if it exists)
68 unsigned int playfield, // playfield to delete the objects from
69 OBJECT **pMultiObj); // multi-part object to be deleted
70
71void MultiHideObject( // Hide a multi-part object
72 OBJECT *pMultiObj); // multi-part object to be hidden
73
74void MultiHorizontalFlip( // Hortizontally flip a multi-part object
75 OBJECT *pFlipObj); // head of multi-part object to flip
76
77void MultiVerticalFlip( // Vertically flip a multi-part object
78 OBJECT *pFlipObj); // head of multi-part object to flip
79
80void MultiAdjustXY( // Adjust coords of a multi-part object. Takes into account the orientation
81 OBJECT *pMultiObj, // multi-part object to be adjusted
82 int deltaX, // x adjustment
83 int deltaY); // y adjustment
84
85void MultiMoveRelXY( // Move multi-part object relative. Does not take into account the orientation
86 OBJECT *pMultiObj, // multi-part object to be moved
87 int deltaX, // x movement
88 int deltaY); // y movement
89
90void MultiSetAniXY( // Set the x & y anim position of a multi-part object
91 OBJECT *pMultiObj, // multi-part object whose position is to be changed
92 int newAniX, // new x animation position
93 int newAniY); // new y animation position
94
95void MultiSetAniXYZ( // Set the x & y anim position of a multi-part object
96 OBJECT *pMultiObj, // multi-part object whose position is to be changed
97 int newAniX, // new x animation position
98 int newAniY, // new y animation position
99 int zPosition); // new Z order
100
101void MultiSetAniX( // Set the x anim position of a multi-part object
102 OBJECT *pMultiObj, // multi-part object whose x position is to be changed
103 int newAniX); // new x animation position
104
105void MultiSetAniY( // Set the y anim position of a multi-part object
106 OBJECT *pMultiObj, // multi-part object whose y position is to be adjusted
107 int newAniY); // new y animation position
108
109void MultiSetZPosition( // Sets the z position of a multi-part object
110 OBJECT *pMultiObj, // multi-part object to be adjusted
111 int newZ); // new Z order
112
113void MultiReshape( // Reshape a multi-part object
114 OBJECT *pMultiObj); // multi-part object to re-shape
115
116Common::Rect MultiBounds( // Returns the bounds of a multi-part object
117 OBJECT *pMulti); // multi-part object
118
119int MultiLeftmost( // Returns the left-most point of a multi-part object
120 OBJECT *pMulti); // multi-part object
121
122int MultiRightmost( // Returns the right-most point of a multi-part object
123 OBJECT *pMulti); // multi-part object
124
125int MultiHighest( // Returns the highest point of a multi-part object
126 OBJECT *pMulti); // multi-part object
127
128int MultiLowest( // Returns the lowest point of a multi-part object
129 OBJECT *pMulti); // multi-part object
130
131bool MultiHasShape( // Returns TRUE if the object currently has an image
132 OBJECT *pMulti); // multi-part object
133
134void MultiForceRedraw(
135 OBJECT *pMultiObj); // multi-part object to be forced
136
137struct FREEL;
138OBJECT *InsertReelObj(const FREEL *reels);
139struct FILM;
140enum class SysReel;
141const FILM *GetSystemReelFilm(SysReel reelIndex);
142OBJECT *InsertSystemReelObj(SysReel reelIndex);
143
144} // End of namespace Tinsel
145
146#endif // TINSEL_MULTIOBJ_H
Definition: actors.h:36
uint32 SCNHANDLE
Definition: dw.h:31
uint32 FRAME
Definition: object.h:71
Definition: rect.h:536
Definition: film.h:40
Definition: film.h:32
Definition: multiobj.h:38
int32 mulID
multi-objects id
Definition: multiobj.h:41
int32 mulZ
multi-objects initial z position
Definition: multiobj.h:44
int32 mulFlags
multi-objects flags
Definition: multiobj.h:40
int32 mulX
multi-objects initial x ani position
Definition: multiobj.h:42
uint32 otherFlags
multi-objects Tinsel 2 - other flags
Definition: multiobj.h:45
int32 mulY
multi-objects initial y ani position
Definition: multiobj.h:43
SCNHANDLE hMulFrame
multi-objects shape - NULL terminated list of IMAGE structures
Definition: multiobj.h:39
Definition: object.h:74