replaced calls to loadExternalStaticCnv with separate loaders for Head and Pointer resources

svn-id: r25934
This commit is contained in:
Nicola Mettifogo 2007-03-02 22:12:57 +00:00
parent f124c22bc5
commit 0c39e0e3db
4 changed files with 23 additions and 14 deletions

View File

@ -89,5 +89,24 @@ void openLocation(const char *name, char* script) {
}
void loadHead(const char* name, StaticCnv* cnv) {
char path[PATH_LEN];
if (!scumm_strnicmp(name, "mini", 4)) {
name += 4;
}
snprintf(path, 8, "%shead", name);
path[8] = '\0';
_vm->_graphics->loadExternalStaticCnv(path, cnv);
}
void loadPointer(StaticCnv* cnv) {
_vm->_graphics->loadExternalStaticCnv("pointer", cnv);
}
} // namespace Parallaction

View File

@ -74,6 +74,8 @@ public:
void openLocation(const char *name, char* script);
void openTalk(const char *name, Cnv *cnv);
void loadPointer(StaticCnv* cnv);
void loadHead(const char* name, StaticCnv* cnv);
} // namespace Parallaction

View File

@ -509,7 +509,7 @@ void jobEraseLabel(void *parm, Job *j) {
void Graphics::initMouse(uint16 arg_0) {
loadExternalStaticCnv("pointer", &_mouseComposedArrow);
loadPointer(&_mouseComposedArrow);
byte temp[16*16];
memcpy(temp, _mouseArrow, 16*16);

View File

@ -416,20 +416,8 @@ void displayItemComment(ExamineData *data) {
_vm->_graphics->flatBlitCnv(&data->_cnv, 140, (SCREEN_HEIGHT - data->_cnv._height)/2, Graphics::kBitFront, data->_cnv._data1);
_vm->_graphics->freeStaticCnv(&data->_cnv);
char *v4 = _vm->_characterName;
if (!scumm_strnicmp(v4, "mini", 4)) {
v4 += 4;
}
StaticCnv cnv;
sprintf(v68, "%shead", v4);
// WORKAROUND
// dos file names are in 8.3 format
v68[8] = '\0';
_vm->_graphics->loadExternalStaticCnv(v68, &cnv);
loadHead(_vm->_characterName, &cnv);
int16 v6A = 0, v6C = 0;