From efbfc0a1b92450388b4a5b0f5bfe3a75dd9dd186 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew@gmail.com" Date: Sat, 31 Oct 2009 13:41:17 +0000 Subject: [PATCH] Erwan - Fix an uninitialized variable warning with JGE - Added -O2 to JGE compilation --- JGE/Makefile | 2 +- JGE/src/JGE.cpp | 67 +------------------------------------------------ 2 files changed, 2 insertions(+), 67 deletions(-) diff --git a/JGE/Makefile b/JGE/Makefile index 62c5b622b..f2a1c8aa7 100644 --- a/JGE/Makefile +++ b/JGE/Makefile @@ -74,7 +74,7 @@ PSPDIR = $(shell psp-config --psp-prefix) OBJS = $(GENERIC_OBJS) $(PSP_OBJS) TARGET_HGE = libhgetools.a INCDIR = include/psp include/psp/freetype2 -CXXFLAGS += -G0 +CXXFLAGS += -O2 -G0 LIBDIR = lib/psp endif ifeq ($(TARGET_ARCHITECTURE),linux) diff --git a/JGE/src/JGE.cpp b/JGE/src/JGE.cpp index 7b2e33497..2c10ba5a9 100644 --- a/JGE/src/JGE.cpp +++ b/JGE/src/JGE.cpp @@ -91,12 +91,6 @@ JGE::JGE() mCurrentMusic = NULL; Init(); - // mResourceManager = new JResourceManager(); - // mFileSystem = new JFileSystem(); - - // mParticleSystem = NULL;//new JParticleSystem(500); - // mMotionSystem = NULL;//new JMotionSystem(); - } @@ -105,22 +99,6 @@ JGE::~JGE() JRenderer::Destroy(); JFileSystem::Destroy(); JSoundSystem::Destroy(); - //JParticleSystem::Destroy(); - - //DestroyGfx(); - //DestroySfx(); - - // if (mResourceManager != NULL) - // delete mResourceManager; - // - // if (mFileSystem != NULL) - // delete mFileSystem; - // - // if (mParticleSystem != NULL) - // delete mParticleSystem; - // - // if (mMotionSystem != NULL) - // delete mMotionSystem; } @@ -134,9 +112,6 @@ void JGE::Init() JRenderer::GetInstance(); JFileSystem::GetInstance(); JSoundSystem::GetInstance(); - //JParticleSystem::GetInstance(); - - //InitSfx(); } void JGE::Run() @@ -191,9 +166,6 @@ void JGE::ResetInput() -// include all the following so we only have one .o file -//#include "../src/JGfx.cpp" -//#include "../src/JSfx.cpp" #include static queue gKeyBuffer; static const int gKeyCodeList[] = { @@ -231,11 +203,6 @@ JGE::JGE() Init(); - // mResourceManager = new JResourceManager(); - // mFileSystem = new JFileSystem(); - // - // mParticleSystem = new JParticleSystem(500); - // mMotionSystem = new JMotionSystem(); } @@ -245,20 +212,6 @@ JGE::~JGE() JSoundSystem::Destroy(); JFileSystem::Destroy(); - //DestroyGfx(); - //DestroySfx(); - - // delete mResourceManager; - // delete mFileSystem; - // delete mParticleSystem; - // delete mMotionSystem; - - // if (mApp != NULL) - // { - // mApp->Destroy(); - // delete mApp; - // mApp = NULL; - // } } @@ -288,20 +241,6 @@ void JGE::Init() mCriticalAssert = false; mOldButtons = mVeryOldButtons = 0; - //InitSfx(); - - //Create(); - - // mCurrMS = 1.0f; - // mFPSSlice = 0; - - //struct timeval tp; - //gettimeofday(&tp, NULL); - //mTimeBase = tp.tv_sec; - - //mLastTime = GetTime(); - - mTickFrequency = sceRtcGetTickResolution(); sceRtcGetCurrentTick(&mLastTime); } @@ -371,7 +310,7 @@ u8 JGE::GetAnalogY() void JGE::Run() { u64 curr; - long long int nextInput; + long long int nextInput = 0; const u32 ticksPerSecond = sceRtcGetTickResolution(); const u64 repeatDelay = REPEAT_DELAY * ticksPerSecond; @@ -504,10 +443,6 @@ void JGE::printf(const char *format, ...) vsprintf(mDebuggingMsg, format, list); va_end(list); - // FILE *f = fopen("jge.log", "a+"); - // fprintf(f, "%s\n", mDebuggingMsg); - // fclose(f); - }