GOB: Calculate _totResStart even if no resources follow

It's also used as a base offset for TOT strings.
This fixes a crash in the Amiga version of Bargon Attack.
This commit is contained in:
Sven Hesse 2014-03-16 16:40:08 +01:00
parent 0f9b1364cf
commit dba4084c8a

View File

@ -209,6 +209,7 @@ void Resources::unload(bool del) {
_totResourceTable = 0;
_extResourceTable = 0;
_totTextTable = 0;
_totResStart = 0;
_totData = 0;
_totSize = 0;
_imData = 0;
@ -233,6 +234,8 @@ bool Resources::loadTOTResourceTable() {
if (!stream)
return false;
_totResStart = totProps.scriptEnd;
if ((totProps.resourcesOffset == 0xFFFFFFFF) ||
(totProps.resourcesOffset == 0))
// No resources here
@ -271,7 +274,6 @@ bool Resources::loadTOTResourceTable() {
item.type = kResourceTOT;
}
_totResStart = totProps.scriptEnd;
_totSize = stream->size() - _totResStart;
if (_totSize <= 0)