-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Interpreter command execution #1740
Conversation
79996f4
to
8bea0cd
Compare
6292f5f
to
f2760a9
Compare
I'm cutting this one here and will do the control flow / subcommand_path stuff in the next PR. Test cases related to this have been listed and need to be verified. |
All test cases pass, except that for doing "ThisEvent" from common events in Player causes warnings instead of crashing. Personally I think this should be fixed, as it quickly ends up in undefined/corrupted behavior but that falls under #1720 and I don't want a huge debate about it holding up this PR. This is ready for review and merge. |
Diff between PR1717 and PR1740: mateofio/Player@scene_fixes...fmatthew5876:event_state |
* Don't ever delete the interpreter, because allocating and deleting is slow. * Still don't allocate an interpreter until a parallel page is activated, however. * assert if we're parallel but there is no interpreter. This means there is a bug that needs to be fixed.
Don't make extra copies of the data. Also avoids potential sync with page bugs.
Eliminates possibility of sync with page bugs
This flag is only used during initiation and immediately cleared. So pass it into Refresh() as a local variable instead of storing it.
Store an entire SaveEventExecFrame and use the last element of its stack as the list. Until we remove child interpreters, the stack articially stays always as size 1.
Add Game_Interpreter_Map::OnMapChange() and call it for the foreground interpreter.
* Use SaveEventExecState::stack * Remove child_interpreter * Correct storage of event_id chunk * Correct behavior for "ThisEvent" commands for rm2k3e and not
* Use wait_time chunk. Allows frame accurate loading of save games with active wait commands. * Waiting pan commands also use wait_time
Use the correct chunk
Use the wait_movement chunk and check in main update loop.
* Support rm2k and rm2k3 versions * Abstract nasty details of chunk versioning
This one is fixed now. I have addressed all review comments and game regressions. Also rebased to master. |
Well the stuff I found before my vacation is fixed, so is fine for me now. |
This PR modifies the interpreter to use
SaveEventExecState
andSaveEventExecFrame
chunks so that it executes more accurately and allows correct saving and loading of LSD chunks while events are running.Changes include
Control flow refactors using
subcommand_path
chunks will come in the next PR.Depends: #1717Depends: #1739Depends: EasyRPG/liblcf#324Fix: #757
Fix: #1777
Test Cases from #1707 addressed by this PR