aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorGregory Montoir2003-11-10 15:45:53 +0000
committerGregory Montoir2003-11-10 15:45:53 +0000
commit98d4b4cb311e5aa95f6b8db3771a1647bed1f545 (patch)
tree4d7120aea77f3b40e93df6bd2892545b71cae95a /queen
parent72d91990227ed6e64f6358011bda3bd5493fdb86 (diff)
downloadscummvm-rg350-98d4b4cb311e5aa95f6b8db3771a1647bed1f545.tar.gz
scummvm-rg350-98d4b4cb311e5aa95f6b8db3771a1647bed1f545.tar.bz2
scummvm-rg350-98d4b4cb311e5aa95f6b8db3771a1647bed1f545.zip
hack for special french character
svn-id: r11250
Diffstat (limited to 'queen')
-rw-r--r--queen/display.cpp9
-rw-r--r--queen/display.h3
-rw-r--r--queen/queen.cpp2
3 files changed, 8 insertions, 6 deletions
diff --git a/queen/display.cpp b/queen/display.cpp
index a78bb9e914..8d98516ac2 100644
--- a/queen/display.cpp
+++ b/queen/display.cpp
@@ -57,9 +57,9 @@ void TextRenderer::drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y
const uint8 *str = (const uint8*)text;
while (*str && x < dstPitch) {
- const uint8 *pchr = FONT + (*str) * 8;
- // FIXME: handle 0x96 character in french version (replace with 0xFB)
+ uint8 c = (lang == FRENCH && *str == 0x96) ? 0xFB : *str;
+ const uint8 *pchr = FONT + c * 8;
if (outlined) {
drawChar(dstBuf, dstPitch, x - 1, y - 1, INK_OUTLINED_TEXT, pchr);
@@ -73,7 +73,7 @@ void TextRenderer::drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y
}
drawChar(dstBuf, dstPitch, x, y, color, pchr);
- x += charWidth[ *str ];
+ x += charWidth[ c ];
++str;
}
}
@@ -101,10 +101,11 @@ void TextRenderer::drawChar(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y,
-Display::Display(OSystem *system, Input *input)
+Display::Display(Language language, OSystem *system, Input *input)
: _system(system), _input(input) {
_dynalum.prevColMask = 0xFF;
+ _textRenderer.lang = language;
_textRenderer.init();
_buffers[RB_BACKDROP] = new uint8[BACKDROP_W * BACKDROP_H];
diff --git a/queen/display.h b/queen/display.h
index ab978adc5d..de27997097 100644
--- a/queen/display.h
+++ b/queen/display.h
@@ -55,6 +55,7 @@ struct TextRenderer {
void drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const char *text, bool outlined = true);
void drawChar(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const uint8 *chr);
+ Language lang;
uint8 charWidth[256];
static const uint8 FONT[];
};
@@ -63,7 +64,7 @@ struct TextRenderer {
class Display {
public:
- Display(OSystem *system, Input *input);
+ Display(Language language, OSystem *system, Input *input);
~Display();
void dynalumInit(Resource *resource, const char *roomName, uint16 roomNum);
diff --git a/queen/queen.cpp b/queen/queen.cpp
index d65a8ed7df..1526c8f7e8 100644
--- a/queen/queen.cpp
+++ b/queen/queen.cpp
@@ -223,7 +223,7 @@ void QueenEngine::go() {
void QueenEngine::initialise(void) {
_resource = new Resource(_gameDataPath, _detectname, _system->get_savefile_manager(), getSavePath());
_input = new Input(_resource->getLanguage(), _system);
- _display = new Display(_system, _input);
+ _display = new Display(_resource->getLanguage(), _system, _input);
_graphics = new Graphics(_display, _input, _resource);
_sound = Sound::giveSound(_mixer, _input, _resource, _resource->compression());
_logic = new Logic(_resource, _graphics, _display, _input, _sound);