first draft of ad code for iOS. Not adding admob/adwhirl/adSesnse libs to this commit. You will need to download them to get the port to build under XCode

This commit is contained in:
techdragon.nguyen@gmail.com
2011-12-08 20:50:36 +00:00
parent 69a0323c86
commit fe78345ef7
13 changed files with 726 additions and 114 deletions
+38 -36
View File
@@ -44,42 +44,6 @@ protected:
WCache<WCachedTexture,JTexture>& mTextureCache;
};
class CacheEngine
{
public:
template <class T>
static void Create(WCache<WCachedTexture,JTexture>& inCache)
{
LOG("Creating Card Retriever instance");
sInstance = NEW T(inCache);
ThreadedCardRetriever* test = dynamic_cast<ThreadedCardRetriever*>(sInstance);
sIsThreaded = (test != NULL);
}
static CardRetrieverBase* Instance()
{
return sInstance;
}
static void Terminate()
{
SAFE_DELETE(sInstance);
}
static bool IsThreaded()
{
return sIsThreaded;
}
static CardRetrieverBase* sInstance;
static bool sIsThreaded;
};
CardRetrieverBase* CacheEngine::sInstance = NULL;
bool CacheEngine::sIsThreaded = false;
/*
**
*/
@@ -206,3 +170,41 @@ protected:
volatile bool mProcessing;
};
class CacheEngine
{
public:
template <class T>
static void Create(WCache<WCachedTexture,JTexture>& inCache)
{
LOG("Creating Card Retriever instance");
sInstance = NEW T(inCache);
ThreadedCardRetriever* test = dynamic_cast<ThreadedCardRetriever*>(sInstance);
sIsThreaded = (test != NULL);
}
static CardRetrieverBase* Instance()
{
return sInstance;
}
static void Terminate()
{
SAFE_DELETE(sInstance);
}
static bool IsThreaded()
{
return sIsThreaded;
}
static CardRetrieverBase* sInstance;
static bool sIsThreaded;
};
CardRetrieverBase* CacheEngine::sInstance = NULL;
bool CacheEngine::sIsThreaded = false;