diff options
author | Nicola Mettifogo | 2007-04-16 20:16:18 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-04-16 20:16:18 +0000 |
commit | 987638a71361129748ef0bfac51850d7c8dc3ecc (patch) | |
tree | d0e24f20e358992c817479f7bdb790258cda721c /engines/parallaction/disk.cpp | |
parent | bf7123548ab5dc5f3eef105ea4d58a30f4844c29 (diff) | |
download | scummvm-rg350-987638a71361129748ef0bfac51850d7c8dc3ecc.tar.gz scummvm-rg350-987638a71361129748ef0bfac51850d7c8dc3ecc.tar.bz2 scummvm-rg350-987638a71361129748ef0bfac51850d7c8dc3ecc.zip |
Now handling fonts with brand-new Font hierarchy. Amiga font have been implemented for dialogues/descriptions, but not for labels yet.
svn-id: r26530
Diffstat (limited to 'engines/parallaction/disk.cpp')
-rw-r--r-- | engines/parallaction/disk.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index 1ed4624429..7a6caf9fb6 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -377,10 +377,10 @@ StaticCnv* DosDisk::loadPointer() { } -Cnv* DosDisk::loadFont(const char* name) { +Font* DosDisk::loadFont(const char* name) { char path[PATH_LEN]; sprintf(path, "%scnv", name); - return loadExternalCnv(path); + return createFont(name, loadExternalCnv(path)); } @@ -916,7 +916,7 @@ StaticCnv* AmigaDisk::loadHead(const char* name) { return cnv; } -Cnv* AmigaDisk::loadFont(const char* name) { +Font* AmigaDisk::loadFont(const char* name) { debugC(1, kDebugDisk, "AmigaDisk::loadFont '%s'", name); char path[PATH_LEN]; @@ -925,11 +925,7 @@ Cnv* AmigaDisk::loadFont(const char* name) { if (!_resArchive.openArchivedFile(path)) errorFileNotFound(path); - // FIXME: actually read data from font file and create - // real font instead of this dummy one - byte *data = (byte*)malloc(256*8*8); - memset(data, 0, 256*8*8); - return new Cnv(256, 8, 8, data); + return createFont(name, _resArchive); } StaticCnv* AmigaDisk::loadStatic(const char* name) { @@ -992,7 +988,7 @@ void AmigaDisk::loadSlide(const char *name) { Graphics::ILBMDecoder decoder(*s); decoder.decode(surf, pal); - for (uint32 i = 0; i < PALETTE_SIZE; i++) + for (uint32 i = 0; i < BASE_PALETTE_COLORS * 3; i++) _vm->_gfx->_palette[i] = pal[i] >> 2; free(pal); _vm->_gfx->setPalette(_vm->_gfx->_palette); |