From 1e5f9d3078f236f306b5d868bcd52f4e47f7b512 Mon Sep 17 00:00:00 2001 From: Peter Kohaut Date: Sun, 14 Jan 2018 12:12:06 +0100 Subject: BLADERUNNER: Added basic KIA interface Settings works Help works Clue database works Fixed code for inserting objects into scene Reorganization of few files Unification & code formatting of few older files --- engines/bladerunner/actor_clues.h | 62 ++++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 27 deletions(-) (limited to 'engines/bladerunner/actor_clues.h') diff --git a/engines/bladerunner/actor_clues.h b/engines/bladerunner/actor_clues.h index d053ef532b..498986a77a 100644 --- a/engines/bladerunner/actor_clues.h +++ b/engines/bladerunner/actor_clues.h @@ -23,46 +23,54 @@ #ifndef BLADERUNNER_ACTOR_CLUES_H #define BLADERUNNER_ACTOR_CLUES_H +#include "common/array.h" + namespace BladeRunner { class BladeRunnerEngine; -struct ActorClue { - int _clueId; - int _weight; - int _fromActorId; - int _field3; - int _field4; - int _field5; - int _field6; - int _field7; - int _field8; - unsigned char _flags; -}; - class ActorClues { + struct Clue { + int clueId; + int weight; + int fromActorId; + int field3; + int field4; + int field5; + int field6; + int field7; + int field8; + unsigned char flags; + }; + BladeRunnerEngine *_vm; -private: - int _count; - int _maxCount; - ActorClue *_clues; + int _count; + int _maxCount; + Common::Array _clues; public: ActorClues(BladeRunnerEngine *_vm, int cluesType); - ~ActorClues(); void add(int actorId, int clueId, int unknown, bool acquired, bool unknownFlag, int fromActorId); + void acquire(int clueId, bool flag2, int fromActorId); void lose(int clueId); - bool isAcquired(int clueId); - int getFromActorId(int clueId); - bool isFlag2(int clueId); - bool isViewed(int clueId); - bool isFlag4(int clueId); - int getField1(int clueId); + bool isAcquired(int clueId) const; + + int getFromActorId(int clueId) const; + + bool isFlag2(int clueId) const; + + bool isViewed(int clueId) const; + void setViewed(int clueId, bool viewed); + + bool isPrivate(int clueId) const; + void setPrivate(int clueId, bool isPrivate); + + int getField1(int clueId) const; - int getCount(); + int getCount() const; void removeAll(); @@ -70,8 +78,8 @@ public: //loadgame private: - bool exists(int clueId); - int findClueIndex(int clueId); + bool exists(int clueId) const; + int findClueIndex(int clueId) const; void remove(int clueIndex); }; -- cgit v1.2.3