Rewrite the whole ``process`` function of the processor to use instead tag dispatching on variant objects.
Each single processor message got rewritten as a struct, inheriting from a base templated Process struct, containing only the required data for that process, rather than using the generic structure that ended up needing to spam bitwise operations to pack as many arguments in a byte as possible. This makes things easier to follow and streamlines the addition of new processes:
- Define its struct with the parameters it expects by also providing a constructor
- If the process requires an answer, inherit it from ``Process<true>``, if it requires no answer, inherit it from ``Process<false>``
- Add such struct to the ``processors`` variant type
- Declare and implement its corresponding ``bool process(Processors::NewProcess& arg);`` function
Do the required changes to make Duel.AnnounceRace work with the new types and also any possible newly added type removing some hardcodings down the way and adding some extra checks, also apply the same updates to Duel.AnnounceAttribute
Add a separate ``set`` function and use memcpy to store/retrieve the data in the buffer, removes the raw cast to a reference that could have also lead to aligment issues.
Bump the race value size from 32 to 64 bit, giving us 32 new race values.
This is needed to futureproof the new upcoming rush card types, that could end up making the card types become more than 32.
This change breaks both the core abi and the messages.
For the abi now the race field in the OCG_CardData struct changed from uint32_t to uint64_t.
For the messages, QUERY_RACE will now be an uint64_t instead of uint32_t, MSG_ANNOUNCE_RACE will send an uint64_t for the races that can be declared, and also will now expect an uint64_t as answer, also, the HINT_RACE property associated with MSG_HINT will be using the full uint64_t data field as well.
Semantically the proper operator to use for oneline increments is the preincrement one, the postincrement is the one to be used only in teh cases where the previous value is required.
When the processor called rock_paper_scissors, it would have returned PROCESSOR_FLAG_WAITING, while it should have been PROCESSOR_FLAG_CONTINUE. Change he way the new message is sent, removing the need for further handling in the processor
Add OPCODE_ALLOW_ALIASES and OPCODE_ALLOW_TOKENS to allow aliased cards and token cards to be declared. Allow the function to be called with opcodes in a table.
Like Group.Select, but allows card codes to be passed directly, instead of card objects
```
Duel.SelectCardsFromCodes(0,1,3,false,10000000,75582395,48356796,48356796)
```
now send the mode of the effect on the same layout, and they can all
identify resolve effects now. And just like the others, no longer have
the flag appended to card code.