-
Notifications
You must be signed in to change notification settings - Fork 44
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
Thecl typed variables #62
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'll be suprised if this doesn't break anything. Also, simple creation mode is now required to recompile byte-perfect ECL files sometimes (ZUN's compiler doesn't seem to do math preprocessing well)
Couple bug/format fixes
It was interfering with the difficulty switch expression
timeline opcodes can be named in eclmaps by using "@" instead of "?"
now you can add/remove subs from dumps without everything exploding
I have doubts whether the person who originally wrote this knew how it worked
basically now all typecasts work correctly when creating a sub call by name. this means that these 2 calls generate exactly the same code: call("whatever", _ff 10f, _SS 10, _fS 10, _Sf 10f, _ff (b + 2f), _SS (a + 2), _Sf (b + 2f), _fS (a + 2) ); @whatever( 10f, 10, _f(10), _S(10f), b + 2f, a + 2, _S(b + 2f), _f(a + 2) ); this also fixes a bug that caused stack offsets for parameter type D to not be handled correctly.
A bit of an experimental feature - makes thecl utilize the I3/F3 variables as return registers, and allows creating functions that return values. Important note: "return" is now a keyword, so if you have it in your eclmap, change it to "ret" or something
- store passed expression value in a temporary variable (needed if expression contains stuff like the RAND variable). The variable is marked as unused after the switch, so next variable declared will reuse its offset. - check cases in the correct order (previously it was reversed) - add default case
… into thecl-typed-variables
…turn", so give them a warning about it
… assume by default that the games aren't manually tampered, hence why the error is non-fatal)
…ed properly. While the integer version most likely works, the float version just breaks under most conditions for some unknown reason. I'd have to take a closer look at the bytecode for it, but for now just have thecl throw an error. It's not like there aren't alternatives: multiply by -1 or just do 0-value instead. Also, rename the expr macro for it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.