mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-02 15:16:46 +00:00
DIRECTOR: Added test for drawing scaled MacFonts
This commit is contained in:
parent
e2b1cd5c80
commit
368c0928b6
@ -119,6 +119,7 @@ Common::Error DirectorEngine::run() {
|
||||
_mainArchive = nullptr;
|
||||
_currentScore = nullptr;
|
||||
|
||||
testFontScaling();
|
||||
testFonts();
|
||||
|
||||
_lingo->runTests();
|
||||
@ -130,8 +131,6 @@ Common::Error DirectorEngine::run() {
|
||||
//_mainArchive = new RIFFArchive();
|
||||
//_mainArchive->openFile("bookshelf_example.mmm");
|
||||
|
||||
//testFontScaling();
|
||||
|
||||
if (getPlatform() == Common::kPlatformWindows)
|
||||
_sharedCastFile = "SHARDCST.MMM";
|
||||
else
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#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"
|
||||
@ -105,6 +106,19 @@ void DirectorEngine::testFontScaling() {
|
||||
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, 500);
|
||||
|
||||
Graphics::MacFont bigFont(Graphics::kMacFontNewYork, 15);
|
||||
|
||||
font1 = (const Graphics::MacFONTFont *)_wm->_fontMan->getFont(bigFont);
|
||||
|
||||
Graphics::MacFONTFont::testBlit(font1, &surface, 0, x, y + 50, 500);
|
||||
|
||||
#if 0
|
||||
const char *text = "d";
|
||||
|
||||
for (int i = 9; i <= 40; i++) {
|
||||
@ -121,6 +135,7 @@ void DirectorEngine::testFontScaling() {
|
||||
|
||||
x += width + 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user