mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
some hacks to get V8 loading further. It now fails because it can't find the SMAP resource
svn-id: r6102
This commit is contained in:
parent
45aec3ef0d
commit
908de40919
@ -668,7 +668,7 @@ void Scumm::redrawBGStrip(int start, int num)
|
||||
gfxUsageBits[s + i] |= 0x80000000;
|
||||
|
||||
gdi.drawBitmap(getResourceAddress(rtRoom, _roomResource) + _IM00_offs,
|
||||
&virtscr[0], s, 0, virtscr[0].height, s, num, 0);
|
||||
&virtscr[0], s, 0, virtscr[0].height, s, num, 0);
|
||||
}
|
||||
|
||||
void Scumm::restoreCharsetBg()
|
||||
@ -1708,7 +1708,10 @@ void Scumm::setCameraAt(int pos_x, int pos_y)
|
||||
&& _vars[VAR_SCROLL_SCRIPT]) {
|
||||
_vars[VAR_CAMERA_POS_X] = camera._cur.x;
|
||||
_vars[VAR_CAMERA_POS_Y] = camera._cur.y;
|
||||
runScript(_vars[VAR_SCROLL_SCRIPT], 0, 0, 0);
|
||||
// FIXME - HACK - for now disable scroll script in V8, until we figure out
|
||||
// what value VAR_SCROLL_SCRIPT has.
|
||||
if (!(_features & GF_AFTER_V8))
|
||||
runScript(_vars[VAR_SCROLL_SCRIPT], 0, 0, 0);
|
||||
}
|
||||
} else {
|
||||
int t;
|
||||
|
@ -402,7 +402,8 @@ void Scumm::loadRoomObjects()
|
||||
RoomHeader *roomhdr;
|
||||
CodeHeader *cdhd;
|
||||
|
||||
CHECK_HEAP room = getResourceAddress(rtRoom, _roomResource);
|
||||
CHECK_HEAP
|
||||
room = getResourceAddress(rtRoom, _roomResource);
|
||||
roomhdr = (RoomHeader *)findResourceData(MKID('RMHD'), room);
|
||||
|
||||
if (_features & GF_AFTER_V8)
|
||||
@ -459,8 +460,8 @@ void Scumm::loadRoomObjects()
|
||||
imhd = (ImageHeader *)findResourceData(MKID('IMHD'), ptr);
|
||||
if (_features & GF_AFTER_V8)
|
||||
// FIXME - in v8, IMHD seems to contain no obj_id, but rather a name string
|
||||
obim_id = 0;
|
||||
// obim_id = READ_LE_UINT32(&imhd->v8.obj_id);
|
||||
// EVIL HACK to allow loading of the first COMI room
|
||||
obim_id = 1373 + i;
|
||||
else if (_features & GF_AFTER_V7)
|
||||
obim_id = READ_LE_UINT16(&imhd->v7.obj_id);
|
||||
else
|
||||
@ -473,13 +474,12 @@ void Scumm::loadRoomObjects()
|
||||
searchptr = NULL;
|
||||
}
|
||||
|
||||
od = &_objs[1];
|
||||
|
||||
for (i = 1; i <= _numObjectsInRoom; i++, od++) {
|
||||
setupRoomObject(od, room);
|
||||
for (i = 1; i <= _numObjectsInRoom; i++) {
|
||||
setupRoomObject(&_objs[i], room);
|
||||
}
|
||||
|
||||
CHECK_HEAP}
|
||||
CHECK_HEAP
|
||||
}
|
||||
|
||||
void Scumm::loadRoomObjectsSmall()
|
||||
{
|
||||
@ -541,7 +541,8 @@ void Scumm::loadRoomObjectsSmall()
|
||||
setupRoomObject(od, room);
|
||||
}
|
||||
|
||||
CHECK_HEAP}
|
||||
CHECK_HEAP
|
||||
}
|
||||
|
||||
void Scumm::setupRoomObject(ObjectData *od, byte *room)
|
||||
{
|
||||
@ -574,15 +575,13 @@ void Scumm::setupRoomObject(ObjectData *od, byte *room)
|
||||
od->actordir = (*(ptr + 17)) & 7;
|
||||
od->height = *(ptr + 17); // ok
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (_features & GF_AFTER_V8)
|
||||
searchptr = getResourceAddress(rtRoomScripts, _roomResource);
|
||||
else
|
||||
searchptr = room;
|
||||
if (_features & GF_AFTER_V8)
|
||||
searchptr = getResourceAddress(rtRoomScripts, _roomResource);
|
||||
else
|
||||
searchptr = room;
|
||||
|
||||
cdhd = (CodeHeader *)findResourceData(MKID('CDHD'), searchptr + od->offs_obcd_to_room);
|
||||
if (cdhd == NULL)
|
||||
|
@ -232,4 +232,19 @@ void Scumm_v8::setupScummVars()
|
||||
|
||||
VAR_PAUSE_KEY = 64; // ???
|
||||
VAR_SAVELOADDIALOG_KEY = 65; // ???
|
||||
|
||||
|
||||
// FIXME - HACK: no clue where these really are located, but we need to put them
|
||||
// somewhere so that camera clamping works. So for now just assume they are on their
|
||||
// V6 positions (which is somewhat unlikely, considering most stuff moved...)
|
||||
VAR_CAMERA_MIN_X = 101;
|
||||
VAR_CAMERA_MAX_X = 102;
|
||||
VAR_CAMERA_MIN_Y = 103;
|
||||
VAR_CAMERA_MAX_Y = 104;
|
||||
VAR_CAMERA_THRESHOLD_X = 105;
|
||||
VAR_CAMERA_THRESHOLD_Y = 106;
|
||||
VAR_CAMERA_SPEED_X = 107;
|
||||
VAR_CAMERA_SPEED_Y = 108;
|
||||
VAR_CAMERA_ACCEL_X = 109;
|
||||
VAR_CAMERA_ACCEL_Y = 110;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user