diff options
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r-- | engines/sword25/gfx/animation.cpp | 20 | ||||
-rw-r--r-- | engines/sword25/gfx/animation.h | 12 | ||||
-rw-r--r-- | engines/sword25/gfx/animationdescription.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/animationdescription.h | 8 | ||||
-rw-r--r-- | engines/sword25/gfx/animationresource.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/gfx/animationtemplate.cpp | 4 | ||||
-rw-r--r-- | engines/sword25/gfx/animationtemplateregistry.cpp | 6 | ||||
-rw-r--r-- | engines/sword25/gfx/bitmap.h | 6 | ||||
-rw-r--r-- | engines/sword25/gfx/image/renderedimage.cpp | 50 | ||||
-rw-r--r-- | engines/sword25/gfx/panel.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/gfx/panel.h | 2 | ||||
-rw-r--r-- | engines/sword25/gfx/renderobject.cpp | 38 | ||||
-rw-r--r-- | engines/sword25/gfx/renderobject.h | 36 | ||||
-rw-r--r-- | engines/sword25/gfx/renderobjectmanager.cpp | 8 | ||||
-rw-r--r-- | engines/sword25/gfx/text.cpp | 12 | ||||
-rw-r--r-- | engines/sword25/gfx/text.h | 10 |
16 files changed, 106 insertions, 114 deletions
diff --git a/engines/sword25/gfx/animation.cpp b/engines/sword25/gfx/animation.cpp index 1660c393c0..37207c967b 100644 --- a/engines/sword25/gfx/animation.cpp +++ b/engines/sword25/gfx/animation.cpp @@ -553,15 +553,15 @@ bool Animation::persist(OutputPersistenceBlock &writer) { writer.write(_currentFrameTime); writer.write(_running); writer.write(_finished); - writer.write(static_cast<uint>(_direction)); + writer.write(static_cast<uint32>(_direction)); // Je nach Animationstyp entweder das Template oder die Ressource speichern. if (_animationResourcePtr) { - uint marker = 0; + uint32 marker = 0; writer.write(marker); writer.writeString(_animationResourcePtr->getFileName()); } else if (_animationTemplateHandle) { - uint marker = 1; + uint32 marker = 1; writer.write(marker); writer.write(_animationTemplateHandle); } else { @@ -574,13 +574,13 @@ bool Animation::persist(OutputPersistenceBlock &writer) { // The following is only there to for compatibility with older saves // resp. the original engine. - writer.write((uint)1); + writer.write((uint32)1); writer.writeString("LuaLoopPointCB"); writer.write(getHandle()); - writer.write((uint)1); + writer.write((uint32)1); writer.writeString("LuaActionCB"); writer.write(getHandle()); - writer.write((uint)1); + writer.write((uint32)1); writer.writeString("LuaDeleteCB"); writer.write(getHandle()); @@ -605,12 +605,12 @@ bool Animation::unpersist(InputPersistenceBlock &reader) { reader.read(_currentFrameTime); reader.read(_running); reader.read(_finished); - uint direction; + uint32 direction; reader.read(direction); _direction = static_cast<Direction>(direction); // Animationstyp einlesen. - uint marker; + uint32 marker; reader.read(marker); if (marker == 0) { Common::String resourceFilename; @@ -629,9 +629,9 @@ bool Animation::unpersist(InputPersistenceBlock &reader) { // The following is only there to for compatibility with older saves // resp. the original engine. - uint callbackCount; + uint32 callbackCount; Common::String callbackFunctionName; - uint callbackData; + uint32 callbackData; // loop point callback reader.read(callbackCount); diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h index 44255e3b64..ced1995ae9 100644 --- a/engines/sword25/gfx/animation.h +++ b/engines/sword25/gfx/animation.h @@ -159,18 +159,18 @@ private: BACKWARD }; - int _relX; - int _relY; + int32 _relX; + int32 _relY; float _scaleFactorX; float _scaleFactorY; - uint _modulationColor; - uint _currentFrame; - int _currentFrameTime; + uint32 _modulationColor; + uint32 _currentFrame; + int32 _currentFrameTime; bool _running; bool _finished; Direction _direction; AnimationResource *_animationResourcePtr; - uint _animationTemplateHandle; + uint32 _animationTemplateHandle; bool _framesLocked; ANIMATION_CALLBACK _loopPointCallback; diff --git a/engines/sword25/gfx/animationdescription.cpp b/engines/sword25/gfx/animationdescription.cpp index da0a660df9..164206bbc2 100644 --- a/engines/sword25/gfx/animationdescription.cpp +++ b/engines/sword25/gfx/animationdescription.cpp @@ -36,7 +36,7 @@ namespace Sword25 { bool AnimationDescription::persist(OutputPersistenceBlock &writer) { - writer.write(static_cast<uint>(_animationType)); + writer.write(static_cast<uint32>(_animationType)); writer.write(_FPS); writer.write(_millisPerFrame); writer.write(_scalingAllowed); @@ -47,7 +47,7 @@ bool AnimationDescription::persist(OutputPersistenceBlock &writer) { } bool AnimationDescription::unpersist(InputPersistenceBlock &reader) { - uint animationType; + uint32 animationType; reader.read(animationType); _animationType = static_cast<Animation::ANIMATION_TYPES>(animationType); reader.read(_FPS); diff --git a/engines/sword25/gfx/animationdescription.h b/engines/sword25/gfx/animationdescription.h index 3b11686bb9..009d83dcc7 100644 --- a/engines/sword25/gfx/animationdescription.h +++ b/engines/sword25/gfx/animationdescription.h @@ -52,8 +52,8 @@ protected: public: struct Frame { // Die Hotspot-Angabe bezieht sich auf das ungeflippte Bild!! - int hotspotX; - int hotspotY; + int32 hotspotX; + int32 hotspotY; bool flipV; bool flipH; Common::String fileName; @@ -88,8 +88,8 @@ public: protected: Animation::ANIMATION_TYPES _animationType; - int _FPS; - int _millisPerFrame; + int32 _FPS; + int32 _millisPerFrame; bool _scalingAllowed; bool _alphaAllowed; bool _colorModulationAllowed; diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp index 621e20ad8c..8c09a545a0 100644 --- a/engines/sword25/gfx/animationresource.cpp +++ b/engines/sword25/gfx/animationresource.cpp @@ -188,7 +188,7 @@ bool AnimationResource::parserCallback_frame(ParserNode *node) { Common::String flipHString = node->values["fliph"]; if (!flipHString.empty()) { - if (!parseBooleanKey(flipVString, frame.flipV)) { + if (!parseBooleanKey(flipHString, frame.flipH)) { warning("Illegal fliph value (\"%s\") in <frame> tag in \"%s\". Assuming default (\"false\").", flipHString.c_str(), getFileName().c_str()); frame.flipH = false; diff --git a/engines/sword25/gfx/animationtemplate.cpp b/engines/sword25/gfx/animationtemplate.cpp index 19924302b9..a1d2bf5d1a 100644 --- a/engines/sword25/gfx/animationtemplate.cpp +++ b/engines/sword25/gfx/animationtemplate.cpp @@ -181,7 +181,7 @@ bool AnimationTemplate::persist(OutputPersistenceBlock &writer) { Result &= AnimationDescription::persist(writer); // Frameanzahl schreiben. - writer.write(_frames.size()); + writer.write((uint32)_frames.size()); // Frames einzeln persistieren. Common::Array<const Frame>::const_iterator Iter = _frames.begin(); @@ -209,7 +209,7 @@ bool AnimationTemplate::unpersist(InputPersistenceBlock &reader) { result &= AnimationDescription::unpersist(reader); // Frameanzahl lesen. - uint frameCount; + uint32 frameCount; reader.read(frameCount); // Frames einzeln wieder herstellen. diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp index 8184b49eba..4cefe24b18 100644 --- a/engines/sword25/gfx/animationtemplateregistry.cpp +++ b/engines/sword25/gfx/animationtemplateregistry.cpp @@ -47,7 +47,7 @@ bool AnimationTemplateRegistry::persist(OutputPersistenceBlock &writer) { writer.write(_nextHandle); // Anzahl an BS_AnimationTemplates schreiben. - writer.write(_handle2PtrMap.size()); + writer.write((uint32)_handle2PtrMap.size()); // Alle BS_AnimationTemplates persistieren. HANDLE2PTR_MAP::const_iterator iter = _handle2PtrMap.begin(); @@ -77,13 +77,13 @@ bool AnimationTemplateRegistry::unpersist(InputPersistenceBlock &reader) { delete _handle2PtrMap.begin()->_value; // Anzahl an BS_AnimationTemplates einlesen. - uint animationTemplateCount; + uint32 animationTemplateCount; reader.read(animationTemplateCount); // Alle gespeicherten BS_AnimationTemplates wieder herstellen. for (uint i = 0; i < animationTemplateCount; ++i) { // Handle lesen. - uint handle; + uint32 handle; reader.read(handle); // BS_AnimationTemplate wieder herstellen. diff --git a/engines/sword25/gfx/bitmap.h b/engines/sword25/gfx/bitmap.h index caa1238558..f22c5d7fc9 100644 --- a/engines/sword25/gfx/bitmap.h +++ b/engines/sword25/gfx/bitmap.h @@ -176,9 +176,9 @@ protected: bool _flipV; float _scaleFactorX; float _scaleFactorY; - uint _modulationColor; - int _originalWidth; - int _originalHeight; + uint32 _modulationColor; + int32 _originalWidth; + int32 _originalHeight; }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp index 346b46f3b4..b359fc6a3e 100644 --- a/engines/sword25/gfx/image/renderedimage.cpp +++ b/engines/sword25/gfx/image/renderedimage.cpp @@ -240,14 +240,6 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe int cg = (color >> 8) & 0xff; int cb = (color >> 0) & 0xff; - // Compensate for transparency. Since we're coming - // down to 255 alpha, we just compensate for the colors here - if (ca != 255) { - cr = cr * ca >> 8; - cg = cg * ca >> 8; - cb = cb * ca >> 8; - } - // Create an encapsulating surface for the data Graphics::Surface srcImage; // TODO: Is the data really in the screen format? @@ -400,52 +392,52 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe } else { #if defined(SCUMM_LITTLE_ENDIAN) pix = *(uint32 *)out; - int outb = (pix >> 0) & 0xff; - int outg = (pix >> 8) & 0xff; - int outr = (pix >> 16) & 0xff; + int outb = ((pix >> 0) & 0xff) * (255 - a); + int outg = ((pix >> 8) & 0xff) * (255 - a); + int outr = ((pix >> 16) & 0xff) * (255 - a); if (cb == 0) - outb = 0; + outb = outb >> 8; else if (cb != 255) - outb += ((b - outb) * a * cb) >> 16; + outb = ((outb << 8) + b * a * cb) >> 16; else - outb += ((b - outb) * a) >> 8; + outb = (outb + b * a) >> 8; if (cg == 0) - outg = 0; + outg = outg >> 8; else if (cg != 255) - outg += ((g - outg) * a * cg) >> 16; + outg = ((outg << 8) + g * a * cg) >> 16; else - outg += ((g - outg) * a) >> 8; + outg = (outg + g * a) >> 8; if (cr == 0) - outr = 0; + outr = outr >> 8; else if (cr != 255) - outr += ((r - outr) * a * cr) >> 16; + outr = ((outr << 8) + r * a * cr) >> 16; else - outr += ((r - outr) * a) >> 8; + outr = (outr + r * a) >> 8; *(uint32 *)out = (255 << 24) | (outr << 16) | (outg << 8) | outb; out += 4; #else *out = 255; out++; if (cr == 0) - *out = 0; + *out = (*out * (255-a)) >> 8; else if (cr != 255) - *out += ((r - *out) * a * cr) >> 16; + *out = (((*out * (255-a)) << 8) + r * a * cr) >> 16; else - *out += ((r - *out) * a) >> 8; + *out = ((*out * (255-a)) + r * a) >> 8; out++; if (cg == 0) - *out = 0; + *out = (*out * (255-a)) >> 8; else if (cg != 255) - *out += ((g - *out) * a * cg) >> 16; + *out = (((*out * (255-a)) << 8) + g * a * cg) >> 16; else - *out += ((g - *out) * a) >> 8; + *out = ((*out * (255-a)) + g * a) >> 8; out++; if (cb == 0) - *out = 0; + *out = (*out * (255-a)) >> 8; else if (cb != 255) - *out += ((b - *out) * a * cb) >> 16; + *out = (((*out * (255-a)) << 8) + b * a * cb) >> 16; else - *out += ((b - *out) * a) >> 8; + *out = ((*out * (255-a)) + b * a) >> 8; out++; #endif } diff --git a/engines/sword25/gfx/panel.cpp b/engines/sword25/gfx/panel.cpp index b9bb8b087d..9b7fe82914 100644 --- a/engines/sword25/gfx/panel.cpp +++ b/engines/sword25/gfx/panel.cpp @@ -104,7 +104,7 @@ bool Panel::unpersist(InputPersistenceBlock &reader) { result &= RenderObject::unpersist(reader); - uint color; + uint32 color; reader.read(color); setColor(color); diff --git a/engines/sword25/gfx/panel.h b/engines/sword25/gfx/panel.h index 74a93247b6..d372b4e0fc 100644 --- a/engines/sword25/gfx/panel.h +++ b/engines/sword25/gfx/panel.h @@ -64,7 +64,7 @@ protected: virtual bool doRender(RectangleList *updateRects); private: - uint _color; + uint32 _color; }; } // End of namespace Sword25 diff --git a/engines/sword25/gfx/renderobject.cpp b/engines/sword25/gfx/renderobject.cpp index 1dd6f4590f..e9e11aae4e 100644 --- a/engines/sword25/gfx/renderobject.cpp +++ b/engines/sword25/gfx/renderobject.cpp @@ -219,27 +219,27 @@ Common::Rect RenderObject::calcBoundingBox() const { return bbox; } -void RenderObject::calcAbsolutePos(int &x, int &y, int &z) const { +void RenderObject::calcAbsolutePos(int32 &x, int32 &y, int32 &z) const { x = calcAbsoluteX(); y = calcAbsoluteY(); z = calcAbsoluteZ(); } -int RenderObject::calcAbsoluteX() const { +int32 RenderObject::calcAbsoluteX() const { if (_parentPtr.isValid()) return _parentPtr->getAbsoluteX() + _x; else return _x; } -int RenderObject::calcAbsoluteY() const { +int32 RenderObject::calcAbsoluteY() const { if (_parentPtr.isValid()) return _parentPtr->getAbsoluteY() + _y; else return _y; } -int RenderObject::calcAbsoluteZ() const { +int32 RenderObject::calcAbsoluteZ() const { if (_parentPtr.isValid()) return _parentPtr->getAbsoluteZ() + _z; else @@ -399,7 +399,7 @@ RenderObjectPtr<Text> RenderObject::addText(const Common::String &font, const Co bool RenderObject::persist(OutputPersistenceBlock &writer) { // Typ und Handle werden als erstes gespeichert, damit beim Laden ein Objekt vom richtigen Typ mit dem richtigen Handle erzeugt werden kann. - writer.write(static_cast<uint>(_type)); + writer.write(static_cast<uint32>(_type)); writer.write(_handle); // Restliche Objekteigenschaften speichern. @@ -413,14 +413,14 @@ bool RenderObject::persist(OutputPersistenceBlock &writer) { writer.write(_visible); writer.write(_childChanged); writer.write(_initSuccess); - writer.write(_bbox.left); - writer.write(_bbox.top); - writer.write(_bbox.right); - writer.write(_bbox.bottom); - writer.write(_oldBbox.left); - writer.write(_oldBbox.top); - writer.write(_oldBbox.right); - writer.write(_oldBbox.bottom); + writer.write((int32)_bbox.left); + writer.write((int32)_bbox.top); + writer.write((int32)_bbox.right); + writer.write((int32)_bbox.bottom); + writer.write((int32)_oldBbox.left); + writer.write((int32)_oldBbox.top); + writer.write((int32)_oldBbox.right); + writer.write((int32)_oldBbox.bottom); writer.write(_oldX); writer.write(_oldY); writer.write(_oldZ); @@ -455,7 +455,7 @@ bool RenderObject::unpersist(InputPersistenceBlock &reader) { reader.read(_oldY); reader.read(_oldZ); reader.read(_oldVisible); - uint parentHandle; + uint32 parentHandle; reader.read(parentHandle); _parentPtr = RenderObjectPtr<RenderObject>(parentHandle); reader.read(_refreshForced); @@ -470,7 +470,7 @@ bool RenderObject::persistChildren(OutputPersistenceBlock &writer) { bool result = true; // Kinderanzahl speichern. - writer.write(_children.size()); + writer.write((uint32)_children.size()); // Rekursiv alle Kinder speichern. RENDEROBJECT_LIST::iterator it = _children.begin(); @@ -486,13 +486,13 @@ bool RenderObject::unpersistChildren(InputPersistenceBlock &reader) { bool result = true; // Kinderanzahl einlesen. - uint childrenCount; + uint32 childrenCount; reader.read(childrenCount); if (!reader.isGood()) return false; // Alle Kinder rekursiv wieder herstellen. - for (uint i = 0; i < childrenCount; ++i) { + for (uint32 i = 0; i < childrenCount; ++i) { if (!recreatePersistedRenderObject(reader).isValid()) return false; } @@ -504,8 +504,8 @@ RenderObjectPtr<RenderObject> RenderObject::recreatePersistedRenderObject(InputP RenderObjectPtr<RenderObject> result; // Typ und Handle auslesen. - uint type; - uint handle; + uint32 type; + uint32 handle; reader.read(type); reader.read(handle); if (!reader.isGood()) diff --git a/engines/sword25/gfx/renderobject.h b/engines/sword25/gfx/renderobject.h index 1116c3284c..7fcd3a87a3 100644 --- a/engines/sword25/gfx/renderobject.h +++ b/engines/sword25/gfx/renderobject.h @@ -359,7 +359,7 @@ public: /** @brief Gibt das Handle des Objekte zurück. */ - uint getHandle() const { + uint32 getHandle() const { return _handle; } @@ -388,14 +388,14 @@ protected: typedef Common::List<RenderObjectPtr<RenderObject> > RENDEROBJECT_LIST; typedef Common::List<RenderObjectPtr<RenderObject> >::iterator RENDEROBJECT_ITER; - int _x; ///< Die X-Position des Objektes relativ zum Eltern-Objekt - int _y; ///< Die Y-Position des Objektes relativ zum Eltern-Objekt - int _z; ///< Der Z-Wert des Objektes relativ zum Eltern-Objekt - int _absoluteX; ///< Die absolute X-Position des Objektes - int _absoluteY; ///< Die absolute Y-Position des Objektes - int _absoluteZ; - int _width; ///< Die Breite des Objektes - int _height; ///< Die Höhe des Objektes + int32 _x; ///< Die X-Position des Objektes relativ zum Eltern-Objekt + int32 _y; ///< Die Y-Position des Objektes relativ zum Eltern-Objekt + int32 _z; ///< Der Z-Wert des Objektes relativ zum Eltern-Objekt + int32 _absoluteX; ///< Die absolute X-Position des Objektes + int32 _absoluteY; ///< Die absolute Y-Position des Objektes + int32 _absoluteZ; + int32 _width; ///< Die Breite des Objektes + int32 _height; ///< Die Höhe des Objektes bool _visible; ///< Ist true, wenn das Objekt sichtbar ist bool _childChanged; ///< Ist true, wenn sich ein Kinderobjekt verändert hat TYPES _type; ///< Der Objekttyp @@ -404,14 +404,14 @@ protected: // Kopien der Variablen, die für die Errechnung des Dirty-Rects und zur Bestimmung der Objektveränderung notwendig sind Common::Rect _oldBbox; - int _oldX; - int _oldY; - int _oldZ; + int32 _oldX; + int32 _oldY; + int32 _oldZ; bool _oldVisible; static int _nextGlobalVersion; - int _version; + int32 _version; // This should be set to true if the RenderObject is NOT alpha-blended to optimize drawing bool _isSolid; @@ -475,7 +475,7 @@ private: /// Ist true, wenn das Objekt in nächsten Frame neu gezeichnet werden soll bool _refreshForced; - uint _handle; + uint32 _handle; /** @brief Entfernt ein Objekt aus der Kinderliste. @@ -500,17 +500,17 @@ private: /** @brief Berechnet die absolute Position des Objektes. */ - void calcAbsolutePos(int &x, int &y, int &z) const; + void calcAbsolutePos(int32 &x, int32 &y, int32 &z) const; /** @brief Berechnet die absolute Position des Objektes auf der X-Achse. */ - int calcAbsoluteX() const; + int32 calcAbsoluteX() const; /** @brief Berechnet die absolute Position des Objektes. */ - int calcAbsoluteY() const; + int32 calcAbsoluteY() const; - int calcAbsoluteZ() const; + int32 calcAbsoluteZ() const; /** @brief Sortiert alle Kinderobjekte nach ihrem Renderang. diff --git a/engines/sword25/gfx/renderobjectmanager.cpp b/engines/sword25/gfx/renderobjectmanager.cpp index 77f944c9e0..57c8ec318f 100644 --- a/engines/sword25/gfx/renderobjectmanager.cpp +++ b/engines/sword25/gfx/renderobjectmanager.cpp @@ -171,7 +171,7 @@ bool RenderObjectManager::persist(OutputPersistenceBlock &writer) { writer.write(_frameStarted); // Referenzen auf die TimedRenderObjects persistieren. - writer.write(_timedRenderObjects.size()); + writer.write((uint32)_timedRenderObjects.size()); RenderObjectList::const_iterator iter = _timedRenderObjects.begin(); while (iter != _timedRenderObjects.end()) { writer.write((*iter)->getHandle()); @@ -200,10 +200,10 @@ bool RenderObjectManager::unpersist(InputPersistenceBlock &reader) { _timedRenderObjects.resize(0); // Referenzen auf die TimedRenderObjects wieder herstellen. - uint timedObjectCount; + uint32 timedObjectCount; reader.read(timedObjectCount); - for (uint i = 0; i < timedObjectCount; ++i) { - uint handle; + for (uint32 i = 0; i < timedObjectCount; ++i) { + uint32 handle; reader.read(handle); _timedRenderObjects.push_back(handle); } diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp index d4aaa90682..8c33fa8d61 100644 --- a/engines/sword25/gfx/text.cpp +++ b/engines/sword25/gfx/text.cpp @@ -45,7 +45,7 @@ namespace Sword25 { namespace { -const uint AUTO_WRAP_THRESHOLD_DEFAULT = 300; +const uint32 AUTO_WRAP_THRESHOLD_DEFAULT = 300; } Text::Text(RenderObjectPtr<RenderObject> parentPtr) : @@ -98,8 +98,8 @@ void Text::setText(const Common::String &text) { } } -void Text::setColor(uint modulationColor) { - uint newModulationColor = (modulationColor & 0x00ffffff) | (_modulationColor & 0xff000000); +void Text::setColor(uint32 modulationColor) { + uint32 newModulationColor = (modulationColor & 0x00ffffff) | (_modulationColor & 0xff000000); if (newModulationColor != _modulationColor) { _modulationColor = newModulationColor; forceRefresh(); @@ -108,7 +108,7 @@ void Text::setColor(uint modulationColor) { void Text::setAlpha(int alpha) { assert(alpha >= 0 && alpha < 256); - uint newModulationColor = (_modulationColor & 0x00ffffff) | alpha << 24; + uint32 newModulationColor = (_modulationColor & 0x00ffffff) | alpha << 24; if (newModulationColor != _modulationColor) { _modulationColor = newModulationColor; forceRefresh(); @@ -123,7 +123,7 @@ void Text::setAutoWrap(bool autoWrap) { } } -void Text::setAutoWrapThreshold(uint autoWrapThreshold) { +void Text::setAutoWrapThreshold(uint32 autoWrapThreshold) { if (autoWrapThreshold != _autoWrapThreshold) { _autoWrapThreshold = autoWrapThreshold; updateFormat(); @@ -351,7 +351,7 @@ bool Text::unpersist(InputPersistenceBlock &reader) { reader.read(autoWrap); setAutoWrap(autoWrap); - uint autoWrapThreshold; + uint32 autoWrapThreshold; reader.read(autoWrapThreshold); setAutoWrapThreshold(autoWrapThreshold); diff --git a/engines/sword25/gfx/text.h b/engines/sword25/gfx/text.h index 94e7a30865..873eb33380 100644 --- a/engines/sword25/gfx/text.h +++ b/engines/sword25/gfx/text.h @@ -80,7 +80,7 @@ public: @remark Dieses Attribut wird mit dem Wert 300 initialisiert. @remark Eine automatische Formatierung wird nur vorgenommen, wenn diese durch einen Aufruf von SetAutoWrap() aktiviert wurde. */ - void setAutoWrapThreshold(uint autoWrapThreshold); + void setAutoWrapThreshold(uint32 autoWrapThreshold); /** @brief Gibt den dargestellten Text zurück. @@ -100,7 +100,7 @@ public: @brief Setzt die Farbe des Textes. @param Color eine 24-Bit RGB Farbe, die die Farbe des Textes festlegt. */ - void setColor(uint modulationColor); + void setColor(uint32 modulationColor); /** @brief Gibt den Alphawert des Textes zurück. @@ -128,7 +128,7 @@ public: /** @brief Gibt die Längengrenze des Textes in Pixeln zurück, ab der eine automatische Formatierung vorgenommen wird. */ - uint getAutoWrapThreshold() const { + uint32 getAutoWrapThreshold() const { return _autoWrapThreshold; } @@ -142,11 +142,11 @@ private: Text(RenderObjectPtr<RenderObject> parentPtr); Text(InputPersistenceBlock &reader, RenderObjectPtr<RenderObject> parentPtr, uint handle); - uint _modulationColor; + uint32 _modulationColor; Common::String _font; Common::String _text; bool _autoWrap; - uint _autoWrapThreshold; + uint32 _autoWrapThreshold; struct Line { Common::Rect bbox; |