diff options
author | Filippos Karapetis | 2007-09-03 15:03:50 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-09-03 15:03:50 +0000 |
commit | b555a1569794b9d72803cd6207f70434cc83ed72 (patch) | |
tree | 07a230f15979c3d177a719763bdce45c337e7f71 /engines/agi/loader_preagi.cpp | |
parent | 750ad32030f3343ded3ad7ac942993da43de68b0 (diff) | |
download | scummvm-rg350-b555a1569794b9d72803cd6207f70434cc83ed72.tar.gz scummvm-rg350-b555a1569794b9d72803cd6207f70434cc83ed72.tar.bz2 scummvm-rg350-b555a1569794b9d72803cd6207f70434cc83ed72.zip |
Some updates for Mickey: objects are shown now (though still incorrectly), implemented some incomplete code for the ship's blinking lights, implemented the scene animation function
svn-id: r28848
Diffstat (limited to 'engines/agi/loader_preagi.cpp')
-rw-r--r-- | engines/agi/loader_preagi.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/engines/agi/loader_preagi.cpp b/engines/agi/loader_preagi.cpp index e503aeea6c..abf3f69af4 100644 --- a/engines/agi/loader_preagi.cpp +++ b/engines/agi/loader_preagi.cpp @@ -138,6 +138,7 @@ int AgiLoader_preagi::loadResource(int t, int n) { int ec = errOK; uint8 *data = NULL; char szFile[255] = {0}; + Common::File infile; if (n > MAX_DIRS) return errBadResource; @@ -153,7 +154,6 @@ int AgiLoader_preagi::loadResource(int t, int n) { data = new uint8[4096]; sprintf(szFile, IDS_MSA_PATH_PIC, n); - Common::File infile; if (!infile.open(szFile)) return errBadResource; infile.read(data, infile.size()); @@ -185,7 +185,23 @@ int AgiLoader_preagi::loadResource(int t, int n) { */ break; case rVIEW: - // + data = new uint8[4096]; + + sprintf(szFile, IDS_MSA_PATH_OBJ, IDS_MSA_NAME_OBJ[n]); + + if (!infile.open(szFile)) + return errBadResource; + infile.read(data, infile.size()); + + if (data != NULL) { + _vm->_game.pictures[n].rdata = data; + _vm->_game.dirPic[n].len = infile.size(); + _vm->_game.dirPic[n].flags |= RES_LOADED; + } else { + ec = errBadResource; + } + + infile.close(); break; default: ec = errBadResource; |