Merge pull request #1339 from Areloch/Remove_Demo_Mode_Checks

Remove demo and trial checks
This commit is contained in:
Daniel Buckmaster 2015-07-23 20:33:31 +10:00
commit d268199f4f
25 changed files with 355 additions and 846 deletions

View file

@ -144,23 +144,12 @@ GuiCanvas::GuiCanvas(): GuiControl(),
#else
mNumFences = 0;
#endif
#ifdef TORQUE_DEMO_PURCHASE
mPurchaseScreen = NULL;
#endif
}
GuiCanvas::~GuiCanvas()
{
SAFE_DELETE(mPlatformWindow);
SAFE_DELETE_ARRAY( mFences );
#ifdef TORQUE_DEMO_PURCHASE
// if (mPurchaseScreen)
// {
// SAFE_DELETE(mPurchaseScreen);
// }
#endif
}
//------------------------------------------------------------------------------
@ -282,13 +271,6 @@ bool GuiCanvas::onAdd()
// Define the menu bar for this canvas (if any)
Con::executef(this, "onCreateMenu");
#ifdef TORQUE_DEMO_PURCHASE
mPurchaseScreen = new PurchaseScreen;
mPurchaseScreen->init();
mLastPurchaseHideTime = 0;
#endif
Sim::findObject("PlatformGenericMenubar", mMenuBarCtrl);
return parentRet;
@ -296,11 +278,6 @@ bool GuiCanvas::onAdd()
void GuiCanvas::onRemove()
{
#ifdef TORQUE_DEMO_PURCHASE
if (mPurchaseScreen && mPurchaseScreen->isAwake())
removeObject(mPurchaseScreen);
#endif
// And the process list
Process::remove(this, &GuiCanvas::paint);
@ -1362,11 +1339,6 @@ bool GuiCanvas::rootMouseWheelDown(const GuiEvent &event)
void GuiCanvas::setContentControl(GuiControl *gui)
{
#ifdef TORQUE_DEMO_PURCHASE
if (mPurchaseScreen->isForceExit())
return;
#endif
// Skip out if we got passed NULL (why would that happen?)
if(!gui)
return;
@ -1435,11 +1407,6 @@ GuiControl *GuiCanvas::getContentControl()
void GuiCanvas::pushDialogControl(GuiControl *gui, S32 layer, bool center)
{
#ifdef TORQUE_DEMO_PURCHASE
if (mPurchaseScreen->isForceExit())
return;
#endif
if( center )
gui->setPosition( getExtent().x / 2 - gui->getExtent().x / 2,
getExtent().y / 2 - gui->getExtent().y / 2 );
@ -1956,10 +1923,6 @@ void GuiCanvas::renderFrame(bool preRenderOnly, bool bufferSwap /* = true */)
// this situation is necessary because it needs to take the screenshot
// before the buffers swap
#ifdef TORQUE_DEMO_TIMEOUT
checkTimeOut();
#endif
PROFILE_END();
// Fence logic here, because this is where endScene is called.

View file

@ -37,12 +37,6 @@
#include "windowManager/platformWindowMgr.h"
#include "gfx/gfxFence.h"
#ifdef TORQUE_DEMO_PURCHASE
#ifndef _PURCHASESCREEN_H_
#include "demo/purchase/purchaseScreen.h"
#endif
#endif
/// A canvas on which rendering occurs.
///
///
@ -442,21 +436,6 @@ public:
private:
static const U32 MAX_GAMEPADS = 4; ///< The maximum number of supported gamepads
#ifdef TORQUE_DEMO_PURCHASE
private:
PurchaseScreen* mPurchaseScreen;
U32 mLastPurchaseHideTime;
public:
void showPurchaseScreen(bool show, bool startBlocker, const char* location, bool doExit);
void updatePurchaseScreen(const char* value);
#endif
#ifdef TORQUE_DEMO_TIMEOUT
private:
void checkTimeOut();
#endif
};
#endif