void CThunderBolt::process() { performCollisions(); if(!processActionRoutine()) exists = false; }
void CMadMushroom::process() { performGravityMid(); performCollisions(); if(!blockedd) { m_jumped = false; } if(blockedd && !m_jumped) { yinertia = -MUSHROOM_LOW_INERTIA; jumpcounter++; if( jumpcounter>=bounceAmount ) { yinertia = -MUSHROOM_HIGH_INERTIA; jumpcounter = 0; playSound( SOUND_BOUNCE_HIGH ); } else { playSound( SOUND_BOUNCE_LOW ); } m_jumped = true; } if(!processActionRoutine()) exists = false; }
void CEnemyShot::process() { m_speedInt += m_speedF; if(m_speedInt >= 1.0) { const int speed = m_speedInt; moveXDir(speed*xDirection); moveYDir(speed*yDirection); m_speedInt -= float(speed); } // If it collides against something, make it non-existent if( (blockedd && yDirection == DOWN) || (blockedl && xDirection == LEFT) || (blockedu && yDirection == UP) || (blockedr && xDirection == RIGHT) ) { exists = false; } if(!processActionRoutine()) { exists = false; } }
void CWormmouth::getTouchedBy(CSpriteObject &theObject) { if(dead || theObject.dead ) return; CStunnable::getTouchedBy(theObject); // Was it a bullet? Than make it stunned. if( dynamic_cast<CBullet*>(&theObject) ) { setAction( A_WORMMOUTH_STUNNED ); dead = true; theObject.dead = true; if(!processActionRoutine()) exists = false; performCollisions(); processGettingStunned(); } if( !getActionNumber(A_WORMMOUTH_EAT) ) return; if( CPlayerBase *player = dynamic_cast<CPlayerBase*>(&theObject) ) { player->kill(); } }
void CAmpton::process() { performCollisions(); if(!getActionNumber(A_AMPTON_POLE_SLIDE)) performGravityMid(); if(!dead) // If we is dead, there is no way to continue moving or turning { if( blockedl ) { if(xDirection == LEFT) setAction(A_AMPTON_TURN); xDirection = RIGHT; } else if(blockedr) { if(xDirection == RIGHT) setAction(A_AMPTON_TURN); xDirection = LEFT; } } if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }
void CRocket::process() { if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }
void CArachnut::process() { performCollisions(); performGravityLow(); if( blockedl ) xDirection = RIGHT; else if( blockedr ) xDirection = LEFT; if( getActionStatus(A_ARACHNUT_WALK) ) setAction(A_ARACHNUT_WALK); if( getActionNumber(A_ARACHNUT_WALK) ) { // Move normally in the direction if( xDirection == RIGHT ) moveRight( WALK_SPEED ); else moveLeft( WALK_SPEED ); } if(!processActionRoutine()) exists = false; }
void CSparky::process() { performCollisions(); performGravityMid(); if(!dead) // If we is dead, there is no way to continue moving or turning { if( blockedl ) { if(xDirection == LEFT) setAction(A_SPARKY_TURN); xDirection = RIGHT; } else if(blockedr) { if(xDirection == RIGHT) setAction(A_SPARKY_TURN); xDirection = LEFT; } } if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }
void CShellyFrags::process() { performCollisions(); performGravityMid(); // Reflections at wall. Not sure, if it makes sense, let's observe the behaviour if( (blockedl && mXSpeed < 0) || (blockedr && mXSpeed > 0) ) { mXSpeed = -mXSpeed; } if( blockedd ) { dead = true; exists = false; return; } moveXDir(mXSpeed); processActionRoutine(); }
void CLick::process() { (this->*mp_processState)(); processActionRoutine(); processFalling(); }
void CPlayerDive::process() { (this->*mp_processState)(); processLevelMiscFlagsCheck(); processActionRoutine(); }
void CWaterMine::process() { (this->*mp_processState)(); if(!processActionRoutine()) exists = false; }
void CBlorb::process() { performCollisions(); if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }
void CMimrock::process() { performCollisions(); processFalling(); (this->*mp_processState)(); processActionRoutine(); }
void CBullets::process() { if( blockedd || blockedu || blockedl || blockedr ) { setAction(A_KEENSHOT_IMPACT); } processActionRoutine(); }
void CShelly::process() { performCollisions(); performGravityHigh(); processActionRoutine(); (this->*mp_processState)(); }
void CMimrock::process() { performCollisions(); performGravityMid(); processActionRoutine(); (this->*mp_processState)(); }
void CCouncilMember::process() { (this->*mp_processState)(); if( blockedl ) m_hDir = RIGHT; else if(blockedr) m_hDir = LEFT; processActionRoutine(); }
void CBullet::process() { if( !getActionNumber(A_KEENSHOT_IMPACT) && (blockedd || blockedu || blockedl || blockedr || onslope) ) { setAction(A_KEENSHOT_IMPACT); playSound( SOUND_SHOT_HIT ); dead = true; } processActionRoutine(); }
void CShikadiMaster::process() { performCollisions(); performGravityMid(); if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }
CMadMushroom::CMadMushroom(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) : CGalaxySpriteObject(pmap, foeID, x, y), jumpcounter(0) { setupGalaxyObjectOnMap(0x20E4, A_MUSHROOM_BOUNCE); CSprite &rSprite = g_pGfxEngine->getSprite(sprite); performCollisions(); processMove( 0, rSprite.m_bboxY1-rSprite.m_bboxY2 ); processActionRoutine(); }
CArachnut::CArachnut(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) : CGalaxySpriteObject(pmap, foeID, x, y) { setupGalaxyObjectOnMap( 0x2378, A_ARACHNUT_WALK ); xDirection = LEFT; CSprite &rSprite = g_pGfxEngine->getSprite(sprite); performCollisions(); processMove( 0, rSprite.m_bboxY1-rSprite.m_bboxY2 ); processActionRoutine(); }
void CCouncilMember::process() { (this->*mp_processState)(); if( blockedl ) xDirection = RIGHT; else if(blockedr) xDirection = LEFT; if(!processActionRoutine()) exists = false; }
void CBerkFlame::process() { processFalling(); performCollisions(); (this->*mpProcessState)(); if(!processActionRoutine()) exists = false; }
CMadMushroom::CMadMushroom(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) : CGalaxySpriteObject(pmap, foeID, x, y, 0), jumpcounter(0) { setupGalaxyObjectOnMap(0x20E4, A_MUSHROOM_BOUNCE); processActionRoutine(); honorPriority = false; bounceAmount = 0; byte *ptr = gKeenFiles.exeFile.getRawData(); ptr += 0xFF90; memcpy(&bounceAmount, ptr, 1 ); }
CArachnut::CArachnut(CMap *pmap, const Uint16 foeID, Uint32 x, Uint32 y) : CGalaxySpriteObject(pmap, foeID, x, y, 0) { setupGalaxyObjectOnMap( 0x2378, A_ARACHNUT_WALK ); xDirection = LEFT; GsSprite &rSprite = gGraphics.getSprite(mSprVar, mSpriteIdx); performCollisions(); const int xcentering=(rSprite.m_bboxX2-rSprite.m_bboxX1)/2; processMove( xcentering, 0 ); processActionRoutine(); }
void COrbatrix::process() { performCollisions(); if( blockedl ) xDirection = RIGHT; else if(blockedr) xDirection = LEFT; if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }
void CLick::process() { performCollisions(); performGravityMid(); if( blockedl ) xDirection = RIGHT; else if( blockedr ) xDirection = LEFT; (this->*mp_processState)(); if(!processActionRoutine()) exists = false; }
void CPlatform::process() { // check if someone is still standing on the platform if(mp_CarriedPlayer) { if(!hitdetect(*mp_CarriedPlayer) || mp_CarriedPlayer->blockedu) { mp_CarriedPlayer->supportedbyobject = false; mp_CarriedPlayer->m_jumpdownfromobject = false; mp_CarriedPlayer = NULL; } } processActionRoutine(); }
void CPoisonSlug::process() { performCollisions(); performGravityLow(); if( blockedl ) xDirection = RIGHT; else if(blockedr) xDirection = LEFT; if(!processActionRoutine()) exists = false; (this->*mp_processState)(); }