<commit_before>#include "j1Item.h"
#include "j1Textures.h"
#include "j1Render.h"
#include "j1App.h"


Item::Item(iPoint position) :j1SceneElement(position)
{
	name = "items";
	type = ITEM;
}

Item::~Item()
{}

bool Item::Awake(pugi::xml_node &conf, uint id)
{
	bool stop_search = false;
	for (int s_id = conf.child("item").attribute("id").as_int(0); stop_search == false; s_id = conf.child("item").next_sibling().attribute("id").as_int(0))
	{
		if (id == s_id)
		{
			name = conf.child("item").attribute("name").as_string("");
			std::string es = conf.child("item").attribute("file").as_string("");
			texture = App->tex->Load(es.c_str());
			stop_search = true;
		}
	}

	return true;
}

bool Item::Start()
{
	return true;
}

bool Item::Update()
{
	if (canBlit == true)
	{
		SDL_Rect tem = { 1128,189,66,90 };
		App->render->Blit(texture, position.x, position.y, &tem);
	}

	return true;
}

bool Item::CleanUp()
{
	return true;
}

bool Item::Save()
{
	return true;
}


<commit_msg>Fixed bug with bool canBlit<commit_after>#include "j1Item.h"
#include "j1Textures.h"
#include "j1Render.h"
#include "j1App.h"


Item::Item(iPoint position) :j1SceneElement(position)
{
	name = "items";
	type = ITEM;
}

Item::~Item()
{}

bool Item::Awake(pugi::xml_node &conf, uint id)
{
	bool stop_search = false;
	for (int s_id = conf.child("item").attribute("id").as_int(0); stop_search == false; s_id = conf.child("item").next_sibling().attribute("id").as_int(0))
	{
		if (id == s_id)
		{
			name = conf.child("item").attribute("name").as_string("");
			std::string es = conf.child("item").attribute("file").as_string("");
			texture = App->tex->Load(es.c_str());
			canBlit = true;
			stop_search = true;
		}
	}

	return true;
}

bool Item::Start()
{
	return true;
}

bool Item::Update()
{
	if (canBlit == true)
	{
		SDL_Rect tem = { 1128,189,66,90 };
		App->render->Blit(texture, position.x, position.y, &tem);
	}

	return true;
}

bool Item::CleanUp()
{
	return true;
}

bool Item::Save()
{
	return true;
}



{'fraction_non_alphanumeric': 0.20350877192982456, 'fraction_numerical': 0.01804511278195489, 'mean_word_length': 4.438692098092643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1309785', 'n_tokens_mistral': 857, 'n_tokens_neox': 809, 'n_words': 150}