Just a couple of minor points.
Might I suggest prev_stage and next_stage as being easier more consistent with current_stage (and easier to search on ;-)?
Initializing prev (or prev_stage, if you would ;-) to BIRTH_RESET would remove a compiler warning and I don't think it would have any other effect. (prev is set to BIRTH_RESET at the end of get_birth_command the first time it is called).
Code:
errr get_birth_command(bool wait) { static enum birth_stage current_stage = BIRTH_RESET; static enum birth_stage prev; static enum birth_stage roller = BIRTH_RESET; enum birth_stage next = current_stage;
Initializing prev (or prev_stage, if you would ;-) to BIRTH_RESET would remove a compiler warning and I don't think it would have any other effect. (prev is set to BIRTH_RESET at the end of get_birth_command the first time it is called).