aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/text.cpp
diff options
context:
space:
mode:
authorStrangerke2015-12-04 13:32:08 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:50 +0100
commit733fbe4c62911adc478400ba5d0dcf220e1b45ee (patch)
tree44b98212dff065a1ef5bae3355192de80eb0861f /engines/lab/text.cpp
parentc399536a07b6bf96ff311d4398f51e2d865a2027 (diff)
downloadscummvm-rg350-733fbe4c62911adc478400ba5d0dcf220e1b45ee.tar.gz
scummvm-rg350-733fbe4c62911adc478400ba5d0dcf220e1b45ee.tar.bz2
scummvm-rg350-733fbe4c62911adc478400ba5d0dcf220e1b45ee.zip
LAB: Start working on a separate DisplayMan class
Diffstat (limited to 'engines/lab/text.cpp')
-rw-r--r--engines/lab/text.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/lab/text.cpp b/engines/lab/text.cpp
index 63ec12bad0..1c1cacdac3 100644
--- a/engines/lab/text.cpp
+++ b/engines/lab/text.cpp
@@ -82,9 +82,9 @@ void text(TextFont *tf, uint16 x, uint16 y, uint16 color, const char *text, uint
for (uint16 i = 0; i < numchars; i++) {
RealOffset = (g_lab->_screenWidth * y) + x;
- curpage = RealOffset / g_lab->_screenBytesPerPage;
- SegmentOffset = RealOffset - (curpage * g_lab->_screenBytesPerPage);
- LeftInSegment = g_lab->_screenBytesPerPage - SegmentOffset;
+ curpage = RealOffset / g_lab->_graphics->_screenBytesPerPage;
+ SegmentOffset = RealOffset - (curpage * g_lab->_graphics->_screenBytesPerPage);
+ LeftInSegment = g_lab->_graphics->_screenBytesPerPage - SegmentOffset;
VGACur = VGATop + SegmentOffset;
if (tf->Widths[(uint)*text]) {
@@ -117,10 +117,10 @@ void text(TextFont *tf, uint16 x, uint16 y, uint16 color, const char *text, uint
curpage++;
VGATemp = (byte *)(VGATop - templeft);
/* Set up VGATempLine for next line */
- VGATempLine -= g_lab->_screenBytesPerPage;
+ VGATempLine -= g_lab->_graphics->_screenBytesPerPage;
/* Set up LeftInSegment for next line */
- LeftInSegment += g_lab->_screenBytesPerPage + templeft;
- templeft += g_lab->_screenBytesPerPage;
+ LeftInSegment += g_lab->_graphics->_screenBytesPerPage + templeft;
+ templeft += g_lab->_graphics->_screenBytesPerPage;
}
if (mask & data)
@@ -142,8 +142,8 @@ void text(TextFont *tf, uint16 x, uint16 y, uint16 color, const char *text, uint
if (LeftInSegment <= 0) {
curpage++;
- VGATempLine -= g_lab->_screenBytesPerPage;
- LeftInSegment += g_lab->_screenBytesPerPage;
+ VGATempLine -= g_lab->_graphics->_screenBytesPerPage;
+ LeftInSegment += g_lab->_graphics->_screenBytesPerPage;
}
}
}