mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 18:31:37 +00:00
ACCESS: Workaround for background rendering bug in original
This commit is contained in:
parent
386aae3ffa
commit
21c1d0f920
@ -289,14 +289,16 @@ void Room::setWallCodes() {
|
||||
|
||||
void Room::buildScreen() {
|
||||
int scrollCol = _vm->_screen->_scrollCol;
|
||||
int cnt = _vm->_screen->_vWindowWidth + 1;
|
||||
int offset = 0;
|
||||
|
||||
// Clear current background buffer
|
||||
_vm->_buffer1.clearBuffer();
|
||||
|
||||
// WORKAROUND: Original's use of '+ 1' would frequently cause memory overruns
|
||||
int w = MIN(_vm->_screen->_vWindowWidth + 1, _playFieldWidth);
|
||||
|
||||
// Loop through drawing each column of tiles forming the background
|
||||
for (int idx = 0; idx < cnt; offset += TILE_WIDTH, ++idx) {
|
||||
for (int idx = 0; idx < w; offset += TILE_WIDTH, ++idx) {
|
||||
buildColumn(_vm->_screen->_scrollCol, offset);
|
||||
++_vm->_screen->_scrollCol;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user