-
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
Some new features and bug fixes in thecl #59
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
50deg + 1.0f should not be valid syntax, now it's rad(50.0f) + 1.0f which doesn't look weird
The recent changes I made resulted in dumped ECL files not necessarily being exactly identical after compiling. Simple creation mode ensures that the created ECL will be the same, as it prevents adding any instructions automatically (at the cost of disabling some of the new features) Note that despite the things that add instructions automatically, simple mode does not need to be used to perfectly recompile ZUN's ECL files, as his compiler seems to add ins_40 and ins_10/ins_1 automatically as well (they are in every sub). As such, simple mode only really needs to be used to compile things that I would call bad and janky.
done because such code ----------- !NHL GirlA01_at() sub; !* while(1) { wait(1000); } ----------- would not compile.
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.
New features (th10+ only):
difficulty switch expressions:
wait(60:50:40:30);
->last parameter always gets all remaining diffs, so do
10:20
to get justor
1:2:3:4:5
to split lunatic and overdrive (for games that have it)this only supports basic integer/float literals, putting variables/expressions inside will not work (I might add that later)
no forced typecast for passing expressions to ins calls: basically now you don't have to do
wait(_S(2+2))
,wait(2+2)
works just fineeasy to write float literals that represent radians:
rad(180.0f)
->3.14159...f
(since this is just a way of representing a float value and not an actual function, you can't put variables/expressions in it)syntax for binary integer literals:
0b1001
->9
added forced sub calls by name -
@mySub();
compiles intoins_11("mySub");
, even if no sub of that name exists in the current file (can also do@mySub() async;
to useins_15
instead)declare variables anywhere in the sub and don't require
var;
at the beginning (ins_40 is prepended to the list in sub_finish automatically)declare & assign variables in 1 line with
var $myVar = 1;
automatically add ins_10 at the end of the sub if there is no ins_1/ins_10 present
since 3 last features make thecl add instructions automatically, simple creation mode was added to disable them (pass
-s
in args when running thecl to enable this mode)added an error message when a variable with a duplicate name is declared
added
times
loop known from some screenshots of ZUN's ECL:since the
times
loop requires one of the earlier features enabled to work (as it automatically creates a counter variable), it's not available in simple creation modeFixes:
break;
no longer requires an instruction before it, rank flags don't require an instruction after them etc)!457
instead of!XYZ
)