suXinjke / cruncheevos

Set of tools to deal with RetroAchievements achievement sets using JavaScript
MIT License
2 stars 0 forks source link

ASCII / Unicode helper functions #6

Open suXinjke opened 3 months ago

suXinjke commented 3 months ago

Originally this was desired in RATools - some functions that generate conditions based on string input, they were implemented later.

cruncheevos does not have anything for that in the core package yet, and no exact idea on how it's gonna be like

ascii('32bit', 0xCAFE, 'abcdef')

AndNext Mem 32bit 0xCAFE = Value 0x64636261
        Mem 16bit 0xCB02 = Value 0x6665

This already will not work well if one has string stored via pointer, meaning ascii / unicode function should also be able to accept ConditionBuilder to base conditions from

suXinjke commented 1 week ago

Mostly implemented in 0.0.6, only lacks unicode helpers. Basic ASCII to UTF16 seems easy enough to do which you'd pass to define.str afterwards