comparison rogue3/rogue.h @ 112:ee250e3646fd

Don't truncate player name in savefile name or log message. The player name is stored in whoami[], which is length 80 in most games (1024 in rogue5). Only the first 10 chars were used to create file_name, because that buffer is the same length. Increasing the size of file_name to 256 permits using all of whoami. The name is also no longer truncated to 20 chars when writing the log. All games should now be able to handle 79-character names without collisions. Anything more would break save compatibility.
author John "Elwin" Edwards
date Sun, 23 Mar 2014 21:27:14 -0700
parents a86ae56e1ed6
children e7862a021609
comparison
equal deleted inserted replaced
111:7f8f43943b1f 112:ee250e3646fd
426 extern coord delta; /* Change indicated to get_dir() */ 426 extern coord delta; /* Change indicated to get_dir() */
427 extern int dnum; /* Dungeon number */ 427 extern int dnum; /* Dungeon number */
428 extern int door_stop; /* Stop running when we pass a door */ 428 extern int door_stop; /* Stop running when we pass a door */
429 extern struct delayed_action d_list[20]; 429 extern struct delayed_action d_list[20];
430 extern int fight_flush; /* True if toilet input */ 430 extern int fight_flush; /* True if toilet input */
431 extern char file_name[80]; /* Save file name */ 431 extern char file_name[256]; /* Save file name */
432 extern int firstmove; /* First move after setting door_stop */ 432 extern int firstmove; /* First move after setting door_stop */
433 extern int food_left; /* Amount of food in hero's stomach */ 433 extern int food_left; /* Amount of food in hero's stomach */
434 extern char fruit[80]; /* Favorite fruit */ 434 extern char fruit[80]; /* Favorite fruit */
435 extern int fung_hit; /* Number of time fungi has hit */ 435 extern int fung_hit; /* Number of time fungi has hit */
436 extern int group; /* Current group number */ 436 extern int group; /* Current group number */