ScummVM API documentation
Ultima::Ultima3::Data::Savegame Struct Reference

#include <savegame.h>

Public Member Functions

RosterEntry & entry (int number)
 
RosterEntry & partyMember (int slot)
 
bool hasLivingPartyMember ()
 
void addToParty (int number)
 
void clearPartySelection ()
 
void synchronize (Common::Serializer &s)
 
bool importOriginal (Common::SeekableReadStream &roster, Common::SeekableReadStream &party)
 
void exportOriginal (Common::WriteStream &roster, Common::WriteStream &party)
 
void setupDummyParty ()
 
void formParty ()
 

Public Attributes

RosterEntry _roster [ROSTER_COUNT]
 
byte _partyEntries [PARTY_MAX] = {}
 
int _partySize = 0
 
byte _transport = 0
 
byte _location = 0
 
byte _posX = 0
 
byte _posY = 0
 
byte _worldX = 0
 
byte _worldY = 0
 
byte _moveCount [4] = {}
 
byte _moonPhase [2] = { 0, 0 }
 
byte _moonCountdown [2] = { 0x0C, 4 }
 
byte _lightTurns = 0
 
byte _dungeonLevel = 0
 
byte _facing = 0
 
bool _allWeapons = false
 
bool _allArmour = false
 
bool _plusTwoWeapons = false
 
bool _plusTwoArmour = false
 
bool _mapLoaded = false
 

Detailed Description

The persistent game state: the roster of up to 20 characters, and which of them (by 1-based roster number) make up the active party. Party members are referenced in place rather than copied.

Member Function Documentation

◆ entry()

RosterEntry & Ultima::Ultima3::Data::Savegame::entry ( int  number)
inline

Returns a roster entry by its 1-based number

◆ hasLivingPartyMember()

bool Ultima::Ultima3::Data::Savegame::hasLivingPartyMember ( )

Returns true if any party member is in a condition to adventure

◆ addToParty()

void Ultima::Ultima3::Data::Savegame::addToParty ( int  number)

Adds a roster entry to the party being selected

◆ clearPartySelection()

void Ultima::Ultima3::Data::Savegame::clearPartySelection ( )

Undoes a partially selected party

◆ importOriginal()

bool Ultima::Ultima3::Data::Savegame::importOriginal ( Common::SeekableReadStream &  roster,
Common::SeekableReadStream &  party 
)

Reads the roster and the party from the files the original game keeps them in, ROSTER.ULT and PARTY.ULT

Returns
False if the files are too short

◆ exportOriginal()

void Ultima::Ultima3::Data::Savegame::exportOriginal ( Common::WriteStream &  roster,
Common::WriteStream &  party 
)

Writes the roster and the party in the form the original game uses

◆ setupDummyParty()

void Ultima::Ultima3::Data::Savegame::setupDummyParty ( )

Fills the roster with four ready made characters, and puts them together as the party

◆ formParty()

void Ultima::Ultima3::Data::Savegame::formParty ( )

Completes a selected party, placing it at the starting point on foot


The documentation for this struct was generated from the following file: