diff --git a/binaries/data/config/default.cfg b/binaries/data/config/default.cfg index 12fc1ae515..41270b927c 100644 --- a/binaries/data/config/default.cfg +++ b/binaries/data/config/default.cfg @@ -27,7 +27,7 @@ fancywater = true ; vertexshader Use vertex shaders for transform and lighting where possible ; Using 'fixed' instead of 'default' may work around some graphics-related problems, ; but will reduce performance when a modern graphics card is available. -renderpath = vertexshader +renderpath = default ; Adjusts how OpenGL calculates mipmap level of detail. 0.0f is the default (blurry) value. ; Lower values sharpen/extend, and higher values blur/decrease. Clamped at -3.0 to 3.0. diff --git a/binaries/data/tools/atlas/scripts/section/object.js b/binaries/data/tools/atlas/scripts/section/object.js index f237ffca82..6a451b85cb 100644 --- a/binaries/data/tools/atlas/scripts/section/object.js +++ b/binaries/data/tools/atlas/scripts/section/object.js @@ -276,6 +276,7 @@ function init(window, bottomWindow) } function updateVariationControl() { + variationControl.freeze(); variationControl.sizer.clear(true); var settings = Atlas.State.objectSettings; var variation = settings.getActorVariation(); @@ -286,6 +287,9 @@ function init(window, bottomWindow) choice.stringSelection = variation[i]; variationControl.sizer.add(choice, 0, wxStretch.EXPAND); } + // TODO: this sizer stuff is a bit dodgy - it often doesn't quite + // update the sizes and scrollbars at the right points + variationControl.thaw(); variationControlBox.layout(); variationControl.sizer.layout(); bottomWindow.sizer.layout(); diff --git a/source/collada/CommonConvert.cpp b/source/collada/CommonConvert.cpp index a7eec747fa..94e365c354 100644 --- a/source/collada/CommonConvert.cpp +++ b/source/collada/CommonConvert.cpp @@ -102,7 +102,11 @@ void FColladaDocument::LoadFromText(const char *text) if (newText != text) { - xmlFree((void*)newText); + // It'd be nice to use xmlFree, but for some reason (?) it causes + // linker errors in MSVC. So get access to it an ugly way: + xmlFreeFunc freeFunc; + xmlMemGet(&freeFunc, NULL, NULL, NULL); + freeFunc((void*)newText); } REQUIRE_SUCCESS(status); diff --git a/source/tools/atlas/AtlasScript/ScriptInterface.cpp b/source/tools/atlas/AtlasScript/ScriptInterface.cpp index a55452b24d..bfeabd72b4 100644 --- a/source/tools/atlas/AtlasScript/ScriptInterface.cpp +++ b/source/tools/atlas/AtlasScript/ScriptInterface.cpp @@ -48,7 +48,9 @@ #include #include -#include +#ifndef _WIN32 +# include +#endif #define FAIL(msg) do { JS_ReportError(cx, msg); return false; } while (false) @@ -511,7 +513,10 @@ namespace wxLogWarning(_T("%s"), logMessage.c_str()); else wxLogError(_T("%s"), logMessage.c_str()); +#ifndef _WIN32 + // When running under Valgrind, print more information in the error message VALGRIND_PRINTF_BACKTRACE("->"); +#endif wxPrintf(_T("wxJS %s: %s\n--------\n"), isWarning ? _T("warning") : _T("error"), logMessage.c_str()); } @@ -654,18 +659,18 @@ JSContext* ScriptInterface::GetContext() bool ScriptInterface::AddRoot(void* ptr) { - return JS_AddRoot(m->m_cx, ptr); + return JS_AddRoot(m->m_cx, ptr) ? true : false; } bool ScriptInterface::RemoveRoot(void* ptr) { - return JS_RemoveRoot(m->m_cx, ptr); + return JS_RemoveRoot(m->m_cx, ptr) ? true : false; } ScriptInterface::LocalRootScope::LocalRootScope(ScriptInterface& scriptInterface) : m_ScriptInterface(scriptInterface) { - m_OK = JS_EnterLocalRootScope(m_ScriptInterface.m->m_cx); + m_OK = JS_EnterLocalRootScope(m_ScriptInterface.m->m_cx) ? true : false; } ScriptInterface::LocalRootScope::~LocalRootScope() @@ -688,7 +693,7 @@ bool ScriptInterface::SetValue_(const wxString& name, jsval val) jsval argv[argc] = { jsName, val }; jsval rval; JSBool ok = JS_CallFunctionName(m->m_cx, m->m_glob, "setValue", argc, argv, &rval); - return ok; + return ok ? true : false; } bool ScriptInterface::GetValue_(const wxString& name, jsval& ret) @@ -697,7 +702,8 @@ bool ScriptInterface::GetValue_(const wxString& name, jsval& ret) const uintN argc = 1; jsval argv[argc] = { jsName }; - return JS_CallFunctionName(m->m_cx, m->m_glob, "getValue", argc, argv, &ret); + JSBool ok = JS_CallFunctionName(m->m_cx, m->m_glob, "getValue", argc, argv, &ret); + return ok ? true : false; } bool ScriptInterface::CallFunction(jsval val, const char* name) @@ -718,21 +724,22 @@ bool ScriptInterface::CallFunction_(jsval val, const char* name, std::vectorm_cx, JSVAL_TO_OBJECT(val), name, &found), false); if (! found) return false; - return JS_CallFunctionName(m->m_cx, JSVAL_TO_OBJECT(val), name, argc, argv, &ret); + JSBool ok = JS_CallFunctionName(m->m_cx, JSVAL_TO_OBJECT(val), name, argc, argv, &ret); + return ok ? true : false; } bool ScriptInterface::Eval(const wxString& script) { jsval rval; JSBool ok = JS_EvaluateScript(m->m_cx, m->m_glob, script.mb_str(), script.length(), NULL, 0, &rval); - return ok; + return ok ? true : false; } bool ScriptInterface::Eval_(const wxString& script, jsval& rval) { JSBool ok = JS_EvaluateScript(m->m_cx, m->m_glob, script.mb_str(), script.length(), NULL, 0, &rval); - return ok; + return ok ? true : false; } void ScriptInterface::LoadScript(const wxString& filename, const wxString& code) diff --git a/source/tools/atlas/AtlasScript/ScriptInterface.h b/source/tools/atlas/AtlasScript/ScriptInterface.h index 4ccdef4ad4..ebc34d1ac4 100644 --- a/source/tools/atlas/AtlasScript/ScriptInterface.h +++ b/source/tools/atlas/AtlasScript/ScriptInterface.h @@ -94,6 +94,8 @@ public: bool OK(); // Leaves the local root scope ~LocalRootScope(); + private: + LocalRootScope& operator=(const LocalRootScope&); }; #define LOCAL_ROOT_SCOPE LocalRootScope scope(*this); if (! scope.OK()) return false