Commit 7755f64
committed
26.6
[Engine]
• Allow 16-bit and 8-bit's per sample .CAF formats and harden CAF file loading.
• Calculate OpenAL format when building a 'Sample' class and no longer store it in the 'Pcm' class.
• Use 'std::transform' in memory byte swap functions.
• Move PCM data filtering system to 'Pcm' loading class like we did with the 'Image' loading class.
• Fix misaligned read in 'FileMapReadVarFrom'.
• Fix missing 'else' on spawning a new 'Source' from a 'Sample'.
• Set a 'Pcm' class purpose.
• Return correct number of arguments when using 'Sample:Spawn()'.
• Use 'unsigned' instead of 'unsigned int' and also strip obsolete use of 'signed' and 'long int'.
• Change 'ui' prefixed variables to 'u' and some others.
• Move volume control into a separate 'Mixer' class from the 'Source' class.
• Optimise triangle angle transformation speed by 10%.
• Optimise automatic texture tile generation.
• Resolve remaining Memory class raw pointer use.
• Win32 DLL header version reader improvements.
• Remove raw access to Theora plane data and protect its pointers with a span class.
• Add cvar 'con_enablebreak' and handle Ctrl+C in NCurses.
• Extract classes from 'SysCore.hpp' into separate files.
• Tweak filename for 'PixPip' and 'WinPip' and suffix an 'e'.
• Put system classes in namespaces.
• Fix all CppCheck issues.
• Git ignore file tweak.
• Comment tweaks.
• Sprinkle 'constexpr' on some thin wrappers.
• Don't use raw pointers in UUID class.
• Start converting Memory class functions to not use raw pointers.
• Fix raw pointers and incorrect end iterators on Joystick classes.a
• Improve byte swapping memory functions.
• Improve OpenAL startup logging including enumerating context extensions and check the version via CVars since it doesn't need a context.
• Expose byte swapping length functions to Lua (SX8/16/32/64).
• Optimise calls to operating system C functions.
• Modify readme to change some links.
• Add tile logging on debug version.
• Remove 'explicit' where it isn't needed.
• Console command 'textures' now accepts a argument to see the stored tiles data of any loaded 'Font' or 'Texture' class.
• Add functions 'Stat:Flush()' and 'Stat:FlushData()'.
• Rename 'stdpost' to 'stdlib' and give it its own namespace.
• Rename 'stdpre' to 'std'.
• Some 'CppCheck' fixes and bypasses for false positives.
• Fix use of raw pointers in 'CmdLine' class.
• Assign ASAN safe environment list on MacOS.
• Trim pointless 'const' (non-reference) return types.
• Fix StdResized/StdReserved on Windows.
• Add UtfDecoder::UtfSize().
• Make more templated string function arguments to prevent casting/copying/duplications.
• Clean up 'Name' class.
• Try to create thin wrappers for templated Crypt and String namespace functions.
• Swap use of '.length()' to '.size()' methods.
• Rename 'Timer' class and functions to 'Frame'.
• Remove string time related functions and move them to 'time.hpp'.
• Some more attempts to de-duplicate string classes.
• Add 'Util.LineCheck' function.
• Move a lot of code around to increase readability.
• Might as well use string literals in 'cvarlib.hpp' since there's no point referencing common strings.
• Mark saved variables that couldn't be overridden to be purged at database closure.
• Optimise 'Token' classes with better type safety.
• Optimise 'Parser' classes with better type safety.
• Modernise typedefs to using & update build scripts. Replace many legacy typedefs with C++ using-aliases across numerous headers for clearer, modern type aliases and consistency (e.g. StdVector/StdMap/StdArray usages). Update various code sites to safer APIs: use StdString::empty() checks instead of pointer dereference, switch Token delimiter to StdStringView, use StdAddressOf, and adjust DoClean/type constructions. Revise build scripts and libjpeg helper: scripts/libjpeg.sh now copies headers into an INCLUDE path and adjusts macOS/linux build labels; build.cpp path and NASM/source flags updated to reference src/ paths, library/object handling tweaked, and other build-command string formatting improved. These changes are primarily code modernization, safety fixes, and build-system/path corrections.
• Modernise Error API, string utilities and fixes
• Refactor several APIs for safer types, perfect forwarding and unified handling:
• Reworked Error to accept generic message types and unified Param into a single constexpr-heavy template that handles integral, float, pointer, array and class types via StdStringView parameter names. Consolidates many platform-specific overloads and reduces duplication.
• Switched many APIs from raw const char* names to StdStringView and updated Float/Str helpers accordingly.
• String formatting utilities updated to use forwarding and decay for exception handling and to avoid unnecessary copies.
• Replaced manual accumulation with StdAccumulate for Lua static count, and made small functions (e.g. PrintSanityCheck) static where appropriate.
• Bumped version defines and adjusted logging punctuation, plus small fixes to flags/FlagGet usage in OAL and CAF codec checks.
• These changes improve type-safety, reduce code duplication, and enable compile-time dispatching for richer, more consistent error messages.
• Refactor formatting, CVar validation, utilities. Modernize and centralize formatting and string utilities, enhance CVar validation, and apply related API updates across headers.
• Reworked StrFormat/StrFormatParam to use string-view based formatting and added a literal overload; updated many call sites (Console, Log, Name, Shader, OAL, OGL, Socket, Statistic, etc.) to accept constexpr char-array formats for safer compile-time handling.
• Added StrTrimRef and improved StrTrim overloads to operate on generic string types (with in-place variants and shrink_to_fit where appropriate).
• Introduced CVar::VerifyString and new MUPPER/MLOWER flags (and MMASK) to centralize string validation/modification (trim/upcase/lowercase) and simplified SetValue to reuse verification logic.
• Various utility and API updates: UtfDecoder/Wide conversion fixes, simplified Archive/file-iterator lookups using string_view, StdMap now uses transparent comparator (std::less<>), SysRedirect made final and moved to a member of SysBase, and multiple small memory/perf fixes (shrink_to_fit, remove needless copies).
• Version bump and build metadata update.
• These changes improve type-safety for formatted strings, reduce unnecessary allocations/copies, and consolidate validation logic for configuration variables.
• Introduce TMASK, refactor flag ops & cvar checks
• Add an explicit TMASK in cvardef.hpp to separate type bits from manipulation bits, and reorder mask definitions for clarity. Introduce FlagAnd and FlagAndInverted helpers in flags.hpp and simplify several FlagsConst methods to use those helpers (removing the variadic FlagIsAnyOfSetAndClear helper), improving readability and correctness of bit tests. Replace complex mixed-type checks in luavar.hpp with a switch on cvfcFlags.FlagAnd(TMASK) to reject none-or-mixed type combinations. Improve CVars logging/messages and fix a typo in cvars.hpp. Also bump VER_REV/VER_STR/VER_DATE in engine.hpp for a new build.
• Use string_view params, tweak Lua init, bump version
• Replace many temporary StdString constructions with StdStringView usages to avoid copies and modernize interfaces (cmdline, console, cvar(s), luavar). Change CVarItem::SetDefValue and CVars::RegisterVar signatures to accept StdStringView and update callers accordingly; adjust insertions to construct StdString only when storing in maps. Update Lua bindings: expand llvar.Register to extract args/flags and validate, and change luavar Init to accept name/default/flags (plus related registration logic updates). Also adjust command existence check to use the view overload. Bump version/revision and compilation date in engine.hpp to rev 179.
• Refactor std utilities into stdcore; bump version.
• Consolidate and rename stdtypes.hpp -> stdcore.hpp and move common STL utility wrappers (StdForward, StdDistance, StdIsXDigit, StdReserved, StdResized, StdToNonConstCast, etc.) into the new header. Update includes in build.cpp and engine.cpp to use stdcore.hpp, remove duplicate implementations from std.hpp and utf.hpp, and add a ssize_t alias for Windows in setup.hpp. Also bump engine version/build/revision and update VER_STR/VER_DATE in engine.hpp.
• Replace StdString with StdStringView for APIs.
• Refactor public/internal APIs to accept StdStringView (and templated string types where appropriate) instead of StdString to reduce unnecessary allocations and copies. Updates include: Archive, Asset, Async, Args, Clip, CmdLine, Console, Crypt, ConGfx and many other headers/source sites to use StdStringView parameters or template constraints; added StdString conversions where map lookups or ownership are required. Also added common string views svPipe and svColon, adjusted UtfWordWrap call sites to use StrList, and minor call-site fixes (StrAppend/StdString construction). This is a broad API surface change to prefer non-owning string references while preserving behavior where owning strings are needed.
• Add indexed entries for key/value pairs in static Lua enum tables. We can then remove the 'MAX' entries as we can use '#Array' length instead.
• Use std::span/size_t for Lua API.
• Modernise Lua API types and counters, replace raw C arrays/ints with safer STL types, and bump engine version.
• Bumped version in src/engine.hpp to 26.5.20.130 with updated build/rev/date.
• Introduced StdSpan (std::span) typedef and added <span> include (src/setup.hpp, src/stdtypes.hpp).
• Converted Lua constant/key/table arrays to use StdSpan and StdStringView (src/luadef.hpp) and updated LuaLibStatic fields to size_t/st-prefixed names.
• Updated code in src/lua.hpp to use size_t/st-prefixed counters, StdSpan-based loops, and adjusted variable/macro names accordingly.
• Adjusted lualib macros to construct LuaTable/LuaKeyInt spans and added an empty llrLast sentinel; updated related macros (src/lualib.hpp).
• Normalized default parameter formatting and minor function signature cleanups in src/luautil.hpp.
• Replace manual ASN.1 time parsing with ASN1_TIME_to_tm and StdMkTime conversions; add CertGetExpiry helper and use it in CertIsExpired.
• Update console table to include expiry timestamps and time-to-expiry display.
• Harden GLFW callbacks by renaming parameters to clearer names, consistently passing the GLFWwindow pointer, copying dropped file paths safely via span/for-each, and normalizing framebuffer/getters parameter names.
• Improve CryptURLDecode to use iterators instead of raw pointers.
• Fix time parsing variable names/format in StrParseTime2 and optimize string replace/search logic.
• Switch token generator to return std::string substrings.
• Introduce a 'StdIsString' concept and 'StdDistance' helper, tighten template constraints across string utilities, and refactor hostname validation into a reusable templated helper with callback handlers.
• Update 'StrDuration' and pluralisation helpers to accept generic string types, add requires clauses to several templates (StrPluralise*, StrToGrouped*, StrFromRatio, etc.).
• Fix Lua wrapper calls in 'llutil.hpp'.
• Also update Lua util functions to use templated string conversions and improve error reporting in LuaUtilGetCppHostname.
• Misc. small API and formatting adjustments across src/{engine,llutil,luautil,stat,std,string}.
• Don't log every Socket class read and write to prevent log spam but instead log the transfer of the data to Lua.
• Change a few other Socket log messages.
• Add 'Util.PluraliseGrouped'.
• Fix graphical console drawing when it is hidden triggering a full redraw.
• Fix drawing flag not clearing when frame limiter is disabled.
• Fixed graphical console processing key presses when terminal console is open which is also sending pointless console redraw events.
• Other tweaks.
• Fix a great deal of minor Win32 compilation warnings which has never been checked for many years *g*.
• Optimise some UTF-8 functions to not use raw pointers.
• Fix missing 'StdForward()' on 'StdSwap()'.
• Tidying up.
• Wrap NSGIF functions in error checking wrappers.
• Overhaul the LUA garbage collector configuration system. The original system was wrong and didn't allow to configure all the parameters.
• Improve Crypt::Sanitise so it changes lookalike homoglyphs to their proper normal ASCII values.
• Move the codex for the homoglyphs and the html entities into separate files.
• Other tidying up in places.
• Add 'creset' command to redraw terminal UI.
• Give all the templated declarations the once over and add checks for them. Which also fixes some typecasting issues.
• Create 'syspix.hpp' to provide common functions for both Mac and Linux versions instead of needing to duplicating them.
• Move 'SysBase::Redirect' to 'pixstdrd.hpp'.
• Remove #includes in 'syspix.hpp' and 'sysnix.hpp' to deduplicate them and put them in 'syscore.hpp' instead.
• Move endianness conversion macros to 'endian.hpp' and promote them to functions. Also juggle some related functions around.
• Fix 'cast-function-type-strict' warnings and remove it from compilation flags.
• Commonise control character handling.
• Remove log entry for pipe read/write's.
• DER formatted X509 files use .DER extension which the engine uses (not .CER).
• Only backup the colour on actual colour change and not on every call.
• Allow most cvars that can only be set by manifest be overriden by command-line.
• Resolve incorrect Stream manager un-queue/re-queue OpenAL buffers behaviour.
• Rename 'Ident' to 'Name' and rename to 'name.hpp'.
• Rename 'IdList' to 'LookupArray' and put in 'lukarray.hpp'.
' Rename 'IdMap' to 'LookupMap' and put in 'lukmap.hpp'.
• Underscore is allowed in a host name.
• Add creation, modified and access time to 'dir' output.
• Optimise the 'StrPluralise*' suite of functions.
• Add 'Util:DurationS' and 'Util:DurationSEx' and rename 'Util:LDuration*' to 'Util:DurationL*'.
• Wrap the 'std::swap' function with 'StdSwap'.
• Don't allow setting inline font colour intensity if already set.
• Store unique ID in directory record in the order of enumeration and update the 'dir' console command and 'File.Enumerate(Ex)' API functions to reflect that.
• Add 'Source:IsPlaying()', 'Source:IsStopped()', 'Source:IsValid()' and 'Source:PlayTwo()'. The two 'Play()' functions now return if the 'Source' started playing or not.
• A lot more readability fixes.
• Break out 'IdentC*' classes from 'ident.hpp' into a new 'serial.hpp' file rename it to the 'Serial*' class.
• Fix video FBO drawing lists not being cleared when rendered.
[Assets]
• Update API documentation.
• Add 'macos' directory with readme and XCode project file.
• Add '.gitignore'.1 parent a9765d2 commit 7755f64
202 files changed
Lines changed: 17832 additions & 13407 deletions
File tree
- docs
- macos
- engine.xcodeproj
- project.xcworkspace
- scripts
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 148 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
0 commit comments