<commit_before>#ifndef _SPRITE_SFR
#define _SPRITE_SFR

#include "Bgui.h"
#include "MyTimer.h"
#include "MyVector.h"
#include "MyRect.h"
#include <set>

enum Direction{
	DIR_UP,
	DIR_DOWN,
	DIR_LEFT,
	DIR_RIGHT
};

class Sprite: public Bgui{
private:
	void (*script)(Sprite&);

	void Process(void);
	Direction face;

	unsigned short frame;
	MyTimer delay_frames;
	bool anim;

	MyVector speed;

	std::vector<MyRect> box_collide;
	void Load_BoxCollide(const std::string&);

	std::set<Sprite*> list_collide;
public:
	Sprite(void):frame(0),anim(false),face(DIR_DOWN),script(NULL){
		this->Set_Delay_Frames(130);<commit_msg>Prima dell'implementazione della lista di collisioni dello sprite avanzata (con relativa posizione inclusa)<commit_after>#ifndef _SPRITE_SFR
#define _SPRITE_SFR

#include "Bgui.h"
#include "MyTimer.h"
#include "MyVector.h"
#include "MyRect.h"
#include <set>

class Sprite;

enum Direction{
	DIR_UP,
	DIR_DOWN,
	DIR_LEFT,
	DIR_RIGHT
};

struct TYPE_COLLISION{
	Sprite* oth_obj;
	Direction dir_oth_obj;

	bool operator<(const TYPE_COLLISION& oth) const{
		if((int)(this->oth_obj)<(int)(oth.oth_obj)){
			return true;
		}
		return false;
	}
};

class Sprite: public Bgui{
private:
	void (*script)(Sprite&);

	void Process(void);
	Direction face;

	unsigned short frame;
	MyTimer delay_frames;
	bool anim;

	MyVector speed;

	std::vector<MyRect> box_collide;
	void Load_BoxCollide(const std::string&);

	std::set<Sprite*> list_collide;
public:
	Sprite(void):frame(0),anim(false),face(DIR_DOWN),script(NULL){
		this->Set_Delay_Frames(130);
{'fraction_non_alphanumeric': 0.13264649066323245, 'fraction_numerical': 0.0051513200257566, 'mean_word_length': 6.330188679245283, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '1590998', 'n_tokens_mistral': 625, 'n_tokens_neox': 605, 'n_words': 129}