Skip to content
Permalink
Browse files

ZVISION: Quit with an error message dialog if no font files are found

  • Loading branch information
bluegr committed Dec 26, 2014
1 parent f9595b1 commit eb46e837969f2f650b5debaa387e63127b83db6c
Showing with 17 additions and 1 deletion.
  1. +17 −1 engines/zvision/zvision.cpp
@@ -46,8 +46,8 @@
#include "common/system.h"
#include "common/file.h"

#include "gui/message.h"
#include "engines/util.h"

#include "audio/mixer.h"

namespace ZVision {
@@ -230,6 +230,22 @@ Common::Error ZVision::run() {
if (ConfMan.hasKey("save_slot"))
_saveManager->loadGame(ConfMan.getInt("save_slot"));

// Before starting, make absolutely sure that the user has copied the needed fonts
if (!Common::File::exists("arial.ttf") && !Common::File::exists("FreeSans.ttf")) {
GUI::MessageDialog dialog(
"Before playing this game, you'll need to copy the required "
"fonts in ScummVM's extras directory, or the game directory. "
"On Windows, you'll need the following font files from the Windows "
"font directory: Times New Roman, Century Schoolbook, Garamond, "
"Courier New and Arial. Alternatively, you can download the GNU "
"FreeFont package. You'll need all the fonts from that package, "
"i.e. FreeMono, FreeSans and FreeSerif."
);
dialog.runModal();
quitGame();
return Common::kUnknownError;
}

// Main loop
while (!shouldQuit()) {
_clock.update();

0 comments on commit eb46e83

Please sign in to comment.
You can’t perform that action at this time.