Skip to content

Commit

Permalink
SHERLOCK: Rename object loading methods from synchronize to load
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster authored and wjp committed May 13, 2015
1 parent 95212c5 commit 2db5763
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
24 changes: 12 additions & 12 deletions engines/sherlock/objects.cpp
Expand Up @@ -365,9 +365,9 @@ void Sprite::checkSprite() {
/*----------------------------------------------------------------*/

/**
* Synchronize the data for a savegame
* Load the data for the action
*/
void ActionType::synchronize(Common::SeekableReadStream &s) {
void ActionType::load(Common::SeekableReadStream &s) {
char buffer[12];

_cAnimNum = s.readByte();
Expand All @@ -391,9 +391,9 @@ UseType::UseType() {
}

/**
* Synchronize the data for a savegame
* Load the data for the UseType
*/
void UseType::synchronize(Common::SeekableReadStream &s) {
void UseType::load(Common::SeekableReadStream &s) {
char buffer[12];

_cAnimNum = s.readByte();
Expand Down Expand Up @@ -459,9 +459,9 @@ Object::Object() {
}

/**
* Load the object data from the passed stream
* Load the data for the object
*/
void Object::synchronize(Common::SeekableReadStream &s) {
void Object::load(Common::SeekableReadStream &s) {
char buffer[41];
s.read(buffer, 12);
_name = Common::String(buffer);
Expand Down Expand Up @@ -504,26 +504,26 @@ void Object::synchronize(Common::SeekableReadStream &s) {
_misc = s.readByte();
_maxFrames = s.readUint16LE();
_flags = s.readByte();
_aOpen.synchronize(s);
_aOpen.load(s);
_aType = (AType)s.readByte();
_lookFrames = s.readByte();
_seqCounter = s.readByte();
_lookPosition.x = s.readUint16LE();
_lookPosition.y = s.readByte();
_lookFacing = s.readByte();
_lookcAnim = s.readByte();
_aClose.synchronize(s);
_aClose.load(s);
_seqStack = s.readByte();
_seqTo = s.readByte();
_descOffset = s.readUint16LE();
_seqCounter2 = s.readByte();
_seqSize = s.readUint16LE();
s.skip(1);
_aMove.synchronize(s);
_aMove.load(s);
s.skip(8);

for (int idx = 0; idx < 4; ++idx)
_use[idx].synchronize(s);
_use[idx].load(s);
}

/**
Expand Down Expand Up @@ -1099,9 +1099,9 @@ const Common::Rect Object::getOldBounds() const {
/*----------------------------------------------------------------*/

/**
* Synchronize the data for a savegame
* Load the data for the animation
*/
void CAnim::synchronize(Common::SeekableReadStream &s) {
void CAnim::load(Common::SeekableReadStream &s) {
char buffer[12];
s.read(buffer, 12);
_name = Common::String(buffer);
Expand Down
8 changes: 4 additions & 4 deletions engines/sherlock/objects.h
Expand Up @@ -148,7 +148,7 @@ struct ActionType {
int _cAnimSpeed;
Common::String _names[4];

void synchronize(Common::SeekableReadStream &s);
void load(Common::SeekableReadStream &s);
};

struct UseType {
Expand All @@ -161,7 +161,7 @@ struct UseType {
Common::String _target;

UseType();
void synchronize(Common::SeekableReadStream &s);
void load(Common::SeekableReadStream &s);
};

class Object {
Expand Down Expand Up @@ -222,7 +222,7 @@ class Object {

Object();

void synchronize(Common::SeekableReadStream &s);
void load(Common::SeekableReadStream &s);

void toggleHidden();

Expand Down Expand Up @@ -255,7 +255,7 @@ struct CAnim {
Common::Point _teleportPos; // Location Holmes shoul teleport to after
int _teleportDir; // playing canim

void synchronize(Common::SeekableReadStream &s);
void load(Common::SeekableReadStream &s);
};

struct SceneImage {
Expand Down
4 changes: 2 additions & 2 deletions engines/sherlock/scene.cpp
Expand Up @@ -261,7 +261,7 @@ bool Scene::loadScene(const Common::String &filename) {

_bgShapes.resize(bgHeader._numStructs);
for (int idx = 0; idx < bgHeader._numStructs; ++idx)
_bgShapes[idx].synchronize(*infoStream);
_bgShapes[idx].load(*infoStream);

if (bgHeader._descSize) {
_descText.resize(bgHeader._descSize);
Expand Down Expand Up @@ -318,7 +318,7 @@ bool Scene::loadScene(const Common::String &filename) {

_cAnim.resize(bgHeader._numcAnimations);
for (uint idx = 0; idx < _cAnim.size(); ++idx)
_cAnim[idx].synchronize(*canimStream);
_cAnim[idx].load(*canimStream);

delete canimStream;
}
Expand Down

0 comments on commit 2db5763

Please sign in to comment.