Some preparation work for new platform support.

- Added a "PSP" compile-time define to clean up some compile time checks (replaced !WIN32 && !LINUX && !IOS with PSP) 
-- Wil, I am aware that this is redundant with the PSPENV variable you introduced recently, I think we can clean that up easily
-- This looks like lots of changes, but most of the time I just moved some blocks here and there
-- tested on VC 2010, PSP, and a bit of NDK
-- I might have broken maemo, iOS, or Linux compilation, can you guys check?
- Fixed some warnings reported by NDK
- NDK still does not compile because recent boost additions (mutex, etc...) are apparently not supported
This commit is contained in:
wagic.the.homebrew
2011-04-21 13:16:11 +00:00
parent 5eb36fecc0
commit 8ff6839c8d
26 changed files with 257 additions and 252 deletions
+7 -8
View File
@@ -16,9 +16,9 @@
#include <string.h>
#include <stdarg.h>
#if (!defined IOS)
#if (!defined IOS) && (!defined ANDROID)
#include <gif_lib.h>
#endif //IOS
#endif //IOS ANDROID
#include "JTypes.h"
@@ -27,9 +27,7 @@
#include <windows.h>
#elif defined (LINUX) || defined(IOS)
#else
#elif defined (PSP)
#include <pspgu.h>
#include <pspkernel.h>
@@ -80,8 +78,7 @@ protected:
public:
#if defined (WIN32) || defined (LINUX) || defined (IOS)
#else
#if defined (PSP)
int PixelSize(int textureMode);
#endif
@@ -575,13 +572,15 @@ private:
#if (!defined IOS)
void LoadJPG(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
int LoadPNG(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
#if (!defined ANDROID)
void LoadGIF(TextureInfo &textureInfo, const char *filename, int mode = 0, int TextureFormat = TEXTURE_FORMAT);
int image_readgif(void * handle, TextureInfo &textureInfo, DWORD * bgcolor, InputFunc readFunc,int mode = 0, int TextureFormat = TEXTURE_FORMAT);
#endif // (ANDROID) How can we get gif support for android ?
#endif //(IOS)
static JRenderer* mInstance;
#if defined (WIN32) || defined (LINUX) || defined (IOS)
#if (!defined PSP)
GLuint mCurrentTex;
#if (defined GL_ES_VERSION_2_0) || (defined GL_VERSION_2_0) || (defined WIN32)