aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/charset.cpp
diff options
context:
space:
mode:
authorTravis Howell2007-04-15 14:12:08 +0000
committerTravis Howell2007-04-15 14:12:08 +0000
commitb932d602516365bf6a62a36773743279a26cf65b (patch)
treec777f2d5ac9b7d0ee03037fcecac067ec0002aa7 /engines/agos/charset.cpp
parent8c4e539a40f816400d89ba45e04f85869642318c (diff)
downloadscummvm-rg350-b932d602516365bf6a62a36773743279a26cf65b.tar.gz
scummvm-rg350-b932d602516365bf6a62a36773743279a26cf65b.tar.bz2
scummvm-rg350-b932d602516365bf6a62a36773743279a26cf65b.zip
Cleanup.
svn-id: r26497
Diffstat (limited to 'engines/agos/charset.cpp')
-rw-r--r--engines/agos/charset.cpp111
1 files changed, 60 insertions, 51 deletions
diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp
index 4b318a3784..874108e872 100644
--- a/engines/agos/charset.cpp
+++ b/engines/agos/charset.cpp
@@ -28,47 +28,52 @@
namespace AGOS {
-void AGOSEngine::print_char_helper_1(const byte *src, uint len) {
- uint idx;
-
+void AGOSEngine_Feeble::print_char_helper_1(const byte *src, uint len) {
if (_textWindow == NULL)
return;
while (len-- != 0) {
- if (getGameType() == GType_FF || getGameType() == GType_PP) {
- if (getBitFlag(93)) {
+ if (getBitFlag(93)) {
+ if (_curWindow == 3) {
+ if ((_newLines >= _textWindow->scrollY) && (_newLines < (_textWindow->scrollY + 3)))
+ windowPutChar(*src);
+ if (*src == '\n') // Do two top lines of text only
+ _newLines++;
+ src++;
+ }
+ } else {
+ if (getBitFlag(94)) {
if (_curWindow == 3) {
- if ((_newLines >= _textWindow->scrollY) && (_newLines < (_textWindow->scrollY + 3)))
+ if (_newLines == (_textWindow->scrollY + 7))
windowPutChar(*src);
- if (*src == '\n') // Do two top lines of text only
+ if (*src == '\n') // Do two top lines of text only
_newLines++;
src++;
}
} else {
- if (getBitFlag(94)) {
- if (_curWindow == 3) {
- if (_newLines == (_textWindow->scrollY + 7))
- windowPutChar(*src);
- if (*src == '\n') // Do two top lines of text only
- _newLines++;
- src++;
- }
- } else {
- if (getBitFlag(92))
- delay(50);
- windowPutChar(*src++);
- }
- }
- } else {
- if (*src != 12 && _textWindow->iconPtr != NULL &&
- _fcsData1[idx = getWindowNum(_textWindow)] != 2) {
-
- _fcsData1[idx] = 2;
- _fcsData2[idx] = 1;
+ if (getBitFlag(92))
+ delay(50);
+ windowPutChar(*src++);
}
+ }
+ }
+}
+
+void AGOSEngine::print_char_helper_1(const byte *src, uint len) {
+ uint idx;
- windowPutChar(*src++);
+ if (_textWindow == NULL)
+ return;
+
+ while (len-- != 0) {
+ if (*src != 12 && _textWindow->iconPtr != NULL &&
+ _fcsData1[idx = getWindowNum(_textWindow)] != 2) {
+
+ _fcsData1[idx] = 2;
+ _fcsData2[idx] = 1;
}
+
+ windowPutChar(*src++);
}
}
@@ -666,35 +671,30 @@ void AGOSEngine::windowPutChar(WindowBlock *window, byte c, byte b) {
}
}
-void AGOSEngine::windowNewLine(WindowBlock *window) {
- if (getGameType() == GType_FF) {
- if (_noOracleScroll == 0) {
- if (window->height < window->textRow + 30) {
- if (!getBitFlag(94)) {
- _noOracleScroll = 1;
- if (getBitFlag(92)) {
- _noOracleScroll = 0;
- checkLinkBox();
- scrollOracle();
- linksUp();
- window->scrollY++;
- _oracleMaxScrollY++;
- } else {
- _oracleMaxScrollY++;
- checkLinkBox();
- }
+void AGOSEngine_Feeble::windowNewLine(WindowBlock *window) {
+ if (_noOracleScroll == 0) {
+ if (window->height < window->textRow + 30) {
+ if (!getBitFlag(94)) {
+ _noOracleScroll = 1;
+ if (getBitFlag(92)) {
+ _noOracleScroll = 0;
+ checkLinkBox();
+ scrollOracle();
+ linksUp();
+ window->scrollY++;
+ _oracleMaxScrollY++;
+ } else {
+ _oracleMaxScrollY++;
+ checkLinkBox();
}
- } else {
- window->textRow += 15;
- checkLinkBox();
}
} else {
- _oracleMaxScrollY++;
+ window->textRow += 15;
checkLinkBox();
}
} else {
- if (window->textRow != window->height)
- window->textRow++;
+ _oracleMaxScrollY++;
+ checkLinkBox();
}
window->textColumn = 0;
@@ -702,6 +702,15 @@ void AGOSEngine::windowNewLine(WindowBlock *window) {
window->textLength = 0;
}
+void AGOSEngine::windowNewLine(WindowBlock *window) {
+ if (window->textRow != window->height)
+ window->textRow++;
+
+ window->textColumn = 0;
+ window->textColumnOffset = 0;
+ window->textLength = 0;
+}
+
#ifdef PALMOS_68K
static const byte *czech_windowFont;
static const byte *russian_windowFont;