<commit_before>#include "S_World.h"
#include "j1Input.h"
#include "SDL\include\SDL.h"
#include "j1Scene.h"
#include "p2Log.h"
#include "j1App.h"
#include "j1Map.h"
#include "j1Render.h"
#include "j1Textures.h"
#include "j1Pathfinding.h"
#include "j1App.h"
#include "j1Player.h"
#include "j1Camera.h"
#include "j1HUD.h"
#include "j1Enemy.h"
#include"j1Audio.h"

bool S_World::Start()
{
	
	App->camera->Enable();
	
	App->hud->Enable();
	App->collision->Enable();
	App->map->Enable();
	App->player->Enable();
		App->object->Enable();
	LOG("IM FUCKING STARTING!!");
	if (App->map->Load("tutorial map test.tmx") == true)

	{
		int w, h = 0;
		uchar* data = NULL;
		if (App->map->CreateWalkabilityMap(w, h, &data))
			App->pathfinding->SetMap(w, h);

		for (int i = 0; i < App->object->V_Objects.size(); i++) {
			if (App->object->V_Objects[i]->collider_tiles.size() > 0) {
				App->object->CreateColliders(*App->object->V_Objects[i]);
			}
		}

		int w_two, h_two = 0;
		uchar* data_two = NULL;
		if (App->map->CreateEnemyMap(w_two, h_two, &data_two)) {
			int w_three = 0;
			int h_three = 0;
			uchar* data_three = NULL;
			if (App->map->CreateEnemyPathMap(w_three, h_three, &data_three)) {
				App->enemy->Enable();
			}
		}
			RELEASE_ARRAY(data);
			//App->map->CreateLogicMap();
	}
	
	

	App->audio->PlayMusic("audio/music/Sewers_Song.ogg", 1);

	App->render->camera.x = 0;
	App->render->camera.y = 0;


	App->player->Link->pos = { 660,1400 };
	App->player->Zelda->pos = { 620,1400 };
	App->player->Link->logic_height = 1;
	App->player->Zelda->logic_height = 1;
	
	LOG("World Open");
	return false;
}

bool S_World::Update()
{
	//App->map->Draw();
	if (App->input->GetKey(SDL_SCANCODE_X) == KEY_DOWN) {
		App->player->loop_game_menu = true;
	}
	
	

	return false;
}
bool S_World::PostUpdate()
{

	if (App->player->loop_game_menu == true || App->player->half_hearts_test_purpose <= 0) {
		App->player->Disable();
		App->enemy->Disable();
		App->map->Disable();
		App->collision->Disable();
		App->hud->Disable();
		App->object->Disable();
		App->scene->ChangeScene(Scene_ID::Send);	
		App->player->loop_game_menu = false;
	}
	return true;

}
bool S_World::Clean()
{
	
	LOG("World Test Deleted");

	//std::list <TileSet*>::iterator temp = App->map->data.tilesets.begin();
	for (std::list <TileSet*>::iterator temp = App->map->data.tilesets.begin(); temp != App->map->data.tilesets.cend(); ++temp) {
		App->tex->UnLoad((*temp)->texture);
	}

	/*p2List_item<TileSet*>* temp = App->map->data.tilesets.start;
	while (temp != NULL) {
		App->tex->UnLoad(temp->data->texture);
		temp = temp->next;
	}*/

	App->map->CleanUp();
	
	return false;
}<commit_msg>player hearts reset<commit_after>#include "S_World.h"
#include "j1Input.h"
#include "SDL\include\SDL.h"
#include "j1Scene.h"
#include "p2Log.h"
#include "j1App.h"
#include "j1Map.h"
#include "j1Render.h"
#include "j1Textures.h"
#include "j1Pathfinding.h"
#include "j1App.h"
#include "j1Player.h"
#include "j1Camera.h"
#include "j1HUD.h"
#include "j1Enemy.h"
#include"j1Audio.h"

bool S_World::Start()
{
	
	App->camera->Enable();
	
	App->hud->Enable();
	App->collision->Enable();
	App->map->Enable();
	App->player->Enable();
		App->object->Enable();
	LOG("IM FUCKING STARTING!!");
	if (App->map->Load("tutorial map test.tmx") == true)

	{
		int w, h = 0;
		uchar* data = NULL;
		if (App->map->CreateWalkabilityMap(w, h, &data))
			App->pathfinding->SetMap(w, h);

		for (int i = 0; i < App->object->V_Objects.size(); i++) {
			if (App->object->V_Objects[i]->collider_tiles.size() > 0) {
				App->object->CreateColliders(*App->object->V_Objects[i]);
			}
		}

		int w_two, h_two = 0;
		uchar* data_two = NULL;
		if (App->map->CreateEnemyMap(w_two, h_two, &data_two)) {
			int w_three = 0;
			int h_three = 0;
			uchar* data_three = NULL;
			if (App->map->CreateEnemyPathMap(w_three, h_three, &data_three)) {
				App->enemy->Enable();
			}
		}
			RELEASE_ARRAY(data);
			//App->map->CreateLogicMap();
	}
	
	

	App->audio->PlayMusic("audio/music/Sewers_Song.ogg", 1);

	App->render->camera.x = 0;
	App->render->camera.y = 0;


	App->player->Link->pos = { 660,1400 };
	App->player->Zelda->pos = { 620,1400 };
	App->player->Link->logic_height = 1;
	App->player->Zelda->logic_height = 1;
	
	LOG("World Open");
	return false;
}

bool S_World::Update()
{
	//App->map->Draw();
	if (App->input->GetKey(SDL_SCANCODE_X) == KEY_DOWN) {
		App->player->loop_game_menu = true;
	}
	
	

	return false;
}
bool S_World::PostUpdate()
{

	if (App->player->loop_game_menu == true || App->player->half_hearts_test_purpose <= 0) {
		App->player->Disable();
		App->enemy->Disable();
		App->map->Disable();
		App->collision->Disable();
		App->hud->Disable();
		App->object->Disable();
		App->scene->ChangeScene(Scene_ID::Send);	
		App->player->loop_game_menu = false;
		App->player->half_hearts_test_purpose = App->player->hearts_containers_test_purpose * 2;
	}
	return true;

}
bool S_World::Clean()
{
	
	LOG("World Test Deleted");

	//std::list <TileSet*>::iterator temp = App->map->data.tilesets.begin();
	for (std::list <TileSet*>::iterator temp = App->map->data.tilesets.begin(); temp != App->map->data.tilesets.cend(); ++temp) {
		App->tex->UnLoad((*temp)->texture);
	}

	/*p2List_item<TileSet*>* temp = App->map->data.tilesets.start;
	while (temp != NULL) {
		App->tex->UnLoad(temp->data->texture);
		temp = temp->next;
	}*/

	App->map->CleanUp();
	
	return false;
}
{'fraction_non_alphanumeric': 0.2160207676617838, 'fraction_numerical': 0.015390320786204338, 'mean_word_length': 4.107954545454546, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 209, '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': '2132620', 'n_tokens_mistral': 2378, 'n_tokens_neox': 2154, 'n_words': 353}