Replies: 3 comments
-
I think there's a function to invert bits... I can't remember if that was a current feature or a work in progress. Maybe that can possibly be made use of in this case. I'll try to find the reference. Update: So Jamiras explained it: "~ is a bitwise not. In current code, it only works on single bits, but in rcheevos, it's been expanded to the entire memory read: i.e. ~0xH0040 would bitwise invert the entire byte: 0xA3 -> 0x5C" Maybe this could help. |
Beta Was this translation helpful? Give feedback.
-
I believe this can be accomplished using a Measured/MeasuredIf construct.
The overall value
Note: the multiplication must be AddSource'd to 0 as it cannot be directly on the Measured condition. |
Beta Was this translation helpful? Give feedback.
-
In addition to using the MeasuredIf logic mentioned above, it's possible to divide a value by itself to generate a 1, and division by 0 always evaluates to 0 to prevent an exception, so that's a secondary alternative.
|
Beta Was this translation helpful? Give feedback.
-
As a developer who loves making leaderboards I would like a means to turn any non-zero value, for the
Value
field into one.This is needed only occasionally, but often without it sacrifices in design must be made.
Use Case
Recently I made some leaderboards for Metroid II, the weapon address stores the beam as:
0: No beam
1: Ice
2: Wave
3: Spazer
4: Plasma
I needed a way to count "had beam weapon", as a single unchanged value, but have no means to do so. This is one of a handful of other cases where I had to abandon my original intent.
Two possible solutions
(And still allowed that number to be multiplied by any value.)
Beta Was this translation helpful? Give feedback.
All reactions