aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Göffringmann2004-01-07 18:08:24 +0000
committerRobert Göffringmann2004-01-07 18:08:24 +0000
commit8e30afd4386ad13730e9697959515a1bab3cf975 (patch)
tree39e175f6c4d89bf3302eaf21653339f2aeed2a79
parent8030f1b1483da8a96b7b8ff6bab246ffd3faad38 (diff)
downloadscummvm-rg350-8e30afd4386ad13730e9697959515a1bab3cf975.tar.gz
scummvm-rg350-8e30afd4386ad13730e9697959515a1bab3cf975.tar.bz2
scummvm-rg350-8e30afd4386ad13730e9697959515a1bab3cf975.zip
some changes for Czech version
svn-id: r12221
-rw-r--r--sword1/control.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp
index be1a523dc5..9d65a7af51 100644
--- a/sword1/control.cpp
+++ b/sword1/control.cpp
@@ -165,7 +165,10 @@ SwordControl::SwordControl(ResMan *pResMan, ObjectMan *pObjMan, OSystem *system,
void SwordControl::askForCd(void) {
_screenBuf = (uint8*)malloc(640 * 480);
- _font = (uint8*)_resMan->openFetchRes(SR_FONT);
+ uint32 fontId = SR_FONT;
+ if (SwordEngine::_systemVars.language == BS1_CZECH)
+ fontId = CZECH_SR_FONT;
+ _font = (uint8*)_resMan->openFetchRes(fontId);
uint8 *pal = (uint8*)_resMan->openFetchRes(SR_PALETTE);
uint8 *palOut = (uint8*)malloc(256 * 4);
for (uint16 cnt = 1; cnt < 256; cnt++) {
@@ -210,7 +213,7 @@ void SwordControl::askForCd(void) {
}
} while (notAccepted);
- _resMan->resClose(SR_FONT);
+ _resMan->resClose(fontId);
free(_screenBuf);
}
@@ -219,8 +222,14 @@ uint8 SwordControl::runPanel(void) {
_restoreBuf = NULL;
_keyPressed = _numButtons = 0;
_screenBuf = (uint8*)malloc(640 * 480);
- _font = (uint8*)_resMan->openFetchRes(SR_FONT); // todo: czech support
- _redFont = (uint8*)_resMan->openFetchRes(SR_REDFONT);
+ uint32 fontId = SR_FONT, redFontId = SR_REDFONT;
+ if (SwordEngine::_systemVars.language == BS1_CZECH) {
+ fontId = CZECH_SR_FONT;
+ redFontId = CZECH_SR_REDFONT;
+ }
+ _font = (uint8*)_resMan->openFetchRes(fontId);
+ _redFont = (uint8*)_resMan->openFetchRes(redFontId);
+
uint8 *pal = (uint8*)_resMan->openFetchRes(SR_PALETTE);
uint8 *palOut = (uint8*)malloc(256 * 4);
for (uint16 cnt = 1; cnt < 256; cnt++) {
@@ -276,8 +285,8 @@ uint8 SwordControl::runPanel(void) {
newMode = getClicks(mode, &retVal);
} while ((newMode != 1) && (retVal == 0));
destroyButtons();
- _resMan->resClose(SR_FONT);
- _resMan->resClose(SR_REDFONT);
+ _resMan->resClose(fontId);
+ _resMan->resClose(redFontId);
memset(_screenBuf, 0, 640 * 480);
_system->copy_rect(_screenBuf, 640, 0, 0, 640, 480);
free(_screenBuf);