From a20264b4ae149f32fd65a31ce882d995072b2973 Mon Sep 17 00:00:00 2001 From: Patrick McIlroy Date: Mon, 10 Jan 2011 05:22:22 +0000 Subject: [PATCH] Fix 3.9-based BGanimations crashing due to position,0 command, CR: cmyers git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg/branches/dev@866 83fadc84-e282-4d84-a09a-c4228d6ae7e5 --- autogen.sh | 2 +- src/Actor.h | 4 ++++ src/Sprite.h | 2 +- src/StepMania.cpp | 3 +-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh index 4e05f65d..a9d064e6 100755 --- a/autogen.sh +++ b/autogen.sh @@ -15,7 +15,7 @@ test -z "$srcdir" && srcdir=. PKG_NAME="stepmania" AUTOHEADER=autoheader -ACLOCAL_OPTIONS="-Iautoconf/m4/" +ACLOCAL_OPTIONS="-I autoconf/m4/" AUTOMAKE_OPTIONS=-a AUTOCONF=autoconf diff --git a/src/Actor.h b/src/Actor.h index cc213193..20dd7769 100755 --- a/src/Actor.h +++ b/src/Actor.h @@ -118,6 +118,8 @@ public: void AddY( float y ) { SetY( GetDestY()+y ); } void AddZ( float z ) { SetZ( GetDestZ()+z ); } + virtual void SetPosition( float p ) { return; } + // height and width vary depending on zoom float GetUnzoomedWidth() { return m_size.x; } float GetUnzoomedHeight() { return m_size.y; } @@ -489,6 +491,7 @@ public: static int zoomto( T* p, lua_State *L ) { p->ZoomTo(FArg(1), FArg(2)); return 0; } static int zoomtowidth( T* p, lua_State *L ) { p->ZoomToWidth(FArg(1)); return 0; } static int zoomtoheight( T* p, lua_State *L ) { p->ZoomToHeight(FArg(1)); return 0; } + static int position( T* p, lua_State *L ) { p->SetPosition(FArg(1)); return 0; } static int basezoomx( T* p, lua_State *L ) { p->SetBaseZoomX(FArg(1)); return 0; } static int basezoomy( T* p, lua_State *L ) { p->SetBaseZoomY(FArg(1)); return 0; } static int stretchto( T* p, lua_State *L ) { p->StretchTo( RectF(FArg(1),FArg(2),FArg(3),FArg(4)) ); return 0; } @@ -701,6 +704,7 @@ public: ADD_METHOD( queuecommand ) ADD_METHOD( queuemessage ) ADD_METHOD( addcommand ) + ADD_METHOD( position ) ADD_METHOD( GetX ) ADD_METHOD( GetY ) diff --git a/src/Sprite.h b/src/Sprite.h index 3234ee8f..0f1bc34b 100755 --- a/src/Sprite.h +++ b/src/Sprite.h @@ -54,7 +54,7 @@ public: void StopUsingCustomCoords(); void GetActiveTextureCoords(float fTexCoordsOut[8]) const; void StretchTexCoords( float fX, float fY ); - void SetPosition( float f ); + virtual void SetPosition( float f ); void SetLooping( bool b ); void SetPlaybackRate( float f ); diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 8d78c8a0..5cc513f5 100755 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -15,6 +15,7 @@ #include "RageMath.h" #include "RageDisplay.h" #include "RageThreads.h" +#include "CryptHelpers.h" #include "arch/ArchHooks/ArchHooks.h" #include "arch/LoadingWindow/LoadingWindow.h" @@ -1073,14 +1074,12 @@ int main(int argc, char* argv[]) LOG->Info("VFS: No patch data found"); } -#if 0 LOG->Info("======= MOUNTPOINTS ========="); vector mymounts; FILEMAN->GetLoadedDrivers(mymounts); for (unsigned i = 0; i < mymounts.size(); i++) LOG->Info("%s ..... %s ..... %s", mymounts[i].Type.c_str(), mymounts[i].Root.c_str(), mymounts[i].MountPoint.c_str() ); LOG->Info("============================="); -#endif /* One of the above filesystems might contain files that affect preferences, eg Data/Static.ini. * Re-read preferences. */ -- 2.11.0