MCPcopy Create free account
hub / github.com/SpartanJ/eepp / mainLoop

Function mainLoop

src/examples/physics/physics.cpp:635–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635void mainLoop() {
636 mWindow->clear();
637
638 KM->update();
639
640 if ( KM->isKeyDown( KEY_ESCAPE ) ) {
641 mWindow->close();
642 }
643
644 physicsUpdate();
645
646 if ( KM->isKeyUp( KEY_LEFT ) || KM->isKeyUp( KEY_A ) ) {
647 ChangeDemo( mCurDemo - 1 );
648 } else if ( KM->isKeyUp( KEY_RIGHT ) || KM->isKeyUp( KEY_D ) ) {
649 ChangeDemo( mCurDemo + 1 );
650 }
651
652 mWindow->display();
653}
654
655EE_MAIN_FUNC int main( int, char*[] ) {
656 mWindow = Engine::instance()->createWindow( WindowSettings( 1024, 768, "eepp - Physics" ),

Callers

nothing calls this directly

Calls 8

physicsUpdateFunction · 0.85
ChangeDemoFunction · 0.85
isKeyDownMethod · 0.80
isKeyUpMethod · 0.80
displayMethod · 0.80
closeMethod · 0.65
clearMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected