Skip to content
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

Maniac´s debugging features: GetCommandInterpreterState (GetGameInfo), maniac_event_info & more debugging extensions #3349

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

florianessl
Copy link
Member

First two commits of this PR were already included with my recent PR :Debug_AssertWay. Basically summed up with refactoring work on existing functionality I implemented in the Interpreter Debug Window that has already been merged for a while; and setting the base with a new Debug namespace inside a new file "game_interpreter_debug.cpp"...

Next up (Commit #3): "Game_Interpreter_Inspector"
Also some refactoring work. This is to clear out some of the "friend classes" I've defined previously. The idea is to only allow access to internal interpreter states via this interface & make it clear that any use of these functions is considered unsafe. (I use this for my new experimental work on trying to translate/patch content of running interpreters. Instead of just declaring "Translation" as just another friend class of Game_Event/Game_CommonEvent/Game_Interpreter/etc. this approach is used..

Then we get to the new stuff:
I've implemented Maniac's "Get Interpreter State" sub-command for "GetGameInfo". This required me to fully implement the "maniac_event_info" field & refactor the way commands are pushed to the interpreter, so that an "ExecutionType" (Action, AutoStart, Parallel, etc..) + the type of event are always known & can be included inside the saved execution state.
I then went the extra route & did some more refactoring, so that all the outside calls to "Interpreter.Push" can be verified at compile time via static_assert´s. So if anyone tries to do something weird, it won't compile.

The rest of the commits concern the Debug Scene`s Interpreter Window again, so the full functionality is restored after the refactoring & so that most of the new available state information is used there.

…erpreterDebug":

- Added new file "game_interpreter_debug.cpp" & moved/refactored some of the logic from the interpreter debug scene there
…nly when using a wrapper type of 'Game_Interpreter_Inspector'
… "maniac_event_info" which holds info about the current interpreter frame.
… catch some undefined or incorrect types of interpreter pushes at compile time.
…mplify the whole thing by using the recently implemented event info fields
…execution type of an interpreter stack (Action, Touch, Parallel, etc...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant