2019-03-05 21:39:44 +11: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.
|
|
|
|
*
|
2021-12-26 18:47:58 +01:00
|
|
|
* 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.
|
2019-03-05 21:39:44 +11:00
|
|
|
|
|
|
|
* 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
|
2021-12-26 18:47:58 +01:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2019-03-05 21:39:44 +11:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifndef DRAGONS_CURSOR_H
|
|
|
|
#define DRAGONS_CURSOR_H
|
|
|
|
|
|
|
|
#include "common/system.h"
|
2020-02-05 23:16:21 +11:00
|
|
|
#include "dragons/scriptopcodes.h"
|
2019-03-05 21:39:44 +11:00
|
|
|
|
|
|
|
namespace Dragons {
|
|
|
|
|
|
|
|
class Actor;
|
|
|
|
class ActorManager;
|
|
|
|
class DragonsEngine;
|
|
|
|
class DragonINIResource;
|
|
|
|
|
|
|
|
class Cursor {
|
2019-03-12 22:57:41 +11:00
|
|
|
public:
|
2020-02-07 15:25:30 +01:00
|
|
|
int16 _data_800728b0_cursor_seqID;
|
2019-03-19 20:49:34 +11:00
|
|
|
uint16 _iniUnderCursor;
|
|
|
|
int32 _sequenceID;
|
2020-02-15 22:49:14 +11:00
|
|
|
int16 _performActionTargetINI;
|
2019-03-05 21:39:44 +11:00
|
|
|
int16 _x;
|
|
|
|
int16 _y;
|
2020-02-19 17:47:09 +11:00
|
|
|
int16 _objectInHandSequenceID;
|
2019-05-01 13:25:51 +10:00
|
|
|
int16 _cursorActivationSeqOffset;
|
2020-02-07 15:25:30 +01:00
|
|
|
uint16 _iniItemInHand;
|
2020-09-01 23:46:01 +10:00
|
|
|
uint16 _handPointerSequenceID;
|
2020-02-07 17:01:19 +01:00
|
|
|
|
2019-03-20 00:09:29 +11:00
|
|
|
private:
|
|
|
|
DragonsEngine *_vm;
|
2019-03-05 21:39:44 +11:00
|
|
|
Actor *_actor;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Cursor(DragonsEngine *vm);
|
|
|
|
void init(ActorManager *actorManager, DragonINIResource *dragonINIResource);
|
|
|
|
void update();
|
2019-03-28 21:54:17 +11:00
|
|
|
void updateSequenceID(int16 sequenceID);
|
2019-03-05 21:39:44 +11:00
|
|
|
void updateVisibility();
|
2019-03-05 23:17:40 +11:00
|
|
|
void updatePosition(int16 x, int16 y);
|
2019-08-17 10:38:43 +10:00
|
|
|
void updateActorPosition(int16 x, int16 y);
|
2019-03-07 21:24:10 +11:00
|
|
|
int16 updateINIUnderCursor();
|
2019-03-12 22:57:41 +11:00
|
|
|
int16 executeScript(ScriptOpCall &scriptOpCall, uint16 unkFlag);
|
2019-03-17 10:25:40 +11:00
|
|
|
void selectPreviousCursor();
|
|
|
|
void selectNextCursor();
|
2019-03-28 21:54:17 +11:00
|
|
|
void setActorFlag400();
|
2019-07-26 17:48:57 +10:00
|
|
|
void clearActorFlag400();
|
2019-07-05 20:31:52 +10:00
|
|
|
byte *getPalette();
|
2020-02-07 17:01:19 +01:00
|
|
|
|
2019-03-12 22:57:41 +11:00
|
|
|
private:
|
2019-03-10 08:59:10 +11:00
|
|
|
int16 updateIniFromScene();
|
2019-03-05 21:39:44 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Dragons
|
|
|
|
|
|
|
|
#endif //DRAGONS_CURSOR_H
|