Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Latest commit

 

History

History
40 lines (29 loc) · 1.1 KB

PROJECTSETUP.md

File metadata and controls

40 lines (29 loc) · 1.1 KB

Setting Up a Project

Instructions for creating an application using NINAGE

Requirements

Make sure you have all the requirements.

Your Project

main.cpp

This is where your app starts.

    #include <ninage/Ninage.h>
    #include "MainScene.h"


    Ninage  *app;
    const Uint8 *state = SDL_GetKeyboardState(NULL); // this is needed for keyboard & mouse input.

    /**
     * This is where the `app` is initialized.
     * Here, you can add scenes for example.
     *
     * This function will run at startup.
    */
    void Ninage::main() {
        MainScene *scene = new MainScene();

        this->addScene(scene);
    }

    int main (int argc, char* args[]) {
        app = new Ninage();
        
        // Start the main loop, will return the state integer when canceled.
        return app->run();
    }

More Information

For more information on how to setup a project, please look at the testgame, or look at the examples