fixed two offsets for V2 and two warnings
svn-id: r7185
This commit is contained in:
parent
12c44ba73d
commit
850ee739af
3 changed files with 16 additions and 6 deletions
|
@ -538,7 +538,11 @@ void Scumm::loadRoomObjectsOldBundle() {
|
||||||
if (_numObjectsInRoom > _numLocalObjects)
|
if (_numObjectsInRoom > _numLocalObjects)
|
||||||
error("More than %d objects in room %d", _numLocalObjects, _roomResource);
|
error("More than %d objects in room %d", _numLocalObjects, _roomResource);
|
||||||
|
|
||||||
ptr = room + 29;
|
if (_features & GF_AFTER_V2)
|
||||||
|
ptr = room + 28;
|
||||||
|
else
|
||||||
|
ptr = room + 29;
|
||||||
|
|
||||||
for (i = 0; i < _numObjectsInRoom; i++) {
|
for (i = 0; i < _numObjectsInRoom; i++) {
|
||||||
od = &_objs[findLocalObjectSlot()];
|
od = &_objs[findLocalObjectSlot()];
|
||||||
|
|
||||||
|
@ -980,7 +984,11 @@ void Scumm::findObjectInRoom(FindObjectInRoom *fo, byte findWhat, uint id, uint
|
||||||
error("findObjectInRoom: More (%d) than %d objects in room %d", numobj, _numLocalObjects, room);
|
error("findObjectInRoom: More (%d) than %d objects in room %d", numobj, _numLocalObjects, room);
|
||||||
|
|
||||||
if (_features & GF_OLD_BUNDLE) {
|
if (_features & GF_OLD_BUNDLE) {
|
||||||
searchptr = roomptr + 29;
|
if (_features & GF_AFTER_V2)
|
||||||
|
searchptr = roomptr + 28;
|
||||||
|
else
|
||||||
|
searchptr = roomptr + 29;
|
||||||
|
|
||||||
for (i = 0; i < numobj; i++) {
|
for (i = 0; i < numobj; i++) {
|
||||||
obimptr = roomptr + READ_LE_UINT16(searchptr);
|
obimptr = roomptr + READ_LE_UINT16(searchptr);
|
||||||
obcdptr = roomptr + READ_LE_UINT16(searchptr + 2 * _numObjectsInRoom);
|
obcdptr = roomptr + READ_LE_UINT16(searchptr + 2 * _numObjectsInRoom);
|
||||||
|
|
|
@ -1096,7 +1096,7 @@ void Scumm::initRoomSubBlocks() {
|
||||||
// HACK: to determine the sizes of the local scripts, we assume that
|
// HACK: to determine the sizes of the local scripts, we assume that
|
||||||
// a) their order in the data file is the same as in the index
|
// a) their order in the data file is the same as in the index
|
||||||
// b) the last script at the same time is the last item in the room "header"
|
// b) the last script at the same time is the last item in the room "header"
|
||||||
int len = - _localScriptList[id - _numGlobalScripts] + _resourceHeaderSize;
|
int len = - (int)_localScriptList[id - _numGlobalScripts] + _resourceHeaderSize;
|
||||||
if (*ptr)
|
if (*ptr)
|
||||||
len += READ_LE_UINT16(ptr + 1);
|
len += READ_LE_UINT16(ptr + 1);
|
||||||
else
|
else
|
||||||
|
|
|
@ -478,7 +478,9 @@ void SkyState::showIntroText(uint32 *&cmdPtr) {
|
||||||
//save current screen contents
|
//save current screen contents
|
||||||
byte *savePtr = (byte *)_workScreen + startPos;
|
byte *savePtr = (byte *)_workScreen + startPos;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < height; i++) {
|
uint i, j;
|
||||||
|
|
||||||
|
for (i = 0; i < height; i++) {
|
||||||
memcpy(saveBuf, savePtr, width);
|
memcpy(saveBuf, savePtr, width);
|
||||||
saveBuf += width;
|
saveBuf += width;
|
||||||
savePtr += GAME_SCREEN_WIDTH;
|
savePtr += GAME_SCREEN_WIDTH;
|
||||||
|
@ -489,11 +491,11 @@ void SkyState::showIntroText(uint32 *&cmdPtr) {
|
||||||
byte *textBuf = _introTextSpace + sizeof(struct dataFileHeader);
|
byte *textBuf = _introTextSpace + sizeof(struct dataFileHeader);
|
||||||
byte *curPos = (byte *)_workScreen + startPos;
|
byte *curPos = (byte *)_workScreen + startPos;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < height; i++) {
|
for (i = 0; i < height; i++) {
|
||||||
|
|
||||||
byte *prevPos = curPos;
|
byte *prevPos = curPos;
|
||||||
|
|
||||||
for (unsigned int j = 0; j < width; j++) {
|
for (j = 0; j < width; j++) {
|
||||||
|
|
||||||
uint8 pixel = *textBuf++;
|
uint8 pixel = *textBuf++;
|
||||||
if (pixel)
|
if (pixel)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue