mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
SCI: Some more work on scaling in SCI32
This commit is contained in:
parent
bbec4acff5
commit
31aec8c581
@ -51,7 +51,6 @@ enum ViewScaleSignals {
|
||||
kScaleSignalDoScaling = 0x0001, // enables scaling when drawing that cel (involves scaleX and scaleY)
|
||||
kScaleSignalGlobalScaling = 0x0002, // means that global scaling shall get applied on that cel (sets scaleX/scaleY)
|
||||
kScaleSignalHoyle4SpecialHandling = 0x0004 // HOYLE4-exclusive: special handling inside kAnimate, is used when giving out cards
|
||||
|
||||
};
|
||||
|
||||
struct AnimateEntry {
|
||||
|
@ -421,7 +421,8 @@ void GfxFrameout::kernelUpdateScreenItem(reg_t object) {
|
||||
|
||||
itemEntry->signal = readSelectorValue(_segMan, object, SELECTOR(signal));
|
||||
itemEntry->scaleSignal = readSelectorValue(_segMan, object, SELECTOR(scaleSignal));
|
||||
if (itemEntry->scaleSignal == 1) {
|
||||
|
||||
if (itemEntry->scaleSignal & kScaleSignalDoScaling32) {
|
||||
itemEntry->scaleX = readSelectorValue(_segMan, object, SELECTOR(scaleX));
|
||||
itemEntry->scaleY = readSelectorValue(_segMan, object, SELECTOR(scaleY));
|
||||
} else {
|
||||
@ -743,10 +744,10 @@ void GfxFrameout::kernelFrameout() {
|
||||
} else if (view) {
|
||||
// Process global scaling, if needed.
|
||||
// TODO: Seems like SCI32 always processes global scaling for scaled objects
|
||||
if (itemEntry->scaleSignal != 0 && itemEntry->scaleSignal != 1)
|
||||
error("Unknown scale signal: %d", itemEntry->scaleSignal);
|
||||
// TODO: We can only process symmetrical scaling for now (i.e. same value for scaleX/scaleY)
|
||||
if (itemEntry->scaleSignal == 1 && itemEntry->scaleX == itemEntry->scaleY)
|
||||
if ((itemEntry->scaleSignal & kScaleSignalDoScaling32) &&
|
||||
!(itemEntry->scaleSignal & kScaleSignalDisableGlobalScaling32) &&
|
||||
(itemEntry->scaleX == itemEntry->scaleY))
|
||||
applyGlobalScaling(itemEntry, it->planeRect, view->getHeight(itemEntry->loopNo, itemEntry->celNo));
|
||||
|
||||
if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128))
|
||||
|
@ -97,11 +97,18 @@ struct ScrollTextEntry {
|
||||
|
||||
typedef Common::Array<ScrollTextEntry> ScrollTextList;
|
||||
|
||||
enum ViewScaleSignals32 {
|
||||
kScaleSignalDoScaling32 = 0x0001, // enables scaling when drawing that cel (involves scaleX and scaleY)
|
||||
kScaleSignalUnk1 = 0x0002, // unknown
|
||||
kScaleSignalDisableGlobalScaling32 = 0x0004
|
||||
};
|
||||
|
||||
class GfxCache;
|
||||
class GfxCoordAdjuster32;
|
||||
class GfxPaint32;
|
||||
class GfxPalette;
|
||||
class GfxScreen;
|
||||
|
||||
/**
|
||||
* Frameout class, kFrameout and relevant functions for SCI32 games
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user