<commit_before>#ifndef MAP_H
#define MAP_H

#include "datastructures.h"
#include "ingameelements/movingentity.h"
#include "ingameelements/character.h"

#include <allegro5/allegro.h>
#include <string>

class Map
{
    public:
        Map(std::string name);
        ~Map();
        void renderbackground(double cam_x, double cam_y);
        void renderwallground(double cam_x, double cam_y);
        bool collides(Gamestate *state, MovingEntity *entity);
        bool collides(Gamestate *state, Character *entity);
        bool collides(Rect rect);
        bool testpixel(double x, double y);
    protected:
    private:<commit_msg>Faster version.<commit_after>#ifndef MAP_H
#define MAP_H

#include "datastructures.h"
#include "ingameelements/movingentity.h"
#include "ingameelements/character.h"

#include <allegro5/allegro.h>
#include <string>

class Map
{
    public:
        Map(std::string name);
        ~Map();
        void renderbackground(double cam_x, double cam_y);
        void renderwallground(double cam_x, double cam_y);
        bool collides(Gamestate *state, MovingEntity *entity);
        bool collides(Gamestate *state, Character *entity);
        bool collides(Rect rect);
        bool testpixel(double x, double y) {return al_get_pixel(wallmask, i+r.x, j+r.y).a != 0;}
    protected:
    private:
{'fraction_non_alphanumeric': 0.11254752851711027, 'fraction_numerical': 0.0022813688212927757, 'mean_word_length': 3.6338028169014085, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '637956', 'n_tokens_mistral': 437, 'n_tokens_neox': 421, 'n_words': 105}