ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Diary state storage. More...

#include <diary.h>

Collaboration diagram for Stark::Diary:

List of all members.

Classes

struct  ConversationLog
struct  ConversationLogLine
struct  FMVEntry

Public Member Functions

 Diary ()
virtual ~Diary ()
bool isEnabled () const
 Does the player have the diary in their inventory?
bool hasUnreadEntries () const
 Does the diary contain entries that have not been read yet?
void setDiaryAllRead ()
 Mark all the diary entries read.
void addDiaryEntry (const Common::String &name)
 Add an entry to the list of available diary pages.
uint32 getPageIndex () const
 Get and set the current diary page index.
void setPageIndex (uint32 pageIndex)
void addFMVEntry (const Common::String &filename, const Common::String &title, int gameDisc)
 Add a FMV entry to the list of movies available to play from the diary.
uint countFMV () const
 Get info of added FMV entries.
const Common::StringgetFMVFilename (uint index) const
const Common::StringgetFMVTitle (uint index) const
uint countDiary () const
 Get info of added Diary entries.
const Common::StringgetDiary (uint index) const
uint countDialog () const
 Get added Dialog entries.
const ConversationLoggetDialog (uint index) const
void openDialog (const Common::String &title, const Common::String &characterName, int32 characterId)
 Start recording speech lines for a dialog.
void logSpeech (const Common::String &line, int32 characterId)
 Record a speech line for the previously opened dialog.
void closeDialog ()
 Close the currently active dialog.
void clear ()
 Reset all the game state data.
void readStateFromStream (Common::SeekableReadStream *stream, uint32 version)
 Replace the current state by that read from the stream.
void writeStateToStream (Common::WriteStream *stream)
 Write the state to a stream.

Private Member Functions

bool hasFMVEntry (const Common::String &filename) const
void saveLoad (ResourceSerializer *serializer)

Private Attributes

Common::Array< Common::String_diaryEntries
Common::Array< FMVEntry_fmvEntries
Common::Array< ConversationLog_conversationEntries
bool _hasUnreadEntries
uint32 _pageIndex

Detailed Description

Diary state storage.

Stores references to all the unlocked data available from the diary menu

Definition at line 43 of file diary.h.


Constructor & Destructor Documentation

Stark::Diary::Diary (  ) 

Definition at line 32 of file diary.cpp.

Stark::Diary::~Diary (  )  [virtual]

Definition at line 36 of file diary.cpp.


Member Function Documentation

void Stark::Diary::addDiaryEntry ( const Common::String name  ) 

Add an entry to the list of available diary pages.

Definition at line 46 of file diary.cpp.

void Stark::Diary::addFMVEntry ( const Common::String filename,
const Common::String title,
int  gameDisc 
)

Add a FMV entry to the list of movies available to play from the diary.

Definition at line 52 of file diary.cpp.

void Stark::Diary::clear (  ) 

Reset all the game state data.

Definition at line 38 of file diary.cpp.

void Stark::Diary::closeDialog (  ) 

Close the currently active dialog.

Definition at line 139 of file diary.cpp.

uint Stark::Diary::countDialog (  )  const [inline]

Get added Dialog entries.

Definition at line 95 of file diary.h.

uint Stark::Diary::countDiary (  )  const [inline]

Get info of added Diary entries.

Definition at line 91 of file diary.h.

uint Stark::Diary::countFMV (  )  const [inline]

Get info of added FMV entries.

Definition at line 86 of file diary.h.

const ConversationLog& Stark::Diary::getDialog ( uint  index  )  const [inline]

Definition at line 96 of file diary.h.

const Common::String& Stark::Diary::getDiary ( uint  index  )  const [inline]

Definition at line 92 of file diary.h.

const Common::String& Stark::Diary::getFMVFilename ( uint  index  )  const [inline]

Definition at line 87 of file diary.h.

const Common::String& Stark::Diary::getFMVTitle ( uint  index  )  const [inline]

Definition at line 88 of file diary.h.

uint32 Stark::Diary::getPageIndex (  )  const [inline]

Get and set the current diary page index.

Definition at line 79 of file diary.h.

bool Stark::Diary::hasFMVEntry ( const Common::String filename  )  const [private]

Definition at line 62 of file diary.cpp.

bool Stark::Diary::hasUnreadEntries (  )  const

Does the diary contain entries that have not been read yet?

Definition at line 160 of file diary.cpp.

bool Stark::Diary::isEnabled (  )  const

Does the player have the diary in their inventory?

Definition at line 156 of file diary.cpp.

void Stark::Diary::logSpeech ( const Common::String line,
int32  characterId 
)

Record a speech line for the previously opened dialog.

Definition at line 145 of file diary.cpp.

void Stark::Diary::openDialog ( const Common::String title,
const Common::String characterName,
int32  characterId 
)

Start recording speech lines for a dialog.

Definition at line 125 of file diary.cpp.

void Stark::Diary::readStateFromStream ( Common::SeekableReadStream stream,
uint32  version 
)

Replace the current state by that read from the stream.

Definition at line 72 of file diary.cpp.

void Stark::Diary::saveLoad ( ResourceSerializer serializer  )  [private]

Definition at line 88 of file diary.cpp.

void Stark::Diary::setDiaryAllRead (  )  [inline]

Mark all the diary entries read.

Definition at line 73 of file diary.h.

void Stark::Diary::setPageIndex ( uint32  pageIndex  )  [inline]

Definition at line 80 of file diary.h.

void Stark::Diary::writeStateToStream ( Common::WriteStream stream  ) 

Write the state to a stream.

Definition at line 83 of file diary.cpp.


Member Data Documentation

Definition at line 126 of file diary.h.

Definition at line 127 of file diary.h.

Definition at line 130 of file diary.h.

Definition at line 131 of file diary.h.


The documentation for this class was generated from the following files:


Generated on Sat Jul 20 2019 05:03:28 for ResidualVM by doxygen 1.7.1
curved edge   curved edge