diff options
author | Eugene Sandulenko | 2017-02-07 20:08:49 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-02-07 20:08:49 +0100 |
commit | 355435e9a7bbcfcc0e4dc23e45dfce3b5337a1cd (patch) | |
tree | 4e5ac74a4ff353cf664e78671599e682a85521e8 /engines/director/score.cpp | |
parent | a9fb3e3225dac382318f7c1ef09e7c61aeb2ac4c (diff) | |
download | scummvm-rg350-355435e9a7bbcfcc0e4dc23e45dfce3b5337a1cd.tar.gz scummvm-rg350-355435e9a7bbcfcc0e4dc23e45dfce3b5337a1cd.tar.bz2 scummvm-rg350-355435e9a7bbcfcc0e4dc23e45dfce3b5337a1cd.zip |
DIRECTOR: Move graphics-related code to graphics.cpp
Diffstat (limited to 'engines/director/score.cpp')
-rw-r--r-- | engines/director/score.cpp | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 2a29234bbc..04371e392a 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -27,7 +27,6 @@ #include "engines/util.h" #include "graphics/font.h" -#include "graphics/fonts/macfont.h" #include "graphics/palette.h" #include "graphics/macgui/macfontmanager.h" #include "graphics/macgui/macwindowmanager.h" @@ -42,113 +41,6 @@ namespace Director { -static byte defaultPalette[768] = { - 0, 0, 0, 17, 17, 17, 34, 34, 34, 68, 68, 68, 85, 85, 85, 119, - 119, 119, 136, 136, 136, 170, 170, 170, 187, 187, 187, 221, 221, 221, 238, 238, - 238, 0, 0, 17, 0, 0, 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, - 0, 0, 136, 0, 0, 170, 0, 0, 187, 0, 0, 221, 0, 0, 238, 0, - 17, 0, 0, 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, 0, 0, 136, - 0, 0, 170, 0, 0, 187, 0, 0, 221, 0, 0, 238, 0, 17, 0, 0, - 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, 0, 0, 136, 0, 0, 170, - 0, 0, 187, 0, 0, 221, 0, 0, 238, 0, 0, 0, 0, 51, 0, 0, - 102, 0, 0, 153, 0, 0, 204, 0, 0, 255, 0, 51, 0, 0, 51, 51, - 0, 51, 102, 0, 51, 153, 0, 51, 204, 0, 51, 255, 0, 102, 0, 0, - 102, 51, 0, 102, 102, 0, 102, 153, 0, 102, 204, 0, 102, 255, 0, 153, - 0, 0, 153, 51, 0, 153, 102, 0, 153, 153, 0, 153, 204, 0, 153, 255, - 0, 204, 0, 0, 204, 51, 0, 204, 102, 0, 204, 153, 0, 204, 204, 0, - 204, 255, 0, 255, 0, 0, 255, 51, 0, 255, 102, 0, 255, 153, 0, 255, - 204, 0, 255, 255, 51, 0, 0, 51, 0, 51, 51, 0, 102, 51, 0, 153, - 51, 0, 204, 51, 0, 255, 51, 51, 0, 51, 51, 51, 51, 51, 102, 51, - 51, 153, 51, 51, 204, 51, 51, 255, 51, 102, 0, 51, 102, 51, 51, 102, - 102, 51, 102, 153, 51, 102, 204, 51, 102, 255, 51, 153, 0, 51, 153, 51, - 51, 153, 102, 51, 153, 153, 51, 153, 204, 51, 153, 255, 51, 204, 0, 51, - 204, 51, 51, 204, 102, 51, 204, 153, 51, 204, 204, 51, 204, 255, 51, 255, - 0, 51, 255, 51, 51, 255, 102, 51, 255, 153, 51, 255, 204, 51, 255, 255, - 102, 0, 0, 102, 0, 51, 102, 0, 102, 102, 0, 153, 102, 0, 204, 102, - 0, 255, 102, 51, 0, 102, 51, 51, 102, 51, 102, 102, 51, 153, 102, 51, - 204, 102, 51, 255, 102, 102, 0, 102, 102, 51, 102, 102, 102, 102, 102, 153, - 102, 102, 204, 102, 102, 255, 102, 153, 0, 102, 153, 51, 102, 153, 102, 102, - 153, 153, 102, 153, 204, 102, 153, 255, 102, 204, 0, 102, 204, 51, 102, 204, - 102, 102, 204, 153, 102, 204, 204, 102, 204, 255, 102, 255, 0, 102, 255, 51, - 102, 255, 102, 102, 255, 153, 102, 255, 204, 102, 255, 255, 153, 0, 0, 153, - 0, 51, 153, 0, 102, 153, 0, 153, 153, 0, 204, 153, 0, 255, 153, 51, - 0, 153, 51, 51, 153, 51, 102, 153, 51, 153, 153, 51, 204, 153, 51, 255, - 153, 102, 0, 153, 102, 51, 153, 102, 102, 153, 102, 153, 153, 102, 204, 153, - 102, 255, 153, 153, 0, 153, 153, 51, 153, 153, 102, 153, 153, 153, 153, 153, - 204, 153, 153, 255, 153, 204, 0, 153, 204, 51, 153, 204, 102, 153, 204, 153, - 153, 204, 204, 153, 204, 255, 153, 255, 0, 153, 255, 51, 153, 255, 102, 153, - 255, 153, 153, 255, 204, 153, 255, 255, 204, 0, 0, 204, 0, 51, 204, 0, - 102, 204, 0, 153, 204, 0, 204, 204, 0, 255, 204, 51, 0, 204, 51, 51, - 204, 51, 102, 204, 51, 153, 204, 51, 204, 204, 51, 255, 204, 102, 0, 204, - 102, 51, 204, 102, 102, 204, 102, 153, 204, 102, 204, 204, 102, 255, 204, 153, - 0, 204, 153, 51, 204, 153, 102, 204, 153, 153, 204, 153, 204, 204, 153, 255, - 204, 204, 0, 204, 204, 51, 204, 204, 102, 204, 204, 153, 204, 204, 204, 204, - 204, 255, 204, 255, 0, 204, 255, 51, 204, 255, 102, 204, 255, 153, 204, 255, - 204, 204, 255, 255, 255, 0, 0, 255, 0, 51, 255, 0, 102, 255, 0, 153, - 255, 0, 204, 255, 0, 255, 255, 51, 0, 255, 51, 51, 255, 51, 102, 255, - 51, 153, 255, 51, 204, 255, 51, 255, 255, 102, 0, 255, 102, 51, 255, 102, - 102, 255, 102, 153, 255, 102, 204, 255, 102, 255, 255, 153, 0, 255, 153, 51, - 255, 153, 102, 255, 153, 153, 255, 153, 204, 255, 153, 255, 255, 204, 0, 255, - 204, 51, 255, 204, 102, 255, 204, 153, 255, 204, 204, 255, 204, 255, 255, 255, - 0, 255, 255, 51, 255, 255, 102, 255, 255, 153, 255, 255, 204, 255, 255, 255 }; - -void DirectorEngine::testFontScaling() { - int x = 10; - int y = 10; - int w = 640; - int h = 480; - - initGraphics(w, h, true); - g_system->getPaletteManager()->setPalette(defaultPalette, 0, 256); - - Graphics::ManagedSurface surface; - - surface.create(w, h); - surface.clear(255); - - Graphics::MacFont origFont(Graphics::kMacFontNewYork, 18); - - const Graphics::MacFONTFont *font1 = (const Graphics::MacFONTFont *)_wm->_fontMan->getFont(origFont); - - Graphics::MacFONTFont::testBlit(font1, &surface, 0, x, y + 200, 500); - - Graphics::MacFont bigFont(Graphics::kMacFontNewYork, 15); - - font1 = (const Graphics::MacFONTFont *)_wm->_fontMan->getFont(bigFont); - - Graphics::MacFONTFont::testBlit(font1, &surface, 0, x, y + 50 + 200, 500); - - const char *text = "d"; - - for (int i = 9; i <= 20; i++) { - Graphics::MacFont macFont(Graphics::kMacFontNewYork, i); - - const Graphics::Font *font = _wm->_fontMan->getFont(macFont); - - int width = font->getStringWidth(text); - - Common::Rect bbox = font->getBoundingBox(text, x, y, w); - surface.frameRect(bbox, 15); - - font->drawString(&surface, text, x, y, width, 0); - - x += width + 1; - } - - g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h); - - Common::Event event; - - while (true) { - if (g_system->getEventManager()->pollEvent(event)) - if (event.type == Common::EVENT_QUIT) - break; - - g_system->updateScreen(); - g_system->delayMillis(10); - } -} - Score::Score(DirectorEngine *vm, Archive *archive) { _vm = vm; _surface = new Graphics::ManagedSurface; |