Beispiel #1
0
int main( int argc, char* args[] )
{

    Editor *game;
    game = new Editor(SCREEN_HEIGHT, SCREEN_WIDTH, false);
    game->Run();

    delete game;
	return 0;
}
Beispiel #2
0
void CLI::Run (int argc, char ** argv)
{
  Editor editor;

  if (argc < 2) Usage(EXIT_FAILURE);

  // Handle special options --help and --version
  if (strcmp(argv[1], "-h") == 0 ||
      strcmp(argv[1], "--help") == 0) Usage(EXIT_SUCCESS);

  if (strcmp(argv[1], "-v") == 0 ||
      strcmp(argv[1], "--version") == 0) Version();

  // Initialize editor
  editor.Init();

  editor.OpenFile(argv[1]);

  // Start editor
  editor.Run();

}