-
Notifications
You must be signed in to change notification settings - Fork 0
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
elseif and switch Support #160
Comments
Maybe it is better with conditional jump opcodes
TO COMPILE AND DECOMPILE ⬇
|
The same I think could be applied to ELSE-IF
TO COMPILE AND DECOMPILE ⬇
|
It is best for SA to give priority to 0871 and 0872. |
0871 & 0872 could be used in the case that the SWITCH only contains INTERGERS and if it is also the same as the one with which it is compared. |
It looks more like "expressions (mapping)" than a classic "switch". However, design compatibility across all games would be a priority for me over a limited case jump table. |
Exactly @wmysterio |
Two examples of the switch construct as used in the original source file, Girls.sc - the 2nd example includes a default_jump [true] for when no cases match the key variable:
|
|
Switch is implemented. Any chance for |
If elseif support is added first, then switch support could be derived from that.
Otherwise switch support could be added using opcodes 0871 and 0872 (only support integers, though).
GTA3Script already has nested switch support using opcodes 0871 and 0872.
The text was updated successfully, but these errors were encountered: