mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
MTROPOLIS: Fix molasses hack to remove transparent strip on the right side of the screen
This commit is contained in:
parent
baeff6a736
commit
9661324ee4
@ -1035,16 +1035,20 @@ public:
|
||||
|
||||
private:
|
||||
Graphics::ManagedSurface _surf;
|
||||
Graphics::ManagedSurface _mask;
|
||||
Common::Rect _initialRect;
|
||||
};
|
||||
|
||||
void MTIMolassesHandler::setFullScreenSurface(const Graphics::ManagedSurface &srcSurf) {
|
||||
_surf.copyFrom(srcSurf);
|
||||
_mask.create(srcSurf.w, srcSurf.h, Graphics::PixelFormat::createFormatCLUT8());
|
||||
_mask.fillRect(Common::Rect(0, 0, srcSurf.w, srcSurf.h), 0xff);
|
||||
|
||||
wipeRect(_initialRect);
|
||||
}
|
||||
|
||||
void MTIMolassesHandler::wipeRect(const Common::Rect &rect) {
|
||||
_surf.fillRect(rect, 0);
|
||||
_mask.fillRect(rect, 0);
|
||||
}
|
||||
|
||||
void MTIMolassesHandler::setInitialRect(const Common::Rect &rect) {
|
||||
@ -1053,10 +1057,11 @@ void MTIMolassesHandler::setInitialRect(const Common::Rect &rect) {
|
||||
|
||||
void MTIMolassesHandler::release() {
|
||||
_surf.free();
|
||||
_mask.free();
|
||||
}
|
||||
|
||||
void MTIMolassesHandler::renderPostEffect(Graphics::ManagedSurface &surface) const {
|
||||
surface.transBlitFrom(_surf, Common::Point(0, 0), 0);
|
||||
surface.transBlitFrom(_surf, Common::Point(0, 0), _mask);
|
||||
}
|
||||
|
||||
class MTIMolassesFullscreenHooks : public StructuralHooks {
|
||||
|
Loading…
Reference in New Issue
Block a user