diff options
author | Nicola Mettifogo | 2007-03-02 22:18:37 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-03-02 22:18:37 +0000 |
commit | c122d83c0eacbb0570a0cbbc6aaaeace1f677786 (patch) | |
tree | 7a54c46972ef0ef653b36239e80e6571f75a871f /engines | |
parent | 0c39e0e3dbf279bfd04ce4e4566c7a32bd3af679 (diff) | |
download | scummvm-rg350-c122d83c0eacbb0570a0cbbc6aaaeace1f677786.tar.gz scummvm-rg350-c122d83c0eacbb0570a0cbbc6aaaeace1f677786.tar.bz2 scummvm-rg350-c122d83c0eacbb0570a0cbbc6aaaeace1f677786.zip |
changed every font name to be platform independent, added font loader routine
svn-id: r25935
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/callables.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/dialogue.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/disk.cpp | 7 | ||||
-rw-r--r-- | engines/parallaction/disk.h | 2 | ||||
-rw-r--r-- | engines/parallaction/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/intro.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/location.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/menu.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/zone.cpp | 4 |
9 files changed, 21 insertions, 14 deletions
diff --git a/engines/parallaction/callables.cpp b/engines/parallaction/callables.cpp index 7c3d2eebd3..537c8c851b 100644 --- a/engines/parallaction/callables.cpp +++ b/engines/parallaction/callables.cpp @@ -285,7 +285,7 @@ void _c_finito(void *parm) { _vm->_graphics->palUnk0(_palette); if (gameCompleted) { - _vm->_graphics->setFont("slidecnv"); + _vm->_graphics->setFont("slide"); _vm->_graphics->_proportionalFont = false; uint16 _ax = _vm->_graphics->getStringWidth(v4C[_language]); _vm->_graphics->displayString((SCREEN_WIDTH - _ax)/2, 70, v4C[_language]); @@ -304,7 +304,7 @@ void _c_finito(void *parm) { _engineFlags |= kEngineChangeLocation; } else { - _vm->_graphics->setFont("slidecnv"); + _vm->_graphics->setFont("slide"); _vm->_graphics->_proportionalFont = false; uint16 _ax = _vm->_graphics->getStringWidth(v8C[_language]); _vm->_graphics->displayString((SCREEN_WIDTH - _ax)/2, 70, v8C[_language]); @@ -355,7 +355,7 @@ void _c_testResult(void *parm) { _vm->parseLocation("common"); _vm->_archive.close(); - _vm->_graphics->setFont("slidecnv"); + _vm->_graphics->setFont("slide"); _vm->_graphics->_proportionalFont = false; uint16 _ax = _vm->_graphics->getStringWidth(_slideText[0]); diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 05c9b5441f..730da3f8ce 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -231,7 +231,7 @@ void runDialogue(SpeakData *data) { openTalk(_vm->_characterName, &_characterFace); - _vm->_graphics->setFont("comiccnv"); + _vm->_graphics->setFont("comic"); Cnv v6E; StaticCnv v5C, v48; diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index d8ab4d8662..86674be31e 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -109,4 +109,11 @@ void loadPointer(StaticCnv* cnv) { _vm->_graphics->loadExternalStaticCnv("pointer", cnv); } +void loadFont(const char* name, Cnv* cnv) { + char path[PATH_LEN]; + + sprintf(path, "%scnv", name); + _vm->_graphics->loadExternalCnv(path, cnv); +} + } // namespace Parallaction diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index bf22ee3487..362439037b 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -76,7 +76,7 @@ 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); - +void loadFont(const char* name, Cnv* cnv); } // namespace Parallaction diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 0bea64318e..bab53c34e5 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -800,7 +800,7 @@ void Graphics::setFont(const char* name) { if (_font._array != NULL) freeCnv(&_font); - loadExternalCnv(name, &_font); + loadFont(name, &_font); } diff --git a/engines/parallaction/intro.cpp b/engines/parallaction/intro.cpp index c91cc3b08e..de5910d71d 100644 --- a/engines/parallaction/intro.cpp +++ b/engines/parallaction/intro.cpp @@ -132,7 +132,7 @@ void _c_startIntro(void *parm) { void _c_endIntro(void *parm) { - _vm->_graphics->setFont("slidecnv"); + _vm->_graphics->setFont("slide"); _vm->_graphics->_proportionalFont = false; uint16 _di; diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index 8a88ddd1b5..219ca8c012 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -46,7 +46,7 @@ void Parallaction::parseLocation(const char *filename) { uint16 _si = 1; _vm->_graphics->_proportionalFont = false; - _vm->_graphics->setFont("topazcnv"); + _vm->_graphics->setFont("topaz"); location_src = (char*)memAlloc(0x4000); openLocation(filename, location_src); @@ -372,7 +372,7 @@ void Parallaction::changeLocation(char *location) { debugC(1, kDebugLocation, "changeLocation: new background set"); _vm->_graphics->_proportionalFont = false; - _vm->_graphics->setFont("slidecnv"); + _vm->_graphics->setFont("slide"); uint16 _ax = strlen(_slideText[0]); _ax <<= 3; // text width @@ -478,7 +478,7 @@ void Parallaction::doLocationEnterTransition() { jobEraseAnimations(NULL, NULL); jobDisplayAnimations(NULL, NULL); - _vm->_graphics->setFont("comiccnv"); + _vm->_graphics->setFont("comic"); _vm->_graphics->swapBuffers(); _vm->_graphics->copyScreen(Graphics::kBitFront, Graphics::kBitBack); diff --git a/engines/parallaction/menu.cpp b/engines/parallaction/menu.cpp index 8ae0e098ab..65818ed681 100644 --- a/engines/parallaction/menu.cpp +++ b/engines/parallaction/menu.cpp @@ -104,7 +104,7 @@ void Menu::start() { _vm->_archive.open("disk1"); _vm->_graphics->_proportionalFont = false; - _vm->_graphics->setFont("slidecnv"); + _vm->_graphics->setFont("slide"); _vm->_graphics->Graphics::loadBackground("intro.slide", Graphics::kBitBack); _vm->_graphics->palUnk0(_palette); @@ -314,7 +314,7 @@ void Menu::selectCharacter() { _vm->_midiPlayer->stop(); _vm->_graphics->_proportionalFont = false; - _vm->_graphics->setFont("slidecnv"); + _vm->_graphics->setFont("slide"); _vm->_archive.open("disk1"); _vm->_graphics->loadBackground("password.slide", Graphics::kBitBack); diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp index f89d49bbbd..af5ebb37b5 100644 --- a/engines/parallaction/zone.cpp +++ b/engines/parallaction/zone.cpp @@ -374,7 +374,7 @@ void displayCharacterComment(ExamineData *data) { v3C._data1 = NULL; //_characterFace.field_8[0]; v3C._data2 = NULL; - _vm->_graphics->setFont("comiccnv"); + _vm->_graphics->setFont("comic"); _vm->_graphics->flatBlitCnv(&v3C, 190, 80, Graphics::kBitFront, v3C._data1); int16 v26, v28; @@ -421,7 +421,7 @@ void displayItemComment(ExamineData *data) { int16 v6A = 0, v6C = 0; - _vm->_graphics->setFont("comiccnv"); + _vm->_graphics->setFont("comic"); _vm->_graphics->getStringExtent(data->_description, 130, &v6C, &v6A); _vm->_graphics->drawBalloon(0, 90, v6C, v6A, 0); _vm->_graphics->flatBlitCnv(&cnv, 100, 152, Graphics::kBitFront, cnv._data1); |