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 * Multi-part object definitions 22 */ 23 24 #ifndef TINSEL_MULTIOBJ_H // prevent multiple includes 25 #define TINSEL_MULTIOBJ_H 26 27 #include "tinsel/dw.h" 28 #include "tinsel/object.h" 29 30 namespace Tinsel { 31 32 struct OBJECT; 33 34 #include "common/pack-start.h" // START STRUCT PACKING 35 36 /** 37 * multi-object initialisation structure (parallels OBJ_INIT struct) 38 */ 39 struct MULTI_INIT { 40 SCNHANDLE hMulFrame; ///< multi-objects shape - NULL terminated list of IMAGE structures 41 int32 mulFlags; ///< multi-objects flags 42 int32 mulID; ///< multi-objects id 43 int32 mulX; ///< multi-objects initial x ani position 44 int32 mulY; ///< multi-objects initial y ani position 45 int32 mulZ; ///< multi-objects initial z position 46 uint32 otherFlags; ///< multi-objects Tinsel 2 - other flags 47 } PACKED_STRUCT; 48 typedef MULTI_INIT *PMULTI_INIT; 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 MultiHideObject( // Hide a multi-part object 68 OBJECT *pMultiObj); // multi-part object to be hidden 69 70 void MultiHorizontalFlip( // Hortizontally flip a multi-part object 71 OBJECT *pFlipObj); // head of multi-part object to flip 72 73 void MultiVerticalFlip( // Vertically flip a multi-part object 74 OBJECT *pFlipObj); // head of multi-part object to flip 75 76 void MultiAdjustXY( // Adjust coords of a multi-part object. Takes into account the orientation 77 OBJECT *pMultiObj, // multi-part object to be adjusted 78 int deltaX, // x adjustment 79 int deltaY); // y adjustment 80 81 void MultiMoveRelXY( // Move multi-part object relative. Does not take into account the orientation 82 OBJECT *pMultiObj, // multi-part object to be moved 83 int deltaX, // x movement 84 int deltaY); // y movement 85 86 void MultiSetAniXY( // Set the x & y anim position of a multi-part object 87 OBJECT *pMultiObj, // multi-part object whose position is to be changed 88 int newAniX, // new x animation position 89 int newAniY); // new y animation position 90 91 void MultiSetAniX( // Set the x anim position of a multi-part object 92 OBJECT *pMultiObj, // multi-part object whose x position is to be changed 93 int newAniX); // new x animation position 94 95 void MultiSetAniY( // Set the y anim position of a multi-part object 96 OBJECT *pMultiObj, // multi-part object whose y position is to be adjusted 97 int newAniY); // new y animation position 98 99 void MultiSetZPosition( // Sets the z position of a multi-part object 100 OBJECT *pMultiObj, // multi-part object to be adjusted 101 int newZ); // new Z order 102 103 void MultiMatchAniPoints( // Matches a multi-parts pos and orientation to be the same as a reference object 104 OBJECT *pMoveObj, // multi-part object to be moved 105 OBJECT *pRefObj); // multi-part object to match with 106 107 void MultiReshape( // Reshape a multi-part object 108 OBJECT *pMultiObj); // multi-part object to re-shape 109 110 int MultiLeftmost( // Returns the left-most point of a multi-part object 111 OBJECT *pMulti); // multi-part object 112 113 int MultiRightmost( // Returns the right-most point of a multi-part object 114 OBJECT *pMulti); // multi-part object 115 116 int MultiHighest( // Returns the highest point of a multi-part object 117 OBJECT *pMulti); // multi-part object 118 119 int MultiLowest( // Returns the lowest point of a multi-part object 120 OBJECT *pMulti); // multi-part object 121 122 bool MultiHasShape( // Returns TRUE if the object currently has an image 123 POBJECT pMulti); // multi-part object 124 125 void MultiForceRedraw( 126 POBJECT pMultiObj); // multi-part object to be forced 127 128 } // End of namespace Tinsel 129 130 #endif // TINSEL_MULTIOBJ_H 131