aboutsummaryrefslogtreecommitdiff
path: root/sky/screen.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2003-07-01 01:29:29 +0000
committerRobert Göffringmann2003-07-01 01:29:29 +0000
commit2c9a784be8fa44fdf250cf2abb541ea54436e91f (patch)
tree6eae5d4a72cf6a529ff48bb04655fcb403759219 /sky/screen.cpp
parentec64f23f22f7a0b74ffd180be99946afd5c10076 (diff)
downloadscummvm-rg350-2c9a784be8fa44fdf250cf2abb541ea54436e91f.tar.gz
scummvm-rg350-2c9a784be8fa44fdf250cf2abb541ea54436e91f.tar.bz2
scummvm-rg350-2c9a784be8fa44fdf250cf2abb541ea54436e91f.zip
finished loading and saving, fixed grid bugs (some debugging code not yet removed), implemented fnLincTextModule
svn-id: r8682
Diffstat (limited to 'sky/screen.cpp')
-rw-r--r--sky/screen.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/sky/screen.cpp b/sky/screen.cpp
index 324ed0500e..f10a9e3757 100644
--- a/sky/screen.cpp
+++ b/sky/screen.cpp
@@ -300,9 +300,7 @@ void SkyScreen::fnFadeUp(uint32 palNum, uint32 scroll) {
//_currentScreen points to new screen,
//_scrollScreen points to graphic showing old room
- if (scroll == 13) scroll = 123; // script bug (?) in lower area
- if ((scroll != 123) && (scroll != 321) && (scroll)) {
- warning("unknown scroll parameter %d",scroll);
+ if ((scroll != 123) && (scroll != 321)) {
scroll = 0;
}
@@ -728,3 +726,35 @@ void SkyScreen::verticalMask(void) {
}
}
+void SkyScreen::paintBox(uint16 x, uint16 y) {
+
+ uint8 *screenPos = _currentScreen + y * GAME_SCREEN_WIDTH + x;
+ memset(screenPos, 255, 8);
+ for (uint8 cnt = 1; cnt < 8; cnt++) {
+ *(screenPos + cnt * GAME_SCREEN_WIDTH) = 255;
+ *(screenPos + cnt * GAME_SCREEN_WIDTH + 7) = 255;
+ }
+ memset(screenPos + 7 * GAME_SCREEN_WIDTH, 255, 7);
+}
+
+void SkyScreen::showGrid(uint8 *gridBuf) {
+
+ uint32 gridData = 0;
+ uint8 bitsLeft = 0;
+ for (uint16 cnty = 0; cnty < GAME_SCREEN_HEIGHT >> 3; cnty++) {
+ for (uint16 cntx = 0; cntx < GAME_SCREEN_WIDTH >> 3; cntx++) {
+ if (!bitsLeft) {
+ bitsLeft = 32;
+ gridData = *(uint32*)gridBuf;
+ gridBuf += 4;
+ }
+ if (gridData & 0x80000000)
+ paintBox(cntx << 3, cnty << 3);
+ bitsLeft--;
+ gridData <<= 1;
+ }
+ }
+ _system->copy_rect(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
+
+}
+