View Single Post
Old April 21, 2009, 19:38   #1
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road

command_cmd of the player_type structure is s16b, but as far as I can tell it is never assigned values outside of the char range. Is more expected from command_cmd in the future?

As it is there are places, like

	/* Check for a "prevention" inscription */
	verify_inscrip[1] = p_ptr->command_cmd;
where I'm not sure if it is safe, or appropriate, to 'cast' p_ptr->command_cmd to (char) or not. I've been going through my (mostly your ;-) code tweaking it to remove compiler warnings and this is one of the few left. I don't want to cast stuff unless I'm pretty sure the RHS is really not going to exceed the cast specified.

[EDIT] Incidentally I think it would be nice if you could make a clean break between 'key pressed' and 'command action'. You could make macros and keymappings easier to read and more flexible for a start.
Currently turning (Angband) Japanese.
PaulBlay is offline   Reply With Quote