当前位置: 首页>>代码示例>>C++>>正文


C++ EmAssert函数代码示例

本文整理汇总了C++中EmAssert函数的典型用法代码示例。如果您正苦于以下问题:C++ EmAssert函数的具体用法?C++ EmAssert怎么用?C++ EmAssert使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了EmAssert函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: EmAssert

void EmFileRef::SetEmulatorRef	(const EmFileRef& ref)
{
	EmAssert (ref.IsSpecified ());
	EmAssert (!gEmulatorRef.IsSpecified ());

	gEmulatorRef = ref;
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:7,代码来源:EmFileRef.cpp

示例2: EmAssert

void EmHAL::AddHandler (EmHALHandler* handler)
{
	EmAssert (handler->fNextHandler == NULL);
	EmAssert (handler->fPrevHandler == NULL);
	EmAssert (fgRootHandler == NULL || fgRootHandler->fPrevHandler == NULL);

	if (fgRootHandler != NULL)
	{
		fgRootHandler->fPrevHandler = handler;
		handler->fNextHandler = fgRootHandler;
	}

	fgRootHandler = handler;
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:14,代码来源:EmHAL.cpp

示例3: EmAssert

EmDocument* EmDocument::DoNewBound (void)
{
	EmAssert (gApplication->IsBoundPartially ());

	// Create the new document.

	EmDocument*	doc = EmDocument::HostCreateDocument ();

	try
	{
		// Create the new session.

		doc->fSession = new EmSession;
		doc->fSession->CreateBound ();
		doc->fSession->CreateThread (false);	// !!! Created here, but destroyed in EmSession::~EmSession!
	}
	catch (...)
	{
		delete doc;
		throw;
	}

	// If we got here, then everything worked.  Open a window on the session.

	doc->PrvOpenWindow ();

	return doc;
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:28,代码来源:EmDocument.cpp

示例4: EmApplication

EmApplicationFltk::EmApplicationFltk (void) :
	EmApplication (),
	fAppWindow (NULL)
{
	EmAssert (gHostApplication == NULL);
	gHostApplication = this;
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:7,代码来源:EmApplicationFltk.cpp

示例5: EmAssert

void StateBehavior::StdOnSignal() {
    EmAssert(this->getParent() != NULL, "Parent NULL");
    if (p_CurrentStateItem == NULL && m_vStateItem.size() == 0) return;

    // initialize origo, this is a ugle hack
    if (m_iTick == 0) {
        this->getParent()->getTranslation(m_vtxTr.x, m_vtxTr.y, m_vtxTr.z);
        this->getParent()->getRotation(m_vtxRot.x, m_vtxRot.y, m_vtxRot.z);
    }

#if EM_DEBUG
    if (Loader::getInstance()->getSignal(GetSignal()) != NULL) {
        EM_COUT("Got signal " << Loader::getInstance()->getSignal(GetSignal()), 0);
    }
#endif

    OnSignal( PBL_SIG_RESET_ALL) {
        this->setState(m_vStateItem[0]);
        // do a fast move
        if (m_bMove) {
            this->getParent()->setTransform(m_vtxTr.x + p_CurrentStateItem->m_vtxTr.x,
                                            m_vtxTr.y + p_CurrentStateItem->m_vtxTr.y,
                                            m_vtxTr.z + p_CurrentStateItem->m_vtxTr.z,
                                            m_vtxRot.x + p_CurrentStateItem->m_vtxRot.x,
                                            m_vtxRot.y + p_CurrentStateItem->m_vtxRot.y,
                                            m_vtxRot.z + p_CurrentStateItem->m_vtxRot.z);

        }
    }
    else {
开发者ID:chegestar,项目名称:pinball,代码行数:30,代码来源:StateBehavior.cpp

示例6: EmAssert

EmApplicationFltk::~EmApplicationFltk (void)
{
	delete fAppWindow;

	EmAssert (gHostApplication == this);
	gHostApplication = NULL;
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:7,代码来源:EmApplicationFltk.cpp

示例7: while

void EmHAL::EnsureCoverage (void)
{
#if 0
	// Rats...can't get this work...

	Bool			isHandled[20];
	EmHALHandler*	thisHandler = fgRootHandler;
	EmHALHandler	baseHandler;

	while (thisHandler)
	{
		typedef void (EmHALHandler::*CycleHandler)(Bool);
		CycleHandler	p1 = (thisHandler->Cycle);
		CycleHandler	p2 = (baseHandler.Cycle);

		if (p1 != p2)
		{
			isHandled[0] = true;
		}

		thisHandler = thisHandler->fNextHandler;
	}

	for (int ii = 0; ii < sizeof (isHandled); ++ii)
	{
		EmAssert (isHandled[ii]);
	}
#endif
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:29,代码来源:EmHAL.cpp

示例8: PrvHandleTrap12

Bool PrvHandleTrap12 (ExceptionNumber)
{
	EmAssert (gSession);
	gSession->ScheduleSuspendSubroutineReturn ();

	return true;
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:7,代码来源:ATraps.cpp

示例9: EmActionHandler

EmDocument::EmDocument (void) :
	EmActionHandler (),
	fSession (NULL),
	fFile ()
{
	EmAssert (gDocument == NULL);
	gDocument = this;
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:8,代码来源:EmDocument.cpp

示例10: EmAssert

ATrap::~ATrap (void)
{
	// Put things back the way they were.

	EmPalmOS::ForgetStack (EmBankMapped::GetEmulatedAddress (this->GetStackBase ()));

	EmAssert (gCPU68K);
	gCPU68K->SetRegisters (fOldRegisters);

	// Check to see if anything interesting was registered while we
	// were making the Palm OS subroutine call.  The "check after end
	// of cycle" bit may have gotten cleared when restoring the old
	// registers, so set it on the off chance that it was.  Doing this
	// is harmless if there really aren't any scheduled tasks.

	EmAssert (gSession);
	gCPU68K->CheckAfterCycle ();
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:18,代码来源:ATraps.cpp

示例11: EmAssert

void StdAnimation::onTick() {
    EmAssert(this->getParent() != NULL, "Parent not allowed to be null");

    float x, y, z;
    float sX, sY, sZ;
    float eX, eY, eZ;
    float k=0.0;
    int index;
    int size = m_vVertex.size();

    if (m_iTick >= size*m_iStep) {
        m_iTick = 0;
    }

    index = (int)(m_iTick/m_iStep);

    sX = m_vVertex[index].x;
    sY = m_vVertex[index].y;
    sZ = m_vVertex[index].z;

    if (index + 1 < size) {
        eX = m_vVertex[index+1].x;
        eY = m_vVertex[index+1].y;
        eZ = m_vVertex[index+1].z;
    } else {
        eX = m_vtxEnd.x;
        eY = m_vtxEnd.y;
        eZ = m_vtxEnd.z;
    }

    k = ((float)(m_iTick%m_iStep)/m_iStep);
    x = (float)(sX + (eX - sX)*k);
    y = (float)(sY + (eY - sY)*k);
    z = (float)(sZ + (eZ - sZ)*k);

    m_iTick++;

    if (m_iAnimType & EM_TRANSLATION) {
        this->getParent()->setTranslation(x, y, z);
    }	else if (m_iAnimType & EM_ROTATION) {
        this->getParent()->setRotation(x, y, z);
    }	else if (m_iAnimType & EM_LIGHT) {
        Light* l = this->getParent()->getLight();
        if (l != NULL) {
            l->setColor(x, y, z);
        }
    } else if (m_iAnimType & EM_BILLBOARD_SIZE) {
        BillBoard * b = this->getParent()->getBillBoard();
        if (b != NULL) {
            b->setSize(x, y);
            b->setZOffset(z);
        }
    }
}
开发者ID:chegestar,项目名称:pinball,代码行数:54,代码来源:StdAnimation.cpp

示例12: EmAssert

void Memory::Save (SessionFile& f)
{
	EmBankDummy::Save (f);
	EmBankRegs::Save (f);
	EmBankSRAM::Save (f);
	EmBankDRAM::Save (f);
	EmBankROM::Save (f);
	EmBankMapped::Save (f);

	EmAssert (gSession);
	if (gSession->GetDevice ().HasFlash ())
		EmBankFlash::Save (f);

	MetaMemory::Save (f);
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:15,代码来源:EmMemory.cpp

示例13: fNewRegisters

ATrap::ATrap (void) :
#if (__GNUC__ < 2)
/* Can't call the default constructor because there isn't one defined */
/* on a struct as there is with a class under GCC 2.8.1 */
	fNewRegisters (),
#endif
	fEmulatedStackMapper (this->GetStackBase (), kStackSize)
{
	// Get the registers.

	EmAssert (gCPU68K);
	gCPU68K->GetRegisters (fOldRegisters);
	fNewRegisters = fOldRegisters;

	// Make sure the CPU is not stopped.  I suppose that we could force the CPU
	// to no longer be stopped, but I'd rather that the Palm OS itself woke up
	// first before we try making calls into it.  Therefore, anything making
	// an out-of-the-blue Palm OS call via this class (that is, a call outside
	// of the context of a Palm OS function head- or tailpatch) should first
	// bring the CPU to a halt by calling EmSession::ExecuteUntilSysCall first.

	EmAssert (fNewRegisters.stopped == 0);

	// Give ourselves our own private stack.  We'll want this in case
	// we're in the debugger and the stack pointer is hosed.

	m68k_areg (fNewRegisters, 7) = EmBankMapped::GetEmulatedAddress (
										this->GetStackBase () + kStackSize - 4);

	// Remember this as a stack so that our stack sniffer won't complain.

	char*	stackBase = this->GetStackBase ();
	StackRange	range (	EmBankMapped::GetEmulatedAddress (&stackBase[0]), 
						EmBankMapped::GetEmulatedAddress (&stackBase[kStackSize - 4]));
	EmPalmOS::RememberStackRange (range);
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:36,代码来源:ATraps.cpp

示例14: EmAssert

void CollisionBounds::addIntersect(Polygon3D* p) {
	EmAssert(p != NULL, "CollisionBounds::add polygon NULL");
	EM_COUT("CollisionBounds::add" << endl, 0);
	// add polygons only to leafs
	if (m_vCollisionBounds.size() > 0) {
		vector<CollisionBounds*>::iterator iter = m_vCollisionBounds.begin();
		vector<CollisionBounds*>::iterator end = m_vCollisionBounds.end();
		for (; iter != end; ++iter) {
			(*iter)->addIntersect(p);
		}
	} else {
		// add intersection polygon to bounds
		if (this->intersect(p)) {
			m_vPolygon.push_back(p);
		}
	}
}
开发者ID:NickolasJShoemaker,项目名称:pinball,代码行数:17,代码来源:CollisionBounds.cpp

示例15: memset

void Memory::Initialize (	EmStream&		hROM,
							RAMSizeType		ramSize)
{
	// Clear everything out.
	
	memset (gEmMemBanks, 0, sizeof (gEmMemBanks));

	// Initialize the valid memory banks.

	EmBankDummy::Initialize ();

	// Initialize the Hardware registers memory bank.  Do this
	// *before* initializing the other RAM banks so that we
	// know how memory is laid out from the chip selects.

	EmBankRegs::Initialize ();

	// Initialize EmBankDRAM after initializing the EmBankSRAM. The order is
	// important for DragonballEZ. On Dragonball devices, DRAM is
	// at 0x00000000, and SRAM is at 0x10000000. But on EZ devices,
	// both start at 0x00000000. By calling EmBankDRAM::Initialize
	// second, we allow it to overwrite the EmAddressBank handlers
	// for the part of memory where they overlap.

	EmBankSRAM::Initialize (ramSize);
	EmBankDRAM::Initialize ();

	EmBankROM::Initialize (hROM);

	EmBankMapped::Initialize ();

	EmAssert (gSession);
	if (gSession->GetDevice ().HasFlash ())
		EmBankFlash::Initialize ();

	MetaMemory::Initialize ();

//	Memory::ResetBankHandlers ();	// Can't do this yet.  We can't set the
									// bank handlers until we know how memory
									// is laid out, and that information isn't
									// determined until reset.
}
开发者ID:Akheon23,项目名称:pose_emulator,代码行数:42,代码来源:EmMemory.cpp


注:本文中的EmAssert函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。