Implement session teardown and resource management for in-process transitions

- Introduced `teardownMountedSession` to handle cleanup of mounted versions, generated data, and mod states during transitions between the editor and launcher.
- Added `flushEditorPackageLoaded` to evict save-editor modules from `package.loaded` dynamically, ensuring a clean state for subsequent sessions.
- Implemented `Game:reset` and `Game2:reset` methods to clear session-specific fields, allowing for a fresh start when returning to the launcher.
- Enhanced `Renderer` and `TileRenderer` to release GPU resources immediately, preventing memory leaks during rapid transitions.
- Updated `MagnetTrainRide` to support OAM priority overlays and manage background rendering with new shader functionality.

This commit improves the stability and performance of the application during in-process transitions, particularly on Android.

fixes Yellow color palette for title screen

fixes #1662 #1643 #1536 and finishes fixing #1597
This commit is contained in:
1jamie
2026-08-22 17:08:14 -05:00
parent d54f9a02e0
commit 16eefcde68
16 changed files with 1090 additions and 215 deletions
+3 -1
View File
@@ -56,7 +56,9 @@ stub.graphics = {
end,
newQuad = function(x, y, w, h) return { x = x, y = y, w = w, h = h } end,
newCanvas = function(w, h)
return setmetatable({ w = w, h = h, setFilter = noop }, Image)
local canvas = setmetatable({ w = w, h = h, setFilter = noop, released = false }, Image)
function canvas:release() self.released = true end
return canvas
end,
newSpriteBatch = function(image, size)
local batch = { image = image, sprites = {} }