[airstrike] Changes in the Airstrike message handling
eero.tamminen at netsonic.fi
Fri Jan 7 13:19:53 EST 2005
I did some more finetuning in the message semantics:
* Changed names of a few messages to be more consistent:
MSG_NONE -> MSG_IGNORE (like earlier with signals before messages)
MSG_ISHARMLESS -> MSG_IS_HARMLESS
MSG_ACCEPT_BONUSES -> MSG_ACCEPTS_BONUS
MSG_DAMAGE -> MSG_SET_DAMAGE
* msg_ctrl() & sprite_ask() assert that only correct message types are given
to them. Additionally sprite_ask() asserts that sprite returns correct
message return value. This revealed a few inconsistencies in the message
helper functions usage, which I corrected (+ added msg_deactivate()).
* Grouped the messages in message_types.h according to their purpose and
* Typedeffed the message return value enum so that gcc reports warnings if
message handler doesn't return them (and it's easier to change it later).
Ulf, the old signals.h had a few things that are not in msg_types.h.
Are these not anymore useful:
I think MSG_DEBUG might be interesting now that we have a shell.
It might be also nice to have a message e.g. for:
When I add support for biplane bombs back to Airstrike, I'll do preliminary
suport for the content stuff i.e. biplane can have any content and
dropping drops whatever biplane has onboard...
More information about the airstrike