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
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.
Remove global duel::strbuffer, this was a leftover from the old message handling, directly pass the string from lua to the callback function, and use local buffers when formatting is needed.
Unified new card functions under new_card, with an additional parameter (duelist). This parameter will be used to add any "additional" player, like a partner in a tag duel or in a relay duel, the api will automatically handle the various modes, if DUEL_RELAY_MODE is passed then the extra players will be considered like in a relay duel, otherwise the extra players will play in rotation like in a tag duel.
MSG_SELECT_BATTLECMD, MSG_SELECT_IDLECMD, MSG_SELECT_SUM, MSG_SELECT_CHAIN, MSG_SORT_CARD, MSG_SORT_CHAIN, MSG_CONFIRM_DECKTOP, MSG_CONFIRM_EXTRATOP, MSG_CONFIRM_CARDS,
MSG_SHUFFLE_HAND, MSG_SHUFFLE_EXTRA, MSG_CARD_SELECTED, MSG_RANDOM_SELECTED, MSG_BECOME_TARGET, MSG_DRAW:
Changed card counts values from int8 to int32.
MSG_SELECT_SUM, MSG_SELECT_CARD, MSG_SELECT_TRIBUTE, MSG_SELECT_UNSELECT_CARD:
Changed max and min value from int8 to int32
MSG_DECK_TOP, MSG_CHAINING:
Changed card sequence from int8 to int32.
MSG_TAG_SWAP:
Changed card counts values from int8 to int32.
MSG_RELOAD_FIELD:
Changed card counts values from int16 to int32.