Open Kinglink opened 3 months ago
The example does match how I'd imagine it. I also would like to be able to optionally produce something like
const addresses = {
_CAFE: 0xCAFE,
_FEED: 0xFEED
}
so it can be used same way as in the multi-regional recipe
in case of your example I would likely emit
-- let memory327950 = 0x00327950
++ const addr_327950 = 0x327950
Without this feature one can focus on moving out repeated blocks into functions and do Find-and-Replace after. Also if some address is required only once - ain't big deal to have it reside inside a function returning conditions, you could just give names to individual conditions and those names would imply the address is relevant to that.
cruncheevos should have a "Generate code notes" function. The Code notes should be made into simple elements in the JS script. They would look something like
Basically take the entire text of the code note and put it in the file, follow it with a simple variable with a memory address. Then as a programmer, I can come along and rename that memory variable as I want, but also have the documentation for that value right there.
This is especially helpful because transcription of these values can lead to errors and incorrect memory/documentation which could cause issue.
This doesn't have to be a major feature just a way to press a button after making all the code notes, and then from there allow the user to only need to use the JS file to generate their achievements, rather than having to refer to the game/code notes in another manner.
(object and comments can be done in the TS or JS style format you prefer, just used a simple version)