RetroAchievements / rcheevos

Library to parse and evaluate achievements and leaderboards for RetroAchievements
MIT License
90 stars 34 forks source link

use modified memref chain for mathematic rich presence macro values #385

Open Jamiras opened 4 days ago

Jamiras commented 4 days ago

Avoids the overhead of creating a value object for macro parameters that are simple mathematic expressions:

@Score(0xH1234*100_0xH1235)

Would create:

AddSource byte 0x1234 * 100
Measured  byte 0x1235

Which would intrinsically have a modified memref chain of "byte 0x1234 * 100 + byte 0x1235". This updates the logic so the macro can reference the chain directly without needing to define the conditions or the condition container.

More complex parameters (i.e. something counting hits or something with a PauseIf) would still need to generate the more complex container.