iOS compilation fixes
This commit is contained in:
@@ -60,7 +60,7 @@ class Interruptible: public PlayGuiObject, public Targetable{
|
||||
virtual const string getDisplayName() const;
|
||||
void Render(MTGCardInstance * source, JQuad * targetQuad, string alt1, string alt2, string action, bool bigQuad = false);
|
||||
virtual int receiveEvent(WEvent * event) {return 0;};
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
virtual void Dump();
|
||||
#endif
|
||||
};
|
||||
@@ -181,8 +181,8 @@ class ActionStack :public GuiLayer{
|
||||
int has(Interruptible * action);
|
||||
int has(MTGAbility * ability);
|
||||
int receiveEventPlus(WEvent * event);
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
void Dump();
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
void Dump();
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
Task(char _type = ' ');
|
||||
|
||||
static Task* createFromStr(string params, bool rand = FALSE);
|
||||
static Task* createFromStr(string params, bool rand = false);
|
||||
virtual string toString();
|
||||
string getDesc();
|
||||
virtual string createDesc() = 0;
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
int load(string _fileName = "");
|
||||
int save(string _fileName = "");
|
||||
int getState() {return mState;};
|
||||
void addTask(string params, bool rand = FALSE);
|
||||
void addTask(string params, bool rand = false);
|
||||
void addTask(Task *task);
|
||||
void addRandomTask(int diff = 100);
|
||||
void removeTask(Task *task);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <JGE.h>
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
|
||||
#else
|
||||
#include <pspkernel.h>
|
||||
|
||||
@@ -1091,7 +1091,7 @@ void ActionStack::Render()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
|
||||
void Interruptible::Dump()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <JGE.h>
|
||||
#include <JLogger.h>
|
||||
#include <JRenderer.h>
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
#include <time.h>
|
||||
#else
|
||||
#include <pspfpu.h>
|
||||
@@ -78,7 +78,7 @@ GameApp::~GameApp()
|
||||
void GameApp::Create()
|
||||
{
|
||||
srand((unsigned int) time(0)); // initialize random
|
||||
#ifndef QT_CONFIG
|
||||
#if not defined(QT_CONFIG) && not defined(IOS)
|
||||
#if defined (WIN32)
|
||||
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
|
||||
#elif not defined (LINUX)
|
||||
|
||||
@@ -278,7 +278,7 @@ int GameStateMenu::nextDirectory(const char * root, const char * file)
|
||||
int found = 0;
|
||||
if (!mDip)
|
||||
{
|
||||
mDip = opendir(root);
|
||||
mDip = opendir(JGE_GET_RES(root).c_str());
|
||||
}
|
||||
|
||||
while (!found && (mDit = readdir(mDip)))
|
||||
|
||||
@@ -55,7 +55,7 @@ Task::Task(char _type)
|
||||
{
|
||||
reward = 0;
|
||||
expiresIn = 1;
|
||||
accepted = FALSE;
|
||||
accepted = false;
|
||||
if (_type == ' ')
|
||||
{
|
||||
type = TASK_BASIC;
|
||||
@@ -603,7 +603,7 @@ void TaskList::addRandomTask(int diff)
|
||||
string s(TASKS_ALL);
|
||||
char taskType[2];
|
||||
sprintf(taskType, "%c", s[rand() % s.length()]);
|
||||
addTask(string(taskType), TRUE);
|
||||
addTask(string(taskType), true);
|
||||
}
|
||||
|
||||
TaskList::~TaskList()
|
||||
@@ -742,7 +742,7 @@ TaskDelay::TaskDelay(int _opponent, int _turn) :
|
||||
{
|
||||
type = TASK_DELAY;
|
||||
turn = _turn;
|
||||
afterTurn = TRUE;
|
||||
afterTurn = true;
|
||||
}
|
||||
|
||||
int TaskDelay::computeReward()
|
||||
|
||||
@@ -10,7 +10,7 @@ using std::map;
|
||||
static map<const LocalKeySym, KeyRep> fattable;
|
||||
static map<const JButton, KeyRep> slimtable;
|
||||
|
||||
#ifdef LINUX
|
||||
#if defined(LINUX) || defined (IOS)
|
||||
const KeyRep& translateKey(LocalKeySym key)
|
||||
{
|
||||
{
|
||||
@@ -20,7 +20,7 @@ const KeyRep& translateKey(LocalKeySym key)
|
||||
}
|
||||
|
||||
char* str = NULL;
|
||||
#ifndef QT_CONFIG
|
||||
#if not defined(QT_CONFIG) && not defined(IOS)
|
||||
str = XKeysymToString(key);
|
||||
#endif // QT_CONFIG
|
||||
if (!str)
|
||||
|
||||
@@ -233,7 +233,7 @@ unsigned long WCachedTexture::size()
|
||||
if (!texture) return 0;
|
||||
|
||||
unsigned int pixel_size = 4;
|
||||
#if defined WIN32 || defined LINUX
|
||||
#if defined WIN32 || defined LINUX || defined IOS
|
||||
#else
|
||||
pixel_size = JRenderer::GetInstance()->PixelSize(texture->mTextureFormat);
|
||||
#endif
|
||||
|
||||
@@ -249,7 +249,7 @@ int WFBFont::PreCacheChar(const u8 *ch)
|
||||
int index = mCurr++;
|
||||
if (mCurr >= mCacheSize) mCurr = 0;
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
memset(mCharBuffer, 0, sizeof(u32) * mFontSize * mFontSize);
|
||||
@@ -285,7 +285,7 @@ int WFBFont::PreCacheChar(const u8 *ch)
|
||||
#if 1
|
||||
for (; j < offset; j++)
|
||||
{
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
mCharBuffer[y * mFontSize + x] = ARGB(0, 0, 0, 0);
|
||||
#else
|
||||
SwizzlePlot(pTexture, ARGB(0, 0, 0, 0), x * PIXEL_SIZE, y, mTexture->mTexWidth * PIXEL_SIZE);
|
||||
@@ -300,7 +300,7 @@ int WFBFont::PreCacheChar(const u8 *ch)
|
||||
gray = src[(i * size + j - offset) / 2];
|
||||
gray = ((j - offset) & 1) ? (gray & 0xF0) : ((gray & 0x0F) << 4);
|
||||
if (gray) gray |= 0x0F;
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
mCharBuffer[y * mFontSize + x] = ARGB(gray, 255, 255, 255);
|
||||
#else
|
||||
SwizzlePlot(pTexture, ARGB(gray, 255, 255, 255), x * PIXEL_SIZE, y, mTexture->mTexWidth * PIXEL_SIZE);
|
||||
@@ -309,7 +309,7 @@ int WFBFont::PreCacheChar(const u8 *ch)
|
||||
}
|
||||
for (; j < mFontSize; j++)
|
||||
{
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
mCharBuffer[y * mFontSize + x] = ARGB(0, 0, 0, 0);
|
||||
#else
|
||||
SwizzlePlot(pTexture, ARGB(0, 0, 0, 0), x * PIXEL_SIZE, y, mTexture->mTexWidth * PIXEL_SIZE);
|
||||
@@ -321,7 +321,7 @@ int WFBFont::PreCacheChar(const u8 *ch)
|
||||
|
||||
mGBCode[index] = code;
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
x = (int)mSprites[index]->mX;
|
||||
y = (int)mSprites[index]->mY;
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, mFontSize, mFontSize, GL_RGBA, GL_UNSIGNED_BYTE, mCharBuffer);
|
||||
@@ -601,7 +601,7 @@ WGBKFont::WGBKFont(int inFontID, const char *fontname, int lineheight, bool useV
|
||||
mSprites = NEW JQuad*[mCacheSize];
|
||||
mGBCode = NEW int[mCacheSize];
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
mCharBuffer = NEW u32[mFontSize*mFontSize];
|
||||
#endif
|
||||
|
||||
@@ -657,7 +657,7 @@ int WGBKFont::PreCacheChar(const u8 *ch)
|
||||
int index = mCurr++;
|
||||
if (mCurr >= mCacheSize) mCurr = 0;
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
memset(mCharBuffer, 0, sizeof(u32) * mFontSize * mFontSize);
|
||||
@@ -685,7 +685,7 @@ int WGBKFont::PreCacheChar(const u8 *ch)
|
||||
// set up the font texture buffer
|
||||
for (unsigned int i = 0; i < mFontSize; i++)
|
||||
{
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
x = 0;
|
||||
#else
|
||||
x = (int) mSprites[index]->mX;
|
||||
@@ -694,7 +694,7 @@ int WGBKFont::PreCacheChar(const u8 *ch)
|
||||
#if 1
|
||||
for (; j < offset; j++)
|
||||
{
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
mCharBuffer[y * mFontSize + x] = ARGB(0, 0, 0, 0);
|
||||
#else
|
||||
SwizzlePlot(pTexture, ARGB(0, 0, 0, 0), x * PIXEL_SIZE, y, mTexture->mTexWidth * PIXEL_SIZE);
|
||||
@@ -709,7 +709,7 @@ int WGBKFont::PreCacheChar(const u8 *ch)
|
||||
gray = src[(i * size + j - offset) / 2];
|
||||
gray = ((j - offset) & 1) ? (gray & 0xF0) : ((gray & 0x0F) << 4);
|
||||
if (gray) gray |= 0x0F;
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
mCharBuffer[y * mFontSize + x] = ARGB(gray, 255, 255, 255);
|
||||
#else
|
||||
SwizzlePlot(pTexture, ARGB(gray, 255, 255, 255), x * PIXEL_SIZE, y, mTexture->mTexWidth * PIXEL_SIZE);
|
||||
@@ -718,7 +718,7 @@ int WGBKFont::PreCacheChar(const u8 *ch)
|
||||
}
|
||||
for (; j < mFontSize; j++)
|
||||
{
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
mCharBuffer[y * mFontSize + x] = ARGB(0, 0, 0, 0);
|
||||
#else
|
||||
SwizzlePlot(pTexture, ARGB(0, 0, 0, 0), x * PIXEL_SIZE, y, mTexture->mTexWidth * PIXEL_SIZE);
|
||||
@@ -730,7 +730,7 @@ int WGBKFont::PreCacheChar(const u8 *ch)
|
||||
|
||||
mGBCode[index] = code;
|
||||
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
x = (int)mSprites[index]->mX;
|
||||
y = (int)mSprites[index]->mY;
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, mFontSize, mFontSize, GL_RGBA, GL_UNSIGNED_BYTE, mCharBuffer);
|
||||
|
||||
@@ -43,7 +43,7 @@ int WRand()
|
||||
int filesize(const char * filename)
|
||||
{
|
||||
int file_size = 0;
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
#if defined (WIN32) || defined (LINUX) || defined (IOS)
|
||||
FILE * file = fopen(filename, "rb");
|
||||
if (file != NULL)
|
||||
{
|
||||
|
||||
@@ -84,7 +84,6 @@ SOURCES += \
|
||||
src/GuiPhaseBar.cpp\
|
||||
src/GuiPlay.cpp\
|
||||
src/GuiStatic.cpp\
|
||||
src/Logger.cpp\
|
||||
src/ManaCost.cpp\
|
||||
src/ManaCostHybrid.cpp\
|
||||
src/MenuItem.cpp\
|
||||
@@ -110,6 +109,7 @@ SOURCES += \
|
||||
src/SimpleMenu.cpp\
|
||||
src/SimpleMenuItem.cpp\
|
||||
src/SimplePad.cpp\
|
||||
src/SimplePopup.cpp\
|
||||
src/StoryFlow.cpp\
|
||||
src/Subtypes.cpp\
|
||||
src/StyleManager.cpp\
|
||||
@@ -234,6 +234,7 @@ HEADERS += \
|
||||
include/StyleManager.h\
|
||||
include/WFont.h\
|
||||
include/DeckManager.h\
|
||||
include/SimplePopup.h\
|
||||
include/SimpleMenu.h
|
||||
|
||||
# JGE, could probably be moved outside
|
||||
|
||||
Reference in New Issue
Block a user