<commit_before>#include "gridmap.hpp"
#include "gui.hpp"
#include "oddlib/lvlarchive.hpp"
#include "renderer.hpp"
#include "oddlib/path.hpp"
#include "oddlib/bits_factory.hpp"
#include "logger.hpp"
#include <cassert>
#include "sdl_raii.hpp"
#include "stb_image.h"
#include <algorithm> // min/max
#include <cmath>

Level::Level(GameData& gameData, IAudioController& /*audioController*/, FileSystem& fs)
    : mGameData(gameData), mFs(fs)
{
    mScript = std::make_unique<Script>();
    if (!mScript->Init(fs))
    {
        LOG_ERROR("Script init failed");
    }
}

void Level::Update()
{
    if (mMap)
    {
        mMap->Update();
    }

    if (mScript)
    {
        mScript->Update();
    }
}

void Level::Render(Renderer& rend, GuiContext& gui, int screenW, int screenH)
{
    RenderDebugPathSelection(rend, gui);
    if (mMap)<commit_msg>Fixed compilation<commit_after>#include "gridmap.hpp"
#include "gui.hpp"
#include "oddlib/lvlarchive.hpp"
#include "renderer.hpp"
#include "oddlib/path.hpp"
#include "oddlib/bits_factory.hpp"
#include "logger.hpp"
#include <cassert>
#include "sdl_raii.hpp"
#include <algorithm> // min/max
#include <cmath>

#ifdef _CRT_SECURE_NO_WARNINGS
#   undef _CRT_SECURE_NO_WARNINGS // stb_image.h might redefine _CRT_SECURE_NO_WARNINGS
#   include "stb_image.h"
#   ifndef _CRT_SECURE_NO_WARNINGS
#       define _CRT_SECURE_NO_WARNINGS
#   endif
#else
#   include "stb_image.h"
#endif

Level::Level(GameData& gameData, IAudioController& /*audioController*/, FileSystem& fs)
    : mGameData(gameData), mFs(fs)
{
    mScript = std::make_unique<Script>();
    if (!mScript->Init(fs))
    {
        LOG_ERROR("Script init failed");
    }
}

void Level::Update()
{
    if (mMap)
    {
        mMap->Update();
    }

    if (mScript)
    {
        mScript->Update();
    }
}

void Level::Render(Renderer& rend, GuiContext& gui, int screenW, int screenH)
{
    RenderDebugPathSelection(rend, gui);
    if (mMap)
{'fraction_non_alphanumeric': 0.14860681114551083, 'fraction_numerical': 0.0, 'mean_word_length': 3.908860759493671, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '2830564', 'n_tokens_mistral': 727, 'n_tokens_neox': 713, 'n_words': 139}