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.
This PR adds support for switch names that are prefixed with
0
. It goes up to 1000, e.g. a switch named001
will correctly be relayed to PinMAME as1
, or099
as99
. But it won't work for let's say0001
, in this case we'll do a normal lookup, and print an error if the ROM doesn't have a switch alias named0001
.The implementation is somewhat hacky. We just add zero-prefixed references to the lookup tables when registering the strings and keep the rest of the code "simple". We could also have added another int-based lookup table that would work for any number. @jsm174 let me know if you prefer the latter.
See also freezy/VisualPinball.Engine#430 for the same feature for coils.
This PR also adds a new
s_spawn_ball
event that adds a ball on the playfield for debugging.