diff --git a/Adventures in Lestoria/FunctionPriming.h b/Adventures in Lestoria/FunctionPriming.h index e64c8df2..20e1619c 100644 --- a/Adventures in Lestoria/FunctionPriming.h +++ b/Adventures in Lestoria/FunctionPriming.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright � 2023 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ @@ -59,7 +59,7 @@ struct MerchantFunctionPrimingData:public FunctionPrimingData{ :FunctionPrimingData(dependentFunction){} virtual inline void Validate(IT item,uint32_t amt){ if(!primed)ERR(std::format("WARNING! {} should be called before running this function! Priming Requirement!",dependentFunction)); - if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",this->item,item)); + if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",std::string(this->item),std::string(item))); if(this->amt!=amt)ERR(std::format("WARNING! Primed amounts are not matching! {}!={}",this->amt,amt)); primed=false; } @@ -76,7 +76,7 @@ struct ItemEnhancementFunctionPrimingData:public FunctionPrimingData{ :FunctionPrimingData(dependentFunction){} virtual inline void Validate(IT item,uint8_t enhancementLevel,uint8_t qty){ if(!primed)ERR(std::format("WARNING! {} should be called before running this function! Priming Requirement!",dependentFunction)); - if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",this->item,item)); + if(this->item!=item)ERR(std::format("WARNING! Primed items are not matching! {}!={}",std::string(this->item),std::string(item))); if(this->qty!=qty)ERR(std::format("WARNING! Primed items do not have the same quantity! {}!={}",this->qty,qty)); if(this->enhancementLevel!=enhancementLevel)ERR(std::format("WARNING! Primed enhancement levels are not matching! {}!={}",this->enhancementLevel,enhancementLevel)); primed=false; diff --git a/Adventures in Lestoria/InventoryCreator.cpp b/Adventures in Lestoria/InventoryCreator.cpp index 38ef3eee..16e7e420 100644 --- a/Adventures in Lestoria/InventoryCreator.cpp +++ b/Adventures in Lestoria/InventoryCreator.cpp @@ -102,6 +102,7 @@ std::function #pragma region Row Merchant Updates std::function InventoryCreator::RowMerchant_InventorySlotsUpdate= [](InventoryScrollableWindowComponent&component,ITCategory cat){ + const std::vector>&merchantInv=Merchant::GetCurrentTravelingMerchant().GetShopItems(); component.RemoveAllComponents(); for(std::shared_ptr item:merchantInv){ component.AddButtonOnSlotUpdate(cat); diff --git a/Adventures in Lestoria/Item.cpp b/Adventures in Lestoria/Item.cpp index 5a4e40cb..fa3d8b73 100644 --- a/Adventures in Lestoria/Item.cpp +++ b/Adventures in Lestoria/Item.cpp @@ -686,7 +686,7 @@ const std::string Item::Description(CompactText compact)const{ for(const auto&[name,amt]:info.craftingRequirement.GetItems()){ description+=std::format("{}{} x{} ({})\n", Inventory::GetItemCount(name)(name)), amt, Inventory::GetItemCount(name)); } diff --git a/Adventures in Lestoria/ItemMapData.h b/Adventures in Lestoria/ItemMapData.h index 492c1823..1e58e342 100644 --- a/Adventures in Lestoria/ItemMapData.h +++ b/Adventures in Lestoria/ItemMapData.h @@ -45,6 +45,6 @@ struct ItemMapData{ int chance; inline ItemMapData(IT item,uint8_t minAmt,uint8_t maxAmt,int chance) :item(item),minAmt(minAmt),maxAmt(maxAmt),chance(chance){ - if(minAmt>maxAmt)ERR(std::format("WARNING! The max amount specified for item {} is less than the minimum amount! {} > {}!",item,minAmt,maxAmt)); + if(minAmt>maxAmt)ERR(std::format("WARNING! The max amount specified for item {} is less than the minimum amount! {} > {}!",std::string(item),minAmt,maxAmt)); } }; \ No newline at end of file diff --git a/Adventures in Lestoria/RequiredMaterialsList.h b/Adventures in Lestoria/RequiredMaterialsList.h index cd97765d..c139eb04 100644 --- a/Adventures in Lestoria/RequiredMaterialsList.h +++ b/Adventures in Lestoria/RequiredMaterialsList.h @@ -30,7 +30,7 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Portions of this software are copyright © 2023 The FreeType +Portions of this software are copyright � 2023 The FreeType Project (www.freetype.org). Please see LICENSE_FT.txt for more information. All rights reserved. */ @@ -78,7 +78,7 @@ protected: Pixel textCol=WHITE; if(Inventory::GetItemCount(name)(name))); float labelWidth=game->GetTextSizeProp(labelText).x; window.DrawShadowStringDecal(drawPos,std::format("{:>3}",amt*qty),textCol,BLACK); window.DrawShadowStringPropDecal(drawPos+vf2d{26,0},labelText,textCol,BLACK,{std::min(1.f,(drawWidth-26-2)/labelWidth),1.f}); diff --git a/Adventures in Lestoria/TMXParser.h b/Adventures in Lestoria/TMXParser.h index e1dca600..722668e6 100644 --- a/Adventures in Lestoria/TMXParser.h +++ b/Adventures in Lestoria/TMXParser.h @@ -668,7 +668,6 @@ class TMXParser{ if(neighbor.neighbors[targetInd]==-1){ //We insert our neighbor pairing here. neighbor.neighbors[targetInd]=counter; - break; } } directionInd++; diff --git a/CMakeLists.txt b/CMakeLists.txt index 86e1cc08..99407cb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,7 +330,7 @@ if (EMSCRIPTEN) -sLLD_REPORT_UNDEFINED -sFETCH=1 -sEXPORTED_RUNTIME_METHODS=stringToNewUTF8 - -std=c++20 + -std=c++2a --proxy-to-worker --preload-file ${SOURCE_DATA_DIR}@assets) else() @@ -344,7 +344,7 @@ if (EMSCRIPTEN) -sUSE_FREETYPE=1 -sFETCH=1 -sEXPORTED_RUNTIME_METHODS=stringToNewUTF8 - -std=c++20 + -std=c++2a --proxy-to-worker -sLLD_REPORT_UNDEFINED) endif()