[Scummvm-cvs-logs] SF.net SVN: scummvm:[53309] scummvm/trunk/engines/sword25
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 01:30:00 CEST 2010
Revision: 53309
http://scummvm.svn.sourceforge.net/scummvm/?rev=53309&view=rev
Author: sev
Date: 2010-10-12 23:30:00 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: unsigned int -> uint
Modified Paths:
--------------
scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
scummvm/trunk/engines/sword25/fmv/movieplayer.h
scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
scummvm/trunk/engines/sword25/gfx/animation.cpp
scummvm/trunk/engines/sword25/gfx/animation.h
scummvm/trunk/engines/sword25/gfx/animationdescription.cpp
scummvm/trunk/engines/sword25/gfx/animationdescription.h
scummvm/trunk/engines/sword25/gfx/animationresource.cpp
scummvm/trunk/engines/sword25/gfx/animationresource.h
scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp
scummvm/trunk/engines/sword25/gfx/animationtemplate.h
scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
scummvm/trunk/engines/sword25/gfx/bitmap.cpp
scummvm/trunk/engines/sword25/gfx/bitmap.h
scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp
scummvm/trunk/engines/sword25/gfx/bitmapresource.h
scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h
scummvm/trunk/engines/sword25/gfx/fontresource.cpp
scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
scummvm/trunk/engines/sword25/gfx/graphicengine.h
scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
scummvm/trunk/engines/sword25/gfx/image/b25sloader.cpp
scummvm/trunk/engines/sword25/gfx/image/b25sloader.h
scummvm/trunk/engines/sword25/gfx/image/image.h
scummvm/trunk/engines/sword25/gfx/image/imageloader.cpp
scummvm/trunk/engines/sword25/gfx/image/imageloader.h
scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp
scummvm/trunk/engines/sword25/gfx/image/pngloader.h
scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
scummvm/trunk/engines/sword25/gfx/image/vectorimage.h
scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp
scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h
scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
scummvm/trunk/engines/sword25/gfx/opengl/glimage.h
scummvm/trunk/engines/sword25/gfx/opengl/glvectorimageblit.cpp
scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h
scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp
scummvm/trunk/engines/sword25/gfx/opengl/swimage.h
scummvm/trunk/engines/sword25/gfx/panel.cpp
scummvm/trunk/engines/sword25/gfx/panel.h
scummvm/trunk/engines/sword25/gfx/renderobject.cpp
scummvm/trunk/engines/sword25/gfx/renderobject.h
scummvm/trunk/engines/sword25/gfx/renderobjectmanager.cpp
scummvm/trunk/engines/sword25/gfx/renderobjectptr.h
scummvm/trunk/engines/sword25/gfx/screenshot.cpp
scummvm/trunk/engines/sword25/gfx/screenshot.h
scummvm/trunk/engines/sword25/gfx/staticbitmap.cpp
scummvm/trunk/engines/sword25/gfx/staticbitmap.h
scummvm/trunk/engines/sword25/gfx/text.cpp
scummvm/trunk/engines/sword25/gfx/text.h
scummvm/trunk/engines/sword25/gfx/timedrenderobject.cpp
scummvm/trunk/engines/sword25/gfx/timedrenderobject.h
scummvm/trunk/engines/sword25/input/inputengine.h
scummvm/trunk/engines/sword25/input/inputengine_script.cpp
scummvm/trunk/engines/sword25/input/scummvminput.cpp
scummvm/trunk/engines/sword25/input/scummvminput.h
scummvm/trunk/engines/sword25/kernel/inputpersistenceblock.cpp
scummvm/trunk/engines/sword25/kernel/inputpersistenceblock.h
scummvm/trunk/engines/sword25/kernel/kernel.cpp
scummvm/trunk/engines/sword25/kernel/kernel.h
scummvm/trunk/engines/sword25/kernel/kernel_script.cpp
scummvm/trunk/engines/sword25/kernel/memleaks.cpp
scummvm/trunk/engines/sword25/kernel/memleaks.h
scummvm/trunk/engines/sword25/kernel/objectregistry.h
scummvm/trunk/engines/sword25/kernel/outputpersistenceblock.cpp
scummvm/trunk/engines/sword25/kernel/outputpersistenceblock.h
scummvm/trunk/engines/sword25/kernel/persistenceblock.h
scummvm/trunk/engines/sword25/kernel/persistenceservice.cpp
scummvm/trunk/engines/sword25/kernel/persistenceservice.h
scummvm/trunk/engines/sword25/kernel/resmanager.cpp
scummvm/trunk/engines/sword25/kernel/resmanager.h
scummvm/trunk/engines/sword25/kernel/resource.h
scummvm/trunk/engines/sword25/kernel/service_ids.h
scummvm/trunk/engines/sword25/kernel/string.h
scummvm/trunk/engines/sword25/math/geometry_script.cpp
scummvm/trunk/engines/sword25/math/region.cpp
scummvm/trunk/engines/sword25/math/region.h
scummvm/trunk/engines/sword25/math/regionregistry.cpp
scummvm/trunk/engines/sword25/math/walkregion.cpp
scummvm/trunk/engines/sword25/math/walkregion.h
scummvm/trunk/engines/sword25/package/packagemanager.h
scummvm/trunk/engines/sword25/package/packagemanager_script.cpp
scummvm/trunk/engines/sword25/package/scummvmpackagemanager.cpp
scummvm/trunk/engines/sword25/package/scummvmpackagemanager.h
scummvm/trunk/engines/sword25/script/luacallback.cpp
scummvm/trunk/engines/sword25/script/luacallback.h
scummvm/trunk/engines/sword25/script/luascript.cpp
scummvm/trunk/engines/sword25/script/luascript.h
scummvm/trunk/engines/sword25/sfx/fmodexchannel.cpp
scummvm/trunk/engines/sword25/sfx/fmodexchannel.h
scummvm/trunk/engines/sword25/sfx/fmodexresource.cpp
scummvm/trunk/engines/sword25/sfx/fmodexresource.h
scummvm/trunk/engines/sword25/sfx/fmodexsound.cpp
scummvm/trunk/engines/sword25/sfx/fmodexsound.h
scummvm/trunk/engines/sword25/sfx/soundengine.h
scummvm/trunk/engines/sword25/sfx/soundengine_script.cpp
Modified: scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -60,7 +60,7 @@
_decoder.close();
}
-bool MoviePlayer::LoadMovie(const Common::String &filename, unsigned int z) {
+bool MoviePlayer::LoadMovie(const Common::String &filename, uint z) {
// Get the file and load it into the decoder
Common::SeekableReadStream *in = Kernel::GetInstance()->GetPackage()->GetStream(filename);
_decoder.load(in);
Modified: scummvm/trunk/engines/sword25/fmv/movieplayer.h
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -73,7 +73,7 @@
* @param Z Z indicates the position of the film on the main graphics layer
* @return Returns false if an error occured while loading, otherwise true.
*/
- bool LoadMovie(const Common::String &Filename, unsigned int Z);
+ bool LoadMovie(const Common::String &Filename, uint Z);
/**
* Unloads the currently loaded movie file.
Modified: scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -49,7 +49,7 @@
MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV();
BS_ASSERT(FMVPtr);
- lua_pushbooleancpp(L, FMVPtr->LoadMovie(luaL_checkstring(L, 1), lua_gettop(L) == 2 ? static_cast<unsigned int>(luaL_checknumber(L, 2)) : 10));
+ lua_pushbooleancpp(L, FMVPtr->LoadMovie(luaL_checkstring(L, 1), lua_gettop(L) == 2 ? static_cast<uint>(luaL_checknumber(L, 2)) : 10));
return 1;
}
Modified: scummvm/trunk/engines/sword25/gfx/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animation.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animation.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -90,7 +90,7 @@
// -----------------------------------------------------------------------------
-Animation::Animation(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+Animation::Animation(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, uint Handle) :
TimedRenderObject(ParentPtr, RenderObject::TYPE_ANIMATION, Handle) {
// Das BS_RenderObject konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden.
if (!m_InitSuccess) return;
@@ -179,7 +179,7 @@
// -----------------------------------------------------------------------------
-void Animation::SetFrame(unsigned int Nr) {
+void Animation::SetFrame(uint Nr) {
AnimationDescription *animationDescriptionPtr = GetAnimationDescription();
BS_ASSERT(animationDescriptionPtr);
@@ -283,7 +283,7 @@
BS_ASSERT(animationDescriptionPtr->GetAnimationType() == AT_JOJO);
TmpCurFrame = - TmpCurFrame;
m_Direction = FORWARD;
- } else if (static_cast<unsigned int>(TmpCurFrame) >= animationDescriptionPtr->GetFrameCount()) {
+ } else if (static_cast<uint>(TmpCurFrame) >= animationDescriptionPtr->GetFrameCount()) {
// Loop-Point Callbacks
for (uint i = 0; i < m_LoopPointCallbacks.size();) {
if ((m_LoopPointCallbacks[i].Callback)(m_LoopPointCallbacks[i].Data) == false) {
@@ -327,7 +327,7 @@
}
}
- m_CurrentFrame = static_cast<unsigned int>(TmpCurFrame);
+ m_CurrentFrame = static_cast<uint>(TmpCurFrame);
}
// Gr\xF6\xDFe und Position der Animation anhand des aktuellen Frames bestimmen
@@ -368,7 +368,7 @@
if (!m_FramesLocked) {
AnimationDescription *animationDescriptionPtr = GetAnimationDescription();
BS_ASSERT(animationDescriptionPtr);
- for (unsigned int i = 0; i < animationDescriptionPtr->GetFrameCount(); ++i) {
+ for (uint i = 0; i < animationDescriptionPtr->GetFrameCount(); ++i) {
if (!Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(i).FileName)) {
BS_LOG_ERRORLN("Could not lock all animation frames.");
return false;
@@ -387,7 +387,7 @@
if (m_FramesLocked) {
AnimationDescription *animationDescriptionPtr = GetAnimationDescription();
BS_ASSERT(animationDescriptionPtr);
- for (unsigned int i = 0; i < animationDescriptionPtr->GetFrameCount(); ++i) {
+ for (uint i = 0; i < animationDescriptionPtr->GetFrameCount(); ++i) {
Resource *pResource;
if (!(pResource = Kernel::GetInstance()->GetResourceManager()->RequestResource(animationDescriptionPtr->GetFrame(i).FileName))) {
BS_LOG_ERRORLN("Could not unlock all animation frames.");
@@ -494,7 +494,7 @@
return;
}
- unsigned int NewModulationColor = (m_ModulationColor & 0x00ffffff) | Alpha << 24;
+ uint NewModulationColor = (m_ModulationColor & 0x00ffffff) | Alpha << 24;
if (NewModulationColor != m_ModulationColor) {
m_ModulationColor = NewModulationColor;
ForceRefresh();
@@ -503,7 +503,7 @@
// -----------------------------------------------------------------------------
-void Animation::SetModulationColor(unsigned int ModulationColor) {
+void Animation::SetModulationColor(uint ModulationColor) {
AnimationDescription *animationDescriptionPtr = GetAnimationDescription();
BS_ASSERT(animationDescriptionPtr);
if (!animationDescriptionPtr->IsColorModulationAllowed()) {
@@ -511,7 +511,7 @@
return;
}
- unsigned int NewModulationColor = (ModulationColor & 0x00ffffff) | (m_ModulationColor & 0xff000000);
+ uint NewModulationColor = (ModulationColor & 0x00ffffff) | (m_ModulationColor & 0xff000000);
if (NewModulationColor != m_ModulationColor) {
m_ModulationColor = NewModulationColor;
ForceRefresh();
@@ -635,7 +635,7 @@
// -----------------------------------------------------------------------------
-void Animation::RegisterActionCallback(ANIMATION_CALLBACK Callback, unsigned int Data) {
+void Animation::RegisterActionCallback(ANIMATION_CALLBACK Callback, uint Data) {
ANIMATION_CALLBACK_DATA CD;
CD.Callback = Callback;
CD.Data = Data;
@@ -644,7 +644,7 @@
// -----------------------------------------------------------------------------
-void Animation::RegisterLoopPointCallback(ANIMATION_CALLBACK Callback, unsigned int Data) {
+void Animation::RegisterLoopPointCallback(ANIMATION_CALLBACK Callback, uint Data) {
ANIMATION_CALLBACK_DATA CD;
CD.Callback = Callback;
CD.Data = Data;
@@ -653,7 +653,7 @@
// -----------------------------------------------------------------------------
-void Animation::RegisterDeleteCallback(ANIMATION_CALLBACK Callback, unsigned int Data) {
+void Animation::RegisterDeleteCallback(ANIMATION_CALLBACK Callback, uint Data) {
ANIMATION_CALLBACK_DATA CD;
CD.Callback = Callback;
CD.Data = Data;
@@ -685,11 +685,11 @@
Vector.resize(0);
// Anzahl an Callbacks einlesen.
- unsigned int CallbackCount;
+ uint CallbackCount;
Reader.Read(CallbackCount);
// Alle Callbacks einzeln wieder herstellen.
- for (unsigned int i = 0; i < CallbackCount; ++i) {
+ for (uint i = 0; i < CallbackCount; ++i) {
ANIMATION_CALLBACK_DATA CallbackData;
Common::String CallbackFunctionName;
@@ -718,15 +718,15 @@
Writer.Write(m_CurrentFrameTime);
Writer.Write(m_Running);
Writer.Write(m_Finished);
- Writer.Write(static_cast<unsigned int>(m_Direction));
+ Writer.Write(static_cast<uint>(m_Direction));
// Je nach Animationstyp entweder das Template oder die Ressource speichern.
if (m_AnimationResourcePtr) {
- unsigned int Marker = 0;
+ uint Marker = 0;
Writer.Write(Marker);
Writer.Write(m_AnimationResourcePtr->GetFileName());
} else if (m_AnimationTemplateHandle) {
- unsigned int Marker = 1;
+ uint Marker = 1;
Writer.Write(Marker);
Writer.Write(m_AnimationTemplateHandle);
} else {
@@ -761,12 +761,12 @@
Reader.Read(m_CurrentFrameTime);
Reader.Read(m_Running);
Reader.Read(m_Finished);
- unsigned int Direction;
+ uint Direction;
Reader.Read(Direction);
m_Direction = static_cast<DIRECTION>(Direction);
// Animationstyp einlesen.
- unsigned int Marker;
+ uint Marker;
Reader.Read(Marker);
if (Marker == 0) {
Common::String ResourceFilename;
Modified: scummvm/trunk/engines/sword25/gfx/animation.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animation.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animation.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -55,7 +55,7 @@
private:
Animation(RenderObjectPtr<RenderObject> ParentPtr, const Common::String &FileName);
Animation(RenderObjectPtr<RenderObject> ParentPtr, const AnimationTemplate &Template);
- Animation(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ Animation(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, uint Handle);
public:
enum ANIMATION_TYPES {
@@ -69,7 +69,7 @@
void Play();
void Pause();
void Stop();
- void SetFrame(unsigned int Nr);
+ void SetFrame(uint Nr);
virtual void SetPos(int X, int Y);
virtual void SetX(int X);
@@ -92,7 +92,7 @@
@param Color eine 24-Bit Farbe, die die Modulationsfarbe der Animation festlegt.
@remark Diese Methode darf nur aufgerufen werden, wenn die Methode IsColorModulationAllowed() true zur\xFCckgibt.
*/
- void SetModulationColor(unsigned int ModulationColor);
+ void SetModulationColor(uint ModulationColor);
/**
@brief Setzt den Skalierungsfaktor der Animation.
@@ -142,7 +142,7 @@
bool IsScalingAllowed() const;
bool IsAlphaAllowed() const;
bool IsColorModulationAllowed() const;
- unsigned int GetCurrentFrame() const {
+ uint GetCurrentFrame() const {
return m_CurrentFrame;
}
const Common::String &GetCurrentAction() const ;
@@ -150,11 +150,11 @@
return m_Running;
}
- typedef bool (*ANIMATION_CALLBACK)(unsigned int);
+ typedef bool (*ANIMATION_CALLBACK)(uint);
- void RegisterLoopPointCallback(ANIMATION_CALLBACK Callback, unsigned int Data = 0);
- void RegisterActionCallback(ANIMATION_CALLBACK Callback, unsigned int Data = 0);
- void RegisterDeleteCallback(ANIMATION_CALLBACK Callback, unsigned int Data = 0);
+ void RegisterLoopPointCallback(ANIMATION_CALLBACK Callback, uint Data = 0);
+ void RegisterActionCallback(ANIMATION_CALLBACK Callback, uint Data = 0);
+ void RegisterDeleteCallback(ANIMATION_CALLBACK Callback, uint Data = 0);
protected:
virtual bool DoRender();
@@ -169,19 +169,19 @@
int m_RelY;
float m_ScaleFactorX;
float m_ScaleFactorY;
- unsigned int m_ModulationColor;
- unsigned int m_CurrentFrame;
+ uint m_ModulationColor;
+ uint m_CurrentFrame;
int m_CurrentFrameTime;
bool m_Running;
bool m_Finished;
DIRECTION m_Direction;
AnimationResource *m_AnimationResourcePtr;
- unsigned int m_AnimationTemplateHandle;
+ uint m_AnimationTemplateHandle;
bool m_FramesLocked;
struct ANIMATION_CALLBACK_DATA {
ANIMATION_CALLBACK Callback;
- unsigned int Data;
+ uint Data;
};
Common::Array<ANIMATION_CALLBACK_DATA> m_LoopPointCallbacks;
Common::Array<ANIMATION_CALLBACK_DATA> m_ActionCallbacks;
Modified: scummvm/trunk/engines/sword25/gfx/animationdescription.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationdescription.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animationdescription.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -47,7 +47,7 @@
// -----------------------------------------------------------------------------
bool AnimationDescription::Persist(OutputPersistenceBlock &Writer) {
- Writer.Write(static_cast<unsigned int>(m_AnimationType));
+ Writer.Write(static_cast<uint>(m_AnimationType));
Writer.Write(m_FPS);
Writer.Write(m_MillisPerFrame);
Writer.Write(m_ScalingAllowed);
@@ -60,7 +60,7 @@
// -----------------------------------------------------------------------------
bool AnimationDescription::Unpersist(InputPersistenceBlock &Reader) {
- unsigned int AnimationType;
+ uint AnimationType;
Reader.Read(AnimationType);
m_AnimationType = static_cast<Animation::ANIMATION_TYPES>(AnimationType);
Reader.Read(m_FPS);
Modified: scummvm/trunk/engines/sword25/gfx/animationdescription.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationdescription.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animationdescription.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -75,8 +75,8 @@
// Abstrakte Methoden
// -----------------------------------------------------------------------------
- virtual const Frame &GetFrame(unsigned int Index) const = 0;
- virtual unsigned int GetFrameCount() const = 0;
+ virtual const Frame &GetFrame(uint Index) const = 0;
+ virtual uint GetFrameCount() const = 0;
virtual void Unlock() = 0;
// -----------------------------------------------------------------------------
Modified: scummvm/trunk/engines/sword25/gfx/animationresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -80,7 +80,7 @@
}
// Load the contents of the file
- unsigned int fileSize;
+ uint fileSize;
char *xmlData = _pPackage->GetXmlFile(GetFileName(), &fileSize);
if (!xmlData) {
BS_LOG_ERRORLN("Could not read \"%s\".", GetFileName().c_str());
Modified: scummvm/trunk/engines/sword25/gfx/animationresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationresource.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animationresource.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -63,11 +63,11 @@
AnimationResource(const Common::String &filename);
virtual ~AnimationResource();
- virtual const Frame &GetFrame(unsigned int Index) const {
+ virtual const Frame &GetFrame(uint Index) const {
BS_ASSERT(Index < m_Frames.size());
return m_Frames[Index];
}
- virtual unsigned int GetFrameCount() const {
+ virtual uint GetFrameCount() const {
return m_Frames.size();
}
virtual void Unlock() {
Modified: scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplate.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -53,7 +53,7 @@
// Konstruktion / Destruktion
// -----------------------------------------------------------------------------
-unsigned int AnimationTemplate::Create(const Common::String &SourceAnimation) {
+uint AnimationTemplate::Create(const Common::String &SourceAnimation) {
AnimationTemplate *AnimationTemplatePtr = new AnimationTemplate(SourceAnimation);
if (AnimationTemplatePtr->IsValid()) {
@@ -66,7 +66,7 @@
// -----------------------------------------------------------------------------
-unsigned int AnimationTemplate::Create(const AnimationTemplate &Other) {
+uint AnimationTemplate::Create(const AnimationTemplate &Other) {
AnimationTemplate *AnimationTemplatePtr = new AnimationTemplate(Other);
if (AnimationTemplatePtr->IsValid()) {
@@ -79,7 +79,7 @@
// -----------------------------------------------------------------------------
-unsigned int AnimationTemplate::Create(InputPersistenceBlock &Reader, unsigned int Handle) {
+uint AnimationTemplate::Create(InputPersistenceBlock &Reader, uint Handle) {
AnimationTemplate *AnimationTemplatePtr = new AnimationTemplate(Reader, Handle);
if (AnimationTemplatePtr->IsValid()) {
@@ -133,7 +133,7 @@
// -----------------------------------------------------------------------------
-AnimationTemplate::AnimationTemplate(InputPersistenceBlock &Reader, unsigned int Handle) {
+AnimationTemplate::AnimationTemplate(InputPersistenceBlock &Reader, uint Handle) {
// Objekt registrieren.
AnimationTemplateRegistry::GetInstance().RegisterObject(this, Handle);
@@ -183,7 +183,7 @@
// -----------------------------------------------------------------------------
-bool AnimationTemplate::ValidateSourceIndex(unsigned int Index) const {
+bool AnimationTemplate::ValidateSourceIndex(uint Index) const {
if (Index > m_SourceAnimationPtr->GetFrameCount()) {
BS_LOG_WARNINGLN("Tried to insert a frame (\"%d\") that does not exist in the source animation (\"%s\"). Ignoring call.",
Index, m_SourceAnimationPtr->GetFileName().c_str());
@@ -194,7 +194,7 @@
// -----------------------------------------------------------------------------
-bool AnimationTemplate::ValidateDestIndex(unsigned int Index) const {
+bool AnimationTemplate::ValidateDestIndex(uint Index) const {
if (Index > m_Frames.size()) {
BS_LOG_WARNINGLN("Tried to change a nonexistent frame (\"%d\") in a template animation. Ignoring call.",
Index);
@@ -249,11 +249,11 @@
Result &= AnimationDescription::Unpersist(Reader);
// Frameanzahl lesen.
- unsigned int FrameCount;
+ uint FrameCount;
Reader.Read(FrameCount);
// Frames einzeln wieder herstellen.
- for (unsigned int i = 0; i < FrameCount; ++i) {
+ for (uint i = 0; i < FrameCount; ++i) {
Frame frame;
Reader.Read(frame.HotspotX);
Reader.Read(frame.HotspotY);
Modified: scummvm/trunk/engines/sword25/gfx/animationtemplate.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplate.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplate.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -57,24 +57,24 @@
class AnimationTemplate : public AnimationDescription {
public:
- static unsigned int Create(const Common::String &SourceAnimation);
- static unsigned int Create(const AnimationTemplate &Other);
- static unsigned int Create(InputPersistenceBlock &Reader, unsigned int Handle);
- AnimationTemplate *ResolveHandle(unsigned int Handle) const;
+ static uint Create(const Common::String &SourceAnimation);
+ static uint Create(const AnimationTemplate &Other);
+ static uint Create(InputPersistenceBlock &Reader, uint Handle);
+ AnimationTemplate *ResolveHandle(uint Handle) const;
private:
AnimationTemplate(const Common::String &SourceAnimation);
AnimationTemplate(const AnimationTemplate &Other);
- AnimationTemplate(InputPersistenceBlock &Reader, unsigned int Handle);
+ AnimationTemplate(InputPersistenceBlock &Reader, uint Handle);
public:
~AnimationTemplate();
- virtual const Frame &GetFrame(unsigned int Index) const {
+ virtual const Frame &GetFrame(uint Index) const {
BS_ASSERT(Index < m_Frames.size());
return m_Frames[Index];
}
- virtual unsigned int GetFrameCount() const {
+ virtual uint GetFrameCount() const {
return m_Frames.size();
}
virtual void Unlock() {
@@ -124,8 +124,8 @@
bool m_Valid;
AnimationResource *RequestSourceAnimation(const Common::String &SourceAnimation) const;
- bool ValidateSourceIndex(unsigned int Index) const;
- bool ValidateDestIndex(unsigned int Index) const;
+ bool ValidateSourceIndex(uint Index) const;
+ bool ValidateDestIndex(uint Index) const;
};
} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/animationtemplateregistry.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -100,13 +100,13 @@
delete m_Handle2PtrMap.begin()->_value;
// Anzahl an BS_AnimationTemplates einlesen.
- unsigned int AnimationTemplateCount;
+ uint AnimationTemplateCount;
Reader.Read(AnimationTemplateCount);
// Alle gespeicherten BS_AnimationTemplates wieder herstellen.
- for (unsigned int i = 0; i < AnimationTemplateCount; ++i) {
+ for (uint i = 0; i < AnimationTemplateCount; ++i) {
// Handle lesen.
- unsigned int Handle;
+ uint Handle;
Reader.Read(Handle);
// BS_AnimationTemplate wieder herstellen.
Modified: scummvm/trunk/engines/sword25/gfx/bitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmap.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/bitmap.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -52,7 +52,7 @@
// Konstruktion / Destruktion
// -----------------------------------------------------------------------------
-Bitmap::Bitmap(RenderObjectPtr<RenderObject> ParentPtr, TYPES Type, unsigned int Handle) :
+Bitmap::Bitmap(RenderObjectPtr<RenderObject> ParentPtr, TYPES Type, uint Handle) :
RenderObject(ParentPtr, Type, Handle),
m_ModulationColor(0xffffffff),
m_ScaleFactorX(1.0f),
@@ -85,7 +85,7 @@
return;
}
- unsigned int NewModulationColor = (m_ModulationColor & 0x00ffffff) | Alpha << 24;
+ uint NewModulationColor = (m_ModulationColor & 0x00ffffff) | Alpha << 24;
if (NewModulationColor != m_ModulationColor) {
m_ModulationColor = NewModulationColor;
ForceRefresh();
@@ -94,13 +94,13 @@
// -----------------------------------------------------------------------------
-void Bitmap::SetModulationColor(unsigned int ModulationColor) {
+void Bitmap::SetModulationColor(uint ModulationColor) {
if (!IsColorModulationAllowed()) {
BS_LOG_WARNINGLN("Tried to set modulation color of a bitmap that does not support color modulation. Call was ignored.");
return;
}
- unsigned int NewModulationColor = (ModulationColor & 0x00ffffff) | (m_ModulationColor & 0xff000000);
+ uint NewModulationColor = (ModulationColor & 0x00ffffff) | (m_ModulationColor & 0xff000000);
if (NewModulationColor != m_ModulationColor) {
m_ModulationColor = NewModulationColor;
ForceRefresh();
Modified: scummvm/trunk/engines/sword25/gfx/bitmap.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmap.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/bitmap.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -50,7 +50,7 @@
class Bitmap : public RenderObject {
protected:
- Bitmap(RenderObjectPtr<RenderObject> ParentPtr, TYPES Type, unsigned int Handle = 0);
+ Bitmap(RenderObjectPtr<RenderObject> ParentPtr, TYPES Type, uint Handle = 0);
public:
@@ -68,7 +68,7 @@
@param Color eine 24-Bit Farbe, die die Modulationsfarbe des Bitmaps festlegt.
@remark Diese Methode darf nur aufgerufen werden, wenn die Methode IsColorModulationAllowed() true zur\xFCckgibt.
*/
- void SetModulationColor(unsigned int ModulationColor);
+ void SetModulationColor(uint ModulationColor);
/**
@brief Setzt den Skalierungsfaktor des Bitmaps.
@@ -159,7 +159,7 @@
@remark Diese Methode sollte auf keine Fall benutzt werden um gr\xF6\xDFere Teile des Bildes zu lesen, da sie sehr langsam ist. Sie ist
eher daf\xFCr gedacht einzelne Pixel des Bildes auszulesen.
*/
- virtual unsigned int GetPixel(int X, int Y) const = 0;
+ virtual uint GetPixel(int X, int Y) const = 0;
/**
@brief F\xFCllt den Inhalt des Bildes mit Pixeldaten.
@@ -172,7 +172,7 @@
@return Gibt false zur\xFCck, falls der Aufruf fehlgeschlagen ist.
@remark Ein Aufruf dieser Methode ist nur erlaubt, wenn IsSetContentAllowed() true zur\xFCckgibt.
*/
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset = 0, unsigned int Stride = 0) = 0;
+ virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset = 0, uint Stride = 0) = 0;
virtual bool IsScalingAllowed() const = 0;
virtual bool IsAlphaAllowed() const = 0;
@@ -187,7 +187,7 @@
bool m_FlipV;
float m_ScaleFactorX;
float m_ScaleFactorY;
- unsigned int m_ModulationColor;
+ uint m_ModulationColor;
int m_OriginalWidth;
int m_OriginalHeight;
};
Modified: scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/bitmapresource.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -58,7 +58,7 @@
// -----------------------------------------------------------------------------
-unsigned int BitmapResource::GetPixel(int X, int Y) const {
+uint BitmapResource::GetPixel(int X, int Y) const {
BS_ASSERT(X >= 0 && X < m_pImage->GetWidth());
BS_ASSERT(Y >= 0 && Y < m_pImage->GetHeight());
Modified: scummvm/trunk/engines/sword25/gfx/bitmapresource.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/bitmapresource.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/bitmapresource.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -125,7 +125,7 @@
bool Blit(int PosX = 0, int PosY = 0,
int Flipping = FLIP_NONE,
Common::Rect *pSrcPartRect = NULL,
- unsigned int Color = BS_ARGB(255, 255, 255, 255),
+ uint Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1) {
BS_ASSERT(m_pImage);
return m_pImage->Blit(PosX, PosY, Flipping, pSrcPartRect, Color, Width, Height);
@@ -144,7 +144,7 @@
BS_RGB und BS_ARGB benutzt werden.
@remark Falls das Rechteck nicht v\xF6llig innerhalb des Bildschirms ist, wird es automatisch zurechtgestutzt.
*/
- bool Fill(const Common::Rect *pFillRect = 0, unsigned int Color = BS_RGB(0, 0, 0)) {
+ bool Fill(const Common::Rect *pFillRect = 0, uint Color = BS_RGB(0, 0, 0)) {
BS_ASSERT(m_pImage);
return m_pImage->Fill(pFillRect, Color);
}
@@ -157,7 +157,7 @@
@remark Diese Methode sollte auf keine Fall benutzt werden um gr\xF6\xDFere Teile des Bildes zu lesen, da sie sehr langsam ist. Sie ist
eher daf\xFCr gedacht einzelne Pixel des Bildes auszulesen.
*/
- unsigned int GetPixel(int X, int Y) const;
+ uint GetPixel(int X, int Y) const;
//@{
/** @name Auskunfts-Methoden */
Modified: scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/dynamicbitmap.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -53,7 +53,7 @@
// Konstruktion / Destruktion
// -----------------------------------------------------------------------------
-DynamicBitmap::DynamicBitmap(RenderObjectPtr<RenderObject> ParentPtr, unsigned int Width, unsigned int Height) :
+DynamicBitmap::DynamicBitmap(RenderObjectPtr<RenderObject> ParentPtr, uint Width, uint Height) :
Bitmap(ParentPtr, TYPE_DYNAMICBITMAP) {
// Das BS_Bitmap konnte nicht erzeugt werden, daher muss an dieser Stelle abgebrochen werden.
if (!m_InitSuccess) return;
@@ -63,14 +63,14 @@
// -----------------------------------------------------------------------------
-DynamicBitmap::DynamicBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+DynamicBitmap::DynamicBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, uint Handle) :
Bitmap(ParentPtr, TYPE_DYNAMICBITMAP, Handle) {
m_InitSuccess = Unpersist(Reader);
}
// -----------------------------------------------------------------------------
-bool DynamicBitmap::CreateGLImage(unsigned int Width, unsigned int Height) {
+bool DynamicBitmap::CreateGLImage(uint Width, uint Height) {
// GLImage mit den gew\xFCnschten Ma\xDFen erstellen
bool Result = false;
m_Image.reset(new GLImage(Width, Height, Result));
@@ -88,7 +88,7 @@
// -----------------------------------------------------------------------------
-unsigned int DynamicBitmap::GetPixel(int X, int Y) const {
+uint DynamicBitmap::GetPixel(int X, int Y) const {
BS_ASSERT(X >= 0 && X < m_Width);
BS_ASSERT(Y >= 0 && Y < m_Height);
@@ -121,7 +121,7 @@
// -----------------------------------------------------------------------------
-bool DynamicBitmap::SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) {
+bool DynamicBitmap::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) {
return m_Image->SetContent(Pixeldata, size, Offset, Stride);
}
Modified: scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/dynamicbitmap.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -58,9 +58,9 @@
public:
virtual ~DynamicBitmap();
- virtual unsigned int GetPixel(int X, int Y) const;
+ virtual uint GetPixel(int X, int Y) const;
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride);
+ virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride);
virtual bool IsScalingAllowed() const;
virtual bool IsAlphaAllowed() const;
@@ -74,10 +74,10 @@
virtual bool DoRender();
private:
- DynamicBitmap(RenderObjectPtr<RenderObject> ParentPtr, unsigned int Width, unsigned int Height);
- DynamicBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ DynamicBitmap(RenderObjectPtr<RenderObject> ParentPtr, uint Width, uint Height);
+ DynamicBitmap(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, uint Handle);
- bool CreateGLImage(unsigned int Width, unsigned int Height);
+ bool CreateGLImage(uint Width, uint Height);
Common::ScopedPtr<GLImage> m_Image;
};
Modified: scummvm/trunk/engines/sword25/gfx/fontresource.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/fontresource.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/fontresource.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -50,8 +50,8 @@
// Konstanten
// -----------------------------------------------------------------------------
-static const unsigned int DEFAULT_LINEHEIGHT = 20;
-static const unsigned int DEFAULT_GAPWIDTH = 1;
+static const uint DEFAULT_LINEHEIGHT = 20;
+static const uint DEFAULT_GAPWIDTH = 1;
// -----------------------------------------------------------------------------
// Konstruktion / Destruktion
@@ -69,7 +69,7 @@
BS_ASSERT(pPackage);
// Load the contents of the file
- unsigned int fileSize;
+ uint fileSize;
char *xmlData = pPackage->GetXmlFile(GetFileName(), &fileSize);
if (!xmlData) {
BS_LOG_ERRORLN("Could not read \"%s\".", GetFileName().c_str());
Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -53,7 +53,7 @@
using namespace Lua;
-static const unsigned int FRAMETIME_SAMPLE_COUNT = 5; // Anzahl der Framezeiten \xFCber die, die Framezeit gemittelt wird
+static const uint FRAMETIME_SAMPLE_COUNT = 5; // Anzahl der Framezeiten \xFCber die, die Framezeit gemittelt wird
GraphicEngine::GraphicEngine(Kernel *pKernel) :
m_Width(0),
@@ -82,13 +82,13 @@
// Verstrichene Zeit seit letztem Frame berechnen und zu gro\xDFe Zeitspr\xFCnge ( > 250 msek.) unterbinden
// (kann vorkommen bei geladenen Spielst\xE4nden, w\xE4hrend des Debuggings oder Hardwareungenauigkeiten)
- m_FrameTimeSamples[m_FrameTimeSampleSlot] = static_cast<unsigned int>(CurrentTime - m_LastTimeStamp);
+ m_FrameTimeSamples[m_FrameTimeSampleSlot] = static_cast<uint>(CurrentTime - m_LastTimeStamp);
if (m_FrameTimeSamples[m_FrameTimeSampleSlot] > 250000) m_FrameTimeSamples[m_FrameTimeSampleSlot] = 250000;
m_FrameTimeSampleSlot = (m_FrameTimeSampleSlot + 1) % FRAMETIME_SAMPLE_COUNT;
// Die Framezeit wird \xFCber mehrere Frames gemittelt um Ausreisser zu eliminieren
- Common::Array<unsigned int>::const_iterator it = m_FrameTimeSamples.begin();
- unsigned int Sum = *it;
+ Common::Array<uint>::const_iterator it = m_FrameTimeSamples.begin();
+ uint Sum = *it;
for (it++; it != m_FrameTimeSamples.end(); it++) Sum += *it;
m_LastFrameDuration = Sum / FRAMETIME_SAMPLE_COUNT;
@@ -100,8 +100,8 @@
namespace {
bool DoSaveScreenshot(GraphicEngine &GraphicEngine, const Common::String &Filename, bool Thumbnail) {
- unsigned int Width;
- unsigned int Height;
+ uint Width;
+ uint Height;
byte *Data;
if (!GraphicEngine.GetScreenshot(Width, Height, &Data)) {
BS_LOG_ERRORLN("Call to GetScreenshot() failed. Cannot save screenshot.");
@@ -129,7 +129,7 @@
// -----------------------------------------------------------------------------
-void GraphicEngine::ARGBColorToLuaColor(lua_State *L, unsigned int Color) {
+void GraphicEngine::ARGBColorToLuaColor(lua_State *L, uint Color) {
lua_Number Components[4] = {
(Color >> 16) & 0xff, // Rot
(Color >> 8) & 0xff, // Gr\xFCn
@@ -139,7 +139,7 @@
lua_newtable(L);
- for (unsigned int i = 1; i <= 4; i++) {
+ for (uint i = 1; i <= 4; i++) {
lua_pushnumber(L, i);
lua_pushnumber(L, Components[i - 1]);
lua_settable(L, -3);
@@ -148,7 +148,7 @@
// -----------------------------------------------------------------------------
-unsigned int GraphicEngine::LuaColorToARGBColor(lua_State *L, int StackIndex) {
+uint GraphicEngine::LuaColorToARGBColor(lua_State *L, int StackIndex) {
#ifdef DEBUG
int __startStackDepth = lua_gettop(L);
#endif
@@ -156,33 +156,33 @@
// Sicherstellen, dass wir wirklich eine Tabelle betrachten
luaL_checktype(L, StackIndex, LUA_TTABLE);
// Gr\xF6\xDFe der Tabelle auslesen
- unsigned int n = luaL_getn(L, StackIndex);
+ uint n = luaL_getn(L, StackIndex);
// RGB oder RGBA Farben werden unterst\xFCtzt und sonst keine
if (n != 3 && n != 4) luaL_argcheck(L, 0, StackIndex, "at least 3 of the 4 color components have to be specified");
// Rote Farbkomponente auslesen
lua_rawgeti(L, StackIndex, 1);
- unsigned int Red = static_cast<unsigned int>(lua_tonumber(L, -1));
+ uint Red = static_cast<uint>(lua_tonumber(L, -1));
if (!lua_isnumber(L, -1) || Red >= 256) luaL_argcheck(L, 0, StackIndex, "red color component must be an integer between 0 and 255");
lua_pop(L, 1);
// Gr\xFCne Farbkomponente auslesen
lua_rawgeti(L, StackIndex, 2);
- unsigned int Green = static_cast<unsigned int>(lua_tonumber(L, -1));
+ uint Green = static_cast<uint>(lua_tonumber(L, -1));
if (!lua_isnumber(L, -1) || Green >= 256) luaL_argcheck(L, 0, StackIndex, "green color component must be an integer between 0 and 255");
lua_pop(L, 1);
// Blaue Farbkomponente auslesen
lua_rawgeti(L, StackIndex, 3);
- unsigned int Blue = static_cast<unsigned int>(lua_tonumber(L, -1));
+ uint Blue = static_cast<uint>(lua_tonumber(L, -1));
if (!lua_isnumber(L, -1) || Blue >= 256) luaL_argcheck(L, 0, StackIndex, "blue color component must be an integer between 0 and 255");
lua_pop(L, 1);
// Alpha Farbkomponente auslesen
- unsigned int Alpha = 0xff;
+ uint Alpha = 0xff;
if (n == 4) {
lua_rawgeti(L, StackIndex, 4);
- Alpha = static_cast<unsigned int>(lua_tonumber(L, -1));
+ Alpha = static_cast<uint>(lua_tonumber(L, -1));
if (!lua_isnumber(L, -1) || Alpha >= 256) luaL_argcheck(L, 0, StackIndex, "alpha color component must be an integer between 0 and 255");
lua_pop(L, 1);
}
Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -64,7 +64,7 @@
class Screenshot;
// Typen
-typedef unsigned int BS_COLOR;
+typedef uint BS_COLOR;
// Makros
#define BS_RGB(R,G,B) (0xFF000000 | ((R) << 16) | ((G) << 8) | (B))
@@ -174,7 +174,7 @@
* @param End The ending point of the line
* @param Color The colour of the line. The default is BS_RGB (255,255,255) (White)
*/
- virtual void DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color = BS_RGB(255, 255, 255)) = 0;
+ virtual void DrawDebugLine(const Vertex &Start, const Vertex &End, uint Color = BS_RGB(255, 255, 255)) = 0;
/**
* Creates a screenshot of the current frame buffer and writes it to a graphic file in PNG format.
@@ -201,7 +201,7 @@
* @param Height Returns the height of the frame buffer
* @param Data Returns the raw data of the frame buffer as an array of 32-bit colour values.
*/
- virtual bool GetScreenshot(unsigned int &Width, unsigned int &Height, byte **Data) = 0;
+ virtual bool GetScreenshot(uint &Width, uint &Height, byte **Data) = 0;
virtual RenderObjectPtr<Panel> GetMainPanel() = 0;
@@ -291,7 +291,7 @@
* @param Color The 32-bit colour with which the area is to be filled. The default is BS_RGB(0, 0, 0) (black)
@remark Falls das Rechteck nicht v\xF6llig innerhalb des Bildschirms ist, wird es automatisch zurechtgestutzt.
*/
- virtual bool Fill(const Common::Rect *FillRectPtr = 0, unsigned int Color = BS_RGB(0, 0, 0)) = 0;
+ virtual bool Fill(const Common::Rect *FillRectPtr = 0, uint Color = BS_RGB(0, 0, 0)) = 0;
// Debugging Methods
@@ -362,8 +362,8 @@
virtual bool Persist(OutputPersistenceBlock &Writer);
virtual bool Unpersist(InputPersistenceBlock &Reader);
- static void ARGBColorToLuaColor(lua_State *L, unsigned int Color);
- static unsigned int LuaColorToARGBColor(lua_State *L, int StackIndex);
+ static void ARGBColorToLuaColor(lua_State *L, uint Color);
+ static uint LuaColorToARGBColor(lua_State *L, int StackIndex);
protected:
// Constructor
@@ -382,7 +382,7 @@
// -------------------
Framecounter m_FPSCounter;
- unsigned int m_RepaintedPixels;
+ uint m_RepaintedPixels;
/**
* Calculates the time since the last frame beginning has passed.
@@ -395,10 +395,10 @@
// LastFrameDuration Variables
// ---------------------------
uint64 m_LastTimeStamp;
- unsigned int m_LastFrameDuration;
+ uint m_LastFrameDuration;
bool m_TimerActive;
- Common::Array<unsigned int> m_FrameTimeSamples;
- unsigned int m_FrameTimeSampleSlot;
+ Common::Array<uint> m_FrameTimeSamples;
+ uint m_FrameTimeSampleSlot;
};
} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -61,9 +61,9 @@
// Callback-Objekte
// -----------------------------------------------------------------------------
-static bool AnimationDeleteCallback(unsigned int Data);
-static bool AnimationActionCallback(unsigned int Data);
-static bool AnimationLoopPointCallback(unsigned int Data);
+static bool AnimationDeleteCallback(uint Data);
+static bool AnimationActionCallback(uint Data);
+static bool AnimationLoopPointCallback(uint Data);
namespace {
// -------------------------------------------------------------------------
@@ -133,7 +133,7 @@
// -----------------------------------------------------------------------------
-static void NewUintUserData(lua_State *L, unsigned int Value) {
+static void NewUintUserData(lua_State *L, uint Value) {
void *UserData = lua_newuserdata(L, sizeof(Value));
memcpy(UserData, &Value, sizeof(Value));
}
@@ -142,8 +142,8 @@
static AnimationTemplate *CheckAnimationTemplate(lua_State *L, int idx = 1) {
// Der erste Parameter muss vom Typ userdata sein und die Metatable der Klasse Gfx.AnimationTemplate
- unsigned int AnimationTemplateHandle;
- if ((AnimationTemplateHandle = *reinterpret_cast<unsigned int *>(my_checkudata(L, idx, ANIMATION_TEMPLATE_CLASS_NAME))) != 0) {
+ uint AnimationTemplateHandle;
+ if ((AnimationTemplateHandle = *reinterpret_cast<uint *>(my_checkudata(L, idx, ANIMATION_TEMPLATE_CLASS_NAME))) != 0) {
AnimationTemplate *AnimationTemplatePtr = AnimationTemplateRegistry::GetInstance().ResolveHandle(AnimationTemplateHandle);
if (!AnimationTemplatePtr)
luaL_error(L, "The animation template with the handle %d does no longer exist.", AnimationTemplateHandle);
@@ -158,7 +158,7 @@
// -----------------------------------------------------------------------------
static int NewAnimationTemplate(lua_State *L) {
- unsigned int AnimationTemplateHandle = AnimationTemplate::Create(luaL_checkstring(L, 1));
+ uint AnimationTemplateHandle = AnimationTemplate::Create(luaL_checkstring(L, 1));
AnimationTemplate *AnimationTemplatePtr = AnimationTemplateRegistry::GetInstance().ResolveHandle(AnimationTemplateHandle);
if (AnimationTemplatePtr && AnimationTemplatePtr->IsValid()) {
NewUintUserData(L, AnimationTemplateHandle);
@@ -514,11 +514,11 @@
static RenderObjectPtr<RenderObject> CheckRenderObject(lua_State *L, bool ErrorIfRemoved = true) {
// Der erste Parameter muss vom Typ userdata sein und die Metatable einer Klasse haben, die von Gfx.RenderObject "erbt".
- unsigned int *UserDataPtr;
- if ((UserDataPtr = (unsigned int *) my_checkudata(L, 1, BITMAP_CLASS_NAME)) != 0 ||
- (UserDataPtr = (unsigned int *) my_checkudata(L, 1, ANIMATION_CLASS_NAME)) != 0 ||
- (UserDataPtr = (unsigned int *) my_checkudata(L, 1, PANEL_CLASS_NAME)) != 0 ||
- (UserDataPtr = (unsigned int *) my_checkudata(L, 1, TEXT_CLASS_NAME)) != 0) {
+ uint *UserDataPtr;
+ if ((UserDataPtr = (uint *) my_checkudata(L, 1, BITMAP_CLASS_NAME)) != 0 ||
+ (UserDataPtr = (uint *) my_checkudata(L, 1, ANIMATION_CLASS_NAME)) != 0 ||
+ (UserDataPtr = (uint *) my_checkudata(L, 1, PANEL_CLASS_NAME)) != 0 ||
+ (UserDataPtr = (uint *) my_checkudata(L, 1, TEXT_CLASS_NAME)) != 0) {
RenderObjectPtr<RenderObject> ROPtr(* UserDataPtr);
if (ROPtr.IsValid())
return ROPtr;
@@ -776,8 +776,8 @@
static RenderObjectPtr<Panel> CheckPanel(lua_State *L) {
// Der erste Parameter muss vom Typ userdata sein und die Metatable der Klasse Gfx.Panel
- unsigned int *UserDataPtr;
- if ((UserDataPtr = (unsigned int *) my_checkudata(L, 1, PANEL_CLASS_NAME)) != 0) {
+ uint *UserDataPtr;
+ if ((UserDataPtr = (uint *) my_checkudata(L, 1, PANEL_CLASS_NAME)) != 0) {
RenderObjectPtr<RenderObject> ROPtr(*UserDataPtr);
if (ROPtr.IsValid()) {
return ROPtr->ToPanel();
@@ -831,8 +831,8 @@
static RenderObjectPtr<Bitmap> CheckBitmap(lua_State *L) {
// Der erste Parameter muss vom Typ userdata sein und die Metatable der Klasse Gfx.Bitmap
- unsigned int *UserDataPtr;
- if ((UserDataPtr = (unsigned int *) my_checkudata(L, 1, BITMAP_CLASS_NAME)) != 0) {
+ uint *UserDataPtr;
+ if ((UserDataPtr = (uint *) my_checkudata(L, 1, BITMAP_CLASS_NAME)) != 0) {
RenderObjectPtr<RenderObject> ROPtr(*UserDataPtr);
if (ROPtr.IsValid()) {
return ROPtr->ToBitmap();
@@ -850,7 +850,7 @@
static int B_SetAlpha(lua_State *L) {
RenderObjectPtr<Bitmap> BitmapPtr = CheckBitmap(L);
BS_ASSERT(BitmapPtr.IsValid());
- BitmapPtr->SetAlpha(static_cast<unsigned int>(luaL_checknumber(L, 2)));
+ BitmapPtr->SetAlpha(static_cast<uint>(luaL_checknumber(L, 2)));
return 0;
}
@@ -1036,8 +1036,8 @@
static RenderObjectPtr<Animation> CheckAnimation(lua_State *L) {
// Der erste Parameter muss vom Typ userdata sein und die Metatable der Klasse Gfx.Animation
- unsigned int *UserDataPtr;
- if ((UserDataPtr = (unsigned int *) my_checkudata(L, 1, ANIMATION_CLASS_NAME)) != 0) {
+ uint *UserDataPtr;
+ if ((UserDataPtr = (uint *) my_checkudata(L, 1, ANIMATION_CLASS_NAME)) != 0) {
RenderObjectPtr<RenderObject> ROPtr(*UserDataPtr);
if (ROPtr.IsValid())
return ROPtr->ToAnimation();
@@ -1083,7 +1083,7 @@
static int A_SetFrame(lua_State *L) {
RenderObjectPtr<Animation> AnimationPtr = CheckAnimation(L);
BS_ASSERT(AnimationPtr.IsValid());
- AnimationPtr->SetFrame(static_cast<unsigned int>(luaL_checknumber(L, 2)));
+ AnimationPtr->SetFrame(static_cast<uint>(luaL_checknumber(L, 2)));
return 0;
}
@@ -1245,7 +1245,7 @@
// -----------------------------------------------------------------------------
-static bool AnimationLoopPointCallback(unsigned int Handle) {
+static bool AnimationLoopPointCallback(uint Handle) {
lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
LoopPointCallbackPtr->InvokeCallbackFunctions(L, Handle);
@@ -1280,7 +1280,7 @@
// -----------------------------------------------------------------------------
-static bool AnimationActionCallback(unsigned int Handle) {
+static bool AnimationActionCallback(uint Handle) {
RenderObjectPtr<Animation> AnimationPtr(Handle);
if (AnimationPtr.IsValid()) {
ActionCallbackPtr->Action = AnimationPtr->GetCurrentAction();
@@ -1319,7 +1319,7 @@
// -----------------------------------------------------------------------------
-static bool AnimationDeleteCallback(unsigned int Handle) {
+static bool AnimationDeleteCallback(uint Handle) {
lua_State *L = static_cast<lua_State *>(Kernel::GetInstance()->GetScript()->GetScriptObject());
LoopPointCallbackPtr->RemoveAllObjectCallbacks(L, Handle);
@@ -1370,8 +1370,8 @@
static RenderObjectPtr<Text> CheckText(lua_State *L) {
// Der erste Parameter muss vom Typ userdata sein und die Metatable der Klasse Gfx.Text
- unsigned int *UserDataPtr;
- if ((UserDataPtr = (unsigned int *) my_checkudata(L, 1, TEXT_CLASS_NAME)) != 0) {
+ uint *UserDataPtr;
+ if ((UserDataPtr = (uint *) my_checkudata(L, 1, TEXT_CLASS_NAME)) != 0) {
RenderObjectPtr<RenderObject> ROPtr(*UserDataPtr);
if (ROPtr.IsValid())
return ROPtr->ToText();
@@ -1434,7 +1434,7 @@
static int T_SetAutoWrapThreshold(lua_State *L) {
RenderObjectPtr<Text> TextPtr = CheckText(L);
BS_ASSERT(TextPtr.IsValid());
- TextPtr->SetAutoWrapThreshold(static_cast<unsigned int>(luaL_checknumber(L, 2)));
+ TextPtr->SetAutoWrapThreshold(static_cast<uint>(luaL_checknumber(L, 2)));
return 0;
}
Modified: scummvm/trunk/engines/sword25/gfx/image/b25sloader.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/b25sloader.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/b25sloader.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -46,24 +46,24 @@
// -----------------------------------------------------------------------------
namespace {
-unsigned int FindEmbeddedPNG(const byte *FileDataPtr, unsigned int FileSize) {
+uint FindEmbeddedPNG(const byte *FileDataPtr, uint FileSize) {
if (memcmp(FileDataPtr, "BS25SAVEGAME", 12))
return 0;
#if 0
// Einen Stringstream mit dem Anfang der Datei intialisieren. 512 Byte sollten hierf\xFCr gen\xFCgen.
- istringstream StringStream(string(FileDataPtr, FileDataPtr + min(static_cast<unsigned int>(512), FileSize)));
+ istringstream StringStream(string(FileDataPtr, FileDataPtr + min(static_cast<uint>(512), FileSize)));
// Headerinformationen der Spielstandes einlesen.
string Marker, VersionID;
- unsigned int CompressedGamedataSize, UncompressedGamedataSize;
+ uint CompressedGamedataSize, UncompressedGamedataSize;
StringStream >> Marker >> VersionID >> CompressedGamedataSize >> UncompressedGamedataSize;
if (!StringStream.good()) return 0;
// Testen, ob wir tats\xE4chlich einen Spielstand haben.
if (Marker == "BS25SAVEGAME") {
// Offset zum PNG innerhalb des Spielstandes berechnen und zur\xFCckgeben.
- return static_cast<unsigned int>(StringStream.tellg()) + CompressedGamedataSize + 1;
+ return static_cast<uint>(StringStream.tellg()) + CompressedGamedataSize + 1;
}
#else
warning("STUB:FindEmbeddedPNG()");
@@ -75,9 +75,9 @@
// -----------------------------------------------------------------------------
-bool B25SLoader::IsCorrectImageFormat(const byte *FileDataPtr, unsigned int FileSize) {
+bool B25SLoader::IsCorrectImageFormat(const byte *FileDataPtr, uint FileSize) {
// PNG innerhalb des Spielstandes finden und den Methodenaufruf zu BS_PNGLoader weiterreichen.
- unsigned int PNGOffset = FindEmbeddedPNG(FileDataPtr, FileSize);
+ uint PNGOffset = FindEmbeddedPNG(FileDataPtr, FileSize);
if (PNGOffset > 0) {
return PNGLoader::DoIsCorrectImageFormat(FileDataPtr + PNGOffset, FileSize - PNGOffset);
}
@@ -87,10 +87,10 @@
// -----------------------------------------------------------------------------
-bool B25SLoader::DecodeImage(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
+bool B25SLoader::DecodeImage(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
int &Width, int &Height, int &Pitch) {
// PNG innerhalb des Spielstandes finden und den Methodenaufruf zu BS_PNGLoader weiterreichen.
- unsigned int PNGOffset = FindEmbeddedPNG(FileDataPtr, FileSize);
+ uint PNGOffset = FindEmbeddedPNG(FileDataPtr, FileSize);
if (PNGOffset > 0) {
return PNGLoader::DoDecodeImage(FileDataPtr + PNGOffset, FileSize - PNGOffset, ColorFormat, UncompressedDataPtr, Width, Height, Pitch);
}
@@ -100,9 +100,9 @@
// -----------------------------------------------------------------------------
-bool B25SLoader::ImageProperties(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height) {
+bool B25SLoader::ImageProperties(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height) {
// PNG innerhalb des Spielstandes finden und den Methodenaufruf zu BS_PNGLoader weiterreichen.
- unsigned int PNGOffset = FindEmbeddedPNG(FileDataPtr, FileSize);
+ uint PNGOffset = FindEmbeddedPNG(FileDataPtr, FileSize);
if (PNGOffset > 0) {
return PNGLoader::DoImageProperties(FileDataPtr + PNGOffset, FileSize - PNGOffset, ColorFormat, Width, Height);
}
Modified: scummvm/trunk/engines/sword25/gfx/image/b25sloader.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/b25sloader.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/b25sloader.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -57,10 +57,10 @@
}
protected:
- virtual bool IsCorrectImageFormat(const byte *FileDataPtr, unsigned int FileSize);
- virtual bool DecodeImage(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
+ virtual bool IsCorrectImageFormat(const byte *FileDataPtr, uint FileSize);
+ virtual bool DecodeImage(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
int &Width, int &Height, int &Pitch);
- virtual bool ImageProperties(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height);
+ virtual bool ImageProperties(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height);
};
Modified: scummvm/trunk/engines/sword25/gfx/image/image.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/image.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/image.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -134,7 +134,7 @@
virtual bool Blit(int PosX = 0, int PosY = 0,
int Flipping = FLIP_NONE,
Common::Rect *pPartRect = NULL,
- unsigned int Color = BS_ARGB(255, 255, 255, 255),
+ uint Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1) = 0;
/**
@@ -149,7 +149,7 @@
BS_RGB und BS_ARGB benutzt werden.
@remark Falls das Rechteck nicht v\xF6llig innerhalb des Bildschirms ist, wird es automatisch zurechtgestutzt.
*/
- virtual bool Fill(const Common::Rect *pFillRect = 0, unsigned int Color = BS_RGB(0, 0, 0)) = 0;
+ virtual bool Fill(const Common::Rect *pFillRect = 0, uint Color = BS_RGB(0, 0, 0)) = 0;
/**
@brief F\xFCllt den Inhalt des Bildes mit Pixeldaten.
@@ -162,7 +162,7 @@
@return Gibt false zur\xFCck, falls der Aufruf fehlgeschlagen ist.
@remark Ein Aufruf dieser Methode ist nur erlaubt, wenn IsSetContentAllowed() true zur\xFCckgibt.
*/
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) = 0;
+ virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) = 0;
/**
@brief Liest einen Pixel des Bildes.
@@ -172,7 +172,7 @@
@remark Diese Methode sollte auf keine Fall benutzt werden um gr\xF6\xDFere Teile des Bildes zu lesen, da sie sehr langsam ist. Sie ist
eher daf\xFCr gedacht einzelne Pixel des Bildes auszulesen.
*/
- virtual unsigned int GetPixel(int X, int Y) = 0;
+ virtual uint GetPixel(int X, int Y) = 0;
//@{
/** @name Auskunfts-Methoden */
Modified: scummvm/trunk/engines/sword25/gfx/image/imageloader.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/imageloader.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/imageloader.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -46,7 +46,7 @@
// Lade Methode
// ------------
-bool ImageLoader::LoadImage(const byte *pFileData, unsigned int FileSize,
+bool ImageLoader::LoadImage(const byte *pFileData, uint FileSize,
GraphicEngine::COLOR_FORMATS ColorFormat,
byte *&pUncompressedData,
int &Width, int &Height,
@@ -71,7 +71,7 @@
// Info Methode
// ------------
-bool ImageLoader::ExtractImageProperties(const byte *pFileData, unsigned int FileSize,
+bool ImageLoader::ExtractImageProperties(const byte *pFileData, uint FileSize,
GraphicEngine::COLOR_FORMATS &ColorFormat,
int &Width, int &Height) {
// Falls die Liste der BS_ImageLoader noch nicht initialisiert wurde, wird dies getan.
@@ -111,7 +111,7 @@
}
}
-ImageLoader *ImageLoader::_FindSuitableImageLoader(const byte *pFileData, unsigned int FileSize) {
+ImageLoader *ImageLoader::_FindSuitableImageLoader(const byte *pFileData, uint FileSize) {
// Alle BS_ImageLoader-Objekte durchgehen, bis eins gefunden wurde, dass das Bild laden kann
Common::List<ImageLoader *>::iterator Iter = _ImageLoaderList.begin();
for (; Iter != _ImageLoaderList.end(); ++Iter) {
Modified: scummvm/trunk/engines/sword25/gfx/image/imageloader.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/imageloader.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/imageloader.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -99,7 +99,7 @@
@remark Die Gr\xF6\xDFe der Ausgabedaten in Bytes kann wie folgt berechnet werden: Pitch * Height.
@remark Es darf nicht vergessen werden, die Ausgabedaten nach erfolgter Benutzung mit delete freizugeben.
*/
- static bool LoadImage(const byte *pFileData, unsigned int FileSize,
+ static bool LoadImage(const byte *pFileData, uint FileSize,
GraphicEngine::COLOR_FORMATS ColorFormat,
byte *&pUncompressedData,
int &Width, int &Height,
@@ -116,7 +116,7 @@
@return Gibt false zur\xFCck, wenn die Bildeigenschaften nicht ausgelesen werden konnten.
@remark Es darf nicht vergessen werden, die Ausgabedaten nach erfolgter Benutzung mit delete freizugeben.
*/
- static bool ExtractImageProperties(const byte *pFileData, unsigned int FileSize,
+ static bool ExtractImageProperties(const byte *pFileData, uint FileSize,
GraphicEngine::COLOR_FORMATS &ColorFormat,
int &Width, int &Height);
//@}
@@ -148,7 +148,7 @@
@return Gibt true zur\xFCck, wenn der #BS_ImageLoader das Bild lesen kann, ansonsten false.
@remark Diese Methode muss von allen BS_ImageLoader Klassen implementiert werden.
*/
- virtual bool IsCorrectImageFormat(const byte *pFileData, unsigned int FileSize) = 0;
+ virtual bool IsCorrectImageFormat(const byte *pFileData, uint FileSize) = 0;
/**
@brief L\xE4dt eine Bilddatei.
@@ -170,7 +170,7 @@
@remark Es darf nicht vergessen werden, die Ausgabedaten nach erfolgter Benutzung mit delete freizugeben.
@remark Diese Methode muss von allen BS_ImageLoader Klassen implementiert werden.
*/
- virtual bool DecodeImage(const byte *pFileData, unsigned int FileSize,
+ virtual bool DecodeImage(const byte *pFileData, uint FileSize,
GraphicEngine::COLOR_FORMATS ColorFormat,
byte *&pUncompressedData,
int &Width, int &Height,
@@ -187,7 +187,7 @@
@remark Es darf nicht vergessen werden, die Ausgabedaten nach erfolgter Benutzung mit delete freizugeben.
@remark Diese Methode muss von allen BS_ImageLoader Klassen implementiert werden.
*/
- virtual bool ImageProperties(const byte *pFileData, unsigned int FileSize,
+ virtual bool ImageProperties(const byte *pFileData, uint FileSize,
GraphicEngine::COLOR_FORMATS &ColorFormat,
int &Width, int &Height) = 0;
@@ -204,8 +204,8 @@
@remark Es gilt zu beachten, dass der Zielpuffer ausreichend gro\xDF ist.<br>
Es sind mindestens Width * 2 Byte notwendig.
*/
- static void RowARGB32ToRGB16(byte *pSrcData, byte *pDestData, unsigned int Width) {
- for (unsigned int i = 0; i < Width; i++) {
+ static void RowARGB32ToRGB16(byte *pSrcData, byte *pDestData, uint Width) {
+ for (uint i = 0; i < Width; i++) {
((uint16_t *)pDestData)[i] = ((pSrcData[2] >> 3) << 11) | ((pSrcData[1] >> 2) << 5) | (pSrcData[0] >> 3);
pSrcData += 4;
}
@@ -219,8 +219,8 @@
@remark Es gilt zu beachten, dass der Zielpuffer ausreichend gro\xDF ist.<br>
Es sind mindestens Width * 2 Byte notwendig.
*/
- static void RowARGB32ToRGB15(byte *pSrcData, byte *pDestData, unsigned int Width) {
- for (unsigned int i = 0; i < Width; i++) {
+ static void RowARGB32ToRGB15(byte *pSrcData, byte *pDestData, uint Width) {
+ for (uint i = 0; i < Width; i++) {
((uint16_t *)pDestData)[i] = ((pSrcData[2] >> 3) << 10) | ((pSrcData[1] >> 3) << 5) | (pSrcData[0] >> 3);
pSrcData += 4;
}
@@ -234,11 +234,11 @@
@remark Es gilt zu beachten, dass der Zielpuffer ausreichend gro\xDF sein muss.<br>
Es sind mindestens ((Width + 3) / 4) * 12 Byte notwendig.
*/
- static void RowARGB32ToRGB16_INTERLEAVED(byte *pSrcData, byte *pDestData, unsigned int Width) {
+ static void RowARGB32ToRGB16_INTERLEAVED(byte *pSrcData, byte *pDestData, uint Width) {
// Die Pixelbl\xF6cke erstellen, dabei werden immer jeweils 4 Pixel zu einem Block zusammengefasst
- unsigned int BlockFillCount = 0;
- unsigned int AlphaBlock = 0;
- for (unsigned int i = 0; i < Width; i++) {
+ uint BlockFillCount = 0;
+ uint AlphaBlock = 0;
+ for (uint i = 0; i < Width; i++) {
// Alphawert in den Alphablock schreiben
AlphaBlock = (AlphaBlock >> 8) | (pSrcData[BlockFillCount * 4 + 3] << 24);
@@ -252,7 +252,7 @@
AlphaBlock >>= (4 - BlockFillCount) * 8;
// Alphablock schreiben
- *((unsigned int *)pDestData) = AlphaBlock;
+ *((uint *)pDestData) = AlphaBlock;
pDestData += 4;
// Pixel konvertieren und schreiben
@@ -278,11 +278,11 @@
@remark Es gilt zu beachten, dass der Zielpuffer ausreichend gro\xDF ist.<br>
Es sind mindestens (Width / 4 + Width % 4) * 3 Byte notwendig.
*/
- static void RowARGB32ToRGB15_INTERLEAVED(byte *pSrcData, byte *pDestData, unsigned int Width) {
+ static void RowARGB32ToRGB15_INTERLEAVED(byte *pSrcData, byte *pDestData, uint Width) {
// Die Pixelbl\xF6cke erstellen, dabei werden immer jeweils 4 Pixel zu einem Block zusammengefasst
- unsigned int BlockFillCount = 0;
- unsigned int AlphaBlock = 0;
- for (unsigned int i = 0; i < Width; i++) {
+ uint BlockFillCount = 0;
+ uint AlphaBlock = 0;
+ for (uint i = 0; i < Width; i++) {
// Alphawert in den Alphablock schreiben
AlphaBlock = (AlphaBlock >> 8) | (pSrcData[BlockFillCount * 4 + 3] << 24);
@@ -296,7 +296,7 @@
AlphaBlock >>= (4 - BlockFillCount) * 8;
// Alphablock schreiben
- *((unsigned int *)pDestData) = AlphaBlock;
+ *((uint *)pDestData) = AlphaBlock;
pDestData += 4;
// Pixel konvertieren und schreiben
@@ -320,8 +320,8 @@
@param pDestData ein Pointer auf den Zielpuffern.
@param Width die Anzahl der Pixel in der Bildzeile.
*/
- static void RowARGB32ToABGR32(byte *pSrcData, byte *pDestData, unsigned int Width) {
- for (unsigned int i = 0; i < Width; ++i) {
+ static void RowARGB32ToABGR32(byte *pSrcData, byte *pDestData, uint Width) {
+ for (uint i = 0; i < Width; ++i) {
*pDestData++ = pSrcData[2];
*pDestData++ = pSrcData[1];
*pDestData++ = pSrcData[0];
@@ -349,7 +349,7 @@
@brief Sucht zu Bilddaten ein BS_ImageLoader Objekt, dass die Bilddaten dekodieren kann.
@return Gibt einen Pointer auf ein passendes BS_ImageLoader Objekt zur\xFCck, oder NULL, wenn kein passendes Objekt gefunden wurde.
*/
- static ImageLoader *_FindSuitableImageLoader(const byte *pFileData, unsigned int FileSize);
+ static ImageLoader *_FindSuitableImageLoader(const byte *pFileData, uint FileSize);
static Common::List<ImageLoader *> _ImageLoaderList; // Die Liste aller BS_ImageLoader-Objekte
static bool _ImageLoaderListInitialized; // Gibt an, ob die Liste schon intialisiert wurde
Modified: scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/pngloader.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -62,7 +62,7 @@
// -----------------------------------------------------------------------------
-bool PNGLoader::DoDecodeImage(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
+bool PNGLoader::DoDecodeImage(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
int &Width, int &Height, int &Pitch) {
png_structp png_ptr = NULL;
png_infop info_ptr = NULL;
@@ -259,14 +259,14 @@
// -----------------------------------------------------------------------------
-bool PNGLoader::DecodeImage(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
+bool PNGLoader::DecodeImage(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
int &Width, int &Height, int &Pitch) {
return DoDecodeImage(FileDataPtr, FileSize, ColorFormat, UncompressedDataPtr, Width, Height, Pitch);
}
// -----------------------------------------------------------------------------
-bool PNGLoader::DoImageProperties(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height) {
+bool PNGLoader::DoImageProperties(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height) {
// PNG Signatur \xFCberpr\xFCfen
if (!DoIsCorrectImageFormat(FileDataPtr, FileSize)) return false;
@@ -310,7 +310,7 @@
// -----------------------------------------------------------------------------
-bool PNGLoader::ImageProperties(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height) {
+bool PNGLoader::ImageProperties(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height) {
return DoImageProperties(FileDataPtr, FileSize, ColorFormat, Width, Height);
}
@@ -318,7 +318,7 @@
// Header \xFCberpr\xFCfen
// -----------------------------------------------------------------------------
-bool PNGLoader::DoIsCorrectImageFormat(const byte *FileDataPtr, unsigned int FileSize) {
+bool PNGLoader::DoIsCorrectImageFormat(const byte *FileDataPtr, uint FileSize) {
if (FileSize > 8)
return png_check_sig(const_cast<byte *>(FileDataPtr), 8) ? true : false;
else
@@ -327,7 +327,7 @@
// -----------------------------------------------------------------------------
-bool PNGLoader::IsCorrectImageFormat(const byte *FileDataPtr, unsigned int FileSize) {
+bool PNGLoader::IsCorrectImageFormat(const byte *FileDataPtr, uint FileSize) {
return DoIsCorrectImageFormat(FileDataPtr, FileSize);
}
Modified: scummvm/trunk/engines/sword25/gfx/image/pngloader.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/pngloader.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/pngloader.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -60,20 +60,20 @@
// Alle virtuellen Methoden von BS_ImageLoader sind hier als static-Methode implementiert, damit sie von BS_B25SLoader aufgerufen werden k\xF6nnen.
// Die virtuellen Methoden rufen diese Methoden auf.
- static bool DoIsCorrectImageFormat(const byte *FileDataPtr, unsigned int FileSize);
- static bool DoDecodeImage(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
+ static bool DoIsCorrectImageFormat(const byte *FileDataPtr, uint FileSize);
+ static bool DoDecodeImage(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS ColorFormat, byte *&UncompressedDataPtr,
int &Width, int &Height, int &Pitch);
- static bool DoImageProperties(const byte *FileDataPtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height);
+ static bool DoImageProperties(const byte *FileDataPtr, uint FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height);
protected:
PNGLoader();
- bool DecodeImage(const byte *pFileData, unsigned int FileSize,
+ bool DecodeImage(const byte *pFileData, uint FileSize,
GraphicEngine::COLOR_FORMATS ColorFormat,
byte *&pUncompressedData,
int &Width, int &Height,
int &Pitch);
- bool IsCorrectImageFormat(const byte *FileDataPtr, unsigned int FileSize);
- bool ImageProperties(const byte *FileDatePtr, unsigned int FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height);
+ bool IsCorrectImageFormat(const byte *FileDataPtr, uint FileSize);
+ bool ImageProperties(const byte *FileDatePtr, uint FileSize, GraphicEngine::COLOR_FORMATS &ColorFormat, int &Width, int &Height);
};
} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -60,11 +60,11 @@
class VectorImage::SWFBitStream {
public:
- SWFBitStream(const byte *pData, unsigned int DataSize) :
+ SWFBitStream(const byte *pData, uint DataSize) :
m_Pos(pData), m_End(pData + DataSize), m_WordMask(0)
{}
- inline uint32 GetBits(unsigned int BitCount) {
+ inline uint32 GetBits(uint BitCount) {
if (BitCount == 0 || BitCount > 32) {
error("SWFBitStream::GetBits() must read at least 1 and at most 32 bits at a time");
}
@@ -83,7 +83,7 @@
return value;
}
- inline int32 GetSignedBits(unsigned int BitCount) {
+ inline int32 GetSignedBits(uint BitCount) {
// Bits einlesen
uint32 Temp = GetBits(BitCount);
@@ -130,7 +130,7 @@
}
}
- inline void SkipBytes(unsigned int SkipLength) {
+ inline void SkipBytes(uint SkipLength) {
FlushByte();
if (m_Pos + SkipLength >= m_End) {
error("Attempted to read past end of file");
@@ -145,7 +145,7 @@
const byte *m_End;
byte m_Word;
- unsigned int m_WordMask;
+ uint m_WordMask;
};
@@ -185,7 +185,7 @@
// Konvertiert SWF-Farben in AntiGrain Farben
// -----------------------------------------------------------------------------
-uint32 FlashColorToAGGRGBA8(unsigned int FlashColor) {
+uint32 FlashColorToAGGRGBA8(uint FlashColor) {
uint32 ResultColor = Graphics::ARGBToColor<Graphics::ColorMasks<8888> >(FlashColor >> 24, (FlashColor >> 16) & 0xff, (FlashColor >> 8) & 0xff, FlashColor & 0xff);
return ResultColor;
@@ -224,7 +224,7 @@
// Konstruktion
// -----------------------------------------------------------------------------
-VectorImage::VectorImage(const byte *pFileData, unsigned int FileSize, bool &Success) {
+VectorImage::VectorImage(const byte *pFileData, uint FileSize, bool &Success) {
Success = false;
// Bitstream-Objekt erzeugen
@@ -303,7 +303,7 @@
// -----------------------------------------------------------------------------
-bool VectorImage::ParseDefineShape(unsigned int ShapeType, SWFBitStream &bs) {
+bool VectorImage::ParseDefineShape(uint ShapeType, SWFBitStream &bs) {
/*uint32 ShapeID = */bs.GetUInt16();
// Bounding Box auslesen
@@ -313,14 +313,14 @@
m_Elements.resize(1);
// Styles einlesen
- unsigned int NumFillBits;
- unsigned int NumLineBits;
+ uint NumFillBits;
+ uint NumLineBits;
if (!ParseStyles(ShapeType, bs, NumFillBits, NumLineBits))
return false;
- unsigned int LineStyle = 0;
- unsigned int FillStyle0 = 0;
- unsigned int FillStyle1 = 0;
+ uint LineStyle = 0;
+ uint FillStyle0 = 0;
+ uint FillStyle1 = 0;
// Shaperecord parsen
// ------------------
@@ -451,20 +451,20 @@
// -----------------------------------------------------------------------------
-bool VectorImage::ParseStyles(unsigned int ShapeType, SWFBitStream &bs, unsigned int &NumFillBits, unsigned int &NumLineBits) {
+bool VectorImage::ParseStyles(uint ShapeType, SWFBitStream &bs, uint &NumFillBits, uint &NumLineBits) {
bs.FlushByte();
// Fillstyles parsen
// -----------------
// Anzahl an Fillstyles bestimmen
- unsigned int FillStyleCount = bs.GetByte();
+ uint FillStyleCount = bs.GetByte();
if (FillStyleCount == 0xff) FillStyleCount = bs.GetUInt16();
// Alle Fillstyles einlesen, falls ein Fillstyle mit Typ != 0 gefunden wird, wird das Parsen abgebrochen.
// Es wird nur "solid fill" (Typ 0) unterst\xFCtzt.
m_Elements.back().m_FillStyles.reserve(FillStyleCount);
- for (unsigned int i = 0; i < FillStyleCount; ++i) {
+ for (uint i = 0; i < FillStyleCount; ++i) {
byte Type = bs.GetByte();
uint32 Color;
if (ShapeType == 3) {
@@ -480,13 +480,13 @@
// -----------------
// Anzahl an Linestyles bestimmen
- unsigned int LineStyleCount = bs.GetByte();
+ uint LineStyleCount = bs.GetByte();
if (LineStyleCount == 0xff)
LineStyleCount = bs.GetUInt16();
// Alle Linestyles einlesen
m_Elements.back().m_LineStyles.reserve(LineStyleCount);
- for (unsigned int i = 0; i < LineStyleCount; ++i) {
+ for (uint i = 0; i < LineStyleCount; ++i) {
double Width = bs.GetUInt16();
uint32 Color;
if (ShapeType == 3)
@@ -507,7 +507,7 @@
// -----------------------------------------------------------------------------
-bool VectorImage::Fill(const Common::Rect *pFillRect, unsigned int Color) {
+bool VectorImage::Fill(const Common::Rect *pFillRect, uint Color) {
BS_LOG_ERRORLN("Fill() is not supported.");
return false;
}
@@ -515,14 +515,14 @@
// -----------------------------------------------------------------------------
-unsigned int VectorImage::GetPixel(int X, int Y) {
+uint VectorImage::GetPixel(int X, int Y) {
BS_LOG_ERRORLN("GetPixel() is not supported. Returning black.");
return 0;
}
// -----------------------------------------------------------------------------
-bool VectorImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) {
+bool VectorImage::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) {
BS_LOG_ERRORLN("SetContent() is not supported.");
return 0;
}
Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimage.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimage.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -60,31 +60,31 @@
class VectorPathInfo {
public:
- VectorPathInfo(unsigned int ID, unsigned int LineStyle, unsigned int FillStyle0, unsigned int FillStyle1) :
+ VectorPathInfo(uint ID, uint LineStyle, uint FillStyle0, uint FillStyle1) :
m_ID(ID), m_LineStyle(LineStyle), m_FillStyle0(FillStyle0), m_FillStyle1(FillStyle1) {}
VectorPathInfo() {
m_ID = m_LineStyle = m_FillStyle0 = m_FillStyle1 = 0;
}
- unsigned int GetID() const {
+ uint GetID() const {
return m_ID;
}
- unsigned int GetLineStyle() const {
+ uint GetLineStyle() const {
return m_LineStyle;
}
- unsigned int GetFillStyle0() const {
+ uint GetFillStyle0() const {
return m_FillStyle0;
}
- unsigned int GetFillStyle1() const {
+ uint GetFillStyle1() const {
return m_FillStyle1;
}
private:
- unsigned int m_ID;
- unsigned int m_LineStyle;
- unsigned int m_FillStyle0;
- unsigned int m_FillStyle1;
+ uint m_ID;
+ uint m_LineStyle;
+ uint m_FillStyle0;
+ uint m_FillStyle1;
};
@@ -101,33 +101,33 @@
}
#endif
- unsigned int GetPathCount() const {
+ uint GetPathCount() const {
return m_PathInfos.size();
}
- const VectorPathInfo &GetPathInfo(unsigned int PathNr) const {
+ const VectorPathInfo &GetPathInfo(uint PathNr) const {
BS_ASSERT(PathNr < GetPathCount());
return m_PathInfos[PathNr];
}
- double GetLineStyleWidth(unsigned int LineStyle) const {
+ double GetLineStyleWidth(uint LineStyle) const {
BS_ASSERT(LineStyle < m_LineStyles.size());
return m_LineStyles[LineStyle].Width;
}
- unsigned int GetLineStyleCount() const {
+ uint GetLineStyleCount() const {
return m_LineStyles.size();
}
- uint32 GetLineStyleColor(unsigned int LineStyle) const {
+ uint32 GetLineStyleColor(uint LineStyle) const {
BS_ASSERT(LineStyle < m_LineStyles.size());
return m_LineStyles[LineStyle].Color;
}
- unsigned int GetFillStyleCount() const {
+ uint GetFillStyleCount() const {
return m_FillStyles.size();
}
- uint32 GetFillStyleColor(unsigned int FillStyle) const {
+ uint32 GetFillStyleColor(uint FillStyle) const {
BS_ASSERT(FillStyle < m_FillStyles.size());
return m_FillStyles[FillStyle];
}
@@ -162,12 +162,12 @@
class VectorImage : public Image {
public:
- VectorImage(const byte *pFileData, unsigned int FileSize, bool &Success);
+ VectorImage(const byte *pFileData, uint FileSize, bool &Success);
- unsigned int GetElementCount() const {
+ uint GetElementCount() const {
return m_Elements.size();
}
- const VectorImageElement &GetElement(unsigned int ElementNr) const {
+ const VectorImageElement &GetElement(uint ElementNr) const {
BS_ASSERT(ElementNr < m_Elements.size());
return m_Elements[ElementNr];
}
@@ -187,8 +187,8 @@
virtual GraphicEngine::COLOR_FORMATS GetColorFormat() const {
return GraphicEngine::CF_ARGB32;
}
- virtual bool Fill(const Common::Rect *pFillRect = 0, unsigned int Color = BS_RGB(0, 0, 0));
- virtual unsigned int GetPixel(int X, int Y);
+ virtual bool Fill(const Common::Rect *pFillRect = 0, uint Color = BS_RGB(0, 0, 0));
+ virtual uint GetPixel(int X, int Y);
virtual bool IsBlitSource() const {
return true;
}
@@ -210,18 +210,18 @@
virtual bool IsSetContentAllowed() const {
return false;
}
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride);
+ virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride);
virtual bool Blit(int PosX = 0, int PosY = 0,
int Flipping = FLIP_NONE,
Common::Rect *pPartRect = NULL,
- unsigned int Color = BS_ARGB(255, 255, 255, 255),
+ uint Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1);
class SWFBitStream;
private:
- bool ParseDefineShape(unsigned int ShapeType, SWFBitStream &bs);
- bool ParseStyles(unsigned int ShapeType, SWFBitStream &bs, unsigned int &NumFillBits, unsigned int &NumLineBits);
+ bool ParseDefineShape(uint ShapeType, SWFBitStream &bs);
+ bool ParseStyles(uint ShapeType, SWFBitStream &bs, uint &NumFillBits, uint &NumLineBits);
Common::Array<VectorImageElement> m_Elements;
Common::Rect m_BoundingBox;
Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -95,7 +95,7 @@
public:
StyleHandler(const BS_VectorImageElement &VectorImageElement) : m_ImageElement(VectorImageElement) {}
- bool is_solid(unsigned int style) const {
+ bool is_solid(uint style) const {
return true;
}
@@ -120,12 +120,12 @@
bool BS_VectorImageRenderer::Render(const BS_VectorImage &VectorImage,
float ScaleFactorX, float ScaleFactorY,
- unsigned int &Width, unsigned int &Height,
+ uint &Width, uint &Height,
byte *ImageData,
float LineScaleFactor,
bool NoAlphaShapes) {
- Width = static_cast<unsigned int>(VectorImage.GetWidth() * ScaleFactorX);
- Height = static_cast<unsigned int>(VectorImage.GetHeight() * ScaleFactorY);
+ Width = static_cast<uint>(VectorImage.GetWidth() * ScaleFactorX);
+ Height = static_cast<uint>(VectorImage.GetHeight() * ScaleFactorY);
ImageData.resize(Width * Height * 4);
memset(&ImageData[0], 0, ImageData.size());
@@ -139,7 +139,7 @@
Scale = agg::trans_affine_translation(- VectorImage.GetBoundingBox().left, - VectorImage.GetBoundingBox().top);
Scale *= agg::trans_affine_scaling(ScaleFactorX, ScaleFactorY);
- for (unsigned int element = 0; element < VectorImage.GetElementCount(); ++element) {
+ for (uint element = 0; element < VectorImage.GetElementCount(); ++element) {
const BS_VectorImageElement &CurImageElement = VectorImage.GetElement(element);
CompoundShape ImageCompoundShape(CurImageElement);
@@ -151,9 +151,9 @@
//----------------------
CompoundRasterizer.clip_box(0, 0, Width, Height);
CompoundRasterizer.reset();
- for (unsigned int i = 0; i < CurImageElement.GetPathCount(); ++i) {
- unsigned int FillStyle0 = CurImageElement.GetPathInfo(i).GetFillStyle0();
- unsigned int FillStyle1 = CurImageElement.GetPathInfo(i).GetFillStyle1();
+ for (uint i = 0; i < CurImageElement.GetPathCount(); ++i) {
+ uint FillStyle0 = CurImageElement.GetPathInfo(i).GetFillStyle0();
+ uint FillStyle1 = CurImageElement.GetPathInfo(i).GetFillStyle1();
if (NoAlphaShapes) {
if (FillStyle0 != 0 && CurImageElement.GetFillStyleColor(FillStyle0 - 1).a != 255) FillStyle0 = 0;
@@ -173,10 +173,10 @@
Rasterizer.clip_box(0, 0, Width, Height);
Stroke.line_join(agg::round_join);
Stroke.line_cap(agg::round_cap);
- for (unsigned int i = 0; i < CurImageElement.GetPathCount(); ++i) {
+ for (uint i = 0; i < CurImageElement.GetPathCount(); ++i) {
Rasterizer.reset();
- unsigned int CurrentLineStyle = CurImageElement.GetPathInfo(i).GetLineStyle();
+ uint CurrentLineStyle = CurImageElement.GetPathInfo(i).GetLineStyle();
if (CurrentLineStyle != 0) {
Stroke.width(ScaleFactorX * CurImageElement.GetLineStyleWidth(CurrentLineStyle - 1) * LineScaleFactor);
Rasterizer.add_path(Stroke, CurImageElement.GetPathInfo(i).GetID());
@@ -202,7 +202,7 @@
bool VectorImageRenderer::Render(const VectorImage &VectorImage,
float ScaleFactorX, float ScaleFactorY,
- unsigned int &Width, unsigned int &Height,
+ uint &Width, uint &Height,
byte *ImageData,
float LineScaleFactor,
bool NoAlphaShapes) {
Modified: scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/image/vectorimagerenderer.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -68,7 +68,7 @@
bool Render(const VectorImage &VectorImage,
float ScaleFactorX, float ScaleFactorY,
- unsigned int &Width, unsigned int &Height,
+ uint &Width, uint &Height,
byte *ImageData,
float LineScaleFactor = 1.0f,
bool NoAlphaShapes = false);
Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -64,7 +64,7 @@
// Datei laden
byte *pFileData;
- unsigned int FileSize;
+ uint FileSize;
if (!(pFileData = (byte *) pPackage->GetFile(Filename, &FileSize))) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", Filename.c_str());
return;
@@ -93,7 +93,7 @@
// -----------------------------------------------------------------------------
-GLImage::GLImage(unsigned int Width, unsigned int Height, bool &Result) :
+GLImage::GLImage(uint Width, uint Height, bool &Result) :
m_Width(Width),
m_Height(Height) {
Result = false;
@@ -114,16 +114,16 @@
// -----------------------------------------------------------------------------
-bool GLImage::Fill(const Common::Rect *pFillRect, unsigned int Color) {
+bool GLImage::Fill(const Common::Rect *pFillRect, uint Color) {
BS_LOG_ERRORLN("Fill() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-bool GLImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) {
+bool GLImage::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) {
// \xDCberpr\xFCfen, ob PixelData ausreichend viele Pixel enth\xE4lt um ein Bild der Gr\xF6\xDFe Width * Height zu erzeugen
- if (size < static_cast<unsigned int>(m_Width * m_Height * 4)) {
+ if (size < static_cast<uint>(m_Width * m_Height * 4)) {
BS_LOG_ERRORLN("PixelData vector is too small to define a 32 bit %dx%d image.", m_Width, m_Height);
return false;
}
@@ -142,14 +142,14 @@
// -----------------------------------------------------------------------------
-unsigned int GLImage::GetPixel(int X, int Y) {
+uint GLImage::GetPixel(int X, int Y) {
BS_LOG_ERRORLN("GetPixel() is not supported. Returning black.");
return 0;
}
// -----------------------------------------------------------------------------
-bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, unsigned int Color, int Width, int Height) {
+bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, uint Color, int Width, int Height) {
int x1 = 0, y1 = 0;
int w = m_Width, h = m_Height;
if (pPartRect) {
Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -67,7 +67,7 @@
@param Result gibt dem Aufrufer bekannt, ob der Konstruktor erfolgreich ausgef\xFChrt wurde. Wenn es nach dem Aufruf false enthalten sollte,
d\xFCrfen keine Methoden am Objekt aufgerufen werden und das Objekt ist sofort zu zerst\xF6ren.
*/
- GLImage(unsigned int Width, unsigned int Height, bool &Result);
+ GLImage(uint Width, uint Height, bool &Result);
virtual ~GLImage();
virtual int GetWidth() const {
@@ -83,11 +83,11 @@
virtual bool Blit(int PosX = 0, int PosY = 0,
int Flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
- unsigned int Color = BS_ARGB(255, 255, 255, 255),
+ uint Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1);
- virtual bool Fill(const Common::Rect *pFillRect, unsigned int Color);
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset = 0, unsigned int Stride = 0);
- virtual unsigned int GetPixel(int X, int Y);
+ virtual bool Fill(const Common::Rect *pFillRect, uint Color);
+ virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset = 0, uint Stride = 0);
+ virtual uint GetPixel(int X, int Y);
virtual bool IsBlitSource() const {
return true;
Modified: scummvm/trunk/engines/sword25/gfx/opengl/glvectorimageblit.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glvectorimageblit.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glvectorimageblit.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -54,7 +54,7 @@
bool VectorImage::Blit(int PosX, int PosY,
int Flipping,
Common::Rect *pPartRect,
- unsigned int Color,
+ uint Color,
int Width, int Height) {
#if 0
static BS_VectorImageRenderer VectorImageRenderer;
@@ -82,8 +82,8 @@
float ScaleFactorX = (Width == - 1) ? 1 : static_cast<float>(Width) / static_cast<float>(GetWidth());
float ScaleFactorY = (Height == - 1) ? 1 : static_cast<float>(Height) / static_cast<float>(GetHeight());
- unsigned int RenderedWidth;
- unsigned int RenderedHeight;
+ uint RenderedWidth;
+ uint RenderedHeight;
if (!VectorImageRenderer.Render(*this, ScaleFactorX, ScaleFactorY, RenderedWidth, RenderedHeight, PixelData, LINE_SCALE_FACTOR)) {
BS_LOG_ERRORLN("Call to BS_VectorImageRenderer::Render() failed.");
return false;
Modified: scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -166,7 +166,7 @@
Common::Array<DebugLine>::const_iterator iter = m_DebugLines.begin();
for (; iter != m_DebugLines.end(); ++iter) {
- const unsigned int &Color = (*iter).Color;
+ const uint &Color = (*iter).Color;
const BS_Vertex &Start = (*iter).Start;
const BS_Vertex &End = (*iter).End;
@@ -212,7 +212,7 @@
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, unsigned int color) {
+bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, uint color) {
Common::Rect rect(m_Width - 1, m_Height - 1);
if (fillRectPtr) {
@@ -229,7 +229,7 @@
// -----------------------------------------------------------------------------
-bool OpenGLGfx::GetScreenshot(unsigned int &Width, unsigned int &Height, byte **Data) {
+bool OpenGLGfx::GetScreenshot(uint &Width, uint &Height, byte **Data) {
if (!ReadFramebufferContents(m_Width, m_Height, Data))
return false;
@@ -246,7 +246,7 @@
// -----------------------------------------------------------------------------
-bool OpenGLGfx::ReadFramebufferContents(unsigned int Width, unsigned int Height, byte **Data) {
+bool OpenGLGfx::ReadFramebufferContents(uint Width, uint Height, byte **Data) {
*Data = (byte *)malloc(Width * Height * 4);
return true;
@@ -258,7 +258,7 @@
uint32 *ptr = (uint32 *)Data;
for (uint i = 0; i < size; i++) {
- unsigned int Pixel = *ptr;
+ uint Pixel = *ptr;
*ptr = (Pixel & 0xff00ff00) | ((Pixel >> 16) & 0xff) | ((Pixel & 0xff) << 16);
++ptr;
}
@@ -266,13 +266,13 @@
// -----------------------------------------------------------------------------
-void OpenGLGfx::FlipImagedataVertical(unsigned int Width, unsigned int Height, byte *Data) {
+void OpenGLGfx::FlipImagedataVertical(uint Width, uint Height, byte *Data) {
#if 0 // TODO
- vector<unsigned int> LineBuffer(Width);
+ vector<uint> LineBuffer(Width);
- for (unsigned int Y = 0; Y < Height / 2; ++Y) {
- vector<unsigned int>::iterator Line1It = Data.begin() + Y * Width;
- vector<unsigned int>::iterator Line2It = Data.begin() + (Height - 1 - Y) * Width;
+ for (uint Y = 0; Y < Height / 2; ++Y) {
+ vector<uint>::iterator Line1It = Data.begin() + Y * Width;
+ vector<uint>::iterator Line2It = Data.begin() + (Height - 1 - Y) * Width;
copy(Line1It, Line1It + Width, LineBuffer.begin());
copy(Line2It, Line2It + Width, Line1It);
copy(LineBuffer.begin(), LineBuffer.end(), Line2It);
@@ -332,7 +332,7 @@
// Datei laden
byte *pFileData;
- unsigned int FileSize;
+ uint FileSize;
if (!(pFileData = static_cast<byte *>(pPackage->GetFile(FileName, &FileSize)))) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", FileName.c_str());
return 0;
@@ -398,7 +398,7 @@
// DEBUGGING
// -----------------------------------------------------------------------------
-void OpenGLGfx::DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color) {
+void OpenGLGfx::DrawDebugLine(const Vertex &Start, const Vertex &End, uint Color) {
m_DebugLines.push_back(DebugLine(Start, End, Color));
}
Modified: scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -77,8 +77,8 @@
virtual void SetVsync(bool Vsync);
virtual bool GetVsync() const;
- virtual bool Fill(const Common::Rect *FillRectPtr = 0, unsigned int Color = BS_RGB(0, 0, 0));
- virtual bool GetScreenshot(unsigned int &Width, unsigned int &Height, byte **Data);
+ virtual bool Fill(const Common::Rect *FillRectPtr = 0, uint Color = BS_RGB(0, 0, 0));
+ virtual bool GetScreenshot(uint &Width, uint &Height, byte **Data);
// Resource-Managing Methoden
// --------------------------
@@ -87,7 +87,7 @@
// Debugging Methoden
// ------------------
- virtual void DrawDebugLine(const Vertex &Start, const Vertex &End, unsigned int Color);
+ virtual void DrawDebugLine(const Vertex &Start, const Vertex &End, uint Color);
// Persistenz Methoden
// -------------------
@@ -103,7 +103,7 @@
Common::ScopedPtr<RenderObjectManager> m_RenderObjectManagerPtr;
struct DebugLine {
- DebugLine(const Vertex &_Start, const Vertex &_End, unsigned int _Color) :
+ DebugLine(const Vertex &_Start, const Vertex &_End, uint _Color) :
Start(_Start),
End(_End),
Color(_Color) {}
@@ -111,14 +111,14 @@
Vertex Start;
Vertex End;
- unsigned int Color;
+ uint Color;
};
Common::Array<DebugLine> m_DebugLines;
- static bool ReadFramebufferContents(unsigned int Width, unsigned int Height, byte **Data);
+ static bool ReadFramebufferContents(uint Width, uint Height, byte **Data);
static void ReverseRGBAComponentOrder(byte *Data, uint size);
- static void FlipImagedataVertical(unsigned int Width, unsigned int Height, byte *Data);
+ static void FlipImagedataVertical(uint Width, uint Height, byte *Data);
};
} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/opengl/swimage.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -61,7 +61,7 @@
// Datei laden
byte *pFileData;
- unsigned int FileSize;
+ uint FileSize;
if (!(pFileData = (byte *) pPackage->GetFile(Filename, &FileSize))) {
BS_LOG_ERRORLN("File \"%s\" could not be loaded.", Filename.c_str());
return;
@@ -85,7 +85,7 @@
// Dateidaten freigeben
delete[] pFileData;
- _ImageDataPtr = (unsigned int *) pUncompressedData;
+ _ImageDataPtr = (uint *) pUncompressedData;
Result = true;
return;
@@ -103,7 +103,7 @@
bool SWImage::Blit(int PosX, int PosY,
int Flipping,
Common::Rect *pPartRect,
- unsigned int Color,
+ uint Color,
int Width, int Height) {
BS_LOG_ERRORLN("Blit() is not supported.");
return false;
@@ -111,21 +111,21 @@
// -----------------------------------------------------------------------------
-bool SWImage::Fill(const Common::Rect *pFillRect, unsigned int Color) {
+bool SWImage::Fill(const Common::Rect *pFillRect, uint Color) {
BS_LOG_ERRORLN("Fill() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
- bool SWImage::SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride) {
+ bool SWImage::SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride) {
BS_LOG_ERRORLN("SetContent() is not supported.");
return false;
}
// -----------------------------------------------------------------------------
-unsigned int SWImage::GetPixel(int X, int Y) {
+uint SWImage::GetPixel(int X, int Y) {
BS_ASSERT(X >= 0 && X < m_Width);
BS_ASSERT(Y >= 0 && Y < m_Height);
Modified: scummvm/trunk/engines/sword25/gfx/opengl/swimage.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/swimage.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/opengl/swimage.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -68,11 +68,11 @@
virtual bool Blit(int PosX = 0, int PosY = 0,
int Flipping = Image::FLIP_NONE,
Common::Rect *pPartRect = NULL,
- unsigned int Color = BS_ARGB(255, 255, 255, 255),
+ uint Color = BS_ARGB(255, 255, 255, 255),
int Width = -1, int Height = -1);
- virtual bool Fill(const Common::Rect *FillRectPtr, unsigned int Color);
- virtual bool SetContent(const byte *Pixeldata, uint size, unsigned int Offset, unsigned int Stride);
- virtual unsigned int GetPixel(int X, int Y);
+ virtual bool Fill(const Common::Rect *FillRectPtr, uint Color);
+ virtual bool SetContent(const byte *Pixeldata, uint size, uint Offset, uint Stride);
+ virtual uint GetPixel(int X, int Y);
virtual bool IsBlitSource() const {
return false;
@@ -96,7 +96,7 @@
return false;
}
private:
- unsigned int *_ImageDataPtr;
+ uint *_ImageDataPtr;
int m_Width;
int m_Height;
Modified: scummvm/trunk/engines/sword25/gfx/panel.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/panel.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/panel.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -53,7 +53,7 @@
// Construction/Destruction
// -----------------------------------------------------------------------------
-Panel::Panel(RenderObjectPtr<RenderObject> ParentPtr, int Width, int Height, unsigned int Color) :
+Panel::Panel(RenderObjectPtr<RenderObject> ParentPtr, int Width, int Height, uint Color) :
RenderObject(ParentPtr, RenderObject::TYPE_PANEL),
m_Color(Color) {
m_InitSuccess = false;
@@ -76,7 +76,7 @@
// -----------------------------------------------------------------------------
-Panel::Panel(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle) :
+Panel::Panel(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, uint Handle) :
RenderObject(ParentPtr, RenderObject::TYPE_PANEL, Handle) {
m_InitSuccess = Unpersist(Reader);
}
@@ -122,7 +122,7 @@
Result &= RenderObject::Unpersist(Reader);
- unsigned int Color;
+ uint Color;
Reader.Read(Color);
SetColor(Color);
Modified: scummvm/trunk/engines/sword25/gfx/panel.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/panel.h 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/panel.h 2010-10-12 23:30:00 UTC (rev 53309)
@@ -52,16 +52,16 @@
friend class RenderObject;
private:
- Panel(RenderObjectPtr<RenderObject> ParentPtr, int Width, int Height, unsigned int Color);
- Panel(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, unsigned int Handle);
+ Panel(RenderObjectPtr<RenderObject> ParentPtr, int Width, int Height, uint Color);
+ Panel(InputPersistenceBlock &Reader, RenderObjectPtr<RenderObject> ParentPtr, uint Handle);
public:
virtual ~Panel();
- unsigned int GetColor() const {
+ uint GetColor() const {
return m_Color;
}
- void SetColor(unsigned int Color) {
+ void SetColor(uint Color) {
m_Color = Color;
ForceRefresh();
}
@@ -73,7 +73,7 @@
virtual bool DoRender();
private:
- unsigned int m_Color;
+ uint m_Color;
};
} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/gfx/renderobject.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/renderobject.cpp 2010-10-12 23:26:48 UTC (rev 53308)
+++ scummvm/trunk/engines/sword25/gfx/renderobject.cpp 2010-10-12 23:30:00 UTC (rev 53309)
@@ -55,7 +55,7 @@
// Konstruktion / Destruktion
// --------------------------
-RenderObject::RenderObject(RenderObjectPtr<RenderObject> ParentPtr, TYPES Type, unsigned int Handle) :
+RenderObject::RenderObject(RenderObjectPtr<RenderObject> ParentPtr, TYPES Type, uint Handle) :
m_ManagerPtr(0),
m_ParentPtr(ParentPtr),
m_X(0),
@@ -347,7 +347,7 @@
// -----------------------------------------------------------------------------
-RenderObjectPtr<Bitmap> RenderObject::AddDynamicBitmap(unsigned int Width, unsigned int Height) {
+RenderObjectPtr<Bitmap> RenderObject::AddDynamicBitmap(uint Width, uint Height) {
RenderObjectPtr<Bitmap> BitmapPtr((new DynamicBitmap(this->GetHandle(), Width, Height))->GetHandle());
if (BitmapPtr.IsValid() && BitmapPtr->GetInitSuccess())
return BitmapPtr;
@@ -359,7 +359,7 @@
// -----------------------------------------------------------------------------
-RenderObjectPtr<Panel> RenderObject::AddPanel(int Width, int Height, unsigned int Color) {
+RenderObjectPtr<Panel> RenderObject::AddPanel(int Width, int Height, uint Color) {
RenderObjectPtr<Panel> PanelPtr((new Panel(this->GetHandle(), Width, Height, Color))->GetHandle());
if (PanelPtr.IsValid() && PanelPtr->GetInitSuccess())
return PanelPtr;
@@ -387,7 +387,7 @@
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<unsigned int>(m_Type));
+ Writer.Write(static_cast<uint>(m_Type));
Writer.Write(m_Handle);
// Restliche Objekteigenschaften speichern.
@@ -445,7 +445,7 @@
Reader.Read(m_OldY);
Reader.Read(m_OldZ);
Reader.Read(m_OldVisible);
- unsigned int ParentHandle;
+ uint ParentHandle;
Reader.Read(ParentHandle);
m_ParentPtr = RenderObjectPtr<RenderObject>(ParentHandle);
Reader.Read(m_RefreshForced);
@@ -480,12 +480,12 @@
bool Result = true;
// Kinderanzahl einlesen.
- unsigned int ChildrenCount;
+ uint ChildrenCount;
Reader.Read(ChildrenCount);
if (!Reader.IsGood()) return false;
// Alle Kinder rekursiv wieder herstellen.
- for (unsigned int i = 0; i < ChildrenCount; ++i) {
+ for (uint i = 0; i < ChildrenCount; ++i) {
if (!RecreatePersistedRenderObject(Reader).IsValid()) return false;
}
@@ -498,8 +498,8 @@
RenderObjectPtr<RenderObject> Result;
// Typ und Handle auslesen.
- unsigned int Type;
- unsigned int Handle;
+ uint Type;
+ uint Handle;
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list