[Scummvm-cvs-logs] SF.net SVN: scummvm:[48174] scummvm/trunk/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sun Mar 7 12:46:03 CET 2010
Revision: 48174
http://scummvm.svn.sourceforge.net/scummvm/?rev=48174&view=rev
Author: Kirben
Date: 2010-03-07 11:46:03 +0000 (Sun, 07 Mar 2010)
Log Message:
-----------
Exclude font data tables for The Feeble Files, when AGOS2 games are disabled.
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/charset-fontdata.cpp
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2010-03-07 09:22:19 UTC (rev 48173)
+++ scummvm/trunk/engines/agos/agos.h 2010-03-07 11:46:03 UTC (rev 48174)
@@ -1236,7 +1236,7 @@
virtual void windowNewLine(WindowBlock *window);
void windowScroll(WindowBlock *window);
- void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr);
+ virtual void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr);
void loadMusic(uint16 track);
void playModule(uint16 music);
@@ -1975,6 +1975,7 @@
void invertBox(HitArea *ha, bool state);
virtual void windowNewLine(WindowBlock *window);
+ virtual void windowDrawChar(WindowBlock *window, uint x, uint y, byte chr);
virtual void clearName();
Modified: scummvm/trunk/engines/agos/charset-fontdata.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset-fontdata.cpp 2010-03-07 09:22:19 UTC (rev 48173)
+++ scummvm/trunk/engines/agos/charset-fontdata.cpp 2010-03-07 11:46:03 UTC (rev 48174)
@@ -89,6 +89,7 @@
}
}
+#ifdef ENABLE_AGOS2
static const byte polish4CD_feeble_windowFont[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
@@ -683,6 +684,51 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+void AGOSEngine_Feeble::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
+ const byte *src;
+ byte color, *dst;
+ uint dstPitch, h, w, i;
+
+ if (_noOracleScroll)
+ return;
+
+ _videoLockOut |= 0x8000;
+
+ dst = getBackGround();
+ dstPitch = _backGroundBuf->pitch;
+ h = 13;
+ w = getFeebleFontSize(chr);
+
+ if (_language == Common::PL_POL) {
+ if (!strcmp(getExtra(), "4CD"))
+ src = polish4CD_feeble_windowFont + (chr - 32) * 13;
+ else
+ src = polish2CD_feeble_windowFont + (chr - 32) * 13;
+ } else {
+ src = feeble_windowFont + (chr - 32) * 13;
+ }
+ dst += y * dstPitch + x + window->textColumnOffset;
+
+ color = window->textColor;
+
+ do {
+ int8 b = *src++;
+ i = 0;
+ do {
+ if (b < 0) {
+ if (dst[i] == 0)
+ dst[i] = color;
+ }
+
+ b <<= 1;
+ } while (++i != w);
+ dst += dstPitch;
+ } while (--h);
+
+ _videoLockOut &= ~0x8000;
+}
+#endif
+
static const byte czech_simonFont[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x70, 0x70, 0x20, 0x20, 0x00, 0x20, 0x00,
@@ -2304,28 +2350,11 @@
byte color, *dst;
uint dstPitch, h, w, i;
- if (_noOracleScroll)
- return;
-
_videoLockOut |= 0x8000;
Graphics::Surface *screen = _system->lockScreen();
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
- dst = getBackGround();
- dstPitch = _backGroundBuf->pitch;
- h = 13;
- w = getFeebleFontSize(chr);
-
- if (_language == Common::PL_POL) {
- if (!strcmp(getExtra(), "4CD"))
- src = polish4CD_feeble_windowFont + (chr - 32) * 13;
- else
- src = polish2CD_feeble_windowFont + (chr - 32) * 13;
- } else {
- src = feeble_windowFont + (chr - 32) * 13;
- }
- } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
+ if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
dst = (byte *)screen->pixels;
dstPitch = screen->pitch;
h = 8;
@@ -2413,12 +2442,7 @@
i = 0;
do {
if (b < 0) {
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
- if (dst[i] == 0)
- dst[i] = color;
- } else {
- dst[i] = color;
- }
+ dst[i] = color;
}
b <<= 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list