comparison xrogue/help.c @ 300:0250220d8cdd

Fix an assortment of compiler warnings. A few potential bugs were removed in the process. Much code cleanup remains to be done.
author John "Elwin" Edwards
date Fri, 22 Nov 2019 21:18:27 -0500
parents f54901b9c39b
children
comparison
equal deleted inserted replaced
299:74351bf23e5e 300:0250220d8cdd
158 static char *game_begin ="To be updated..."; 158 static char *game_begin ="To be updated...";
159 */ 159 */
160 160
161 /* help list */ 161 /* help list */
162 static struct h_list helpstr[] = { 162 static struct h_list helpstr[] = {
163 '?', " Print help", 163 { '?', " Print help" },
164 '/', " Identify object", 164 { '/', " Identify object" },
165 '=', " Identify a screen character", 165 { '=', " Identify a screen character" },
166 ' ', "", 166 { ' ', "" },
167 'h', " Move left", 167 { 'h', " Move left" },
168 'j', " Move down", 168 { 'j', " Move down" },
169 'k', " Move up", 169 { 'k', " Move up" },
170 'l', " Move right", 170 { 'l', " Move right" },
171 'y', " Move up and left", 171 { 'y', " Move up and left" },
172 'u', " Move up and right", 172 { 'u', " Move up and right" },
173 'b', " Move down and left", 173 { 'b', " Move down and left" },
174 'n', " Move down and right", 174 { 'n', " Move down and right" },
175 'H', " Run left", 175 { 'H', " Run left" },
176 'J', " Run down", 176 { 'J', " Run down" },
177 'K', " Run up", 177 { 'K', " Run up" },
178 'L', " Run right", 178 { 'L', " Run right" },
179 'Y', " Run up & left", 179 { 'Y', " Run up & left" },
180 'U', " Run up & right", 180 { 'U', " Run up & right" },
181 'B', " Run down & left", 181 { 'B', " Run down & left" },
182 'N', " Run down & right", 182 { 'N', " Run down & right" },
183 ' ', "", 183 { ' ', "" },
184 '>', " Go down a staircase", 184 { '>', " Go down a staircase" },
185 '<', " Go up a staircase", 185 { '<', " Go up a staircase" },
186 '\\', " Game descriptions", 186 { '\\', " Game descriptions" },
187 '.', " Rest for a while", 187 { '.', " Rest for a while" },
188 '*', " Count gold pieces", 188 { '*', " Count gold pieces" },
189 'a', " Affect the undead", 189 { 'a', " Affect the undead" },
190 'A', " Choose artifact (equipage)", 190 { 'A', " Choose artifact (equipage)" },
191 'c', " Chant a mantra", 191 { 'c', " Chant a mantra" },
192 'C', " Cast a spell", 192 { 'C', " Cast a spell" },
193 'd', " Drop something", 193 { 'd', " Drop something" },
194 'D', " Dip something (into a pool)", 194 { 'D', " Dip something (into a pool)" },
195 'e', " Eat food or fruit", 195 { 'e', " Eat food or fruit" },
196 'f', "<dir> Forward until find something", 196 { 'f', "<dir> Forward until find something" },
197 'F', " Frighten a monster", 197 { 'F', " Frighten a monster" },
198 'g', " Give food to monster", 198 { 'g', " Give food to monster" },
199 'G', " Sense for gold", 199 { 'G', " Sense for gold" },
200 'i', " Inventory", 200 { 'i', " Inventory" },
201 'I', " Inventory (single item)", 201 { 'I', " Inventory (single item)" },
202 'm', " Mark an object (specific)", 202 { 'm', " Mark an object (specific)" },
203 'o', " Examine and/or set options", 203 { 'o', " Examine and/or set options" },
204 'O', " Character type and quest item", 204 { 'O', " Character type and quest item" },
205 'p', " Pray to the powers that be", 205 { 'p', " Pray to the powers that be" },
206 'P', " Pick up object(s)", 206 { 'P', " Pick up object(s)" },
207 'q', " Quaff a potion", 207 { 'q', " Quaff a potion" },
208 'Q', " Quit the game", 208 { 'Q', " Quit the game" },
209 'r', " Read a scroll", 209 { 'r', " Read a scroll" },
210 's', " Search for a trap/secret door", 210 { 's', " Search for a trap/secret door" },
211 'S', " Save your game", 211 { 'S', " Save your game" },
212 't', "<dir> Throw something", 212 { 't', "<dir> Throw something" },
213 'T', " Take off something", 213 { 'T', " Take off something" },
214 'v', " Print program version", 214 { 'v', " Print program version" },
215 'w', " Wield a weapon", 215 { 'w', " Wield a weapon" },
216 'W', " Wear something", 216 { 'W', " Wear something" },
217 'X', " Sense for traps", 217 { 'X', " Sense for traps" },
218 'z', "<dir> Zap a wand or staff", 218 { 'z', "<dir> Zap a wand or staff" },
219 ' ', "", 219 { ' ', "" },
220 '^', " Set a trap", 220 { '^', " Set a trap" },
221 '$', " Price an item (trading post)", 221 { '$', " Price an item (trading post)" },
222 '#', " Buy an item (trading post)", 222 { '#', " Buy an item (trading post)" },
223 '%', " Sell an item (trading post)", 223 { '%', " Sell an item (trading post)" },
224 '!', " Shell escape", 224 { '!', " Shell escape" },
225 ESC, " Cancel command (Esc)", 225 { ESC, " Cancel command (Esc)" },
226 ' ', "", 226 { ' ', "" },
227 CTRL('B'), " Current score (if you win)", 227 { CTRL('B'), " Current score (if you win)" },
228 CTRL('E'), " Current food level", 228 { CTRL('E'), " Current food level" },
229 CTRL('L'), " Redraw the screen", 229 { CTRL('L'), " Redraw the screen" },
230 CTRL('N'), " Name an object or a monster", 230 { CTRL('N'), " Name an object or a monster" },
231 CTRL('O'), " Character affect status", 231 { CTRL('O'), " Character affect status" },
232 CTRL('R'), " Repeat last message", 232 { CTRL('R'), " Repeat last message" },
233 CTRL('T'), "<dir> Take (steal) from (direction)", 233 { CTRL('T'), "<dir> Take (steal) from (direction)" },
234 CTRL('U'), " Use a magic item", 234 { CTRL('U'), " Use a magic item" },
235 0, 0 235 { 0, "" }
236 } ; 236 } ;
237 237
238 /* wizard help list */ 238 /* wizard help list */
239 static struct h_list wiz_help[] = { 239 static struct h_list wiz_help[] = {
240 ' ', "", 240 { ' ', "" },
241 '+', " Random fortunes", 241 { '+', " Random fortunes" },
242 'M', " Make an object", 242 { 'M', " Make an object" },
243 'V', " Display vlevel and turns", 243 { 'V', " Display vlevel and turns" },
244 CTRL('A'), " System activity", 244 { CTRL('A'), " System activity" },
245 CTRL('C'), " Move to another dungeon level", 245 { CTRL('C'), " Move to another dungeon level" },
246 CTRL('D'), " Go down 1 dungeon level", 246 { CTRL('D'), " Go down 1 dungeon level" },
247 CTRL('F'), " Display the entire level", 247 { CTRL('F'), " Display the entire level" },
248 CTRL('G'), " Charge wands and staffs", 248 { CTRL('G'), " Charge wands and staffs" },
249 CTRL('H'), " Jump 9 experience levels", 249 { CTRL('H'), " Jump 9 experience levels" },
250 CTRL('I'), " Inventory of level", 250 { CTRL('I'), " Inventory of level" },
251 CTRL('J'), " Teleport somewhere", 251 { CTRL('J'), " Teleport somewhere" },
252 CTRL('K'), " Identify an object", 252 { CTRL('K'), " Identify an object" },
253 CTRL('M'), " Recharge wand or staff", 253 { CTRL('M'), " Recharge wand or staff" },
254 CTRL('P'), " Toggle wizard status", 254 { CTRL('P'), " Toggle wizard status" },
255 CTRL('X'), " Detect monsters", 255 { CTRL('X'), " Detect monsters" },
256 CTRL('Y'), " Display food levels", 256 { CTRL('Y'), " Display food levels" },
257 0, 0 257 { 0, "" }
258 }; 258 };
259 259
260 /* item help list */ 260 /* item help list */
261 static struct item_list item_help[] = { 261 static struct item_list item_help[] = {
262 '@', " You (visible)", 262 { '@', " You (visible)" },
263 '_', " You (invisible)", 263 { '_', " You (invisible)" },
264 ' ', "", 264 { ' ', "" },
265 ':', " Food ration or fruit (eat)", 265 { ':', " Food ration or fruit (eat)" },
266 '!', " Potion (quaff)", 266 { '!', " Potion (quaff)" },
267 '?', " Scroll (read)", 267 { '?', " Scroll (read)" },
268 '=', " Ring (wear)", 268 { '=', " Ring (wear)" },
269 ')', " Weapon (wield)", 269 { ')', " Weapon (wield)" },
270 ']', " Armor (wear)", 270 { ']', " Armor (wear)" },
271 '/', " Wand or staff (zap)", 271 { '/', " Wand or staff (zap)" },
272 ';', " Magic item (use)", 272 { ';', " Magic item (use)" },
273 ',', " Artifact (quest item)", 273 { ',', " Artifact (quest item)" },
274 '*', " Gold or zapped missile", 274 { '*', " Gold or zapped missile" },
275 ' ', "", 275 { ' ', "" },
276 '$', " Magical item in room", 276 { '$', " Magical item in room" },
277 '>', " Blessed magical item", 277 { '>', " Blessed magical item" },
278 '<', " Cursed magical item", 278 { '<', " Cursed magical item" },
279 ' ', " ", 279 { ' ', " " },
280 '`', " Dart trap", 280 { '`', " Dart trap" },
281 '{', " Arrow trap", 281 { '{', " Arrow trap" },
282 '}', " Bear trap", 282 { '}', " Bear trap" },
283 '~', " Teleport trap", 283 { '~', " Teleport trap" },
284 '$', " Sleeping gas trap", 284 { '$', " Sleeping gas trap" },
285 '>', " Trap door", 285 { '>', " Trap door" },
286 '<', " Outer region entrance", 286 { '<', " Outer region entrance" },
287 '\'', " Maze entrance", 287 { '\'', " Maze entrance" },
288 '^', " Trading post entrance", 288 { '^', " Trading post entrance" },
289 '"', " Magic pool or lake", 289 { '"', " Magic pool or lake" },
290 ' ', " Solid rock or mountain", 290 { ' ', " Solid rock or mountain" },
291 '.', " Floor of a room or meadow", 291 { '.', " Floor of a room or meadow" },
292 '%', " Stairs (up or down)", 292 { '%', " Stairs (up or down)" },
293 '+', " Doorway", 293 { '+', " Doorway" },
294 '&', " Secret doorway", 294 { '&', " Secret doorway" },
295 '#', " Passage between rooms", 295 { '#', " Passage between rooms" },
296 '\\', " Forest", 296 { '\\', " Forest" },
297 HORZWALL, " Horizontal wall of a room", 297 { HORZWALL, " Horizontal wall of a room" },
298 VERTWALL, " Vertical wall of a room", 298 { VERTWALL, " Vertical wall of a room" },
299 0, 0 299 { 0, "" }
300 }; 300 };
301 301
302 void 302 void
303 ident_hero(void) 303 ident_hero(void)
304 { 304 {