ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 
29 namespace Tinsel {
30 
31 struct OBJECT;
32 
33 #include "common/pack-start.h" // START STRUCT PACKING
34 
38 struct 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 
56 OBJECT *MultiInitObject( // Initialize a multi-part object
57  const MULTI_INIT *pInitTbl); // pointer to multi-object initialisation table
58 
59 void 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 
63 void 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 
67 void 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 
71 void MultiHideObject( // Hide a multi-part object
72  OBJECT *pMultiObj); // multi-part object to be hidden
73 
74 void MultiHorizontalFlip( // Hortizontally flip a multi-part object
75  OBJECT *pFlipObj); // head of multi-part object to flip
76 
77 void MultiVerticalFlip( // Vertically flip a multi-part object
78  OBJECT *pFlipObj); // head of multi-part object to flip
79 
80 void 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 
85 void 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 
90 void 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 
95 void 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 
101 void 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 
105 void 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 
109 void 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 
113 void MultiReshape( // Reshape a multi-part object
114  OBJECT *pMultiObj); // multi-part object to re-shape
115 
116 Common::Rect MultiBounds( // Returns the bounds of a multi-part object
117  OBJECT *pMulti); // multi-part object
118 
119 int MultiLeftmost( // Returns the left-most point of a multi-part object
120  OBJECT *pMulti); // multi-part object
121 
122 int MultiRightmost( // Returns the right-most point of a multi-part object
123  OBJECT *pMulti); // multi-part object
124 
125 int MultiHighest( // Returns the highest point of a multi-part object
126  OBJECT *pMulti); // multi-part object
127 
128 int MultiLowest( // Returns the lowest point of a multi-part object
129  OBJECT *pMulti); // multi-part object
130 
131 bool MultiHasShape( // Returns TRUE if the object currently has an image
132  OBJECT *pMulti); // multi-part object
133 
134 void MultiForceRedraw(
135  OBJECT *pMultiObj); // multi-part object to be forced
136 
137 struct FREEL;
138 OBJECT *InsertReelObj(const FREEL *reels);
139 struct FILM;
140 enum class SysReel;
141 const FILM *GetSystemReelFilm(SysReel reelIndex);
142 OBJECT *InsertSystemReelObj(SysReel reelIndex);
143 
144 } // End of namespace Tinsel
145 
146 #endif // TINSEL_MULTIOBJ_H
int32 mulZ
multi-objects initial z position
Definition: multiobj.h:44
uint32 SCNHANDLE
Definition: dw.h:31
int32 mulFlags
multi-objects flags
Definition: multiobj.h:40
Definition: rect.h:144
uint32 otherFlags
multi-objects Tinsel 2 - other flags
Definition: multiobj.h:45
int32 mulID
multi-objects id
Definition: multiobj.h:41
Definition: object.h:74
uint32 FRAME
Definition: object.h:71
Definition: actors.h:36
int32 mulX
multi-objects initial x ani position
Definition: multiobj.h:42
Definition: film.h:32
Definition: film.h:40
Definition: multiobj.h:38
SCNHANDLE hMulFrame
multi-objects shape - NULL terminated list of IMAGE structures
Definition: multiobj.h:39
int32 mulY
multi-objects initial y ani position
Definition: multiobj.h:43