mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-09-26 05:32:07 -04:00
4010857a32
Add ROM-backed contextual L/R help with article navigation and safe pause/resume. Record recent field scenes and gameplay events for the skippable Continue recap, with playback isolated from live progress. Integrate extraction and cache validation, preserve bundled script flags during import, and cover navigation, persistence, event recording, playback isolation, and both ROM revisions with tests.
15 lines
729 B
Lua
15 lines
729 B
Lua
package.path='./?.lua;./?/init.lua;'..package.path
|
|
local Extract=require('src.import.gba.flags_extract')
|
|
local function source()
|
|
local f=assert(io.open('src/core/game3/scripting/flags_table.lua','rb'))
|
|
local s=f:read('*a');f:close();return s
|
|
end
|
|
local before=source()
|
|
local empty=Extract.extract({root='/nonexistent-pokefirered-source'})
|
|
local cache={write=function(self,_,s) self.source=s;return true end}
|
|
assert(Extract.write(cache,'test',empty))
|
|
assert(source()==before,'Import must never overwrite engine source')
|
|
local flags=assert(loadstring(cache.source))()
|
|
assert(flags.FLAGS.FLAG_SYS_POKEDEX_GET==0x829,'Missing headers must use bundled constants')
|
|
print('Flag extraction preserves source and uses bundled constants')
|