Permalink
Browse files

STARTREK: Various code cleanup

  • Loading branch information...
Drenn1 authored and sev- committed Aug 2, 2018
1 parent ce42cd9 commit ba05b5539ba458c87cb804a5658b153a48f7338b
@@ -57,9 +57,9 @@ uint16 FileStream::readUint16() {
assert(_pos + 2 <= size());
uint16 w;
if (_bigEndian)
w = _data[_pos + 1] | (_data[_pos] << 8);
w = READ_BE_UINT16(_data + _pos);
else
w = _data[_pos] | (_data[_pos + 1] << 8);
w = READ_LE_UINT16(_data + _pos);
_pos += 2;
return w;
}
@@ -68,9 +68,9 @@ uint32 FileStream::readUint32() {
assert(_pos + 4 <= size());
uint32 w;
if (_bigEndian)
w = _data[_pos + 3] | (_data[_pos + 2] << 8) | (_data[_pos + 1] << 16) | (_data[_pos] << 24);
w = READ_BE_UINT32(_data + _pos);
else
w = _data[_pos] | (_data[_pos + 1] << 8) | (_data[_pos + 2] << 16) | (_data[_pos + 3] << 24);
w = READ_LE_UINT32(_data + _pos);
_pos += 4;
return w;
}
@@ -1,4 +1,3 @@

/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
@@ -1,4 +1,3 @@

/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
@@ -13,7 +13,6 @@ MODULE_OBJS = \
lzss.o \
math.o \
menu.o \
object.o \
room.o \
saveload.o \
sound.o \

This file was deleted.

Oops, something went wrong.
@@ -133,45 +133,45 @@ struct Actor {

public:
Actor() :
spriteDrawn(),
spriteDrawn(false),
//animFilename[16],
animType(),
animType(0),
sprite(),
//bitmapFilename[10],
scale(),
scale(0),
animFile(),
numAnimFrames(),
animFrame(),
frameToStartNextAnim(),
pos(),
field60(),
field62(),
triggerActionWhenAnimFinished(),
finishedAnimActionParam(),
numAnimFrames(0),
animFrame(0),
frameToStartNextAnim(0),
pos(Common::Point(0, 0)),
field60(0),
field62(0),
triggerActionWhenAnimFinished(false),
finishedAnimActionParam(0),
//animationString2[8](),
field70(),
field72(),
field74(),
field76(),
iwSrcPosition(),
iwDestPosition(),
granularPosX(),
granularPosY(),
speedX(),
speedY(),

dest(),
field90(),
field92(),

direction(),
field94(),
field96(),
field70(0),
field72(0),
field74(0),
field76(0),
iwSrcPosition(0),
iwDestPosition(0),
granularPosX(0),
granularPosY(0),
speedX(0),
speedY(0),

dest(Common::Point(0, 0)),
field90(0),
field92(0),

direction(0),
field94(0),
field96(0),
//char animationString[10];

fielda2(),
fielda4(),
fielda6() {
fielda2(0),
fielda4(0),
fielda6(0) {
memset(animFilename, 0, sizeof(animFilename));
memset(bitmapFilename, 0, sizeof(bitmapFilename));
memset(animationString2, 0, sizeof(animationString2));
@@ -113,7 +113,7 @@ Room::~Room() {
}

uint16 Room::readRdfWord(int offset) {
return _rdfData[offset] | (_rdfData[offset + 1] << 8);
return READ_LE_UINT16((_rdfData + offset));
}

bool Room::actionHasCode(const Action &action) {

0 comments on commit ba05b55

Please sign in to comment.