Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring data per game #15

Open
ExpHP opened this issue Feb 21, 2021 · 0 comments
Open

Configuring data per game #15

ExpHP opened this issue Feb 21, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ExpHP
Copy link
Owner

ExpHP commented Feb 21, 2021

There has been some interest (particularly from zero) in providing ways for the user to supply information to the compiler. E.g. I might not want to maintain a list of ITEM_ constants in truth for every game (and so truth will probably deserialize these as a plain int by default). But if there is a user that's willing to put in the time and effort to create these lists, then there ought to be some way for them to configure truth so that it can decompile an instruction to e.g. itemAdd(ITEM_EXTEND, 1).

I currently haven't put too much thought into this, because I want to focus on more straightforward issues first, but I do agree that stuff like this could make for a great feature. So what I'm creating here for now is a bit of a vague issue, just to keep a record of the things we'd potentially like to make user configurable.

  • Simple enums: Items. Aim types.
  • Bullet types and colors. This can be especially tricky because the valid colors (i.e. the ones we should decompile to) will depend on the bullet type!
  • Since the user will be defining the enums, they also need to define what instructions use them. I think that most likely this will involve some fancy way to define instruction signatures that more closely resembles function declarations, like
    insdef 23 void flagSet(MyBitflags flags);
  • ANM color formats. (this could be difficult because it appears in meta rather than an instruction)
  • Whether each argument of an instruction is allowed to be a register. (e.g. jumps completely ignore the parameter mask)
  • Bitflags. E.g. EX flags, ECL flags.
  • There is also the desire to be able to write documentation comments for instructions. Perhaps that can be a part of this, by making the format resemble a C header file enough that it can fool C IDEs.
  • In modern ECL, registers start at -10000 while in ANM they start at 10000. It'd be nice to configure something so that both can show as GVAR_0, GVAR_1...
  • What if the labels generated by trumsg could be e.g. "MarisaA" instead of "script10" and etc?

Not all of these things might necessarily be possible to provide with a single solution. But keeping all of them in mind may help guide the design process.

@ExpHP ExpHP added the enhancement New feature or request label Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant