diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj b/Adventures in Lestoria/Adventures in Lestoria.vcxproj index 088ae397..3e6f06b2 100644 --- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj +++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj @@ -193,7 +193,7 @@ C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\sigon\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\sigon\OneDrive\Documents\include - Console + Windows true true true diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index 501a69ee..4c9fa5c5 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -153,6 +153,7 @@ float AiL::SIZE_CHANGE_SPEED=1; AiL::AiL() { + debugLogger.open("debug.log"); utils::datafile::Read(DATA,"assets/config/configuration.txt"); std::filesystem::create_directories("save_file_path"_S); @@ -207,7 +208,7 @@ AiL::AiL() std::vectorvalues=DATA.GetProperty("class_list").GetValues(); for(const std::string&cl:values){ - std::cout<RunCallbacks(); if(result!=::discord::Result::Ok){ - std::cout<<"Discord Error Code "<Load(mapPath,&gamepack); @@ -1959,7 +1960,7 @@ void AiL::InitializeLevel(std::string mapFile,MapName map){ gamepack.AddFile(mapPath); } }else{ - std::cout<<"WARNING! "<Create(tileset.GetData().imagewidth,tileset.GetData().imageheight); SetDrawTarget(r->Sprite()); int tileXCount=tileset.GetData().imagewidth/tileset.GetData().tilewidth; @@ -2001,7 +2002,7 @@ void AiL::InitializeLevel(std::string mapFile,MapName map){ } if(MAP_DATA[map].MapData.optimized){ - std::cout<<"Generating optimized map for Map "<Create(MAP_DATA[map].MapData.width*MAP_DATA[map].MapData.tilewidth,MAP_DATA[map].MapData.height*MAP_DATA[map].MapData.tileheight); SetDrawTarget(MAP_DATA[map].optimizedTile->Sprite()); @@ -2028,7 +2029,7 @@ void AiL::InitializeLevel(std::string mapFile,MapName map){ SetPixelMode(prevMode); MAP_DATA[map].optimizedTile->Decal()->Update(); SetDrawTarget(nullptr); - std::cout<<" Clearing Layer Data..."<1){ @@ -3196,11 +3205,11 @@ void AiL::InitializeGraphics(){ } SetPixelMode(prevMode); - std::cout<<"Theme "<totalDrops; - std::cout<<"Monte Carlo Test: 100000 tries:"<Name()<<" x"<Name()<<" x"<(level) << "): " << message << "\n"; }); - std::cout<<"Connected to Discord!"<GetClassName()); }else{ - std::cout<<"Could not connect to Discord. Error Code "<ActivityManager().UpdateActivity(newActivity,[](::discord::Result result){ if(result==::discord::Result::Ok){ - std::cout<<"Discord Activity successfully updated!"<levelCap++; } if(player->levelCap<=1)ERR("Could not detect level cap properly!") - std::cout<<"Level cap detected as "<levelCap)<levelCap)); } void AiL::ResetGame(bool changeToMainMenu){ @@ -3796,7 +3805,7 @@ bool AiL::Steam_Init(){ if(SteamAPI_Init()){ if(SteamUtils()!=nullptr){ SteamUtils()->SetWarningMessageHook([](int severity,const char*message){ - std::cout<Size()); } } diff --git a/Adventures in Lestoria/Error.h b/Adventures in Lestoria/Error.h index c21b0d0e..15e57a46 100644 --- a/Adventures in Lestoria/Error.h +++ b/Adventures in Lestoria/Error.h @@ -42,6 +42,9 @@ All rights reserved. #include #include #include +#include + +inline std::ofstream debugLogger; #ifdef _DEBUG #ifndef __EMSCRIPTEN__ @@ -67,10 +70,18 @@ All rights reserved. std::stringstream errStream; \ errStream<GetGlyphPNGForActionOrigin(EInputActionOrigin(i),k_ESteamInputGlyphSize_Small,0U)}; if(imageName!=nullptr){ std::string loadImage{imageName}; if(loadImage.length()>0&&!GFX.count(loadImage)){ - std::cout<afterSaveGameDataUp gameFilesList->RemoveAllComponents(); #ifdef __EMSCRIPTEN__ emscripten_idb_async_load("/assets",("save_file_path"_S+"metadata.dat").c_str(),0,[](void*arg,void*data,int length){ - std::cout<<"Loaded metadata successfully!"<(LOAD_GAME,"Game Files List"); std::string rawMetadata=(char*)data; @@ -521,7 +521,7 @@ const void SaveFile::UpdateSaveGameData(std::functionafterSaveGameDataUp } SaveFile::afterSaveGameDataUpdate(); },[](void*arg){ - std::cout<<"Failed to load metadata!"<SendRequest("save_server"_S,CreateServerRequest(SaveFileOperation::SAVE_METADATA_FILE,fileContents.str())); diff --git a/Adventures in Lestoria/ScrollableWindowComponent.h b/Adventures in Lestoria/ScrollableWindowComponent.h index ba1bac1b..6cdfc5f5 100644 --- a/Adventures in Lestoria/ScrollableWindowComponent.h +++ b/Adventures in Lestoria/ScrollableWindowComponent.h @@ -87,7 +87,7 @@ public: removedCount+=Menu::menus[parentMenu]->components.erase(componentName); if(removedCount!=1){ - std::cout<<"WARNING! Attempted to remove subbuttons from button listing, but not found!"; + LOG("WARNING! Attempted to remove subbuttons from button listing, but not found!"); } } } @@ -103,7 +103,7 @@ public: removedCount+=Menu::menus[parentMenu]->components.erase(button.lock()->GetName()); if(removedCount!=1){ - std::cout<<"WARNING! Attempted to remove buttons from button listing, but not found!"; + LOG("WARNING! Attempted to remove buttons from button listing, but not found!"); } CalculateBounds(); } diff --git a/Adventures in Lestoria/TMXParser.h b/Adventures in Lestoria/TMXParser.h index 14babdc1..97c12a24 100644 --- a/Adventures in Lestoria/TMXParser.h +++ b/Adventures in Lestoria/TMXParser.h @@ -390,7 +390,7 @@ class TMXParser{ if (newTag.tag.length()==0) { //Tag's empty, so first line is the tag. newTag.tag=data; #if _DEBUG - if(_DEBUG_MAP_LOAD_INFO)std::cout<<"Tag: "<0){ if (newTag.tag.length()==0) { //Tag's empty, so first line is the tag. newTag.tag=data; - if(_DEBUG_MAP_LOAD_INFO)std::cout<<"Tag: "< #include #include +#include "Error.h" #include FT_FREETYPE_H #include FT_GLYPH_H @@ -160,7 +161,7 @@ namespace olc { FT_Set_Transform(toUse->fontFace, &rotMat, &pen); FT_Error error = FT_Load_Char(toUse->fontFace, chr, FT_LOAD_RENDER); if(error){ - std::cout<<"FT Error: "<