TombEngine/TombEngine/Game/debug/debug.cpp

160 lines
4.7 KiB
C++
Raw Normal View History

2021-08-03 15:08:43 +01:00
#include "framework.h"
#include "Game/Debug/Debug.h"
2021-12-24 03:32:19 +03:00
#include <chrono>
#include <spdlog.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <stdarg.h>
#include "Renderer/Renderer.h"
using TEN::Renderer::g_Renderer;
2024-06-19 15:29:46 +10:00
namespace TEN::Debug
{
static auto StartTime = std::chrono::high_resolution_clock::time_point{};
2024-06-19 15:29:46 +10:00
void InitTENLog(const std::string& logDirContainingDir)
{
// "true" means create new log file each time game is run.
auto logPath = logDirContainingDir + "Logs/TENLog.txt";
auto fileSink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(logPath, true);
2021-08-03 15:08:43 +01:00
2024-06-19 15:29:46 +10:00
auto logger = std::shared_ptr<spdlog::logger>();
2024-06-19 15:29:46 +10:00
// Set file and console log targets.
auto consoleSink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
logger = std::make_shared<spdlog::logger>(std::string("multi_sink"), spdlog::sinks_init_list{ fileSink, consoleSink });
2024-06-19 15:29:46 +10:00
spdlog::initialize_logger(logger);
logger->set_level(spdlog::level::info);
logger->flush_on(spdlog::level::info);
logger->set_pattern("[%Y-%b-%d %T] [%^%l%$] %v");
2021-08-03 15:08:43 +01:00
}
2024-06-19 15:29:46 +10:00
void ShutdownTENLog()
2021-08-03 15:08:43 +01:00
{
2024-06-19 15:29:46 +10:00
spdlog::shutdown();
2021-08-03 15:08:43 +01:00
}
2022-02-14 17:05:52 +11:00
void TENLog(const std::string_view& msg, LogLevel level, LogConfig config, bool allowSpam)
2024-06-19 15:29:46 +10:00
{
static auto prevString = std::string();
if (prevString == msg && !allowSpam)
2024-06-19 15:29:46 +10:00
return;
Squashed commit of the following: commit 77d0865c8a37dea33d2573b8079b8c9b59f2665a Author: Nemoel-Tomo <tomo_669@hotmail.com> Date: Sun Feb 16 08:20:58 2025 +0100 Waterfall emitter formatting fix (#1570) commit 92329741adac17807a79850dfd401fbec988ce6b Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Feb 15 07:46:37 2025 +0100 Clarify EmitSpotLight description commit 562637f5993f4bea2b883919fbd42fde497cc8ec Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Fri Feb 14 23:10:40 2025 +0100 Fixed #1574 commit a64825b6f166d5d1bb99304af32496bbea242f3e Author: Sezz <sezzary@outlook.com> Date: Fri Feb 14 04:30:00 2025 +1100 Add missing shift in EmitParticle() commit 455d547de77975e881ef57d6643758d18a715838 Author: Sezz <sezzary@outlook.com> Date: Fri Feb 14 04:25:55 2025 +1100 Add lock to parallel task class commit 918237113f02d57a1535c99a9e4ff34b5c52f158 Author: Sezz <sezzary@outlook.com> Date: Thu Feb 13 14:59:16 2025 +1100 Make script utils more idiomatic to C++ commit b78376b0abdec97fab0a0321a3d5005ec56b221f Author: Sezz <sezzary@outlook.com> Date: Thu Feb 13 12:44:06 2025 +1100 Use correct angle conversion in EmitPatricle() commit 3e00302ade9a153024fba2ad0c6b15387c7d90b7 Author: Sezz <sezzary@outlook.com> Date: Thu Feb 13 05:38:56 2025 +1100 Update Rotation.cpp commit f1c1fd2f63d5ab7ef77779535d609a77617646d8 Author: Sezz <sezzary@outlook.com> Date: Thu Feb 13 04:12:34 2025 +1100 Add Lerp() method to script Rotation class commit 6ef9675bcbc93fe26044ead572e1d9612e642814 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Feb 12 09:08:45 2025 +0100 Update CHANGELOG.md commit ca56f62f540a1e2616089010f779bfd3a472a4e5 Author: Sezz <sezzary@outlook.com> Date: Wed Feb 12 18:59:54 2025 +1100 Multithreading (#1541) * Create Worker class for multithreading * Update TombEngine.vcxproj * Rename GetWorkerCount() to GetThreadCount() * Add ProcessInParallel template for vectors * Add multiThreaded flag to settings, process sprites in parallel * Update Flow.Settings.html * Refine WorkerManager class conventions; deinit threads properly * Don't require explicit destruction * Address basic PR notes * Update Worker.cpp * Simplify ThreadManager class * Add method for running single task * Use singleton pattern; use more appropriate Controller suffix * Update WorkerController template method * Revise method * Handle exception in ~WorkerController() * Grammar * Correctly init single-threaded mode * Update CHANGELOG.md * Defer thread init until g_GameFlow is valid * unsigned int -> int * Rename class --------- Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com> commit d37ac17a39acf9ad255a7033ad6f3da3b5c9b173 Author: Sezz <sezzary@outlook.com> Date: Wed Feb 12 17:36:12 2025 +1100 Formatting commit 62ce2f043d53a45360fb51132561316d649980be Author: Sezz <sezzary@outlook.com> Date: Tue Feb 11 18:05:07 2025 +1100 Fix bridges moving the player when the player is underwater commit 0bb9af989432a122a8d7a2185dec9b2d6f927f3e Author: Sezz <sezzary@outlook.com> Date: Tue Feb 11 17:31:51 2025 +1100 puzzle_keys.cpp formatting commit 7d18d7506f7fe9ff4d542072b63607f3d73a7575 Author: davidmarr <116632612+davidmarr@users.noreply.github.com> Date: Sun Feb 9 15:58:15 2025 +0100 Update Type module (#1569) * Update VolumeObject.cpp fixed Volume:GetActive() method * Update CHANGELOG.md * function description LevelFuncs.OnUseItem * Revert "function description LevelFuncs.OnUseItem" This reverts commit 2478afca68f1e0ce11c610f07da6c6588cc4f35f. * Update Type.lua commit 909f631c2f1d2cab7a46eeba8eb92ea1020efce9 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Feb 8 11:04:40 2025 +0100 Fixed mistake in electricity rendering commit a840c2200c0f5b6a231d9d51d3539db25626d6b7 Merge: 2c6331f58 a31faffec Author: Sezz <sezzary@outlook.com> Date: Sat Feb 8 02:58:13 2025 +1100 Merge branch 'develop' of https://github.com/MontyTRC89/TombEngine into develop commit 2c6331f583a7669a0ab6a645ead9623f967b4d29 Author: Sezz <sezzary@outlook.com> Date: Sat Feb 8 02:58:03 2025 +1100 Deprecate CalculateDistance() script function commit a31faffec52e93f3a1ef9ed04e03a8fe50d5cd2e Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Fri Feb 7 08:31:14 2025 +0100 Update CHANGELOG.md commit 1f81ccf44dd126b53f757fca31fd97ae5f49c25b Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Thu Feb 6 18:05:25 2025 -0500 Diary module (TEN side) (#1509) * Update to bug report form * Update bug_report.yaml * Update AUTHORS.md - Tomo (general coding, special FX coding, bug fixing) * Update CHANGELOG.md * Update CHANGELOG.md * Update bug_report.yaml * Add files via upload * Add files via upload * Add ID_DIARY_SPRITES (1384) and DIARY_ENTRY_SPRITES (1385) * Delete Scripts/Engine/Diarymodule.lua * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Delete Scripts/Engine/CustomBar.lua * Add files via upload * Update CustomDiary.lua * Add files via upload * Add files via upload * Add files via upload * Update CustomDiary.lua * Upload * Update CHANGELOG.md * Revisions * Doc revisions * Remove GameVars.Engine everywhere. * Added error warnings by integrating type module * Update bug_report.yaml * Fixed the bug with GameVars resetting each level. * Added .Engine back. * Added missing checks. * Removed nil from textOptions loop * Added full TEN name for printlogs. * LatestChanges * Added section for import. --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> commit 34ff933e5bcf6fec469b88da4f128a7b6dfb3d63 Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 18:48:45 2025 +1100 Update LogicHandler.cpp commit 5500b13659896a63698d150fe26debfe722e9c2d Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 18:47:33 2025 +1100 Update LogicHandler.cpp commit acb1bb15187d6f54bdaf177bbad7d7bc23c1071f Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 18:46:16 2025 +1100 Enforce proper convention for the few Lua table constants that didn't use it yet commit 89d5b7429894338b694d3fa45f0dd2eea4f707db Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Thu Feb 6 02:09:53 2025 -0500 Fix Trigger Triggerer (#1565) * Fix * Update CHANGELOG.md * Update trigger.cpp --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> commit 8316062e3a808912504075586f2f31a3a646a6fe Merge: 5f447d95c 599a651b6 Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Thu Feb 6 06:03:41 2025 +0000 Merge branch 'develop' of https://github.com/MontyTRC89/TombEngine into develop commit 5f447d95c511d3eefd111298a3b37fd106d96eef Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Thu Feb 6 06:03:18 2025 +0000 Fix stopwatch display in inventory (due to removal of trademarked item) Now the trademarked item from Tomb Raider Chronicles has been removed and replaced with the stopwatch from Tomb Raider III commit 599a651b6fdb17eca7c8136c10af823de2c335ad Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 16:56:19 2025 +1100 Update lens flare and starfield Lua docs commit 94ede801bc50500a1e0388f167752a19d76aacb8 Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 16:35:59 2025 +1100 Misc. script doc tidying; move some script classes to namespaces commit be8048407efc6aed145a1c28376100c1f4f99d13 Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Feb 5 23:51:35 2025 -0500 Underwater keys/puzzles (#1529) * Update to bug report form * Update bug_report.yaml * Update AUTHORS.md - Tomo (general coding, special FX coding, bug fixing) * Update CHANGELOG.md * Update CHANGELOG.md * Update bug_report.yaml * First Push * Updae LaraStruct to use animation 280 * Update puzzles_keys.cpp * Update CHANGELOG.md * Squashed commit of the following: commit e50a4f8c27091fcae1d22bfe91ed90d849fd8280 Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 20:07:56 2024 -0500 Doc Revision commit 39a6e713ce51a2e55f4cacb30af28affacaf23b4 Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 20:02:47 2024 -0500 Doc revisions commit c3303438205692a4f817cc0bd1c4d1c71cdaebbf Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:52:59 2024 -0500 Update CHANGELOG.md commit ad62d7b605a48e89087648d8b40948289eea96f6 Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:42:32 2024 -0500 Check commit e135195641e463bb1013c7a1e2565f3a0ecb7eac Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:26:23 2024 -0500 First Commit commit 4a6c6ee2705dd3999681cf3b28b1593b2da60e44 Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Wed Dec 25 19:19:05 2024 -0500 Update EffectsFunctions.cpp * Revert "Squashed commit of the following:" This reverts commit ff2e49c6ed780f0aa6c87676cb2e0b27089b6fe0. * Formatting. * Formatting. * Update CHANGELOG.md --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Nemoel-Tomo <tomo_669@hotmail.com> Co-authored-by: Jakub <kubabilinski03@gmail.com> Co-authored-by: Jakub <80340234+Jakub768@users.noreply.github.com> Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com> Co-authored-by: TrainWreck <barry@DESKTOP-HC53CPN> commit 106787d911031d1b42ee3b07f9bddae354e2527f Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 04:34:28 2025 +1100 Doc corrections commit 737f5aa742cf408c3309cba6748c760700462b1d Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 04:28:58 2025 +1100 Make getters const commit 2b41ae743a2529c95de8a72e21488df99bde8135 Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 02:35:16 2025 +1100 Tidy up Lua doc for Static class commit 437ce7c139256f659363ada8b7ebd07ac95f5b25 Author: Sezz <sezzary@outlook.com> Date: Thu Feb 6 01:22:59 2025 +1100 Complete short -> int conversions for Lua commit 237ceca0f4cb25f4c0b256328d880b673cc06263 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Wed Feb 5 08:04:23 2025 +0100 Fixed custom shatter sounds commit 64e0c303ba644d56d06620f098084c405aa4bded Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Feb 4 20:58:09 2025 +0100 Update CHANGELOG.md commit d2b692cb3bcce96a99ab3ba3aa7b6743ac3556b4 Author: Sezz <sezzary@outlook.com> Date: Mon Feb 3 16:15:41 2025 +1100 ShadowMode::Lara -> ShadowMode::Player commit ebb20121ac580e2b48a000f543b32418543fee94 Author: Sezz <sezzary@outlook.com> Date: Sat Feb 1 23:57:54 2025 +1100 -1 -> NO_VALUE and other formatting commit 4a6f30a152508d8bad9bad268d510ce2ecaf2254 Author: Jakub <80340234+Jakub768@users.noreply.github.com> Date: Sat Feb 1 12:07:10 2025 +0000 Update LICENSE commit 45d46e0e6b33c355fad3a37c2054de87c1e2d3c6 Author: Sezz <sezzary@outlook.com> Date: Sat Feb 1 22:55:35 2025 +1100 Fix display pickup string not being interpolated in 60FPS mode commit 903fdf288fc5524e6df9babac62302b2c2ad006b Author: Sezz <sezzary@outlook.com> Date: Sat Feb 1 22:40:50 2025 +1100 Optimise BitField class (#1511) * Optimise BitField class * DebugBuild -> DEBUG_BUILD * Fix merge error commit 48902b00a9d5d34cd0d9c4dd4f98000f3354315e Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Sat Feb 1 06:23:04 2025 -0500 Emit air bubble exposed (#1537) * Update to bug report form * Update bug_report.yaml * Update AUTHORS.md - Tomo (general coding, special FX coding, bug fixing) * Update CHANGELOG.md * Update CHANGELOG.md * Update bug_report.yaml * Update EffectsFunctions.cpp * First Commit * Check * Update CHANGELOG.md * Doc revisions * Doc Revision * Update EffectsFunctions.cpp * Remove room from arguements. * Doc clarification. * Make Size and Amplitude Optional * Update EffectsFunctions.cpp --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Nemoel-Tomo <tomo_669@hotmail.com> Co-authored-by: Jakub <kubabilinski03@gmail.com> Co-authored-by: Jakub <80340234+Jakub768@users.noreply.github.com> Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com> commit fa0e125f59c77d09091b857edf394c0473d73a06 Author: TrainWrack <120750885+TrainWrack@users.noreply.github.com> Date: Sat Feb 1 06:22:49 2025 -0500 Emit particle upgrade (#1542) * Update to bug report form * Update bug_report.yaml * Update AUTHORS.md - Tomo (general coding, special FX coding, bug fixing) * Update CHANGELOG.md * Update CHANGELOG.md * Update bug_report.yaml * Expose ObjectSlot * Docs * Code Update * FinalPush * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Expose startRot * Expose startRot * Remove Space. * Code cleanup, revise doc comment * Nicer defaults in doc --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Nemoel-Tomo <tomo_669@hotmail.com> Co-authored-by: Jakub <kubabilinski03@gmail.com> Co-authored-by: Jakub <80340234+Jakub768@users.noreply.github.com> Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com> commit bcbe21650818a60942a4baa0aa8a6e094c1df9c7 Author: Sezz <sezzary@outlook.com> Date: Sat Feb 1 20:17:11 2025 +1100 Update Vec3.cpp commit 06c33908d97a7b83999a0c6fd946d7626be8de2f Author: Sezz <sezzary@outlook.com> Date: Sat Feb 1 20:13:34 2025 +1100 Explicit conversion commit c99b8abf2529a3a7c2704b38608cdb8ac6931491 Author: Sezz <sezzary@outlook.com> Date: Sat Feb 1 20:01:55 2025 +1100 Add Translate() functions to script Vec2 and Vec3 classes commit d8c646fabdf2c1ce698d5ba0d1ab6d1d58a756d1 Author: Sezz <sezzary@outlook.com> Date: Sat Feb 1 17:47:29 2025 +1100 Start restructuring script Moveable class commit 98b01ff64ada9227de8faa1da8374e08e2119d7f Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Thu Jan 30 22:25:57 2025 +0100 Fixed #1562 commit d163d1ec30729cd00890915d9a71e483f09fc7ed Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Mon Jan 27 19:27:08 2025 +0100 Fixed #1558 commit 6ef8a562e582abefae7bb9bd4b5eefda4a3e1364 Author: Sezz <sezzary@outlook.com> Date: Tue Jan 28 04:10:12 2025 +1100 Update doc comment for moveable commit d919e1679034b693f1448321a8478177fb046095 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sat Jan 25 23:03:28 2025 +0100 Fixed player model submerging into the floor while swimming underwater commit faf17cd03adf2c32517c1e99ab6b8996b9bed128 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Fri Jan 24 23:18:14 2025 +0100 Fixed #1557 commit 5f402e380bc0e64d21b635cad99111a4daa5e4b7 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Fri Jan 24 22:55:08 2025 +0100 Fixed #1556 commit ae20a49eb2e8fe50fcb359d3b1be5b03e8afd99e Author: Sezz <sezzary@outlook.com> Date: Thu Jan 23 17:02:26 2025 +1100 Update VS hint comments for various classes commit fb97628ac92133526e422cbfceb2c730dbb1d7c4 Author: Sezz <sezzary@outlook.com> Date: Thu Jan 23 16:48:46 2025 +1100 Add `Scale` field to `Pose` class (#1546) * Reapply "Add functional Scale field to Pose class" This reverts commit 92305a5d25f3968531d703153fc37797c437db62. * Update lara.cpp commit fc0c260ea1cd3617f193bb9e454919ba1f076c37 Author: Sezz <sezzary@outlook.com> Date: Thu Jan 23 15:25:09 2025 +1100 Update script Rotation class and its doc commit 0dd0061a94a93ef7997edcf398da125dbf607b8d Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Jan 21 20:55:57 2025 +0100 Update CHANGELOG.md commit 7735f660ab622e1ac9e7b18e4d1babe6df383650 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Jan 21 20:49:32 2025 +0100 Fixed #1553 commit 5764965230ffa1f513a6c40b296efdfa7d6b0633 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Jan 21 20:47:06 2025 +0100 Fixed #1554 commit b55675b9ced4e1f4a775aed69bc21ae58de3f87c Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Tue Jan 21 20:46:47 2025 +0100 Fixed #1552 commit 7be096f86abd129725e75fe45d3142e9271f8933 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Sun Jan 19 05:41:05 2025 +0100 Fixed dynamic light shadows not being handled correctly commit db2649e93660628cf8d770d04cc061d42bc2a4b8 Author: Sezz <sezzary@outlook.com> Date: Sat Jan 18 19:54:04 2025 +1100 Fix two block platform sometimes not traversing room portals correctly; cleanup commit ff41900bd967a6955d120a13ec2e35019097f777 Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Sun Jan 12 16:35:44 2025 +0000 Updated to reflect develop branch after merging Pull Request commit 2a89abe66d946fa425e2579daf06a99d72e75844 Author: Nemoel-Tomo <tomo_669@hotmail.com> Date: Sun Jan 12 17:15:45 2025 +0100 Tr1 electric ball (#1413) Implementation of the Electric Ball from Tomb Raider I, inside Level 5: St Francis Folly commit a97548467e5c35e8416d47bc0f2b976e853e5ea0 Author: Nemoel-Tomo <tomo_669@hotmail.com> Date: Fri Jan 10 23:27:48 2025 +0100 Waterfall_Emitter (#1359) * waterfall emitter. warning for the test I changed waterfallmist object * test * update * update * update * formatting * formatting * formatting * update mist color * import develop * bugfix sprite * added mor sprite particles * waterfall intensity * update waterfall to be more filled * update * Create a new sprite sequence for waterfall * Fixed texture order * removed GetParticleDistanceFade() from waterfall * Order * Update Particle struct; update waterfall * Update Particle struct * Simplify waterfall emitter * Simplify waterfall emitter * Simplify waterfall emitter * Simplify * Fix waterfall density; move sprite slot * Update Waterfall.cpp * fixed some small bugs with the waterfall after simplify * commit * imported develop 60fps branch * fixed waterfall errors * update * commit * update/test * update Waterfall * fixed last bugs * formatting * added option for sound * update * update, fixing errors * update * formatting * Formatting * fixed color issue, now only savegame is left * formatting * added new fields to savegame * targetpos is now Vector3 * import develop * Fixes according to GH notes + move waterfall-specific code out of effects.cpp * Rollback object ID rename, add missing enum * renamed ID_WATERFALL_ into ID_WATERFALL_SPRITES * fixed SpriteSeqID for spark in spark.cpp * Update CHANGELOG.md * rewritten waterfall code * Update waterfall impact point --------- Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Co-authored-by: Sezz <sezzary@outlook.com> Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com> commit bfe07f6e21c369d64d9256c6e31fe1b3af4946dd Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Sun Jan 5 16:45:30 2025 +0000 Bump version in Lua API for development commit 4dce1576651ee2b8663a6ae3c5fbb2949226d2eb Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Sun Jan 5 16:27:38 2025 +0000 Bump Tomb Editor version for next dev cycle Amended also in the Development branch for TE commit c25c7a1c96a327adc82662368f4ff4e6cb09878f Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Sun Jan 5 15:10:17 2025 +0000 Update CHANGELOG.md commit 2da7401c28fa731c729356d100a421959f6ab67b Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Sun Jan 5 15:09:41 2025 +0000 Update changelog with template for the next version. commit 66d7e51f5d3218c72e281c16ea6bb11f258df1f8 Author: Stranger1992 <84292688+Stranger1992@users.noreply.github.com> Date: Sat Jan 4 18:41:11 2025 +0000 Bump dev version to 1.7.2 This has been done to draw a line post-release and any commits after this to form the next release. Version number may change. commit cebc0175c9f132f75d8b58cc9db26c2e12d4cf29 Author: Sezz <sezzary@outlook.com> Date: Sat Jan 4 17:03:46 2025 +1100 Move splash effect to its own file commit b81b28039c9ce4b84cfde14aea1791de0d5c2421 Author: Sezz <sezzary@outlook.com> Date: Sat Jan 4 16:03:07 2025 +1100 Fix gravity being applied when vaulting on the same frame as the player lands commit 5444ede2a8fd079c2793e792a09715ea561ddb05 Author: Sezz <sezzary@outlook.com> Date: Sat Jan 4 15:51:52 2025 +1100 Reliably stop at edge when running at it while holding Walk commit 43d5bb9639cc9667875c82f360684e03e565166a Author: Sezz <sezzary@outlook.com> Date: Fri Jan 3 23:31:59 2025 +1100 Update CHANGELOG.md commit fb7e4dce70e9f5ed1882e45973a1ca30001315a3 Merge: 9baf5222f 12ac1219e Author: Sezz <sezzary@outlook.com> Date: Fri Jan 3 23:06:28 2025 +1100 Merge branch 'develop' of https://github.com/MontyTRC89/TombEngine into develop commit 9baf5222f8cc315d5cf4c65a3f865187b0d78059 Author: Sezz <sezzary@outlook.com> Date: Fri Jan 3 23:06:25 2025 +1100 Reset IsAirborne flag properly when exiting fly cheat commit 12ac1219e959ecf18ae34e2a7b4229b15198930d Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Thu Jan 2 13:10:57 2025 +0100 Update spark.cpp commit 7f071b5ec51e041cb0bd1e9a54756e9fb93c6f72 Author: Lwmte <3331699+Lwmte@users.noreply.github.com> Date: Thu Jan 2 11:15:04 2025 +0100 Port additional ricochet effect from tomb4
2025-02-20 20:07:05 -05:00
if constexpr (!DEBUG_BUILD)
2024-06-19 15:29:46 +10:00
{
if (config == LogConfig::Debug)
return;
}
auto logger = spdlog::get("multi_sink");
switch (level)
{
case LogLevel::Error:
logger->error(msg);
2024-06-19 15:29:46 +10:00
break;
case LogLevel::Warning:
logger->warn(msg);
2024-06-19 15:29:46 +10:00
break;
case LogLevel::Info:
logger->info(msg);
2024-06-19 15:29:46 +10:00
break;
}
logger->flush();
prevString = std::string(msg);
}
void StartDebugTimer()
{
StartTime = std::chrono::high_resolution_clock::now();
}
void EndDebugTimer()
{
auto endTime = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(endTime - StartTime);
PrintDebugMessage("Execution (microseconds): %d", duration);
}
void PrintDebugMessage(LPCSTR msg, ...)
{
auto args = va_list{};
va_start(args, msg);
g_Renderer.PrintDebugMessage(msg, args);
va_end(args);
}
void DrawDebugString(const std::string& string, const Vector2& pos, const Color& color, float scale, RendererDebugPage page)
{
g_Renderer.AddDebugString(string, pos, color, scale, page);
}
void DrawDebug2DLine(const Vector2& origin, const Vector2& target, const Color& color, RendererDebugPage page)
{
g_Renderer.AddLine2D(origin, target, color, page);
}
void DrawDebugLine(const Vector3& origin, const Vector3& target, const Color& color, RendererDebugPage page)
{
g_Renderer.AddDebugLine(origin, target, color, page);
}
void DrawDebugTriangle(const Vector3& vertex0, const Vector3& vertex1, const Vector3& vertex2, const Color& color, RendererDebugPage page)
{
g_Renderer.AddDebugTriangle(vertex0, vertex1, vertex2, color, page);
}
void DrawDebugTarget(const Vector3& center, const Quaternion& orient, float radius, const Color& color, RendererDebugPage page)
{
g_Renderer.AddDebugTarget(center, orient, radius, color, page);
}
void DrawDebugBox(const std::array<Vector3, BOX_VERTEX_COUNT>& corners, const Color& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugBox(corners, color, page, isWireframe);
}
void DrawDebugBox(const Vector3& min, const Vector3& max, const Color& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugBox(min, max, color, page, isWireframe);
}
void DrawDebugBox(const BoundingOrientedBox& box, const Color& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugBox(box, color, page, isWireframe);
}
void DrawDebugBox(const BoundingBox& box, const Color& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugBox(box, color, page, isWireframe);
}
void DrawDebugCone(const Vector3& center, const Quaternion& orient, float radius, float length, const Vector4& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugCone(center, orient, radius, length, color, page, isWireframe);
}
void DrawDebugCylinder(const Vector3& center, const Quaternion& orient, float radius, float length, const Color& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugCylinder(center, orient, radius, length, color, page, isWireframe);
}
void DrawDebugSphere(const Vector3& center, float radius, const Color& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugSphere(center, radius, color, page, isWireframe);
}
void DrawDebugSphere(const BoundingSphere& sphere, const Color& color, RendererDebugPage page, bool isWireframe)
{
g_Renderer.AddDebugSphere(sphere, color, page, isWireframe);
2024-06-19 15:29:46 +10:00
}
2021-08-03 15:08:43 +01:00
}