aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/anim.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2008-11-13 08:59:17 +0000
committerFilippos Karapetis2008-11-13 08:59:17 +0000
commit162634cc95e5a2a86ae1611d69024075dfdad450 (patch)
tree15265f4cbaab2fc5bbeaad2fcf25bdb2a35ff6fe /engines/cine/anim.cpp
parent0ba17539acad48797323f1481a0533082778b61d (diff)
downloadscummvm-rg350-162634cc95e5a2a86ae1611d69024075dfdad450.tar.gz
scummvm-rg350-162634cc95e5a2a86ae1611d69024075dfdad450.tar.bz2
scummvm-rg350-162634cc95e5a2a86ae1611d69024075dfdad450.zip
Started moving Save/Load code to saveload.cpp/.h
svn-id: r35033
Diffstat (limited to 'engines/cine/anim.cpp')
-rw-r--r--engines/cine/anim.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp
index f5cde579e6..a0f998e02f 100644
--- a/engines/cine/anim.cpp
+++ b/engines/cine/anim.cpp
@@ -776,75 +776,4 @@ int loadResource(const char *resourceName, int16 idx) {
return result;
}
-/*! \brief Load animDataTable from save
- * \param fHandle Savefile open for reading
- * \param saveGameFormat The used savegame format
- * \todo Add Operation Stealth savefile support
- *
- * Unlike the old code, this one actually rebuilds the table one frame
- * at a time.
- */
-void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat) {
- int16 currentAnim, foundFileIdx, frame;
- char *animName, part[256], name[10];
- uint16 width, height, bpp, var1;
-
- strcpy(part, currentPartName);
-
- // We only support these variations of the savegame format at the moment.
- assert(saveGameFormat == ANIMSIZE_23 || saveGameFormat == ANIMSIZE_30_PTRS_INTACT);
-
- const int entrySize = ((saveGameFormat == ANIMSIZE_23) ? 23 : 30);
- const int fileStartPos = fHandle.pos();
- currentAnim = 0;
- while (currentAnim < NUM_MAX_ANIMDATA) {
- // Seek to the start of the current animation's entry
- fHandle.seek(fileStartPos + currentAnim * entrySize);
- // Read in the current animation entry
- width = fHandle.readUint16BE();
- var1 = fHandle.readUint16BE();
- bpp = fHandle.readUint16BE();
- height = fHandle.readUint16BE();
-
- bool validPtr = false;
- // Handle variables only present in animation entries of size 30
- if (entrySize == 30) {
- validPtr = (fHandle.readUint32BE() != 0); // Read data pointer
- fHandle.readUint32BE(); // Discard mask pointer
- }
-
- foundFileIdx = fHandle.readSint16BE();
- frame = fHandle.readSint16BE();
- fHandle.read(name, 10);
-
- // Handle variables only present in animation entries of size 23
- if (entrySize == 23) {
- validPtr = (fHandle.readByte() != 0);
- }
-
- // Don't try to load invalid entries.
- if (foundFileIdx < 0 || !validPtr) {
- currentAnim++; // Jump over the invalid entry
- continue;
- }
-
- // Alright, the animation entry looks to be valid so let's start handling it...
- if (strcmp(currentPartName, name)) {
- closePart();
- loadPart(name);
- }
-
- animName = partBuffer[foundFileIdx].partName;
- loadRelatedPalette(animName); // Is this for Future Wars only?
- const int16 prevAnim = currentAnim;
- currentAnim = loadResource(animName, currentAnim);
- assert(currentAnim > prevAnim); // Make sure we advance forward
- }
-
- loadPart(part);
-
- // Make sure we jump over all the animation entries
- fHandle.seek(fileStartPos + NUM_MAX_ANIMDATA * entrySize);
-}
-
} // End of namespace Cine