commit 8d382e49fb3411cad1a3ef5ee1e546030c3a9d93
Author: James R <justsomejames2@gmail.com>
Date: Tue Nov 17 04:14:45 2020 -0800
Big Large Lua Hooklib Refactor
* Hooks are no longer a mess of lua boiler plate. Helper functions reduce hooks
to, at the most basic level, only two calls.
* Lua tables (the array part) are used to index hooks. Such tables contain only
hooks of the same type.
* Hook types are defined in one place so you no longer need to sync up the enum
and name array.
commit 3f7c2ae0b0c450cb8993ffe7664ead05fd9f5000
Author: James R <justsomejames2@gmail.com>
Date: Thu Dec 10 05:39:53 2020 -0800
Avoid using multiple tables to fetch hook
String hooks still use a table to fetch the id, but the id indexes a C array.
Also I fixed a missing call in the MusicChange hook.
commit dbd8903a538e7b87061795ce27ec5c72c26743af
Author: James R <justsomejames2@gmail.com>
Date: Thu Dec 10 08:50:23 2020 -0800
Use ref for pushing error handler
commit 9ddeb5f5896de0407b2b6fce8c949295a9e6d5e4
Author: James R <justsomejames2@gmail.com>
Date: Sat Dec 12 02:05:21 2020 -0800
Resolve GameQuit hook conflicts
commit 93e4f43e4b3a24fc2d8032e8730cbf427e75b297
Author: James R <justsomejames2@gmail.com>
Date: Sat Dec 12 03:06:57 2020 -0800
Hooklib macros names -> uppercase + documentation
commit 80fe39bbd1433c91131d2cdb36ba709f37d3b5f3
Author: Steel Titanium <steeltitanium1@gmail.com>
Date: Mon May 3 01:40:02 2021 -0400
Fix MusicChange hook not returning some values correctly
commit 46ca9613c68422a26910cbb034a9f3e004a967c3
Author: James R <justsomejames2@gmail.com>
Date: Thu Jun 10 18:09:39 2021 -0700
Pop hook id fetched from table
commit a75d4a1c360874a3c301a494e38ea49cd89b6616
Author: James R <justsomejames2@gmail.com>
Date: Tue Jul 6 18:42:08 2021 -0700
Automatically count hook values
commit 331329306cad257d52f84e47a92d9214d9eaa8d3
Author: James R <justsomejames2@gmail.com>
Date: Tue Jul 6 19:12:47 2021 -0700
Refactor hook ref allocation
commit ae57b6ca8664e00ff4d9544339dbf29a41138040
Author: James R <justsomejames2@gmail.com>
Date: Tue Jul 6 20:23:38 2021 -0700
MORE MACROS
I just can't stop myself!
commit b4fa98d2fbab180f487ce3efedb8ab715e5f3390
Author: James R <justsomejames2@gmail.com>
Date: Wed Jul 7 00:23:51 2021 -0700
Refactor hudlib hooks to hooklib
HUD hooks now meet the standard of hooklib. HUD registry
magic numbers are gone.
HUD hooks may also be added using addHook.
addHook('HUD', fn[, type])
hud.add still exists, but the intention is to remove it
eventually.
commit cb619fad5d762ba8d8dd20e9a979a04ced7c943f
Author: SMS Alfredo <65426124+SMS-Alfredo@users.noreply.github.com>
Date: Wed Jul 7 19:57:28 2021 -0500
Rebase on !1307
commit f271f88c7f3084523a03ca7f47060d6527724796
Author: LJ Sonic <lamr@free.fr>
Date: Sun Dec 5 17:59:33 2021 +0100
Fix MusicChange hook crashing when called
BRUH MOMENT BRUH MOMENT
PREPARE THE HALL OF SHAME
commit 0a0c17da7c793ec29e80c5bdaa66b02da0884078
Author: James R <justsomejames2@gmail.com>
Date: Tue Feb 1 02:27:27 2022 -0800
PARANOIA: I_Error if mobj hook is called with MT_NULL
commit 86336d6bed80bee6f8168078aa8856109091e50f
Author: katsy <katmint@live.com>
Date: Mon Mar 7 18:33:15 2022 -0600
remove MODID check from hooklib to fix compile issue
Windows bug; RPT files were not being generated for
toaster on Windows 11. Eventually it was narrowed to down
to direct3d driver specifically.
# Conflicts:
# src/sdl/i_video.c
- Also adjust cv_currprofile in PR_DeleteProfile, instead of half-heartedly outside
- Make it clearer if you're going to destroy your current profile
- Add an "[In use]" identifier to the menu's visuals
- Was reproducible by spamming back button events during game launch.
- Caused by the way profile data was initialised - D_StartTitle was calling a function with too many side effects.
- In addition, never instantly skip the title screen when the above occours.
- This would be enough to patch over the mentioned bug, but I made sure to solve it properly so it won't break when we touch this again later.
- Take the weird extra mini settings menu out of the Online Host Game sequence
- Make sure to actively use the server variables in Match Race creation
- Hides the Auto options for Encore and Kartspeed on the Match Race menu specifically...
- BUT if you leave it at the default it'll secretly set them to Auto!!!
- The pain + hit confirm delay is done for all players, instead of only the damaged player.
- The player who got the hit also gets to hear their pain sound at full volume.
- Changed the code so that your hit confirm sound effect will no longer be interrupted if the player who got hit left the game.
- Make the menu-only dummykartspeed and dummygpdifficulty cvars also affected by the unlock system.
- Master mode is currently behind SECRET_HARDSPEED, this can be changed later when we're seriously thinking about unlock progression.
- Complete forwardport of changes to cv_kartspeed from 1.4+, since I missed a spot previously.
- Fix an issue where if the last line of an M_StartMessage was the longest, the box width wouldn't account for it. (port from v1)
- Reduce length of some common error messages the Addons menu may produce.
- Add a warning for attempting to run .cfg files, since I absentmindedly overwrote ringconfig.cfg with kartconfig.cfg info while testing...
- Get rid of the temperature gauge, a relic from an age where the filenames you could fit in a packet controlled how many files you could load.
- Instead, add a file count to the bottom of the screen.
- Still a little ugly, but this menu is now SHIPPABLE.
Search finally works again!
- Now uses a cvar which is copied into static memory to uppercase it, instead of a weird static string uppercased into zone memory.
- You have to scroll to the top of the menu to use it, one entry above the previous first file/folder/"UP...".
- Don't play menu sound if you've reached the end of an un-looping menu.
- Change M_DrawAddons to draw relatively, so that the height can be changed without consequence.
- Add an option to adjust the spacing of Addons Menu entries (currently unused, but could be explored later).
- Moved Search (still not yet functional) further up the menu.
- Move M_AddonsRefresh out of M_DrawAddons - death to a HORRIBLE hack
- Use it as the tickroutine for the addons menu instead
- Behaves as before, possibly more consistent
There's no actual good way to handle the case of changing your skin, etc, maybe even various controls for a momentary test AND supporting profiles, so don't even try. Instead, let the game "pretend" you selected ttlprofilen to let it just about work.
This works because all the relevant cvars and controls still get saved to the config when changed... they just get written over when you select a profile. So if you haven't changed anything since your last successful launch, it is now functionally indistinguishable.
Catches a case that's never been relevant before -- now that you can open the console on the menu, map commands have newfound dangers to be worked around.
Was caused by the following actions:
- Starting a game
- Going to the Options menu
- scrolling beyond the 4th entry
- Exiting to title screen
- Opening up main menu again
Changed conditions -
- Switch Map and Addons on in-game pause menu
- now restricted by !K_CanChangeRules(), which covers all singleplayer conditions
- Gameplay and Server Options
- now restricted if in-game, and either singleplayer conditions or not admin
- Erase data
- now restricted if in-game at all (fixes new-menus regression)
- Previous implementation used fopen, fwrite, fread, etc.
- Instead, use the byteptr.h macros to/from a buffer, performing IO all at once before/after.
- This way, if we do something unrecoverable mid-write, we won't corrupt the user's profile.
- Also cross-endian compatible AND now capable of supporting changes in the struct.
- Sadly not back-compatible. This should be the last time we destroy the team's existing profiles...
Also, modify a typo in a gamedata error this system used as reference.
Preparation for reworking Addons menu -- I have been caught in these virtual keyboard popups without remembering how to escape a little too often for comfort.
Used to be "CHANGES? No/Yes", but that was confusing.
Now "READY? All good/Change" (had to be adjusted from discussed text to fit in the space, even with thinstring)