Fix a mistake in the resource loader.
svn-id: r4239
This commit is contained in:
parent
713152fcef
commit
b9be9d1065
2 changed files with 11 additions and 10 deletions
11
resource.cpp
11
resource.cpp
|
@ -470,7 +470,7 @@ int Scumm::loadResource(int type, int idx)
|
||||||
uint32 fileOffs;
|
uint32 fileOffs;
|
||||||
uint32 size, tag;
|
uint32 size, tag;
|
||||||
|
|
||||||
// debug(1, "loadResource(%s,%d)", resTypeFromId(type),idx);
|
// debug(1, "loadResource(%s,%d)", resTypeFromId(type),idx);
|
||||||
|
|
||||||
if (type == rtCharset && (_features & GF_SMALL_HEADER)) {
|
if (type == rtCharset && (_features & GF_SMALL_HEADER)) {
|
||||||
loadCharset(idx);
|
loadCharset(idx);
|
||||||
|
@ -478,9 +478,12 @@ int Scumm::loadResource(int type, int idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
roomNr = getResourceRoomNr(type, idx);
|
roomNr = getResourceRoomNr(type, idx);
|
||||||
if (roomNr == 0 || idx >= res.num[type]) {
|
|
||||||
error("%s %d undefined", res.name[type], idx);
|
if (idx >= res.num[type])
|
||||||
}
|
error("%s %d undefined %d %d", res.name[type], idx, res.num[type], roomNr);
|
||||||
|
|
||||||
|
if (roomNr == 0)
|
||||||
|
roomNr = _roomResource;
|
||||||
|
|
||||||
if (type == rtRoom) {
|
if (type == rtRoom) {
|
||||||
fileOffs = 0;
|
fileOffs = 0;
|
||||||
|
|
|
@ -825,19 +825,17 @@ void Scumm::o5_actorSetClass()
|
||||||
{
|
{
|
||||||
int act = getVarOrDirectWord(0x80);
|
int act = getVarOrDirectWord(0x80);
|
||||||
int newClass;
|
int newClass;
|
||||||
|
|
||||||
while ((_opcode = fetchScriptByte()) != 0xFF) {
|
while ((_opcode = fetchScriptByte()) != 0xFF) {
|
||||||
newClass = getVarOrDirectWord(0x80);
|
newClass = getVarOrDirectWord(0x80);
|
||||||
if (newClass == 0) {
|
if (newClass == 0) {
|
||||||
_classData[act] = 0;
|
_classData[act] = 0;
|
||||||
|
if((_features & GF_SMALL_HEADER) && act <= NUM_ACTORS)
|
||||||
if( _features & GF_SMALL_HEADER)
|
|
||||||
{
|
{
|
||||||
Actor *a;
|
Actor *a;
|
||||||
a=derefActor(act);
|
a = derefActorSafe(act, "actorSetClass");
|
||||||
a->forceClip=0;
|
a->forceClip=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue