END_DEFAULTS bool ASecActHitFakeFloor::TriggerAction (AActor *triggerer, int activationType) { bool didit = (activationType & SECSPAC_HitFakeFloor) ? CheckTrigger (triggerer) : false; return didit | Super::TriggerAction (triggerer, activationType); }
END_DEFAULTS bool ASecActEyesAboveC::TriggerAction (AActor *triggerer, int activationType) { bool didit = (activationType & SECSPAC_EyesAboveC) ? CheckTrigger (triggerer) : false; return didit | Super::TriggerAction (triggerer, activationType); }
/******************************************************************** * Function: main() * * Precondition: * * Input: None. * * Output: None. * * Side Effects: None. * * Overview: Main entry function. If there is a trigger or * if there is no valid application, the device * stays in firmware upgrade mode. * * * Note: None. ********************************************************************/ INT main(void) { UINT pbClk; // Setup configuration pbClk = SYSTEMConfig(SYS_FREQ, SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE); InitLED(); mLED = 0; TRISAbits.TRISA4 = 1; // TEST pin CNPDAbits.CNPDA4 = 1; // Pull-down delay_us( 10 ); // Wait a bit until the port pin got pulled down. // Enter firmware upgrade mode if there is a trigger or if the application is not valid if(CheckTrigger() || !ValidAppPresent()) { // Initialize the transport layer - UART/USB/Ethernet TRANS_LAYER_Init(pbClk); while(!FRAMEWORK_ExitFirmwareUpgradeMode()) // Be in loop till framework recieves "run application" command from PC { // Enter firmware upgrade mode. // Be in loop, looking for commands from PC TRANS_LAYER_Task(); // Run Transport layer tasks FRAMEWORK_FrameWorkTask(); // Run frame work related tasks (Handling Rx frame, process frame and so on) // Blink LED (Indicates the user that bootloader is running). BlinkLED(); } // Close trasnport layer. TRANS_LAYER_Close(); mLED = 0; while ( CheckTrigger() ) {}; // Do not run the application while TEST is still tied to VCC. } // No trigger + valid application = run application. CNPDAbits.CNPDA4 = 0; // turn off Pull-down JumpToApp(); return 0; }
/******************************************************************** * Function: main() * * Precondition: * * Input: None. * * Output: None. * * Side Effects: None. * * Overview: Main entry function. If there is a trigger or * if there is no valid application, the device * stays in firmware upgrade mode. * * * Note: None. ********************************************************************/ INT main(void) { UINT pbClk; UINT bSoftResetFlag = 0; // Setup configuration pbClk = SYSTEMConfig(SYS_FREQ, SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE); InitLED(); TRISBbits.TRISB15 = 1;//test bSoftResetFlag = *(unsigned int *)(NVM_DATA); if(bSoftResetFlag == 1) { NVMErasePage((void*)NVM_DATA); NVMWriteWord((void*)(NVM_DATA), (unsigned int)0x00); } // Enter firmware upgrade mode if there is a trigger or if the application is not valid if(bSoftResetFlag == 1 || CheckTrigger() || !ValidAppPresent()) { // Initialize the transport layer - UART/USB/Ethernet TRANS_LAYER_Init(pbClk); while(!FRAMEWORK_ExitFirmwareUpgradeMode()) // Be in loop till framework recieves "run application" command from PC { // Enter firmware upgrade mode. // Be in loop, looking for commands from PC TRANS_LAYER_Task(); // Run Transport layer tasks FRAMEWORK_FrameWorkTask(); // Run frame work related tasks (Handling Rx frame, process frame and so on) // Blink LED (Indicates the user that bootloader is running). BlinkLED(); } // Close trasnport layer. TRANS_LAYER_Close(); } // No trigger + valid application = run application. JumpToApp(); return 0; }
void TCheckPoint::Update() { m_tSprite.Update(); if (CheckTrigger(*TPlayer::GetInstance().GetCastToUoBox()) && !m_bActive) { m_bActive = true; m_tSprite.SetCutOut(CHECKPOINT_ACTIVATED_CUTOUT); TPlayer::GetInstance().SetCheckPoint(this); if (m_bEndCheckPoint) { TPlayer::GetInstance().ExitLevel(); } } if (m_bRespawning) { m_tAnimation.Update(); } }
void MissionEvent::ExecFrame(double seconds) { Sim* sim = Sim::GetSim(); if (!sim) { status = PENDING; return; } if (status == PENDING) CheckTrigger(); if (status == ACTIVE) { if (delay > 0) delay -= seconds; else Execute(); } }
bool ASecActEyesSurface::TriggerAction (AActor *triggerer, int activationType) { bool didit = (activationType & SECSPAC_EyesSurface) ? CheckTrigger (triggerer) : false; return didit | Super::TriggerAction (triggerer, activationType); }
bool ASecActUseWall::TriggerAction (AActor *triggerer, int activationType) { bool didit = (activationType & SECSPAC_UseWall) ? CheckTrigger (triggerer) : false; return didit | Super::TriggerAction (triggerer, activationType); }
bool ASecActHitCeil::DoTriggerAction (AActor *triggerer, int activationType) { bool didit = (activationType & SECSPAC_HitCeiling) ? CheckTrigger (triggerer) : false; return didit | Super::DoTriggerAction (triggerer, activationType); }