[Scummvm-git-logs] scummvm master -> 20ec21f743dd95552cd95556b2214647bc801803
sev-
noreply at scummvm.org
Mon Feb 13 20:02:14 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
20ec21f743 FTA2: Load ResImportTable in a portable way
Commit: 20ec21f743dd95552cd95556b2214647bc801803
https://github.com/scummvm/scummvm/commit/20ec21f743dd95552cd95556b2214647bc801803
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-13T21:01:27+01:00
Commit Message:
FTA2: Load ResImportTable in a portable way
Changed paths:
engines/saga2/towerfta.cpp
diff --git a/engines/saga2/towerfta.cpp b/engines/saga2/towerfta.cpp
index 304dd1652e6..3b29d59e96a 100644
--- a/engines/saga2/towerfta.cpp
+++ b/engines/saga2/towerfta.cpp
@@ -210,9 +210,24 @@ INITIALIZER(initResourceHandles) {
return false;
if (g_vm->getGameId() == GID_FTA2) {
// Only FTA2 has resource imports
- resImports = (ResImportTable *)LoadResource(listRes, MKTAG('I', 'M', 'P', 'O'), "res imports");
- if (!resImports)
+ Common::SeekableReadStream *stream = loadResourceToStream(listRes, MKTAG('I', 'M', 'P', 'O'), "res imports");
+
+ if (!stream)
return false;
+
+ resImports = (ResImportTable *)malloc(sizeof(ResImportTable));
+ resImports->deadActorProto = (int16)stream->readSint16LE();
+ (void)stream->readSint16LE();
+ (void)stream->readSint16LE();
+ resImports->EXP_spellEffect_CreateFireWisp = stream->readSint16LE();
+ resImports->EXP_spellEffect_CreateWindWisp = stream->readSint16LE();
+ resImports->EXP_spellEffect_CreateWraith = stream->readSint16LE();
+ resImports->EXP_spellEffect_TeleportToShrine = stream->readSint16LE();
+ resImports->EXP_spellEffect_Rejoin = stream->readSint16LE();
+ resImports->EXP_spellEffect_Timequake = stream->readSint16LE();
+ resImports->EXP_spellEffect_CreateFood = stream->readSint16LE();
+
+ delete stream;
}
return true;
}
More information about the Scummvm-git-logs
mailing list