[Scummvm-tracker] [ScummVM :: Bugs] #16013: AWE: Panorama in level 2 not showing
ScummVM :: Bugs
trac at scummvm.org
Mon Jun 23 11:13:30 UTC 2025
#16013: AWE: Panorama in level 2 not showing
--------------------+----------------------------------------------
Reporter: tag2015 | Owner: dreammaster
Type: defect | Status: new
Priority: normal | Component: Engine: AWE
Version: | Resolution:
Keywords: | Game: Another World/Out of this World
--------------------+----------------------------------------------
Comment (by eriktorbjorn):
I think I see the problem, though I still don't quite understand how
drawing is meant to work. According to
https://fabiensanglard.net/anotherWorld_code_review/ there are two buffers
used for double buffering, and one for long-lived images (e.g.
backgrounds?). That seems to correspond to `_buffers[]` in the `Video`
class, but `Video::getPagePtr()`, as well as `_pagePtrs[]` suggest that
there may be ''four''? I don't get it.
Experimentation suggests that `Video::scaleBitmap()` isn't drawing to the
correct buffer. Looking at rawgl, I see this:
{{{
void Video::scaleBitmap(const uint8_t *src, int fmt) {
if (_scaler) {
const int w = BITMAP_W * _scalerFactor;
const int h = BITMAP_H * _scalerFactor;
const int depth = (fmt == FMT_CLUT) ? 1 : 2;
_scaler->scale(_scalerFactor, depth, _scalerBuffer, w *
depth, src, BITMAP_W * depth, BITMAP_W, BITMAP_H);
_graphics->drawBitmap(0, _scalerBuffer, w, h, fmt);
} else {
_graphics->drawBitmap(0, src, BITMAP_W, BITMAP_H, fmt);
}
}
}}}
ScummVM drops the `if (_scaler)` bit:
{{{
void Video::scaleBitmap(const uint8 *src, int fmt) {
_graphics->drawBitmap(_buffers[0], src, BITMAP_W, BITMAP_H, fmt);
}
}}}
So this may be the correct fix?
{{{
diff --git a/engines/awe/video.cpp b/engines/awe/video.cpp
index a0bf7e146fd..faac6603eee 100644
--- a/engines/awe/video.cpp
+++ b/engines/awe/video.cpp
@@ -463,7 +463,7 @@ static void yflip(const uint8 *src, int w, int h,
uint8 *dst) {
}
void Video::scaleBitmap(const uint8 *src, int fmt) {
- _graphics->drawBitmap(_buffers[0], src, BITMAP_W, BITMAP_H, fmt);
+ _graphics->drawBitmap(0, src, BITMAP_W, BITMAP_H, fmt);
}
void Video::copyBitmapPtr(const uint8 *src, uint32 size) {
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/16013#comment:5>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list