void EngineStatePoolShowShot::Draw() { #ifdef SHOW_VALID_SHOTS EngineStatePoolBase::DrawBackground(); // GetActivePlayer()->DrawSwish(); Frustum::Instance()->Create(); m_scenePolys = m_pLevel->Draw(); GetRules(m_pLevel.GetPtr())->GetBehaviour()->DrawValidShot(m_validShotNum); DrawGameObjects(false); // false => non-translucent #else EngineStatePoolBase::Draw(); #endif }
void __fastcall TMainForm::PaintBox1Paint(TObject *Sender) { DrawGameObjects(); }
void EngineRunningBase::DrawForeground() { // Create the view frustum. This is used in the drawing calls to cull objects // out of view. Frustum::Instance()->Create(); // TODO make configurable.. this is just a test if (IsUnderwater()) { GetEngine()->PushColour(0.5f, 0.5f, 1.0f, 1.0f); } #if defined(HS_DEBUG) if (GetEngine()->GetDrawHeights()) { // Draw the Heights/walls around the player. // The player (and all characters) own a HeightServer. const HeightServer* hs = GetPlayer()->GetHeightServer(); hs->DrawHeights(); hs->DrawWalls(); } #endif // Don't draw player character in first person mode! // TODO Maybe draw bits, e.g. a GUN in Multiplayer Deathmatch mode. // Pool: don't draw player // DrawPlayer(); // Draw static elements of scene. Get number of polys drawn. m_scenePolys = m_pLevel->Draw(); // Scene display lists may be stored in a sorted list. // This call executes the sorted display lists // then empties the container. //LeafData::GetRenderer()->DrawList(); // Player shadow: draw it TWICE, once on the static scene, once on // the game objects. // if (!GetEngine()->GetEngineState()->PlayerIsDead()) // { // DrawCharacterShadow(GetPlayer()); // } //DrawCharacterShadow(GetPlayer()); // needed ?? //DrawGameObjectShadows(); // Draw Game Objects. These are stateful, interactive things, including // moving Platforms, bonuses, etc. DrawGameObjects(false); // false => non-translucent DrawGameObjectShadows(); AmjuGL::Enable(AmjuGL::AMJU_BLEND); DrawGameObjects(true); // true => translucent, or with transparent areas. AmjuGL::Disable(AmjuGL::AMJU_BLEND); // Execute GameObject display lists. //LeafData::GetRenderer()->DrawList(); // Player shadow: draw it AGAIN //DrawCharacterShadow(GetPlayer()); // We don't like lensflare any more. //DrawLensflare(); // If underwater, we pushed a colour onto the colour stack. if (IsUnderwater()) { GetEngine()->PopColour(); } }