2012-04-29 23:27:12 +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.
|
|
|
|
*
|
|
|
|
*/
|
2012-05-14 05:43:50 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This code is based on original Tony Tough source code
|
|
|
|
*
|
|
|
|
* Copyright (c) 1997-2003 Nayma Software
|
|
|
|
*/
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
#ifndef TONY_TONYCHAR_H
|
|
|
|
#define TONY_TONYCHAR_H
|
|
|
|
|
2012-05-11 13:15:59 +00:00
|
|
|
#include "common/coroutines.h"
|
2012-04-30 13:16:19 +00:00
|
|
|
#include "tony/loc.h"
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
namespace Tony {
|
|
|
|
|
|
|
|
class RMTony : public RMCharacter {
|
|
|
|
private:
|
|
|
|
enum DIRECTION {
|
|
|
|
UP, DOWN, LEFT, RIGHT
|
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum TALKTYPE {
|
|
|
|
TALK_NORMAL,
|
|
|
|
TALK_FIANCHI,
|
|
|
|
TALK_CANTA,
|
|
|
|
TALK_RIDE,
|
|
|
|
TALK_SIINDICA,
|
2012-06-12 19:42:46 +00:00
|
|
|
TALK_SCARED,
|
|
|
|
TALK_SCARED2,
|
|
|
|
TALK_WITHGLASSES,
|
|
|
|
TALK_WITHHAMMER,
|
|
|
|
TALK_WITHWORM,
|
|
|
|
TALK_WITHROPE,
|
|
|
|
TALK_WITHRABBIT,
|
|
|
|
TALK_WITHRECIPE,
|
|
|
|
TALK_WITHCARDS,
|
|
|
|
TALK_WITHSNOWMAN,
|
|
|
|
TALK_WITHSNOWMANSTATIC,
|
|
|
|
TALK_WITHRABBITSTATIC,
|
|
|
|
TALK_WITHRECIPESTATIC,
|
|
|
|
TALK_WITHCARDSSTATIC,
|
2012-06-10 14:24:52 +00:00
|
|
|
TALK_WITH_NOTEBOOK,
|
2012-06-12 19:42:46 +00:00
|
|
|
TALK_WITHMEGAPHONESTATIC,
|
|
|
|
TALK_WITHBEARDSTATIC,
|
2012-04-29 23:27:12 +00:00
|
|
|
TALK_RIDE2,
|
|
|
|
TALK_SCHIFATO,
|
|
|
|
TALK_NAAH,
|
|
|
|
TALK_MACBETH1,
|
|
|
|
TALK_MACBETH2,
|
|
|
|
TALK_MACBETH3,
|
|
|
|
TALK_MACBETH4,
|
|
|
|
TALK_MACBETH5,
|
|
|
|
TALK_MACBETH6,
|
|
|
|
TALK_MACBETH7,
|
|
|
|
TALK_MACBETH8,
|
|
|
|
TALK_MACBETH9,
|
2012-06-12 19:42:46 +00:00
|
|
|
TALK_SCAREDSTATIC,
|
|
|
|
TALK_WITHSECRETARY
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2012-06-07 05:58:01 +00:00
|
|
|
bool _bShow;
|
|
|
|
bool _bShowOmbra;
|
|
|
|
bool _bCorpoDavanti;
|
|
|
|
RMGfxSourceBuffer8AB _ombra;
|
|
|
|
bool _bActionPending;
|
2012-06-11 19:43:04 +00:00
|
|
|
RMItem *_actionItem;
|
|
|
|
int _action;
|
|
|
|
int _actionParm;
|
2012-06-07 05:58:01 +00:00
|
|
|
static bool _bAction;
|
|
|
|
|
|
|
|
bool _bPastorella;
|
|
|
|
|
|
|
|
bool _bIsStaticTalk;
|
|
|
|
bool _bIsTalking;
|
|
|
|
int _nPatB4Talking;
|
|
|
|
TALKTYPE _nTalkType;
|
2012-06-11 19:43:04 +00:00
|
|
|
DIRECTION _talkDirection;
|
2012-06-07 05:58:01 +00:00
|
|
|
RMPoint _nBodyOffset;
|
|
|
|
|
|
|
|
int _nTimeLastStep;
|
|
|
|
|
|
|
|
RMItem _body;
|
2012-06-11 19:43:04 +00:00
|
|
|
uint32 _hActionThread;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
protected:
|
2012-05-20 03:54:59 +00:00
|
|
|
// Overload of the allocation allocation of sprites
|
2012-06-07 05:58:01 +00:00
|
|
|
virtual RMGfxSourceBuffer *newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Watch thread which waits for the end of an action
|
2012-06-07 05:58:01 +00:00
|
|
|
static void waitEndOfAction(CORO_PARAM, const void *param);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-21 21:53:13 +00:00
|
|
|
public:
|
2012-04-29 23:27:12 +00:00
|
|
|
enum PATTERNS {
|
|
|
|
PAT_TAKEUP_UP1 = 9,
|
|
|
|
PAT_TAKEUP_UP2,
|
|
|
|
PAT_TAKEUP_MID1,
|
|
|
|
PAT_TAKEUP_MID2,
|
|
|
|
PAT_TAKEUP_DOWN1,
|
|
|
|
PAT_TAKEUP_DOWN2,
|
2012-05-21 21:53:13 +00:00
|
|
|
|
2012-04-29 23:27:12 +00:00
|
|
|
PAT_TAKELEFT_UP1,
|
|
|
|
PAT_TAKELEFT_UP2,
|
|
|
|
PAT_TAKELEFT_MID1,
|
|
|
|
PAT_TAKELEFT_MID2,
|
|
|
|
PAT_TAKELEFT_DOWN1,
|
|
|
|
PAT_TAKELEFT_DOWN2,
|
|
|
|
|
|
|
|
PAT_TAKERIGHT_UP1,
|
|
|
|
PAT_TAKERIGHT_UP2,
|
|
|
|
PAT_TAKERIGHT_MID1,
|
|
|
|
PAT_TAKERIGHT_MID2,
|
|
|
|
PAT_TAKERIGHT_DOWN1,
|
|
|
|
PAT_TAKERIGHT_DOWN2,
|
|
|
|
|
|
|
|
PAT_SIRIALZALEFT,
|
|
|
|
PAT_PERTERRALEFT,
|
|
|
|
PAT_SIRIALZARIGHT,
|
|
|
|
PAT_PERTERRARIGHT,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Sheperdess!
|
2012-04-29 23:27:12 +00:00
|
|
|
PAT_PAST_WALKUP,
|
|
|
|
PAT_PAST_WALKDOWN,
|
|
|
|
PAT_PAST_WALKLEFT,
|
|
|
|
PAT_PAST_WALKRIGHT,
|
|
|
|
|
|
|
|
PAT_PAST_STANDUP,
|
|
|
|
PAT_PAST_STANDDOWN,
|
|
|
|
PAT_PAST_STANDLEFT,
|
|
|
|
PAT_PAST_STANDRIGHT,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Speech
|
2012-04-29 23:27:12 +00:00
|
|
|
PAT_TALK_UP,
|
|
|
|
PAT_TALK_DOWN,
|
|
|
|
PAT_TALK_LEFT,
|
|
|
|
PAT_TALK_RIGHT,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Static head
|
2012-04-29 23:27:12 +00:00
|
|
|
PAT_TESTA_UP,
|
|
|
|
PAT_TESTA_DOWN,
|
|
|
|
PAT_TESTA_LEFT,
|
|
|
|
PAT_TESTA_RIGHT,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Laugh
|
2012-04-29 23:27:12 +00:00
|
|
|
PAT_RIDELEFT_START,
|
|
|
|
PAT_RIDELEFT_LOOP,
|
|
|
|
PAT_RIDELEFT_END,
|
|
|
|
PAT_RIDERIGHT_START,
|
|
|
|
PAT_RIDERIGHT_LOOP,
|
|
|
|
PAT_RIDERIGHT_END,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Speaking as a shepherdess
|
2012-04-29 23:27:12 +00:00
|
|
|
PAT_PAST_TALKUP,
|
|
|
|
PAT_PAST_TALKDOWN,
|
|
|
|
PAT_PAST_TALKLEFT,
|
|
|
|
PAT_PAST_TALKRIGHT,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Fear
|
2012-06-12 19:42:46 +00:00
|
|
|
PAT_SCAREDLEFT_START,
|
|
|
|
PAT_SCAREDLEFT_LOOP,
|
|
|
|
PAT_SCAREDLEFT_END,
|
|
|
|
PAT_SCAREDRIGHT_START,
|
|
|
|
PAT_SCAREDRIGHT_LOOP,
|
|
|
|
PAT_SCAREDRIGHT_END,
|
|
|
|
PAT_SCAREDDOWN_START,
|
|
|
|
PAT_SCAREDDOWN_LOOP,
|
|
|
|
PAT_SCAREDDOWN_END,
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// With objects: full body
|
2012-06-12 19:42:46 +00:00
|
|
|
PAT_WITHGLASSES,
|
|
|
|
PAT_WITHROPE,
|
|
|
|
PAT_WITHWORM,
|
|
|
|
PAT_WITHHAMMER,
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Sound the whistle
|
2012-06-12 19:42:46 +00:00
|
|
|
PAT_WHISTLERIGHT,
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Head with beard
|
2012-06-12 19:42:46 +00:00
|
|
|
PAT_TALKBEARD_LEFT,
|
|
|
|
PAT_TALKBEARD_RIGHT,
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
// Sniff
|
|
|
|
PAT_SNIFFA_LEFT,
|
|
|
|
PAT_SNIFFA_RIGHT,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Disgusted
|
2012-04-29 23:27:12 +00:00
|
|
|
PAT_SCHIFATOLEFT_START,
|
|
|
|
PAT_SCHIFATOLEFT_LOOP,
|
|
|
|
PAT_SCHIFATOLEFT_END,
|
|
|
|
PAT_SCHIFATORIGHT_START,
|
|
|
|
PAT_SCHIFATORIGHT_LOOP,
|
|
|
|
PAT_SCHIFATORIGHT_END,
|
|
|
|
PAT_NAAHLEFT_START,
|
|
|
|
PAT_NAAHLEFT_LOOP,
|
|
|
|
PAT_NAAHLEFT_END,
|
|
|
|
PAT_NAAHRIGHT_START,
|
|
|
|
PAT_NAAHRIGHT_LOOP,
|
|
|
|
PAT_NAAHRIGHT_END,
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Stand scared
|
2012-06-12 19:42:46 +00:00
|
|
|
PAT_SCAREDLEFT_STAND,
|
|
|
|
PAT_SCAREDRIGHT_STAND,
|
|
|
|
PAT_SCAREDDOWN_STAND,
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
PAT_PUTLEFT_UP1,
|
|
|
|
PAT_PUTLEFT_UP2,
|
|
|
|
PAT_PUTRIGHT_UP1,
|
|
|
|
PAT_PUTRIGHT_UP2,
|
|
|
|
PAT_PUTLEFT_MID1,
|
|
|
|
PAT_PUTLEFT_MID2,
|
|
|
|
PAT_PUTRIGHT_MID1,
|
|
|
|
PAT_PUTRIGHT_MID2,
|
|
|
|
PAT_PUTLEFT_DOWN1,
|
|
|
|
PAT_PUTLEFT_DOWN2,
|
|
|
|
PAT_PUTRIGHT_DOWN1,
|
|
|
|
PAT_PUTRIGHT_DOWN2,
|
|
|
|
PAT_PUTUP_UP1,
|
|
|
|
PAT_PUTUP_UP2,
|
|
|
|
PAT_PUTUP_MID1,
|
|
|
|
PAT_PUTUP_MID2,
|
|
|
|
PAT_PUTUP_DOWN1,
|
|
|
|
PAT_PUTUP_DOWN2,
|
2012-05-21 21:53:13 +00:00
|
|
|
|
2012-06-12 19:42:46 +00:00
|
|
|
PAT_WITHSECRETARY
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum BODYPATTERNS {
|
|
|
|
BPAT_STANDUP = 1,
|
|
|
|
BPAT_STANDDOWN,
|
|
|
|
BPAT_STANDLEFT,
|
|
|
|
BPAT_STANDRIGHT,
|
|
|
|
|
2012-06-12 19:42:46 +00:00
|
|
|
BPAT_HAMMER,
|
|
|
|
BPAT_SNOWMAN,
|
|
|
|
BPAT_WORM,
|
|
|
|
BPAT_GLASS,
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
BPAT_CANTALEFT_START,
|
|
|
|
BPAT_CANTALEFT_LOOP,
|
|
|
|
BPAT_CANTALEFT_END,
|
|
|
|
|
|
|
|
BPAT_FIANCHILEFT_START,
|
|
|
|
BPAT_FIANCHILEFT_LOOP,
|
|
|
|
BPAT_FIANCHILEFT_END,
|
|
|
|
BPAT_FIANCHIRIGHT_START,
|
|
|
|
BPAT_FIANCHIRIGHT_LOOP,
|
|
|
|
BPAT_FIANCHIRIGHT_END,
|
|
|
|
BPAT_FIANCHIUP_START,
|
|
|
|
BPAT_FIANCHIUP_LOOP,
|
|
|
|
BPAT_FIANCHIUP_END,
|
|
|
|
BPAT_FIANCHIDOWN_START,
|
|
|
|
BPAT_FIANCHIDOWN_LOOP,
|
|
|
|
BPAT_FIANCHIDOWN_END,
|
|
|
|
|
|
|
|
BPAT_RIDELEFT,
|
|
|
|
BPAT_RIDERIGHT,
|
|
|
|
|
|
|
|
BPAT_SIINDICALEFT,
|
|
|
|
BPAT_SIINDICARIGHT,
|
|
|
|
|
2012-06-12 19:42:46 +00:00
|
|
|
BPAT_SCAREDDOWN_START,
|
|
|
|
BPAT_SCAREDDOWN_LOOP,
|
|
|
|
BPAT_SCAREDDOWN_END,
|
|
|
|
BPAT_SCAREDLEFT_START,
|
|
|
|
BPAT_SCAREDLEFT_LOOP,
|
|
|
|
BPAT_SCAREDLEFT_END,
|
|
|
|
BPAT_SCAREDRIGHT_START,
|
|
|
|
BPAT_SCAREDRIGHT_LOOP,
|
|
|
|
BPAT_SCAREDRIGHT_END,
|
|
|
|
BPAT_SCAREDUP_START,
|
|
|
|
BPAT_SCAREDUP_LOOP,
|
|
|
|
BPAT_SCAREDUP_END,
|
|
|
|
|
|
|
|
BPAT_ROPE,
|
|
|
|
|
|
|
|
BPAT_WITHRABBITLEFT_START,
|
|
|
|
BPAT_WITHRABBITLEFT_LOOP,
|
|
|
|
BPAT_WITHRABBITLEFT_END,
|
|
|
|
BPAT_WITHRABBITRIGHT_START,
|
|
|
|
BPAT_WITHRABBITRIGHT_LOOP,
|
|
|
|
BPAT_WITHRABBITRIGHT_END,
|
|
|
|
|
|
|
|
BPAT_WITHRECIPELEFT_START,
|
|
|
|
BPAT_WITHRECIPELEFT_LOOP,
|
|
|
|
BPAT_WITHRECIPELEFT_END,
|
|
|
|
BPAT_WITHRECIPERIGHT_START,
|
|
|
|
BPAT_WITHRECIPERIGHT_LOOP,
|
|
|
|
BPAT_WITHRECIPERIGHT_END,
|
|
|
|
|
|
|
|
BPAT_WITHCARDSLEFT_START,
|
|
|
|
BPAT_WITHCARDSLEFT_LOOP,
|
|
|
|
BPAT_WITHCARDSLEFT_END,
|
|
|
|
BPAT_WITHCARDSRIGHT_START,
|
|
|
|
BPAT_WITHCARDSRIGHT_LOOP,
|
|
|
|
BPAT_WITHCARDSRIGHT_END,
|
|
|
|
|
|
|
|
BPAT_WITHSNOWMANLEFT_START,
|
|
|
|
BPAT_WITHSNOWMANLEFT_LOOP,
|
|
|
|
BPAT_WITHSNOWMANLEFT_END,
|
|
|
|
BPAT_WITHSNOWMANRIGHT_START,
|
|
|
|
BPAT_WITHSNOWMANRIGHT_LOOP,
|
|
|
|
BPAT_WITHSNOWMANRIGHT_END,
|
|
|
|
|
|
|
|
BPAT_WITHNOTEBOOKLEFT_START,
|
|
|
|
BPAT_WITHNOTEBOOKLEFT_LOOP,
|
|
|
|
BPAT_WITHNOTEBOOKLEFT_END,
|
|
|
|
BPAT_WITHNOTEBOOKRIGHT_START,
|
|
|
|
BPAT_WITHNOTEBOOKRIGHT_LOOP,
|
|
|
|
BPAT_WITHNOTEBOOKRIGHT_END,
|
|
|
|
|
|
|
|
BPAT_WITHMEGAPHONELEFT_START,
|
|
|
|
BPAT_WITHMEGAPHONELEFT_LOOP,
|
|
|
|
BPAT_WITHMEGAPHONELEFT_END,
|
|
|
|
BPAT_WITHMEGAPHONERIGHT_START,
|
|
|
|
BPAT_WITHMEGAPHONERIGHT_LOOP,
|
|
|
|
BPAT_WITHMEGAPHONERIGHT_END,
|
|
|
|
|
|
|
|
BPAT_WITHBEARDLEFT_START,
|
|
|
|
BPAT_WITHBEARDLEFT_END,
|
|
|
|
BPAT_WITHBEARDRIGHT_START,
|
|
|
|
BPAT_WITHBEARDRIGHT_END,
|
|
|
|
BPAT_WITHBEARDLEFT_STATIC,
|
|
|
|
BPAT_WITHBEARDRIGHT_STATIC,
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
BPAT_MACBETH1,
|
|
|
|
BPAT_MACBETH2,
|
|
|
|
BPAT_MACBETH3,
|
|
|
|
BPAT_MACBETH4,
|
|
|
|
BPAT_MACBETH5,
|
|
|
|
BPAT_MACBETH6,
|
|
|
|
BPAT_MACBETH7,
|
|
|
|
BPAT_MACBETH8,
|
|
|
|
BPAT_MACBETH9,
|
|
|
|
|
2012-06-12 19:42:46 +00:00
|
|
|
BPAT_WITHSECRETARY
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
2012-06-05 06:39:55 +00:00
|
|
|
static void initStatics();
|
2012-05-12 00:34:52 +00:00
|
|
|
RMTony();
|
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Initialise Tony
|
2012-06-05 06:39:55 +00:00
|
|
|
void init(void);
|
2012-05-21 21:53:13 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Free all memory
|
2012-06-07 05:58:01 +00:00
|
|
|
void close(void);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Tony makes a frame, updating the movement, etc.
|
2012-06-07 05:58:01 +00:00
|
|
|
void doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Draw method, which controls chararacter display
|
2012-06-05 06:39:55 +00:00
|
|
|
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Show or hide
|
2012-06-07 05:58:01 +00:00
|
|
|
void show(void);
|
|
|
|
void hide(bool bShowOmbra = false);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Move and make an action, if necessary
|
2012-06-07 05:58:01 +00:00
|
|
|
void moveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction, int nActionParm = 0);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Tony stops (on the right side with respect to any subject)
|
2012-06-07 05:58:01 +00:00
|
|
|
virtual void stop(CORO_PARAM);
|
|
|
|
void stopNoAction(CORO_PARAM);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Set a pattern
|
2012-06-07 05:58:01 +00:00
|
|
|
void setPattern(int npatt, bool bPlayP0 = false);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Reads the current pattern
|
2012-06-07 05:58:01 +00:00
|
|
|
int getCurPattern();
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Waits until the end of a pattern
|
2012-06-07 05:58:01 +00:00
|
|
|
void waitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE) {
|
|
|
|
RMCharacter::waitForEndPattern(coroParam, hCustomSkip);
|
2012-05-07 22:25:33 +00:00
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Check if currently in an action
|
2012-06-07 05:58:01 +00:00
|
|
|
bool inAction() {
|
2012-06-11 19:43:04 +00:00
|
|
|
return (_bActionPending && _action != 0) | _bAction;
|
2012-05-21 21:53:13 +00:00
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Check if there needs to be an update for scrolling movement
|
2012-06-07 05:58:01 +00:00
|
|
|
bool mustUpdateScrolling() {
|
|
|
|
return ((!inAction()) || (isMoving()));
|
2012-05-21 21:53:13 +00:00
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Returns Tony's position
|
2012-06-07 05:58:01 +00:00
|
|
|
RMPoint position() {
|
|
|
|
return _pos;
|
2012-05-21 21:53:13 +00:00
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Set the scrolling position
|
2012-06-07 05:58:01 +00:00
|
|
|
void setScrollPosition(const RMPoint &pt) {
|
|
|
|
RMCharacter::setScrollPosition(pt);
|
2012-05-21 21:53:13 +00:00
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Set the take animation
|
2012-06-07 05:58:01 +00:00
|
|
|
void take(int nWhere, int nPart);
|
|
|
|
void put(int nWhere, int nPart);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Start or End Talk
|
2012-06-07 05:58:01 +00:00
|
|
|
bool startTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &bodyStartPat,
|
2012-05-21 21:53:13 +00:00
|
|
|
int &headLoopPat, int &bodyLoopPat);
|
2012-06-07 05:58:01 +00:00
|
|
|
void startTalk(CORO_PARAM, TALKTYPE nTalkType);
|
|
|
|
bool endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic);
|
|
|
|
void endTalk(CORO_PARAM);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Start or End Static
|
2012-06-07 05:58:01 +00:00
|
|
|
void startStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat,
|
2012-05-21 21:53:13 +00:00
|
|
|
int &bodyStartPat, int &bodyLoopPat);
|
2012-06-07 05:58:01 +00:00
|
|
|
void startStatic(CORO_PARAM, TALKTYPE nTalkType);
|
|
|
|
void endStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat, int &headEndPat);
|
|
|
|
void endStatic(CORO_PARAM, TALKTYPE nTalkType);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Tony disguises himself!
|
2012-06-07 05:58:01 +00:00
|
|
|
void setPastorella(bool bIsPast) {
|
|
|
|
_bPastorella = bIsPast;
|
2012-05-21 21:53:13 +00:00
|
|
|
}
|
2012-06-07 05:58:01 +00:00
|
|
|
int getPastorella(void) {
|
|
|
|
return _bPastorella;
|
2012-05-21 21:53:13 +00:00
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 03:54:59 +00:00
|
|
|
// Perform an action
|
2012-06-07 05:58:01 +00:00
|
|
|
void executeAction(int nAction, int nActionItem, int nParm);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-06-07 05:58:01 +00:00
|
|
|
void playSfx(int nSfx) {
|
|
|
|
RMItem::playSfx(nSfx);
|
2012-05-21 21:53:13 +00:00
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Tony
|
|
|
|
|
|
|
|
#endif
|