aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support
diff options
context:
space:
mode:
authorPaul Gilbert2016-07-10 17:19:11 -0400
committerPaul Gilbert2016-07-15 19:27:44 -0400
commit207e1cbb296c8f825d19167d420bbf141398ac1d (patch)
tree1c4718540b39bee95cc8898128046c817f97c615 /engines/titanic/support
parent62f2763bf794dfb711fd48e32d7c2162bdb5aed8 (diff)
downloadscummvm-rg350-207e1cbb296c8f825d19167d420bbf141398ac1d.tar.gz
scummvm-rg350-207e1cbb296c8f825d19167d420bbf141398ac1d.tar.bz2
scummvm-rg350-207e1cbb296c8f825d19167d420bbf141398ac1d.zip
TITANIC: Remove old hard-coded video loading code from cursors loading
Diffstat (limited to 'engines/titanic/support')
-rw-r--r--engines/titanic/support/mouse_cursor.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp
index be607a432f..496b1527fe 100644
--- a/engines/titanic/support/mouse_cursor.cpp
+++ b/engines/titanic/support/mouse_cursor.cpp
@@ -63,26 +63,10 @@ CMouseCursor::~CMouseCursor() {
}
void CMouseCursor::loadCursorImages() {
- const CString name("ycursors.avi");
- g_vm->_filesManager->fn4(name);
-
- // WORKAROUND: We need to manipulate ycursors.avi file so it can be read
- // by the ScummVM AVIDecoder, by removing the redundant second video track
- Common::File f;
- if (!f.open(name))
- error("Could not open cursors file");
-
- // Read in the entire file
- byte *movieData = (byte *)malloc(f.size());
- f.read(movieData, f.size());
-
- if (READ_BE_UINT32(movieData + 254) == MKTAG('s', 't', 'r', 'h')) {
- // Change the second video chunk to junk data so it gets ignored
- WRITE_BE_UINT32(movieData + 254, MKTAG('J', 'U', 'N', 'K'));
- WRITE_LE_UINT32(movieData + 258, 1128);
- }
+ const CResourceKey key("ycursors.avi");
+ g_vm->_filesManager->fn4(key.getString());
- // Iterate through each cursor
+ // Iterate through getting each cursor
for (int idx = 0; idx < NUM_CURSORS; ++idx) {
assert(CURSOR_DATA[idx][0] == (idx + 1));
_cursors[idx]._centroid = Common::Point(CURSOR_DATA[idx][2],
@@ -91,16 +75,14 @@ void CMouseCursor::loadCursorImages() {
// Create the surface
CVideoSurface *surface = _screenManager->createSurface(64, 64);
_cursors[idx]._videoSurface = surface;
-/*
- Common::SeekableReadStream *stream = new Common::MemoryReadStream(
- movieData, f.size(), DisposeAfterUse::NO);
- OSMovie movie(stream, surface);
+
+ // Open the cursors video and move to the given frame
+ OSMovie movie(key, surface);
movie.setFrame(idx);
void *frameInfo = movie.duplicateFrameInfo();
_cursors[idx]._frameInfo = frameInfo;
surface->setMovieFrameInfo(frameInfo);
- */
}
}