<commit_before>#include "area.hpp"
#include "actor.hpp"
#include "screen.hpp"
#include "tileset.hpp"
#include "level.hpp"
#include "defs.hpp"
#include "other.hpp"
#include "player.hpp"
#include "item.hpp"
#include "client/opengl.hpp"
#include "client/texturefile.hpp"
#include <cstring>
#include <algorithm>
using namespace LD22;

Area::Area(Screen &screen)
    : m_screen(screen)
{ }

Area::~Area()
{ }

void Area::addActor(Actor *a)
{
    m_actors.push_back(a);
    a->m_area = this;
    a->m_x0 = a->m_x;
    a->m_y0 = a->m_x;
    a->init();
}

void Area::draw(int delta)
{
    Tileset &tiles = m_screen.tileset();
    tiles.drawTiles(m_tiles, delta);
    std::vector<Actor *>::iterator
        b = m_actors.begin(), i = b, e = m_actors.end();
    for (; i != e; ++i) {
        Actor &a = **i;
        if (a.isvalid())
            a.draw(delta, tiles);
    }
}
<commit_msg>Fix graphical glitch at level start<commit_after>#include "area.hpp"
#include "actor.hpp"
#include "screen.hpp"
#include "tileset.hpp"
#include "level.hpp"
#include "defs.hpp"
#include "other.hpp"
#include "player.hpp"
#include "item.hpp"
#include "client/opengl.hpp"
#include "client/texturefile.hpp"
#include <cstring>
#include <algorithm>
using namespace LD22;

Area::Area(Screen &screen)
    : m_screen(screen)
{ }

Area::~Area()
{ }

void Area::addActor(Actor *a)
{
    m_actors.push_back(a);
    a->m_area = this;
    a->m_x0 = a->m_x;
    a->m_y0 = a->m_y;
    a->init();
}

void Area::draw(int delta)
{
    Tileset &tiles = m_screen.tileset();
    tiles.drawTiles(m_tiles, delta);
    std::vector<Actor *>::iterator
        b = m_actors.begin(), i = b, e = m_actors.end();
    for (; i != e; ++i) {
        Actor &a = **i;
        if (a.isvalid())
            a.draw(delta, tiles);
    }
}

{'fraction_non_alphanumeric': 0.1871476888387824, 'fraction_numerical': 0.004509582863585118, 'mean_word_length': 3.3292682926829267, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, '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': '4974450', 'n_tokens_mistral': 724, 'n_tokens_neox': 712, 'n_words': 147}