diff options
author | Nicola Mettifogo | 2007-03-02 23:13:13 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-03-02 23:13:13 +0000 |
commit | 6d958e9f30db6c89517d078815d7332dbbb4aa22 (patch) | |
tree | 1f62ccb994bec8a7b43e334cf673263b1e66fc6a | |
parent | 9267e85c163a50e8c20ed8a3fad8b129a2a33813 (diff) | |
download | scummvm-rg350-6d958e9f30db6c89517d078815d7332dbbb4aa22.tar.gz scummvm-rg350-6d958e9f30db6c89517d078815d7332dbbb4aa22.tar.bz2 scummvm-rg350-6d958e9f30db6c89517d078815d7332dbbb4aa22.zip |
added loaders for static images like pickable items and for characters frames
svn-id: r25940
-rw-r--r-- | engines/parallaction/animation.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/dialogue.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/disk.cpp | 15 | ||||
-rw-r--r-- | engines/parallaction/disk.h | 3 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/zone.cpp | 6 |
6 files changed, 24 insertions, 8 deletions
diff --git a/engines/parallaction/animation.cpp b/engines/parallaction/animation.cpp index f7f9dac6e5..9bcacefc7a 100644 --- a/engines/parallaction/animation.cpp +++ b/engines/parallaction/animation.cpp @@ -128,7 +128,7 @@ Animation *Parallaction::parseAnimation(Script& script, Node *list, char *name) } } - _vm->_graphics->loadCnv(vC8, &vD0->_cnv); + loadFrames(vC8, &vD0->_cnv); // int16 _ax = _vm->_graphics->loadCnv(vC8, &vD0->_cnv); // if (_ax == -1) exit(-1); } diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 9f5f83970a..276327a79c 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -513,7 +513,7 @@ void runDialogue(SpeakData *data) { _vm->_archive.close(); strcpy(_vm->_disk, "disk1"); _vm->_archive.open(_vm->_disk); - _vm->_graphics->loadCnv("dino", &_tempFrames); + loadFrames("dino", &_tempFrames); memcpy(&_yourself._cnv, &_tempFrames, sizeof(Cnv)); diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index 7449f7c76f..655428e0ae 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -150,4 +150,19 @@ void loadObjects(const char *name, Cnv* cnv) { return; } +void loadStatic(const char* name, StaticCnv* cnv) { + + _vm->_graphics->loadStaticCnv(name, cnv); + + return; +} + +void loadFrames(const char* name, Cnv* cnv) { + + _vm->_graphics->loadCnv(name, cnv); + + return; +} + + } // namespace Parallaction diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 292e8fa579..8ffdc9c658 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -79,7 +79,8 @@ void loadObjects(const char *name, Cnv *cnv); void loadPointer(StaticCnv* cnv); void loadHead(const char* name, StaticCnv* cnv); void loadFont(const char* name, Cnv* cnv); - +void loadStatic(const char* name, StaticCnv* cnv); +void loadFrames(const char* name, Cnv* cnv); } // namespace Parallaction diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index af37c4915d..ed48a04221 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -857,11 +857,11 @@ void Parallaction::changeCharacter(const char *name) { char path[PATH_LEN]; strcpy(path, v32); - _graphics->loadCnv(path, &_tempFrames); + loadFrames(path, &_tempFrames); if (name[0] != 'D') { sprintf(path, "mini%s", v32); - _graphics->loadCnv(path, &_miniCharacterFrames); + loadFrames(path, &_miniCharacterFrames); sprintf(path, "%s.tab", name); initTable(path, _objectsNames); diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp index 6ad3c5667a..3d07c83c0d 100644 --- a/engines/parallaction/zone.cpp +++ b/engines/parallaction/zone.cpp @@ -279,7 +279,7 @@ void Parallaction::parseZoneTypeBlock(Script &script, Zone *z) { strcpy(vC8, _tokens[1]); StaticCnv vE0; - _vm->_graphics->loadCnv(vC8, doorcnv); + loadFrames(vC8, doorcnv); // printf("door width: %i, height: %i", doorcnv->_width, doorcnv->_height ); @@ -309,7 +309,7 @@ void Parallaction::parseZoneTypeBlock(Script &script, Zone *z) { if (!scumm_stricmp(_tokens[0], "file")) { StaticCnv *vE4 = &u->get->_cnv; strcpy(vC8, _tokens[1]); - _vm->_graphics->loadStaticCnv(vC8, vE4); + loadStatic(vC8, vE4); vE4->_data2 = (byte*)memAlloc(vE4->_width*vE4->_height); if ((z->_flags & kFlagsRemove) == 0) { @@ -412,7 +412,7 @@ void displayItemComment(ExamineData *data) { char v68[PATH_LEN]; strcpy(v68, data->_filename); - _vm->_graphics->loadStaticCnv(v68, &data->_cnv); + loadStatic(v68, &data->_cnv); _vm->_graphics->flatBlitCnv(&data->_cnv, 140, (SCREEN_HEIGHT - data->_cnv._height)/2, Graphics::kBitFront, data->_cnv._data1); _vm->_graphics->freeStaticCnv(&data->_cnv); |