View Single Post
Old February 20, 2009, 21:19   #4
Join Date: Jan 2009
Posts: 657
PaulBlay is on a distinguished road
Originally Posted by Pete Mack View Post
Did you use the menus from cmd0.c? If not, you are probably duplicating functionality. (The point isn't that duplication is bad necessarily, but that if you ever want to add an inventory command, you will need to modify cmd3.c as well as cmd0.c. That is how "code [gets] all spread to hell and gone."
Hey, I said 'heck'.

It's handled within the display inventory / display equipment functions. It's probably a bit of a hack but you can see for yourself.

	/* PTB */ 
	/* Process '?' */
	if (p_ptr->command_new == '?')
		p_ptr->command_new = 0; 

		/* Show help screen */
		/* Save screen */

		/* Peruse the invent/equip help file */
		(void)show_file("invent.txt", NULL, 0, 0);

		/* Load screen */
	/* Hack -- Process "Escape" */
	else if (p_ptr->command_new == ESCAPE) /* PTB END */
The local store help is handled entirely within store.c so I don't see it's much different to that.
PaulBlay is offline   Reply With Quote