diff options
Diffstat (limited to 'engines')
62 files changed, 73 insertions, 68 deletions
diff --git a/engines/wintermute/AdActor.cpp b/engines/wintermute/AdActor.cpp index 14a36b1a90..328ab31874 100644 --- a/engines/wintermute/AdActor.cpp +++ b/engines/wintermute/AdActor.cpp @@ -1115,7 +1115,7 @@ HRESULT CAdActor::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdActor::ScToString() {
+const char *CAdActor::ScToString() {
return "[actor object]";
}
diff --git a/engines/wintermute/AdActor.h b/engines/wintermute/AdActor.h index 6d91f5f67b..2f3a678f93 100644 --- a/engines/wintermute/AdActor.h +++ b/engines/wintermute/AdActor.h @@ -84,7 +84,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
private:
HRESULT SetDefaultAnimNames();
diff --git a/engines/wintermute/AdEntity.cpp b/engines/wintermute/AdEntity.cpp index 0fb9d3b21b..0a78cfab98 100644 --- a/engines/wintermute/AdEntity.cpp +++ b/engines/wintermute/AdEntity.cpp @@ -809,7 +809,7 @@ HRESULT CAdEntity::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdEntity::ScToString() {
+const char *CAdEntity::ScToString() {
return "[entity object]";
}
diff --git a/engines/wintermute/AdEntity.h b/engines/wintermute/AdEntity.h index c63da505ce..30b9bab3a7 100644 --- a/engines/wintermute/AdEntity.h +++ b/engines/wintermute/AdEntity.h @@ -58,7 +58,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
diff --git a/engines/wintermute/AdItem.cpp b/engines/wintermute/AdItem.cpp index 448fed3dc7..b360f97e1d 100644 --- a/engines/wintermute/AdItem.cpp +++ b/engines/wintermute/AdItem.cpp @@ -718,7 +718,7 @@ HRESULT CAdItem::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdItem::ScToString() {
+const char *CAdItem::ScToString() {
return "[item]";
}
diff --git a/engines/wintermute/AdItem.h b/engines/wintermute/AdItem.h index 50db9cc0b8..143f27fc87 100644 --- a/engines/wintermute/AdItem.h +++ b/engines/wintermute/AdItem.h @@ -62,7 +62,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/AdLayer.cpp b/engines/wintermute/AdLayer.cpp index 9840cf3097..156de5b2e7 100644 --- a/engines/wintermute/AdLayer.cpp +++ b/engines/wintermute/AdLayer.cpp @@ -472,7 +472,7 @@ HRESULT CAdLayer::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdLayer::ScToString() {
+const char *CAdLayer::ScToString() {
return "[layer]";
}
diff --git a/engines/wintermute/AdLayer.h b/engines/wintermute/AdLayer.h index 98081d217b..1c0e3fa946 100644 --- a/engines/wintermute/AdLayer.h +++ b/engines/wintermute/AdLayer.h @@ -50,7 +50,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/AdObject.cpp b/engines/wintermute/AdObject.cpp index 58bb742c8a..4351e0953c 100644 --- a/engines/wintermute/AdObject.cpp +++ b/engines/wintermute/AdObject.cpp @@ -777,7 +777,7 @@ HRESULT CAdObject::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdObject::ScToString() {
+const char *CAdObject::ScToString() {
return "[ad object]";
}
diff --git a/engines/wintermute/AdObject.h b/engines/wintermute/AdObject.h index 706c291eef..488cf6807f 100644 --- a/engines/wintermute/AdObject.h +++ b/engines/wintermute/AdObject.h @@ -102,7 +102,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
CBArray<CAdObject *, CAdObject *> _attachmentsPre;
CBArray<CAdObject *, CAdObject *> _attachmentsPost;
diff --git a/engines/wintermute/AdRegion.cpp b/engines/wintermute/AdRegion.cpp index 61d1e29f4a..d928689cda 100644 --- a/engines/wintermute/AdRegion.cpp +++ b/engines/wintermute/AdRegion.cpp @@ -342,7 +342,7 @@ HRESULT CAdRegion::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdRegion::ScToString() {
+const char *CAdRegion::ScToString() {
return "[ad region]";
}
diff --git a/engines/wintermute/AdRegion.h b/engines/wintermute/AdRegion.h index 8f386036d1..7c982ca4e1 100644 --- a/engines/wintermute/AdRegion.h +++ b/engines/wintermute/AdRegion.h @@ -50,7 +50,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/AdScene.cpp b/engines/wintermute/AdScene.cpp index c3331c223b..e0fb05d867 100644 --- a/engines/wintermute/AdScene.cpp +++ b/engines/wintermute/AdScene.cpp @@ -1942,7 +1942,7 @@ HRESULT CAdScene::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdScene::ScToString() {
+const char *CAdScene::ScToString() {
return "[scene object]";
}
diff --git a/engines/wintermute/AdScene.h b/engines/wintermute/AdScene.h index 6023ec0547..4071068d15 100644 --- a/engines/wintermute/AdScene.h +++ b/engines/wintermute/AdScene.h @@ -159,7 +159,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
private:
diff --git a/engines/wintermute/AdTalkHolder.cpp b/engines/wintermute/AdTalkHolder.cpp index 5fc5a40388..48bab0b1c1 100644 --- a/engines/wintermute/AdTalkHolder.cpp +++ b/engines/wintermute/AdTalkHolder.cpp @@ -320,7 +320,7 @@ HRESULT CAdTalkHolder::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CAdTalkHolder::ScToString() {
+const char *CAdTalkHolder::ScToString() {
return "[talk-holder object]";
}
diff --git a/engines/wintermute/AdTalkHolder.h b/engines/wintermute/AdTalkHolder.h index 647a4b0b98..66fb7c8e10 100644 --- a/engines/wintermute/AdTalkHolder.h +++ b/engines/wintermute/AdTalkHolder.h @@ -48,7 +48,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
diff --git a/engines/wintermute/BFileManager.cpp b/engines/wintermute/BFileManager.cpp index 71b03a5bb9..21688a5ea9 100644 --- a/engines/wintermute/BFileManager.cpp +++ b/engines/wintermute/BFileManager.cpp @@ -410,13 +410,13 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign hdr.readFromStream(package);
// package->read(&hdr, sizeof(TPackageHeader), 1, f);
if (hdr.Magic1 != PACKAGE_MAGIC_1 || hdr.Magic2 != PACKAGE_MAGIC_2 || hdr.PackageVersion > PACKAGE_VERSION) {
- Game->LOG(0, " Invalid header in package file '%s'. Ignoring.", Filename);
+ Game->LOG(0, " Invalid header in package file '%s'. Ignoring.", Filename.c_str());
delete package;
return S_OK;
}
if (hdr.PackageVersion != PACKAGE_VERSION) {
- Game->LOG(0, " Warning: package file '%s' is outdated.", Filename);
+ Game->LOG(0, " Warning: package file '%s' is outdated.", Filename.c_str());
}
// new in v2
diff --git a/engines/wintermute/BFontTT.cpp b/engines/wintermute/BFontTT.cpp index a9495834b3..d27985a62e 100644 --- a/engines/wintermute/BFontTT.cpp +++ b/engines/wintermute/BFontTT.cpp @@ -623,7 +623,7 @@ HRESULT CBFontTT::InitFont() { }
warning("I guess we got a file");
if (file) {
- _font = Graphics::loadTTFFont(*file->getMemStream(), 12);
+ //_font = Graphics::loadTTFFont(*file->getMemStream(), 12);
} else {
_fallbackFont = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont);
warning("BFontTT::InitFont - Couldn't load %s", _fontFile);
diff --git a/engines/wintermute/BFrame.cpp b/engines/wintermute/BFrame.cpp index a4e3cb9032..8f52f90dc3 100644 --- a/engines/wintermute/BFrame.cpp +++ b/engines/wintermute/BFrame.cpp @@ -700,7 +700,7 @@ HRESULT CBFrame::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBFrame::ScToString() {
+const char *CBFrame::ScToString() {
return "[frame]";
}
diff --git a/engines/wintermute/BFrame.h b/engines/wintermute/BFrame.h index 9810e50ada..086a6106b3 100644 --- a/engines/wintermute/BFrame.h +++ b/engines/wintermute/BFrame.h @@ -64,7 +64,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
diff --git a/engines/wintermute/BGame.cpp b/engines/wintermute/BGame.cpp index fd3d8908cc..fa2e19a3c7 100644 --- a/engines/wintermute/BGame.cpp +++ b/engines/wintermute/BGame.cpp @@ -2673,7 +2673,7 @@ HRESULT CBGame::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBGame::ScToString() {
+const char *CBGame::ScToString() {
return "[game object]";
}
diff --git a/engines/wintermute/BGame.h b/engines/wintermute/BGame.h index 1eb41403b4..de98897a3d 100644 --- a/engines/wintermute/BGame.h +++ b/engines/wintermute/BGame.h @@ -229,7 +229,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
// compatibility bits
bool _compatKillMethodThreads;
diff --git a/engines/wintermute/BKeyboardState.cpp b/engines/wintermute/BKeyboardState.cpp index 1bece9fea6..eb1346e645 100644 --- a/engines/wintermute/BKeyboardState.cpp +++ b/engines/wintermute/BKeyboardState.cpp @@ -174,7 +174,7 @@ HRESULT CBKeyboardState::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBKeyboardState::ScToString() {
+const char *CBKeyboardState::ScToString() {
return "[keyboard state]";
}
diff --git a/engines/wintermute/BKeyboardState.h b/engines/wintermute/BKeyboardState.h index 2ceaa6eb4d..738f390eea 100644 --- a/engines/wintermute/BKeyboardState.h +++ b/engines/wintermute/BKeyboardState.h @@ -60,7 +60,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
private:
uint32 KeyCodeToVKey(Common::Event *event);
diff --git a/engines/wintermute/BObject.cpp b/engines/wintermute/BObject.cpp index 4d3a24cfa4..56c988faea 100644 --- a/engines/wintermute/BObject.cpp +++ b/engines/wintermute/BObject.cpp @@ -845,7 +845,7 @@ HRESULT CBObject::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBObject::ScToString() {
+const char *CBObject::ScToString() {
return "[object]";
}
diff --git a/engines/wintermute/BObject.h b/engines/wintermute/BObject.h index 11fa3dba19..53f3aa794d 100644 --- a/engines/wintermute/BObject.h +++ b/engines/wintermute/BObject.h @@ -137,7 +137,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/BRegion.cpp b/engines/wintermute/BRegion.cpp index 4f71975c39..15d7b26d94 100644 --- a/engines/wintermute/BRegion.cpp +++ b/engines/wintermute/BRegion.cpp @@ -372,7 +372,7 @@ HRESULT CBRegion::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBRegion::ScToString() {
+const char *CBRegion::ScToString() {
return "[region]";
}
diff --git a/engines/wintermute/BRegion.h b/engines/wintermute/BRegion.h index ef7b3f2719..9869cda5e1 100644 --- a/engines/wintermute/BRegion.h +++ b/engines/wintermute/BRegion.h @@ -60,7 +60,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/BRenderSDL.cpp b/engines/wintermute/BRenderSDL.cpp index 0574b3e7b9..fbb683dfb6 100644 --- a/engines/wintermute/BRenderSDL.cpp +++ b/engines/wintermute/BRenderSDL.cpp @@ -274,24 +274,29 @@ HRESULT CBRenderSDL::FadeToColor(uint32 Color, RECT *rect) { // Replacement for SDL2's SDL_RenderCopy
void CBRenderSDL::drawFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRect) {
for (int i = 0; i < srcRect->height(); i++) {
- void *destPtr = _renderSurface->getBasePtr(dstRect->left, dstRect->top + i);
- void *srcPtr = surf->getBasePtr(srcRect->left, srcRect->top + i);
+ byte *destPtr = (byte*)_renderSurface->getBasePtr(dstRect->left, dstRect->top + i);
+ byte *srcPtr = (byte*)surf->getBasePtr(srcRect->left, srcRect->top + i);
for (int j = 0; j < srcRect->width(); j++) {
// TODO: Replace this with something less ugly, and more portable.
if (((byte *)srcPtr)[0] == 255) {
memcpy(destPtr, srcPtr, _renderSurface->format.bytesPerPixel);
}
- ((byte *)srcPtr) += _renderSurface->format.bytesPerPixel;
- ((byte *)destPtr) += _renderSurface->format.bytesPerPixel;
+ srcPtr += _renderSurface->format.bytesPerPixel;
+ destPtr += _renderSurface->format.bytesPerPixel;
}
}
}
//////////////////////////////////////////////////////////////////////////
HRESULT CBRenderSDL::DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color) {
- byte r = D3DCOLGetR(Color);
+ static bool hasWarned = false;
+ if (!hasWarned) {
+ warning("CBRenderSDL::DrawLine - not fully ported yet");
+ hasWarned = true;
+ }
+/* byte r = D3DCOLGetR(Color);
byte g = D3DCOLGetG(Color);
byte b = D3DCOLGetB(Color);
- byte a = D3DCOLGetA(Color);
+ byte a = D3DCOLGetA(Color);*/
//SDL_SetRenderDrawColor(_renderer, r, g, b, a);
//SDL_SetRenderDrawBlendMode(_renderer, SDL_BLENDMODE_BLEND);
diff --git a/engines/wintermute/BScriptHolder.cpp b/engines/wintermute/BScriptHolder.cpp index 2cd070e925..da6c95c8a8 100644 --- a/engines/wintermute/BScriptHolder.cpp +++ b/engines/wintermute/BScriptHolder.cpp @@ -252,7 +252,7 @@ HRESULT CBScriptHolder::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBScriptHolder::ScToString() {
+const char *CBScriptHolder::ScToString() {
return "[script_holder]";
}
diff --git a/engines/wintermute/BScriptHolder.h b/engines/wintermute/BScriptHolder.h index d06778d7af..f094d6591a 100644 --- a/engines/wintermute/BScriptHolder.h +++ b/engines/wintermute/BScriptHolder.h @@ -62,7 +62,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
virtual void ScDebuggerDesc(char *Buf, int BufSize);
// IWmeObject
public:
diff --git a/engines/wintermute/BScriptable.cpp b/engines/wintermute/BScriptable.cpp index cfdb0e1771..78faa0e8ca 100644 --- a/engines/wintermute/BScriptable.cpp +++ b/engines/wintermute/BScriptable.cpp @@ -90,7 +90,7 @@ HRESULT CBScriptable::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBScriptable::ScToString() {
+const char *CBScriptable::ScToString() {
return "[native object]";
}
diff --git a/engines/wintermute/BScriptable.h b/engines/wintermute/BScriptable.h index be2b961b08..5682cfe8e0 100644 --- a/engines/wintermute/BScriptable.h +++ b/engines/wintermute/BScriptable.h @@ -53,7 +53,7 @@ public: virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
virtual void *ScToMemBuffer();
virtual int ScToInt();
virtual double ScToFloat();
diff --git a/engines/wintermute/BSprite.cpp b/engines/wintermute/BSprite.cpp index 05ccc9c397..06bf9a4d6a 100644 --- a/engines/wintermute/BSprite.cpp +++ b/engines/wintermute/BSprite.cpp @@ -737,7 +737,7 @@ HRESULT CBSprite::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBSprite::ScToString() {
+const char *CBSprite::ScToString() {
return "[sprite]";
}
diff --git a/engines/wintermute/BSprite.h b/engines/wintermute/BSprite.h index b2b99bc2db..085dafe8d8 100644 --- a/engines/wintermute/BSprite.h +++ b/engines/wintermute/BSprite.h @@ -82,7 +82,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/BSubFrame.cpp b/engines/wintermute/BSubFrame.cpp index 0c57b9b79f..2e54e1a1ec 100644 --- a/engines/wintermute/BSubFrame.cpp +++ b/engines/wintermute/BSubFrame.cpp @@ -543,7 +543,7 @@ HRESULT CBSubFrame::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CBSubFrame::ScToString() {
+const char *CBSubFrame::ScToString() {
return "[subframe]";
}
diff --git a/engines/wintermute/BSubFrame.h b/engines/wintermute/BSubFrame.h index ec4e7204d0..80c0cc6092 100644 --- a/engines/wintermute/BSubFrame.h +++ b/engines/wintermute/BSubFrame.h @@ -76,7 +76,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
diff --git a/engines/wintermute/PartEmitter.cpp b/engines/wintermute/PartEmitter.cpp index a184a46e40..efd167a137 100644 --- a/engines/wintermute/PartEmitter.cpp +++ b/engines/wintermute/PartEmitter.cpp @@ -1088,7 +1088,7 @@ HRESULT CPartEmitter::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CPartEmitter::ScToString() {
+const char *CPartEmitter::ScToString() {
return "[particle emitter]";
}
diff --git a/engines/wintermute/PartEmitter.h b/engines/wintermute/PartEmitter.h index 66814558b1..89a56a21a0 100644 --- a/engines/wintermute/PartEmitter.h +++ b/engines/wintermute/PartEmitter.h @@ -121,7 +121,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
private:
diff --git a/engines/wintermute/UIButton.cpp b/engines/wintermute/UIButton.cpp index 15a9d6f49b..e2c13e80ba 100644 --- a/engines/wintermute/UIButton.cpp +++ b/engines/wintermute/UIButton.cpp @@ -1002,7 +1002,7 @@ HRESULT CUIButton::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CUIButton::ScToString() {
+const char *CUIButton::ScToString() {
return "[button]";
}
diff --git a/engines/wintermute/UIButton.h b/engines/wintermute/UIButton.h index de50431f2d..0d504fdea0 100644 --- a/engines/wintermute/UIButton.h +++ b/engines/wintermute/UIButton.h @@ -71,7 +71,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/UIEdit.cpp b/engines/wintermute/UIEdit.cpp index 5b222ac831..4e048117ba 100644 --- a/engines/wintermute/UIEdit.cpp +++ b/engines/wintermute/UIEdit.cpp @@ -528,7 +528,7 @@ HRESULT CUIEdit::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CUIEdit::ScToString() {
+const char *CUIEdit::ScToString() {
return "[edit]";
}
diff --git a/engines/wintermute/UIEdit.h b/engines/wintermute/UIEdit.h index 762332e60c..9c2f4fddd4 100644 --- a/engines/wintermute/UIEdit.h +++ b/engines/wintermute/UIEdit.h @@ -64,7 +64,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/UIEntity.cpp b/engines/wintermute/UIEntity.cpp index f0b7e7a68f..ce94d81519 100644 --- a/engines/wintermute/UIEntity.cpp +++ b/engines/wintermute/UIEntity.cpp @@ -322,7 +322,7 @@ HRESULT CUIEntity::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CUIEntity::ScToString() {
+const char *CUIEntity::ScToString() {
return "[entity container]";
}
diff --git a/engines/wintermute/UIEntity.h b/engines/wintermute/UIEntity.h index f55160b4d4..c18fd952dc 100644 --- a/engines/wintermute/UIEntity.h +++ b/engines/wintermute/UIEntity.h @@ -50,7 +50,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/UIObject.cpp b/engines/wintermute/UIObject.cpp index 468ababfc1..153d04ada4 100644 --- a/engines/wintermute/UIObject.cpp +++ b/engines/wintermute/UIObject.cpp @@ -480,7 +480,7 @@ HRESULT CUIObject::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CUIObject::ScToString() {
+const char *CUIObject::ScToString() {
return "[ui_object]";
}
diff --git a/engines/wintermute/UIObject.h b/engines/wintermute/UIObject.h index 1f982ce830..6d5f463fca 100644 --- a/engines/wintermute/UIObject.h +++ b/engines/wintermute/UIObject.h @@ -75,7 +75,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/UIText.cpp b/engines/wintermute/UIText.cpp index 92e917ab36..434ab47027 100644 --- a/engines/wintermute/UIText.cpp +++ b/engines/wintermute/UIText.cpp @@ -455,7 +455,7 @@ HRESULT CUIText::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CUIText::ScToString() {
+const char *CUIText::ScToString() {
return "[static]";
}
diff --git a/engines/wintermute/UIText.h b/engines/wintermute/UIText.h index 8071461ede..756834fd5c 100644 --- a/engines/wintermute/UIText.h +++ b/engines/wintermute/UIText.h @@ -51,7 +51,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/UIWindow.cpp b/engines/wintermute/UIWindow.cpp index eeeb11d836..51d3ff0f2b 100644 --- a/engines/wintermute/UIWindow.cpp +++ b/engines/wintermute/UIWindow.cpp @@ -1092,7 +1092,7 @@ HRESULT CUIWindow::ScSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
-char *CUIWindow::ScToString() {
+const char *CUIWindow::ScToString() {
return "[window]";
}
diff --git a/engines/wintermute/UIWindow.h b/engines/wintermute/UIWindow.h index deb6bd0a1b..510fc076b4 100644 --- a/engines/wintermute/UIWindow.h +++ b/engines/wintermute/UIWindow.h @@ -84,7 +84,7 @@ public: virtual CScValue *ScGetProperty(const char *Name);
virtual HRESULT ScSetProperty(const char *Name, CScValue *Value);
virtual HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- virtual char *ScToString();
+ virtual const char *ScToString();
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/scriptables/SXArray.cpp b/engines/wintermute/scriptables/SXArray.cpp index 0dd620c487..d14660de4c 100644 --- a/engines/wintermute/scriptables/SXArray.cpp +++ b/engines/wintermute/scriptables/SXArray.cpp @@ -69,7 +69,7 @@ CSXArray::~CSXArray() { //////////////////////////////////////////////////////////////////////////
-char *CSXArray::ScToString() {
+const char *CSXArray::ScToString() {
static char Dummy[32768];
strcpy(Dummy, "");
char PropName[20];
diff --git a/engines/wintermute/scriptables/SXArray.h b/engines/wintermute/scriptables/SXArray.h index f3ae690ab2..3a174946fd 100644 --- a/engines/wintermute/scriptables/SXArray.h +++ b/engines/wintermute/scriptables/SXArray.h @@ -44,7 +44,7 @@ public: CScValue *ScGetProperty(const char *Name);
HRESULT ScSetProperty(const char *Name, CScValue *Value);
HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- char *ScToString();
+ const char *ScToString();
int _length;
CScValue *_values;
};
diff --git a/engines/wintermute/scriptables/SXDate.cpp b/engines/wintermute/scriptables/SXDate.cpp index 9c16b3595e..d6b20fc3dc 100644 --- a/engines/wintermute/scriptables/SXDate.cpp +++ b/engines/wintermute/scriptables/SXDate.cpp @@ -66,7 +66,7 @@ CSXDate::~CSXDate() { //////////////////////////////////////////////////////////////////////////
-char *CSXDate::ScToString() {
+const char *CSXDate::ScToString() {
#if 0
return asctime(&_tm);
#endif
diff --git a/engines/wintermute/scriptables/SXDate.h b/engines/wintermute/scriptables/SXDate.h index 1947925f02..cce3c5300e 100644 --- a/engines/wintermute/scriptables/SXDate.h +++ b/engines/wintermute/scriptables/SXDate.h @@ -43,7 +43,7 @@ public: CScValue *ScGetProperty(const char *Name);
HRESULT ScSetProperty(const char *Name, CScValue *Value);
HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- char *ScToString();
+ const char *ScToString();
char *_string;
//struct tm _tm; // TODO!
};
diff --git a/engines/wintermute/scriptables/SXFile.cpp b/engines/wintermute/scriptables/SXFile.cpp index e25825bebe..5ffc69d1e7 100644 --- a/engines/wintermute/scriptables/SXFile.cpp +++ b/engines/wintermute/scriptables/SXFile.cpp @@ -86,7 +86,7 @@ void CSXFile::Close() { }
//////////////////////////////////////////////////////////////////////////
-char *CSXFile::ScToString() {
+const char *CSXFile::ScToString() {
if (_filename) return _filename;
else return "[file object]";
}
diff --git a/engines/wintermute/scriptables/SXFile.h b/engines/wintermute/scriptables/SXFile.h index daa63c305c..1900355dea 100644 --- a/engines/wintermute/scriptables/SXFile.h +++ b/engines/wintermute/scriptables/SXFile.h @@ -42,7 +42,7 @@ public: CScValue *ScGetProperty(const char *Name);
HRESULT ScSetProperty(const char *Name, CScValue *Value);
HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- char *ScToString();
+ const char *ScToString();
CSXFile(CBGame *inGame, CScStack *Stack);
virtual ~CSXFile();
private:
diff --git a/engines/wintermute/scriptables/SXMemBuffer.cpp b/engines/wintermute/scriptables/SXMemBuffer.cpp index 730108e4a4..6f5bfee6bb 100644 --- a/engines/wintermute/scriptables/SXMemBuffer.cpp +++ b/engines/wintermute/scriptables/SXMemBuffer.cpp @@ -115,7 +115,7 @@ bool CSXMemBuffer::CheckBounds(CScScript *Script, int Start, int Length) { }
//////////////////////////////////////////////////////////////////////////
-char *CSXMemBuffer::ScToString() {
+const char *CSXMemBuffer::ScToString() {
return "[membuffer object]";
}
diff --git a/engines/wintermute/scriptables/SXMemBuffer.h b/engines/wintermute/scriptables/SXMemBuffer.h index e63601a113..824c0aaf77 100644 --- a/engines/wintermute/scriptables/SXMemBuffer.h +++ b/engines/wintermute/scriptables/SXMemBuffer.h @@ -41,7 +41,7 @@ public: CScValue *ScGetProperty(const char *Name);
HRESULT ScSetProperty(const char *Name, CScValue *Value);
HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
- char *ScToString();
+ const char *ScToString();
CSXMemBuffer(CBGame *inGame, CScStack *Stack);
CSXMemBuffer(CBGame *inGame, void *Buffer);
virtual ~CSXMemBuffer();
diff --git a/engines/wintermute/scriptables/SXString.cpp b/engines/wintermute/scriptables/SXString.cpp index 183be7dec5..2837530ca0 100644 --- a/engines/wintermute/scriptables/SXString.cpp +++ b/engines/wintermute/scriptables/SXString.cpp @@ -81,7 +81,7 @@ void CSXString::SetStringVal(const char *Val) { //////////////////////////////////////////////////////////////////////////
-char *CSXString::ScToString() {
+const char *CSXString::ScToString() {
if (_string) return _string;
else return "[null string]";
}
diff --git a/engines/wintermute/scriptables/SXString.h b/engines/wintermute/scriptables/SXString.h index aa3b9ebb35..44e2bbe5ef 100644 --- a/engines/wintermute/scriptables/SXString.h +++ b/engines/wintermute/scriptables/SXString.h @@ -42,7 +42,7 @@ public: HRESULT ScSetProperty(const char *Name, CScValue *Value);
HRESULT ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name);
void ScSetString(const char *Val);
- char *ScToString();
+ const char *ScToString();
void SetStringVal(const char *Val);
CSXString(CBGame *inGame, CScStack *Stack);
diff --git a/engines/wintermute/scriptables/ScValue.cpp b/engines/wintermute/scriptables/ScValue.cpp index 7720aa314c..8075df0e71 100644 --- a/engines/wintermute/scriptables/ScValue.cpp +++ b/engines/wintermute/scriptables/ScValue.cpp @@ -591,7 +591,7 @@ const char *CScValue::GetString() { break;
case VAL_NATIVE: {
- char *StrVal = _valNative->ScToString();
+ const char *StrVal = _valNative->ScToString();
SetStringVal(StrVal);
return StrVal;
break;
|