Remove all dependencies of old unit testing framework, included catch2 testing header. Added requirement for UNIT_TESTING macro to suppress identical systems to emscripten. Release Build 13372.
Some checks failed
Emscripten Build / Build_and_Deploy_Web_Build (push) Failing after 1m13s

This commit is contained in:
AMay 2026-04-27 16:48:39 -05:00
parent 0369a46c9c
commit 687332df0c
28 changed files with 18131 additions and 84 deletions

View File

@ -1,5 +1,6 @@
#include "pch.h"
#include "olcUTIL_Geometry2D.h"
#include<Pixel.h>
using namespace olc::utils;

View File

@ -1,14 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.4.11519.219 insiders
VisualStudioVersion = 18.4.11519.219
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Adventures in Lestoria", "Adventures in Lestoria\Adventures in Lestoria.vcxproj", "{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Adventures in Lestoria Tests", "Adventures in Lestoria Tests\Adventures in Lestoria Tests.vcxproj", "{11969B7B-3D50-4825-9584-AF01D15B88E0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Adventures in Lestoria GTest", "Adventures in Lestoria GTest\Adventures in Lestoria GTest.vcxproj", "{69757256-C088-4B22-9557-AF7D281CEE86}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@ -60,33 +58,7 @@ Global
{11969B7B-3D50-4825-9584-AF01D15B88E0}.Release|x64.ActiveCfg = Unit Testing|x64
{11969B7B-3D50-4825-9584-AF01D15B88E0}.Release|x86.ActiveCfg = Unit Testing|Win32
{11969B7B-3D50-4825-9584-AF01D15B88E0}.Unit Testing|x64.ActiveCfg = Unit Testing|x64
{11969B7B-3D50-4825-9584-AF01D15B88E0}.Unit Testing|x64.Build.0 = Unit Testing|x64
{11969B7B-3D50-4825-9584-AF01D15B88E0}.Unit Testing|x86.ActiveCfg = Unit Testing|Win32
{11969B7B-3D50-4825-9584-AF01D15B88E0}.Unit Testing|x86.Build.0 = Unit Testing|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Debug|x64.ActiveCfg = Debug|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Debug|x64.Build.0 = Debug|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Debug|x86.ActiveCfg = Debug|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Debug|x86.Build.0 = Debug|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten Debug|x64.ActiveCfg = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten Debug|x64.Build.0 = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten Debug|x86.ActiveCfg = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten Debug|x86.Build.0 = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten|x64.ActiveCfg = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten|x64.Build.0 = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten|x86.ActiveCfg = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Emscripten|x86.Build.0 = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Release Desktop|x64.ActiveCfg = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Release Desktop|x64.Build.0 = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Release Desktop|x86.ActiveCfg = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Release Desktop|x86.Build.0 = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Release|x64.ActiveCfg = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Release|x64.Build.0 = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Release|x86.ActiveCfg = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Release|x86.Build.0 = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Unit Testing|x64.ActiveCfg = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Unit Testing|x64.Build.0 = Release|x64
{69757256-C088-4B22-9557-AF7D281CEE86}.Unit Testing|x86.ActiveCfg = Release|Win32
{69757256-C088-4B22-9557-AF7D281CEE86}.Unit Testing|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -77,7 +77,7 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unit Testing|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
@ -251,7 +251,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>UNIT_TESTING;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard>
<AdditionalIncludeDirectories>$(ProjectDir)steam;$(ProjectDir)discord-files;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;C:\Users\LabUser\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\LabUser\Documents\include;C:\Users\niconiconii\source\repos\AdventuresInLestoria\Adventures in Lestoria\discord-files;C:\Users\niconiconii\OneDrive\Documents\include;C:\Users\niconiconii\source\repos\AdventuresInLestoria\Adventures in Lestoria\steam;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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -411,6 +411,7 @@
</SubType>
</ClInclude>
<ClInclude Include="CastInfo.h" />
<ClInclude Include="catch.h" />
<ClInclude Include="DynamicMenuLabel.h">
<SubType>
</SubType>

View File

@ -732,6 +732,9 @@
<ClInclude Include="Effect.h">
<Filter>Source Files\Effects</Filter>
</ClInclude>
<ClInclude Include="catch.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Player.cpp">

View File

@ -73,9 +73,11 @@ All rights reserved.
#include "olcPGEX_Gamepad.h"
#include "InventoryScrollableWindowComponent.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "discord.h"
#include "steam/steam_api.h"
#endif
#endif
#include "GameSettings.h"
#include "LoadingScreen.h"
#include "Tutorial.h"
@ -162,8 +164,10 @@ InputGroup AiL::KEY_MOUSE_RIGHT;
InputGroup AiL::KEY_TOGGLE_MAP;
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
::discord::Core*Discord{};
#endif
#endif
float AiL::SIZE_CHANGE_SPEED=1;
@ -376,6 +380,7 @@ bool AiL::OnUserCreate(){
)
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
if(steamKeyboardCallbackListener==nullptr){
steamKeyboardCallbackListener=new SteamKeyboardCallbackHandler();
}
@ -383,13 +388,16 @@ bool AiL::OnUserCreate(){
steamStatsReceivedHandlerListener=new SteamStatsReceivedHandler();
}
#endif
#endif
utils::datafile::INITIAL_SETUP_COMPLETE=true;
ValidateGameStatus(); //Checks to make sure everything has been initialized properly.
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
SetupDiscord();
#endif
#endif
player->InitializeMinimapImage();
minimap.Initialize();
@ -497,6 +505,7 @@ bool AiL::OnUserUpdate(float fElapsedTime){
LoadingScreen::Draw();
RenderVersionInfo();
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
if(Discord){
auto result=Discord->RunCallbacks();
if(result!=::discord::Result::Ok){
@ -506,6 +515,7 @@ bool AiL::OnUserUpdate(float fElapsedTime){
}
}
#endif
#endif
}
skipGameProcess:
@ -2957,6 +2967,7 @@ datafiledoubledata AiL::GetDoubleList(std::string key){
bool Steam_Init(){
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
if(SteamAPI_Init()){
if(SteamUtils()!=nullptr){
SteamUtils()->SetWarningMessageHook([](int severity,const char*message){
@ -2969,6 +2980,7 @@ bool Steam_Init(){
return true;
}
#endif
#endif
return false;
}
@ -3009,6 +3021,7 @@ int main(const int argn,char**args)
usingSteam&=configFile["steam_api"].GetBool();
if(usingSteam){
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
if(!ADMIN_MODE&&SteamAPI_RestartAppIfNecessary(2895980U))return false; //Immediately quit if steam is detected and can be started through it.
if(Steam_Init()){
LOG("Steam API Initialized successfully!");
@ -3016,54 +3029,60 @@ int main(const int argn,char**args)
LOG("Steam API failed to initialize!");
}
#endif
#endif
}
}
{
InitializeGameConfigurations();
AiL demo;
demo.UsingSteamAPI(usingSteam);
#pragma region Load Window Settings
utils::datafile loadSystemFile;
std::string loadSystemFilename="save_file_path"_S+"system.conf";
#ifdef UNIT_TESTING
vi2d windowPosConf={30,30};
vi2d windowSizeConf=WINDOW_SIZE*4;
bool fullscreenConf=false;
bool vsyncConf=GameSettings::VSyncEnabled();
#else
InitializeGameConfigurations();
AiL demo;
demo.UsingSteamAPI(usingSteam);
if(std::filesystem::exists(loadSystemFilename)){
utils::datafile::Read(loadSystemFile,loadSystemFilename);
if(loadSystemFile.HasProperty("Window Pos")){
GameSettings::SetWindowPos({loadSystemFile["Window Pos"].GetInt(0),loadSystemFile["Window Pos"].GetInt(1)});
windowPosConf={loadSystemFile["Window Pos"].GetInt(0),loadSystemFile["Window Pos"].GetInt(1)};
}
if(loadSystemFile.HasProperty("Window Size"))windowSizeConf={loadSystemFile["Window Size"].GetInt(0),loadSystemFile["Window Size"].GetInt(1)};
size_t requiredSize=0;
#pragma region Load Window Settings
utils::datafile loadSystemFile;
#ifdef WIN32
getenv_s(&requiredSize,NULL,0,"SteamTenfoot");
#else
const char*bigPicture=getenv("SteamTenfoot");
if(bigPicture){
requiredSize=strlen(bigPicture);
LOG("Big Picture reported a length of "<<requiredSize);
std::string loadSystemFilename="save_file_path"_S+"system.conf";
vi2d windowPosConf={30,30};
vi2d windowSizeConf=WINDOW_SIZE*4;
bool fullscreenConf=false;
bool vsyncConf=GameSettings::VSyncEnabled();
if(std::filesystem::exists(loadSystemFilename)){
utils::datafile::Read(loadSystemFile,loadSystemFilename);
if(loadSystemFile.HasProperty("Window Pos")){
GameSettings::SetWindowPos({loadSystemFile["Window Pos"].GetInt(0),loadSystemFile["Window Pos"].GetInt(1)});
windowPosConf={loadSystemFile["Window Pos"].GetInt(0),loadSystemFile["Window Pos"].GetInt(1)};
}
#endif
if(loadSystemFile.HasProperty("Fullscreen"))fullscreenConf=loadSystemFile["Fullscreen"].GetBool();
if(loadSystemFile.HasProperty("VSync"))vsyncConf=loadSystemFile["VSync"].GetBool();
if(requiredSize>0)fullscreenConf=true;
}
#pragma endregion
if(loadSystemFile.HasProperty("Window Size"))windowSizeConf={loadSystemFile["Window Size"].GetInt(0),loadSystemFile["Window Size"].GetInt(1)};
size_t requiredSize=0;
if (demo.Construct(windowPosConf.x, windowPosConf.y, windowSizeConf.x, windowSizeConf.y, WINDOW_SIZE.x, WINDOW_SIZE.y, 4, 4, fullscreenConf, vsyncConf))
demo.Start();
#ifdef WIN32
getenv_s(&requiredSize,NULL,0,"SteamTenfoot");
#else
const char*bigPicture=getenv("SteamTenfoot");
if(bigPicture){
requiredSize=strlen(bigPicture);
LOG("Big Picture reported a length of "<<requiredSize);
}
#endif
if(loadSystemFile.HasProperty("Fullscreen"))fullscreenConf=loadSystemFile["Fullscreen"].GetBool();
if(loadSystemFile.HasProperty("VSync"))vsyncConf=loadSystemFile["VSync"].GetBool();
if(requiredSize>0)fullscreenConf=true;
}
#pragma endregion
if (demo.Construct(windowPosConf.x, windowPosConf.y, windowSizeConf.x, windowSizeConf.y, WINDOW_SIZE.x, WINDOW_SIZE.y, 4, 4, fullscreenConf, vsyncConf))
demo.Start();
#endif
}
#ifdef _DEBUG
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#ifndef __linux__
HANDLE hLogFile;
hLogFile = CreateFile(L"assets/memoryleak.txt", GENERIC_WRITE,
@ -3093,6 +3112,7 @@ int main(const int argn,char**args)
#endif
#endif
#endif
#endif
return 0;
}
@ -3228,8 +3248,10 @@ bool AiL::OnUserDestroy(){
gameEnd=true;
if(!savingFile){
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
SteamAPI_Shutdown();
#endif
#endif
GFX.Reset();
for(auto&map:MAP_DATA){
if(map.optimizedTile!=nullptr){
@ -4028,6 +4050,7 @@ void AiL::EndGame(){
}
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
::discord::Result AiL::SetupDiscord(){
auto result=::discord::Core::Create(1186719371750555780,DiscordCreateFlags_NoRequireDiscord,&Discord);
if(result==::discord::Result::Ok){
@ -4043,11 +4066,13 @@ void AiL::EndGame(){
return result;
}
#endif
#endif
void AiL::UpdateDiscordStatus(std::string levelName,std::string className){
std::string originalClassName=className;
bool retry=false;
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
if(Discord){
::discord::Activity newActivity{};
newActivity.SetDetails(levelName.c_str());
@ -4094,6 +4119,7 @@ void AiL::UpdateDiscordStatus(std::string levelName,std::string className){
UpdateDiscordStatus(levelName,className);
}
#endif
#endif
}
void AiL::InitializePlayerLevelCap(){

View File

@ -49,8 +49,10 @@ All rights reserved.
#include "olcUTIL_DataFile.h"
#include "GameState.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "discord.h"
#endif
#endif
#include "Audio.h"
#include "olcPGEX_SplashScreen.h"
#include "olcPixelGameEngine.h"
@ -448,8 +450,10 @@ private:
//This function assigns the mode tile colors of each loaded tileset.
void ComputeModeColors(TilesetData&tileset);
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
::discord::Result SetupDiscord();
#endif
#endif
Audio audioEngine;
SteamKeyboardCallbackHandler*steamKeyboardCallbackListener=nullptr;
SteamStatsReceivedHandler*steamStatsReceivedHandlerListener=nullptr;

View File

@ -52,8 +52,10 @@ All rights reserved.
#include "ProgressBar.h"
#include "MenuItemLabel.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteamuserstats.h"
#endif
#endif
#include <bit>
INCLUDE_game

View File

@ -46,8 +46,10 @@ All rights reserved.
#include "TextEntryLabel.h"
#include "Checkbox.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteamutils.h"
#endif
#endif
INCLUDE_game
INCLUDE_DEMO_BUILD

View File

@ -58,14 +58,9 @@ enum class EffectType{
BLIZZARD_SNOW,
};
namespace EffectTests{
class EffectTest;
};
struct Effect{
friend class AiL;
friend struct FallingBullet;
friend class EffectTests::EffectTest;
vf2d pos={0,0};
float lifetime=0;
float fadeout=0;

View File

@ -10,9 +10,6 @@ INCLUDE_game
debugLogger<<finalOutput.str()<<std::endl;
std::cout<<finalOutput.str()<<std::endl;
if(game&&game->ConsoleOut()&&game->ConsoleOut().good())game->ConsoleOut()<<finalOutput.str()<<std::endl;
#ifdef UNITTESTING
Logger::WriteMessage((finalOutput.str()+"\n").c_str());
#endif
}
void Error::log(std::stringstream&str,std::source_location loc){
std::stringstream finalOutput;
@ -22,9 +19,6 @@ INCLUDE_game
if(game&&game->ConsoleOut()&&game->ConsoleOut().good()){
game->ConsoleOut()<<finalOutput.str()<<std::endl;
}
#ifdef UNITTESTING
Logger::WriteMessage((finalOutput.str()+"\n").c_str());
#endif
throw std::runtime_error{finalOutput.str()};
}
#else

View File

@ -48,21 +48,19 @@ All rights reserved.
#include <stacktrace>
#endif
#include<utility>
#ifdef UNITTESTING
#include "CppUnitTest.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
#endif
inline std::ofstream debugLogger;
#ifdef _DEBUG
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#ifndef __linux__
#define NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
// Replace _NORMAL_BLOCK with _CLIENT_BLOCK if you want the
// allocations to be of _CLIENT_BLOCK type
#endif
#endif
#endif
#endif
#ifndef NEW //For everything else.

View File

@ -48,8 +48,10 @@ All rights reserved.
#include "ClassInfo.h"
#include "RowInventoryScrollableWindowComponent.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteamuserstats.h"
#endif
#endif
#include <ranges>
#include "ItemEnchant.h"
#include<algorithm>

View File

@ -63,6 +63,7 @@ std::vector<Steam::SteamInput>Input::rightStickActionSets{Steam::SCROLL};
std::array<std::unordered_map<Steam::SteamInput,std::pair<std::string,HWButton>>,STEAM_INPUT_MAX_COUNT>Input::enumToActionName;
std::unordered_map<EInputActionOrigin,std::string>Input::steamIconToGameIcon{
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
{k_EInputActionOrigin_SteamController_A,"themes/button_d_xb.png"},
{k_EInputActionOrigin_XBoxOne_A,"themes/button_d_xb.png"},
{k_EInputActionOrigin_XBox360_A,"themes/button_d_xb.png"},
@ -141,6 +142,7 @@ std::unordered_map<EInputActionOrigin,std::string>Input::steamIconToGameIcon{
{k_EInputActionOrigin_SteamDeck_LeftStick_Move,"themes/button_analogstick.png"},
{k_EInputActionOrigin_SteamDeck_RightStick_Move,"themes/button_analogstick.png"},
#endif
#endif
};
Input::Input(InputType type,int key)
@ -178,6 +180,7 @@ void Input::Initialize(){
void Input::LoadSteamButtonIcons(){
GFX.Unlock();
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
for(int i=1;i<k_EInputActionOrigin_Count;i++){
const char*imageName{SteamInput()->GetGlyphPNGForActionOrigin(EInputActionOrigin(i),k_ESteamInputGlyphSize_Small,0U)};
if(imageName!=nullptr){
@ -192,6 +195,7 @@ void Input::LoadSteamButtonIcons(){
}
}
#endif
#endif
GFX.SetInitialized();
}
@ -913,6 +917,7 @@ const bool Input::HasExtendedIcons()const{
const Renderable&Input::GetIcon()const{
if(type==STEAM){
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
EInputActionOrigin action=Input::steamGameInputToOrigin.at(Steam::SteamInput(key)).second[0];
EInputActionOrigin analogAction=Input::steamGameInputToAnalogOrigin.at(Steam::SteamInput(key)).second[0];
if(Input::steamGameInputToOrigin.count(Steam::SteamInput(key))&&
@ -932,6 +937,7 @@ const Renderable&Input::GetIcon()const{
}
}
#endif
#endif
}
return GFX.at(GenericKey::keyLiteral.at({type,key}).iconName);
}

View File

@ -47,8 +47,10 @@ All rights reserved.
#include "olcPGEX_ViewPort.h"
#include "UndefKeys.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteaminput.h"
#endif
#endif
#include "emscripten_compat.h"
class AiL;

View File

@ -91,9 +91,11 @@ void Menu::InitializeLoadGameWindow(){
},ButtonAttr::FIT_TO_LABEL)END;
onlineCharacterTab->SetSelectionType(HIGHLIGHT);
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
offlineCharacterTab->Disable();
onlineCharacterTab->Disable();
#endif
#endif
#pragma region Keyboard Navigation Rules
loadGameWindow->SetupKeyboardNavigation(

View File

@ -123,7 +123,7 @@ class Menu:public IAttributable{
friend class AiL;
friend class ItemInfo;
friend class EntityStats;
friend class InputListener;
friend class ::InputListener;
float buttonHoldTime=0;
static vi2d lastActiveMousePos;

View File

@ -49,8 +49,10 @@ All rights reserved.
#include "SoundEffect.h"
#include "Unlock.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteamuserstats.h"
#endif
#endif
#include "GameSettings.h"
#include "ItemEnchant.h"
#include <ranges>

View File

@ -60,8 +60,10 @@ All rights reserved.
#include <ranges>
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteamuserstats.h"
#endif
#endif
INCLUDE_MONSTER_DATA
INCLUDE_MONSTER_LIST

View File

@ -43,8 +43,10 @@ All rights reserved.
#include "ItemDrop.h"
#include "util.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteamuserstats.h"
#endif
#endif
INCLUDE_game

View File

@ -40,6 +40,7 @@ All rights reserved.
#include "emscripten_compat.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
void SteamKeyboardCallbackHandler::TextEntryComplete( GamepadTextInputDismissed_t* pCallback ){
STEAMUTILS(
if(pCallback->m_bSubmitted){
@ -55,4 +56,5 @@ All rights reserved.
}else Component<MenuComponent>(SAVE_FILE_NAME,"Back Button")->Click();
)
};
#endif
#endif

View File

@ -37,13 +37,17 @@ All rights reserved.
#pragma endregion
#pragma once
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/steam_api.h"
#endif
#endif
#include <string>
#include "TextEntryLabel.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
class SteamKeyboardCallbackHandler{
STEAM_CALLBACK(SteamKeyboardCallbackHandler,TextEntryComplete,GamepadTextInputDismissed_t);
};
#endif
#endif

View File

@ -45,10 +45,12 @@ All rights reserved.
INCLUDE_DATA
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
void SteamStatsReceivedHandler::SteamStatsReceived( UserStatsReceived_t* pCallback ){
if(pCallback->m_eResult==k_EResultOK){
SteamUserStats()->GetStat("Achievement.Kill Unlocks.Total Kill API Name"_S.c_str(),&Unlock::monsterKillCount);
LOG(std::format("Retrieved monster kill count: {}",Unlock::monsterKillCount));
}
}
#endif
#endif

View File

@ -37,11 +37,15 @@ All rights reserved.
#pragma endregion
#pragma once
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/steam_api.h"
#endif
#endif
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
class SteamStatsReceivedHandler{
STEAM_CALLBACK(SteamStatsReceivedHandler,SteamStatsReceived,UserStatsReceived_t);
};
#endif
#endif

View File

@ -42,8 +42,10 @@ All rights reserved.
#include "DEFINES.h"
#include "emscripten_compat.h"
#ifndef __EMSCRIPTEN__
#ifndef UNIT_TESTING
#include "steam/isteamuserstats.h"
#endif
#endif
INCLUDE_DATA

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 13349
#define VERSION_BUILD 13372
#define stringify(a) stringify_(a)
#define stringify_(a) #a

18000
Adventures in Lestoria/catch.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,22 @@ class GamepadTextInputDismissed_t{};
inline void SteamAPI_RunCallbacks(){};
#define STEAMINPUT(statement) if(false){}
#define STEAMUTILS(statement) if(false){}
#define STEAMUSERSTATS(statement) if(false){}
#else
#ifdef UNIT_TESTING
#define STEAM_INPUT_MAX_COUNT 0
#define STEAM_INPUT_MAX_ORIGINS 0
#define STEAM_CALLBACK(arg1,arg2,arg3)
enum EInputActionOrigin{};
using InputHandle_t=uint64_t;
using InputActionSetHandle_t=uint64_t;
class GamepadTextInputDismissed_t{};
inline void SteamAPI_RunCallbacks(){};
#define STEAMINPUT(statement) if(false){}
#define STEAMUTILS(statement) if(false){}
#define STEAMUSERSTATS(statement) if(false){}
@ -21,3 +37,4 @@ inline void SteamAPI_RunCallbacks(){};
#define STEAMUTILS(statement) if(SteamUtils()){statement}
#define STEAMUSERSTATS(statement) if(SteamUserStats()){statement}
#endif
#endif

Binary file not shown.