Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Engine] * Fix CVar autocomplete not working and optimise the routine a bit more. * Readability updates in 'Flags' class. * Add 'Util.IsBoolean', 'Util.IsFunction', 'Util.IsInteger', 'Util.IsNumber', 'Util.IsString', 'Util.IsTable' and 'Util.IsUserdata'. * Wrap all of the 'lua_is*' functions so that they all return booleans. * Copy "__dtor" metadata string from a static C++ string for LUA. * Log warning instead of throwing exception to trace a mysterious destabilisation of the engine when trying to Sample:Play() on a sample with no handles (normally impossible!) loaded during an audio reset. * Obsolete LUA API functions 'Input.GetMousePos()', 'Input.GetKeyState()' and 'Input.GetMouseState()' were removed. * LUA API functions 'Display.Maximise()', 'Display.Focus()', 'Display.Restore(), 'Display.Minimise()', 'Display.Attention()' were fixed. * Send mouse position LUA event at start of LUA execution. * Prevent unaligned reads in 'Memory::MemReadInt()' detected by ASAN debuggers. * Fix "Fill error" exception with 'Asset.Create(0)' LUA API function. * Optimisations and readability changes. * Optimise and fix LuaLib API functions so that user passed arguments are accessed in proper order on compilers that evaluate function calls right to left (i.e. MacOS/XCode). To be continued… * Add functions to send common events. * Add 'Credit.Libs' which uniquely id's all the available libs and also 'Libs.MAX' for the total. * Remove obsolete 'Credit.Total()'. * Engine compatible with LUA version 5.4.7. * Optimise 'File.WriteStr()' to prevent pointless string duplication. * Add 'Info.LUAMicroTime', 'Info.LUAMilliTime', 'Info.LUANanoTime', 'Info.LUATime', 'Info.UpMicroTime', 'Info.UpMilliTime', 'Info.UpNanoTime' LUA api functions to show total Lua and engine execution times. * Improve 'Crypt::CryptRandomPtr()' engine function. * Optimise and fix LuaLib API functions so that user passed arguments are accessed in proper order on compilers that evaluate function calls right to left (i.e. Windows/MSVC). To be continued… * Fix infinite loop bug when trying to render or sort unfinished 'Stat' objects. * Fix 'Sample:Spawn()' not assigning OpenAL buffer id's. * Remove obsolete 'Asset.Set()'. * Optimise and fix LuaLib API functions so that user passed arguments are accessed in proper order on compilers that evaluate function calls right to left (i.e. Windows/MSVC). To be continued… * Rename all '*.ArrayAsync' functions to '*.AssetAsync' for naming consistency. * Remove pointless 'Asset.StringAsync' which was ill-thought out. * Fix 'Asset.Duplicate()' not copying identifier and request identifier argument for 'Asset.Create()'. * Remove 'Asset.Fill()' and add 'Asset.FF32()', 'Asset.FF32BE()', 'Asset.FF32LE()', 'Asset.FF64()', 'Asset.FF64BE()', 'Asset.FF64LE()', 'Asset.FI16()', 'Asset.FI16BE()', 'Asset.FI16LE()', 'Asset.FI32()', 'Asset.FI32BE()', 'Asset.FI32LE()', 'Asset.FI64()', 'Asset.FI64BE()' 'Asset.FI64LE()'. 'Asset.FI8()', 'Asset.FU16()', 'Asset.FU16BE()', Asset.FU16LE()', 'Asset.FU32()', 'Asset.FU32BE()', 'Asset.FU32LE()', 'Asset.FU64()', 'Asset.FU64BE()' 'Asset.FU64LE()' and 'Asset.FU8()'. * Optimise 'Memory::MemCheckParam()'. * Don't validate filename twice with 'Archive.LoadAsync()'. * Async loader optimisations. * Other optimisations, readability improvements and clean-ups. * Remove API function parameter labels since we have a reference manual now they're no longer needed. * Optimise and fix LuaLib API functions so that user passed arguments are accessed in proper order on compilers that evaluate function calls right to left (i.e. Windows/MSVC). Work may continue across commits. * Ignore certain user requested cvar values when not supported by the underlying operating system. * Remove ability to create an allocated Mask object surface that is uninitialised and supply 'Mask.CreateZero' or 'Mask.CreateOne'. * Enforce parameter counts on all functions. * Collector classes will hold the literal name string of each member class so we can use it with Lua. * Finished fixing all LuaLib API functions pending optimisations. * Reduce uneccesary macro usage in all LuaLib functions. * Revert counting parameters (except on Async funcs) since Lua's own built-in functions don't do it. * Completed LuaLib function optimisations. * Add 'Font:PrintUC', 'Font:PrintUCT', 'Font:PrintUR' and 'Font:PrintURT'. * Fix saving and restoring original colour intensities of glyphs when using 'Font:Print*T*' functions. * Add more entropy to libcrypto random seed and don't 'set' it anymore. * Fix console 'find' command by flushing all the queued console lines output buffer on command execution. * No need to check rows being finished when using 'Stat:Finish()'. * Log the randomly generated seed. * Pre-calculate Y axis positions before processing X axis positions on Mask functions. [Diggers] * Monsters pick better Digger targets and when around the trade centre, they won't relentless harass the same Digger. * AI Diggers shall only teleport to safety when they are moving only so the Digger can try to regain health. * Perform most AI procedures when firmly on the ground. * Optimise setting object actions. * AI won't teleport as much when in danger and health above half. * Remove at least two of the four Jennites from Klarsh at the player spawn that the AI can easily get to. * Optimise uses of 'type' and 'assert' with new 'Util.Is*' engine functions. * Optimise storage of game terrain data tile ids to use a LUA array for much faster memory read/writes. * Remove 'no-cache' flag from raw level data file. * Fix script error when cleaning up pursuer targets. * Don't re-read level tile when updating level terrain mask when the tile id is already known. * Force viewport position when loading a level so scrolling never occurs from the far top-left of the screen. * View all players' Diggers on title screen. * Other minor optimisations and readability fixes. * Optimise credits. * Renamed some data variables. * Added shroud system to hide parts of the level you wouldn't normally see in the original game. * Add test value to test rolling credits. * Let callers of LoadLevel() control when to scroll the viewport. * Use original table in API instead of GetLevelData(). * Revert cave ceiling terrain mask tiles to original version tiles so the monsters don't get stuck. * Make and use functions for calculating tile under mouse cursor. * Use separate object member variable for checking for shroud update. * Move AI choices data and shroud data to data source module. * Deprecate use of the 'table.insert' function. * Break out map post mortem into separate module. * Optimise ending scene and texture. * Change running away from low health when fighting to be based on intelligence. * Re-optimise some graphics files because interlacing was accidently used which was bloating them. * Don't apply inventory perks when in the shop. * Break out debug mode to separate module. * Remove use of 'math.floor()' when dealing with integers where needed. * Fix numerous cases where numbers are being generated instead of integers. * Debug mode changes. * Miscellaneous optimisations. * Check AI Digger fall even when in danger. * Deprecate use of 'assert()' and properly debug affected variables. * Optimisations and readability changes. * Update setup module to use new 'Credit.Libs.MAX' const. * Recognise when objects are in water with a flag. * Clean up object flags. * Fix script errors when respawning objects. * Diggers will now try to jump gaps but falling into water is now completely impossible. * Diggers won't drop into water thats only one tile deep anymore. * AI Diggers phase out if they 'wriggle' too much (e.g. if they get stuck on a 1-pixel wide island). * AI Diggers won't jump if the ceiling is too low. * Decrease chances that AI Diggers will continuously dig down. * AI dropped devices that can be deployed will be automatically deployed (if possible). * Add AI for AI Digger purchased devices. * AI won't steal opponents devices anymore. * Colourised shroud depending on level type. * Give all the code the once over with a spellchecker. * Restore animation speed on respawn. [Assets] * Update refdoc with new functions and fixed some explanations.
- Loading branch information