2008-07-23 09:02:47 +00:00
|
|
|
/* 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 2
|
|
|
|
* 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, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* Prototypes of actor functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TINSEL_ACTOR_H // prevent multiple includes
|
|
|
|
#define TINSEL_ACTOR_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "tinsel/dw.h" // for SCNHANDLE
|
2008-12-01 20:35:36 +00:00
|
|
|
#include "tinsel/events.h" // for TINSEL_EVENT
|
2008-07-23 09:02:47 +00:00
|
|
|
#include "tinsel/palette.h" // for COLORREF
|
|
|
|
|
|
|
|
namespace Tinsel {
|
|
|
|
|
|
|
|
struct FREEL;
|
|
|
|
struct INT_CONTEXT;
|
2008-12-01 20:35:36 +00:00
|
|
|
struct MOVER;
|
2008-07-23 09:02:47 +00:00
|
|
|
struct OBJECT;
|
|
|
|
|
2008-12-01 20:35:36 +00:00
|
|
|
#define ACTORTAG_KEY 0x1000000
|
|
|
|
|
|
|
|
#define OTH_RELATEDACTOR 0x00000fff
|
|
|
|
#define OTH_RELATIVE 0x00001000
|
|
|
|
#define OTH_ABSOLUTE 0x00002000
|
2008-07-23 09:02:47 +00:00
|
|
|
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
void RegisterActors(int num);
|
2009-11-02 21:54:57 +00:00
|
|
|
void FreeActors();
|
2008-12-01 20:35:36 +00:00
|
|
|
void SetLeadId(int rid);
|
2009-11-02 21:54:57 +00:00
|
|
|
int GetLeadId();
|
2008-12-01 20:35:36 +00:00
|
|
|
bool ActorIsGhost(int actor);
|
|
|
|
void StartTaggedActors(SCNHANDLE ah, int numActors, bool bRunScript);
|
2009-11-02 21:54:57 +00:00
|
|
|
void DropActors(); // No actor reels running
|
2008-07-23 09:02:47 +00:00
|
|
|
void DisableActor(int actor);
|
|
|
|
void EnableActor(int actor);
|
|
|
|
void Tag_Actor(int ano, SCNHANDLE tagtext, int tp);
|
|
|
|
void UnTagActor(int ano);
|
|
|
|
void ReTagActor(int ano);
|
|
|
|
int TagType(int ano);
|
|
|
|
bool actorAlive(int ano);
|
|
|
|
int32 actorMaskType(int ano);
|
|
|
|
void GetActorPos(int ano, int *x, int *y);
|
|
|
|
void SetActorPos(int ano, int x, int y);
|
|
|
|
void GetActorMidTop(int ano, int *x, int *y);
|
|
|
|
int GetActorLeft(int ano);
|
|
|
|
int GetActorRight(int ano);
|
|
|
|
int GetActorTop(int ano);
|
|
|
|
int GetActorBottom(int ano);
|
2008-12-01 20:35:36 +00:00
|
|
|
void ShowActor(CORO_PARAM, int ano);
|
|
|
|
void HideActor(CORO_PARAM, int ano);
|
|
|
|
bool ActorHidden(int ano);
|
2008-07-23 09:02:47 +00:00
|
|
|
bool HideMovingActor(int id, int sf);
|
|
|
|
void unHideMovingActor(int id);
|
|
|
|
void restoreMovement(int id);
|
2008-12-01 20:35:36 +00:00
|
|
|
void storeActorReel(int ano, const FREEL *reel, SCNHANDLE hFilm, OBJECT *pobj, int reelnum, int x, int y);
|
2008-07-23 09:02:47 +00:00
|
|
|
const FREEL *actorReel(int ano);
|
|
|
|
SCNHANDLE actorFilm(int ano);
|
|
|
|
|
2008-12-01 20:35:36 +00:00
|
|
|
void SetActorPlayFilm(int ano, SCNHANDLE hFilm);
|
|
|
|
SCNHANDLE GetActorPlayFilm(int ano);
|
|
|
|
void SetActorTalkFilm(int ano, SCNHANDLE hFilm);
|
|
|
|
SCNHANDLE GetActorTalkFilm(int ano);
|
|
|
|
void SetActorTalking(int ano, bool tf);
|
|
|
|
bool ActorIsTalking(int ano);
|
|
|
|
void SetActorLatestFilm(int ano, SCNHANDLE hFilm);
|
|
|
|
SCNHANDLE GetActorLatestFilm(int ano);
|
|
|
|
|
|
|
|
void UpdateActorEsc(int ano, bool escOn, int escEvent);
|
|
|
|
void UpdateActorEsc(int ano, int escEvent);
|
|
|
|
bool ActorEsc(int ano);
|
|
|
|
int ActorEev(int ano);
|
|
|
|
void StoreActorPos(int ano, int x, int y);
|
|
|
|
void StoreActorSteps(int ano, int steps);
|
|
|
|
int GetActorSteps(int ano);
|
|
|
|
void StoreActorZpos(int ano, int z, int column = -1);
|
|
|
|
int GetActorZpos(int ano, int column);
|
|
|
|
void IncLoopCount(int ano);
|
|
|
|
int GetLoopCount(int ano);
|
2008-07-23 09:02:47 +00:00
|
|
|
SCNHANDLE GetActorTag(int ano);
|
2009-11-02 21:54:57 +00:00
|
|
|
void FirstTaggedActor();
|
|
|
|
int NextTaggedActor();
|
2008-12-01 20:35:36 +00:00
|
|
|
int NextTaggedActor(int previous);
|
2008-07-23 09:02:47 +00:00
|
|
|
int AsetZPos(OBJECT *pObj, int y, int32 zFactor);
|
2008-12-01 20:35:36 +00:00
|
|
|
void SetMoverZ(MOVER *pMover, int y, int32 zFactor);
|
|
|
|
void ActorEvent(int ano, TINSEL_EVENT event, PLR_EVENT be);
|
2008-07-23 09:02:47 +00:00
|
|
|
|
|
|
|
void storeActorAttr(int ano, int r1, int g1, int b1);
|
2008-12-01 20:35:36 +00:00
|
|
|
COLORREF GetActorRGB(int ano);
|
2011-04-14 12:12:27 +00:00
|
|
|
void SetActorRGB(int ano, COLORREF color);
|
2008-12-01 20:35:36 +00:00
|
|
|
void SetActorZfactor(int ano, uint32 zFactor);
|
|
|
|
uint32 GetActorZfactor(int ano);
|
2008-07-23 09:02:47 +00:00
|
|
|
|
2009-11-02 21:54:57 +00:00
|
|
|
void setactorson();
|
2008-07-23 09:02:47 +00:00
|
|
|
|
|
|
|
void ActorsLife(int id, bool bAlive);
|
|
|
|
|
2008-12-01 20:35:36 +00:00
|
|
|
void dwEndActor(int ano);
|
|
|
|
|
|
|
|
void ActorEvent(CORO_PARAM, int ano, TINSEL_EVENT tEvent, bool bWait, int myEscape, bool *result = NULL);
|
|
|
|
|
|
|
|
void GetActorTagPortion(int ano, unsigned *top, unsigned *bottom, unsigned *left, unsigned *right);
|
|
|
|
SCNHANDLE GetActorTagHandle(int ano);
|
|
|
|
void SetActorPointedTo(int actor, bool bPointedTo);
|
|
|
|
bool ActorIsPointedTo(int actor);
|
|
|
|
void SetActorTagWanted(int actor, bool bTagWanted, bool bCursor, SCNHANDLE hOverrideTag);
|
|
|
|
bool ActorTagIsWanted(int actor);
|
|
|
|
bool InHotSpot(int ano, int curX, int curY);
|
2009-11-02 21:54:57 +00:00
|
|
|
int FrontTaggedActor();
|
2008-12-01 20:35:36 +00:00
|
|
|
void GetActorTagPos(int actor, int *pTagX, int *pTagY, bool bAbsolute);
|
|
|
|
bool IsTaggedActor(int actor);
|
|
|
|
void StoreActorPresFilm(int ano, SCNHANDLE hFilm, int x, int y);
|
|
|
|
SCNHANDLE GetActorPresFilm(int ano);
|
|
|
|
int GetActorFilmNumber(int ano);
|
|
|
|
void StoreActorReel(int actor, int column, OBJECT *pObj);
|
|
|
|
void NotPlayingReel(int actor, int filmNumber, int column);
|
|
|
|
bool ActorReelPlaying(int actor, int column);
|
|
|
|
|
2008-07-23 09:02:47 +00:00
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
struct SAVED_ACTOR {
|
|
|
|
short actorID;
|
2008-12-01 20:35:36 +00:00
|
|
|
short zFactor;
|
2008-07-23 09:02:47 +00:00
|
|
|
bool bAlive;
|
2008-12-01 20:35:36 +00:00
|
|
|
bool bHidden;
|
2009-10-08 21:28:57 +00:00
|
|
|
SCNHANDLE presFilm; ///< the film that reel belongs to
|
|
|
|
short presRnum; ///< the present reel number
|
2008-12-01 20:35:36 +00:00
|
|
|
short presPlayX, presPlayY;
|
|
|
|
};
|
|
|
|
typedef SAVED_ACTOR *PSAVED_ACTOR;
|
|
|
|
|
|
|
|
#define NUM_ZPOSITIONS 200 // Reasonable-sounding number
|
|
|
|
|
|
|
|
struct Z_POSITIONS {
|
|
|
|
short actor;
|
|
|
|
short column;
|
|
|
|
int z;
|
2008-07-23 09:02:47 +00:00
|
|
|
};
|
|
|
|
|
2011-10-20 09:36:37 +00:00
|
|
|
void RestoreActorProcess(int id, INT_CONTEXT *pic, bool savegameFlag);
|
2008-07-23 09:02:47 +00:00
|
|
|
|
2008-12-01 20:35:36 +00:00
|
|
|
int SaveActors(PSAVED_ACTOR sActorInfo);
|
|
|
|
void RestoreActors(int numActors, PSAVED_ACTOR sActorInfo);
|
|
|
|
|
|
|
|
void SaveZpositions(void *zpp);
|
|
|
|
void RestoreZpositions(void *zpp);
|
|
|
|
|
|
|
|
void SaveActorZ(byte *saveActorZ);
|
|
|
|
void RestoreActorZ(byte *saveActorZ);
|
2008-07-23 09:02:47 +00:00
|
|
|
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
|
2009-10-04 21:26:33 +00:00
|
|
|
} // End of namespace Tinsel
|
2008-07-23 09:02:47 +00:00
|
|
|
|
|
|
|
#endif /* TINSEL_ACTOR_H */
|