-
Notifications
You must be signed in to change notification settings - Fork 127
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
Improve AptEditor & Apt VM #593
base: master
Are you sure you want to change the base?
Conversation
This reverts commit cabee61.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks a lot for your contribution 👍 This looks great already!
I know this is still WIP, but some early comments already:
- On which games are you testing this? We must make sure the Apt VM stays compatible with earlier games ( BFME in particular ). We mostly tested against those games.
- For your final PR make sure we don't have too much commented out code
@@ -81,10 +81,15 @@ void OnWindowResized() | |||
ImGui.TextWrapped("Start OpenSage Apt Editor by providing a root path."); | |||
ImGui.TextWrapped("It's recommended that you set it to " + | |||
"the RA3SDK_UI_ScreensPack folder so you could load apt files more easily."); | |||
|
|||
// TODO More fancy implementations? | |||
var defaultInputPath = "G:\\Games\\RA#s\\aptuis\\aptui"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't stay this way
Sorry for creating a pull request with so many unfinished codes. The underlying logic is still incomplete to a large extent, I plan to clean up the code after I finished mostly the resource-loading logic, built-in AS functions, and opcodes. |
@BillStark001 no problem, i saw this is a draft :) Just wanted to comment early, so you know we're looking at it. Also feel free to join our Discord to discuss this stuff 👍 |
instruction = new GotoLabel(); | ||
parameters.Add(Value.FromString(reader.ReadStringAtOffset())); | ||
break; | ||
case InstructionType.PushData: // NIE doubtful and not used in any games |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This instruction is used by the Battle for Middleearth games, which were the first SAGE games that used Apt for UI. Please make sure you stay compatible in that regard. Those are 3 games (BFME I, BFME II and BFME II Rise of the Witchking).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I just added a line of throwing an exception to remind me where it is used. Although I'm mainly developing with RA3's scripts, I'll check the compatibility of BFME.
…262 representation of properties 1 vague part of reference needs to be corrected: CallFunction etc. "the undefined value should be discarded" => discard it in the instruction or add a Pop() after it by compiler? (Decompiling of swf shows the latter one)
The decompilation is completed on the infrastructures, when open an Apt file with AptEditor and select an action of a frame, one can see the result in cmd console The next thing important is fixing last bugs and adapting it to the UI
bfme compatibiliy is CRASHED, need fix
editing apt movie needs better infrastructures.
I implemented a prototype of the EA-modified ActionScript VM. The main TO-DO list includes AS DOM, built-in function implementations, script compiler, and Apt file writer.