Erwan
- Fix an uninitialized variable warning with JGE - Added -O2 to JGE compilation
This commit is contained in:
@@ -74,7 +74,7 @@ PSPDIR = $(shell psp-config --psp-prefix)
|
|||||||
OBJS = $(GENERIC_OBJS) $(PSP_OBJS)
|
OBJS = $(GENERIC_OBJS) $(PSP_OBJS)
|
||||||
TARGET_HGE = libhgetools.a
|
TARGET_HGE = libhgetools.a
|
||||||
INCDIR = include/psp include/psp/freetype2
|
INCDIR = include/psp include/psp/freetype2
|
||||||
CXXFLAGS += -G0
|
CXXFLAGS += -O2 -G0
|
||||||
LIBDIR = lib/psp
|
LIBDIR = lib/psp
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET_ARCHITECTURE),linux)
|
ifeq ($(TARGET_ARCHITECTURE),linux)
|
||||||
|
|||||||
@@ -91,12 +91,6 @@ JGE::JGE()
|
|||||||
mCurrentMusic = NULL;
|
mCurrentMusic = NULL;
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
// mResourceManager = new JResourceManager();
|
|
||||||
// mFileSystem = new JFileSystem();
|
|
||||||
|
|
||||||
// mParticleSystem = NULL;//new JParticleSystem(500);
|
|
||||||
// mMotionSystem = NULL;//new JMotionSystem();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -105,22 +99,6 @@ JGE::~JGE()
|
|||||||
JRenderer::Destroy();
|
JRenderer::Destroy();
|
||||||
JFileSystem::Destroy();
|
JFileSystem::Destroy();
|
||||||
JSoundSystem::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();
|
JRenderer::GetInstance();
|
||||||
JFileSystem::GetInstance();
|
JFileSystem::GetInstance();
|
||||||
JSoundSystem::GetInstance();
|
JSoundSystem::GetInstance();
|
||||||
//JParticleSystem::GetInstance();
|
|
||||||
|
|
||||||
//InitSfx();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JGE::Run()
|
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 <queue>
|
#include <queue>
|
||||||
static queue<u32> gKeyBuffer;
|
static queue<u32> gKeyBuffer;
|
||||||
static const int gKeyCodeList[] = {
|
static const int gKeyCodeList[] = {
|
||||||
@@ -231,11 +203,6 @@ JGE::JGE()
|
|||||||
|
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
// mResourceManager = new JResourceManager();
|
|
||||||
// mFileSystem = new JFileSystem();
|
|
||||||
//
|
|
||||||
// mParticleSystem = new JParticleSystem(500);
|
|
||||||
// mMotionSystem = new JMotionSystem();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,20 +212,6 @@ JGE::~JGE()
|
|||||||
JSoundSystem::Destroy();
|
JSoundSystem::Destroy();
|
||||||
JFileSystem::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;
|
mCriticalAssert = false;
|
||||||
mOldButtons = mVeryOldButtons = 0;
|
mOldButtons = mVeryOldButtons = 0;
|
||||||
|
|
||||||
//InitSfx();
|
|
||||||
|
|
||||||
//Create();
|
|
||||||
|
|
||||||
// mCurrMS = 1.0f;
|
|
||||||
// mFPSSlice = 0;
|
|
||||||
|
|
||||||
//struct timeval tp;
|
|
||||||
//gettimeofday(&tp, NULL);
|
|
||||||
//mTimeBase = tp.tv_sec;
|
|
||||||
|
|
||||||
//mLastTime = GetTime();
|
|
||||||
|
|
||||||
|
|
||||||
mTickFrequency = sceRtcGetTickResolution();
|
mTickFrequency = sceRtcGetTickResolution();
|
||||||
sceRtcGetCurrentTick(&mLastTime);
|
sceRtcGetCurrentTick(&mLastTime);
|
||||||
}
|
}
|
||||||
@@ -371,7 +310,7 @@ u8 JGE::GetAnalogY()
|
|||||||
void JGE::Run()
|
void JGE::Run()
|
||||||
{
|
{
|
||||||
u64 curr;
|
u64 curr;
|
||||||
long long int nextInput;
|
long long int nextInput = 0;
|
||||||
|
|
||||||
const u32 ticksPerSecond = sceRtcGetTickResolution();
|
const u32 ticksPerSecond = sceRtcGetTickResolution();
|
||||||
const u64 repeatDelay = REPEAT_DELAY * ticksPerSecond;
|
const u64 repeatDelay = REPEAT_DELAY * ticksPerSecond;
|
||||||
@@ -504,10 +443,6 @@ void JGE::printf(const char *format, ...)
|
|||||||
vsprintf(mDebuggingMsg, format, list);
|
vsprintf(mDebuggingMsg, format, list);
|
||||||
va_end(list);
|
va_end(list);
|
||||||
|
|
||||||
// FILE *f = fopen("jge.log", "a+");
|
|
||||||
// fprintf(f, "%s\n", mDebuggingMsg);
|
|
||||||
// fclose(f);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user