<commit_before>// Copyright (C) 2017 <NAME>
// This file is part of the Ouzel engine.

#include "MainMenu.hpp"
#include "SpritesSample.hpp"
#include "GUISample.hpp"
#include "RTSample.hpp"
#include "AnimationsSample.hpp"
#include "InputSample.hpp"
#include "SoundSample.hpp"
#include "PerspectiveSample.hpp"

std::string DEVELOPER_NAME = "org.ouzelengine";
std::string APPLICATION_NAME = "samples";

void ouzelMain(const std::vector<std::string>& args)
{
    // disable screen saver
    ouzel::engine->setScreenSaverEnabled(false);

    std::string sample;

    for (auto arg = args.begin(); arg != args.end(); ++arg)
    {
        if (arg == args.begin())
        {
            // skip the first parameter
            continue;
        }

        if (*arg == "-sample")
        {
            auto nextArg = ++arg;

            if (nextArg != args.end())
            {
                sample = *nextArg;
            }
            else
            {
                ouzel::Log(ouzel::Log::Level::WARN) << "No sample specified";
            }
        }
        else
        {
            ouzel::Log(ouzel::Log::Level::WARN) << "Invalid argument \"" << *arg << "\"";
        }
    }

    ouzel::engine->getFileSystem()->addResourcePath("Resources");

    ouzel::engine->getRenderer()->setClearColor(ouzel::Color(64, 0, 0));

    std::unique_ptr<ouzel::scene::Scene> currentScene;

    if (!sample.empty())
    {
        if (sample == "sprites")
        {
            currentScene.reset(new SpritesSample());
        }
        else if (sample == "gui")
        {
            currentScene.reset(new GUISample());
        }
        else if (sample == "render_target")
        {
            currentScene.reset(new RTSample());
        }
        else if (sample == "animations")
        {
            currentScene.reset(new AnimationsSample());
        }
        else if (sample == "input")
        {
            currentScene.reset(new InputSample());
        }
        else if (sample == "sound")
        {
            currentScene.reset(new SoundSample());
        }
        else if (sample == "perspective")
        {
            currentScene.reset(new PerspectiveSample());
        }
    }
    
    if (!currentScene)
    {
        currentScene.reset(new MainMenu());
    }

    ouzel::engine->getSceneManager()->setScene(std::move(currentScene));
}<commit_msg>Use ouzel namespace in samples<commit_after>// Copyright (C) 2017 <NAME>
// This file is part of the Ouzel engine.

#include "MainMenu.hpp"
#include "SpritesSample.hpp"
#include "GUISample.hpp"
#include "RTSample.hpp"
#include "AnimationsSample.hpp"
#include "InputSample.hpp"
#include "SoundSample.hpp"
#include "PerspectiveSample.hpp"

std::string DEVELOPER_NAME = "org.ouzelengine";
std::string APPLICATION_NAME = "samples";

using namespace ouzel;

void ouzelMain(const std::vector<std::string>& args)
{
    // disable screen saver
    engine->setScreenSaverEnabled(false);

    std::string sample;

    for (auto arg = args.begin(); arg != args.end(); ++arg)
    {
        if (arg == args.begin())
        {
            // skip the first parameter
            continue;
        }

        if (*arg == "-sample")
        {
            auto nextArg = ++arg;

            if (nextArg != args.end())
            {
                sample = *nextArg;
            }
            else
            {
                ouzel::Log(ouzel::Log::Level::WARN) << "No sample specified";
            }
        }
        else
        {
            ouzel::Log(ouzel::Log::Level::WARN) << "Invalid argument \"" << *arg << "\"";
        }
    }

    engine->getFileSystem()->addResourcePath("Resources");

    engine->getRenderer()->setClearColor(ouzel::Color(64, 0, 0));

    std::unique_ptr<ouzel::scene::Scene> currentScene;

    if (!sample.empty())
    {
        if (sample == "sprites")
        {
            currentScene.reset(new SpritesSample());
        }
        else if (sample == "gui")
        {
            currentScene.reset(new GUISample());
        }
        else if (sample == "render_target")
        {
            currentScene.reset(new RTSample());
        }
        else if (sample == "animations")
        {
            currentScene.reset(new AnimationsSample());
        }
        else if (sample == "input")
        {
            currentScene.reset(new InputSample());
        }
        else if (sample == "sound")
        {
            currentScene.reset(new SoundSample());
        }
        else if (sample == "perspective")
        {
            currentScene.reset(new PerspectiveSample());
        }
    }
    
    if (!currentScene)
    {
        currentScene.reset(new MainMenu());
    }

    engine->getSceneManager()->setScene(std::move(currentScene));
}
{'fraction_non_alphanumeric': 0.14702771313729637, 'fraction_numerical': 0.0033848106621535857, 'mean_word_length': 1.9494697442295696, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '182639', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1361, 'n_words': 277}