Initial commit
This commit is contained in:
146
engines/tinsel/multiobj.h
Normal file
146
engines/tinsel/multiobj.h
Normal file
@@ -0,0 +1,146 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Multi-part object definitions
|
||||
*/
|
||||
|
||||
#ifndef TINSEL_MULTIOBJ_H // prevent multiple includes
|
||||
#define TINSEL_MULTIOBJ_H
|
||||
|
||||
#include "tinsel/dw.h"
|
||||
#include "tinsel/object.h"
|
||||
|
||||
namespace Tinsel {
|
||||
|
||||
struct OBJECT;
|
||||
|
||||
#include "common/pack-start.h" // START STRUCT PACKING
|
||||
|
||||
/**
|
||||
* multi-object initialisation structure (parallels OBJ_INIT struct)
|
||||
*/
|
||||
struct MULTI_INIT {
|
||||
SCNHANDLE hMulFrame; ///< multi-objects shape - NULL terminated list of IMAGE structures
|
||||
int32 mulFlags; ///< multi-objects flags
|
||||
int32 mulID; ///< multi-objects id
|
||||
int32 mulX; ///< multi-objects initial x ani position
|
||||
int32 mulY; ///< multi-objects initial y ani position
|
||||
int32 mulZ; ///< multi-objects initial z position
|
||||
uint32 otherFlags; ///< multi-objects Tinsel 2 - other flags
|
||||
|
||||
const FRAME *GetFrame() const;
|
||||
} PACKED_STRUCT;
|
||||
|
||||
#include "common/pack-end.h" // END STRUCT PACKING
|
||||
|
||||
/*----------------------------------------------------------------------*\
|
||||
|* Multi Object Function Prototypes *|
|
||||
\*----------------------------------------------------------------------*/
|
||||
|
||||
OBJECT *MultiInitObject( // Initialize a multi-part object
|
||||
const MULTI_INIT *pInitTbl); // pointer to multi-object initialisation table
|
||||
|
||||
void MultiInsertObject( // Insert a multi-part object onto a object list
|
||||
OBJECT **pObjList, // list to insert multi-part object onto
|
||||
OBJECT *pInsObj); // head of multi-part object to insert
|
||||
|
||||
void MultiDeleteObject( // Delete all the pieces of a multi-part object
|
||||
OBJECT **pObjList, // list to delete multi-part object from
|
||||
OBJECT *pMultiObj); // multi-part object to be deleted
|
||||
|
||||
void MultiDeleteObjectIfExists( // Delete all the pieces of a multi-part object (if it exists)
|
||||
unsigned int playfield, // playfield to delete the objects from
|
||||
OBJECT **pMultiObj); // multi-part object to be deleted
|
||||
|
||||
void MultiHideObject( // Hide a multi-part object
|
||||
OBJECT *pMultiObj); // multi-part object to be hidden
|
||||
|
||||
void MultiHorizontalFlip( // Hortizontally flip a multi-part object
|
||||
OBJECT *pFlipObj); // head of multi-part object to flip
|
||||
|
||||
void MultiVerticalFlip( // Vertically flip a multi-part object
|
||||
OBJECT *pFlipObj); // head of multi-part object to flip
|
||||
|
||||
void MultiAdjustXY( // Adjust coords of a multi-part object. Takes into account the orientation
|
||||
OBJECT *pMultiObj, // multi-part object to be adjusted
|
||||
int deltaX, // x adjustment
|
||||
int deltaY); // y adjustment
|
||||
|
||||
void MultiMoveRelXY( // Move multi-part object relative. Does not take into account the orientation
|
||||
OBJECT *pMultiObj, // multi-part object to be moved
|
||||
int deltaX, // x movement
|
||||
int deltaY); // y movement
|
||||
|
||||
void MultiSetAniXY( // Set the x & y anim position of a multi-part object
|
||||
OBJECT *pMultiObj, // multi-part object whose position is to be changed
|
||||
int newAniX, // new x animation position
|
||||
int newAniY); // new y animation position
|
||||
|
||||
void MultiSetAniXYZ( // Set the x & y anim position of a multi-part object
|
||||
OBJECT *pMultiObj, // multi-part object whose position is to be changed
|
||||
int newAniX, // new x animation position
|
||||
int newAniY, // new y animation position
|
||||
int zPosition); // new Z order
|
||||
|
||||
void MultiSetAniX( // Set the x anim position of a multi-part object
|
||||
OBJECT *pMultiObj, // multi-part object whose x position is to be changed
|
||||
int newAniX); // new x animation position
|
||||
|
||||
void MultiSetAniY( // Set the y anim position of a multi-part object
|
||||
OBJECT *pMultiObj, // multi-part object whose y position is to be adjusted
|
||||
int newAniY); // new y animation position
|
||||
|
||||
void MultiSetZPosition( // Sets the z position of a multi-part object
|
||||
OBJECT *pMultiObj, // multi-part object to be adjusted
|
||||
int newZ); // new Z order
|
||||
|
||||
void MultiReshape( // Reshape a multi-part object
|
||||
OBJECT *pMultiObj); // multi-part object to re-shape
|
||||
|
||||
Common::Rect MultiBounds( // Returns the bounds of a multi-part object
|
||||
OBJECT *pMulti); // multi-part object
|
||||
|
||||
int MultiLeftmost( // Returns the left-most point of a multi-part object
|
||||
OBJECT *pMulti); // multi-part object
|
||||
|
||||
int MultiRightmost( // Returns the right-most point of a multi-part object
|
||||
OBJECT *pMulti); // multi-part object
|
||||
|
||||
int MultiHighest( // Returns the highest point of a multi-part object
|
||||
OBJECT *pMulti); // multi-part object
|
||||
|
||||
int MultiLowest( // Returns the lowest point of a multi-part object
|
||||
OBJECT *pMulti); // multi-part object
|
||||
|
||||
bool MultiHasShape( // Returns TRUE if the object currently has an image
|
||||
OBJECT *pMulti); // multi-part object
|
||||
|
||||
void MultiForceRedraw(
|
||||
OBJECT *pMultiObj); // multi-part object to be forced
|
||||
|
||||
struct FREEL;
|
||||
OBJECT *InsertReelObj(const FREEL *reels);
|
||||
struct FILM;
|
||||
enum class SysReel;
|
||||
const FILM *GetSystemReelFilm(SysReel reelIndex);
|
||||
OBJECT *InsertSystemReelObj(SysReel reelIndex);
|
||||
|
||||
} // End of namespace Tinsel
|
||||
|
||||
#endif // TINSEL_MULTIOBJ_H
|
||||
Reference in New Issue
Block a user