annotate rogue5/score.h @ 227:696277507a2e

Rogue V4, V5: disable a cheat granting permanent monster detection. In these two games, a potion of monster detection turns on the player's SEEMONST flag. A fuse is set to call turn_see() to turn the flag back off. But the save and restore functions do not recognize turn_see() and fail to set the fuse up again. When restoring, Rogue V4 merely sets the fuse's function to NULL and leaves it burning. When it goes off, a segfault results. Rogue V5 clears all the fuse's fields, and the player retains the ability to see all monsters on the level. The save and restore code can now handle the fuse. The function used is a new wrapper, turn_see_off(), which should lead to less problems with daemons being multiple incompatible types. Also, Rogue V4 and Super-Rogue now properly clear unrecognized daemon and fuse slots when restoring a saved game.
author John "Elwin" Edwards
date Sat, 05 Mar 2016 12:10:20 -0500
parents f502bf60e6e4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
1 /*
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
2 * Score file structure
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
3 *
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
4 * @(#)score.h 4.6 (Berkeley) 02/05/99
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
5 *
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
6 * Rogue: Exploring the Dungeons of Doom
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
7 * Copyright (C) 1980-1983, 1985, 1999 Michael Toy, Ken Arnold and Glenn Wichman
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
8 * All rights reserved.
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
9 *
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
10 * See the file LICENSE.TXT for full copyright and licensing information.
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
11 */
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
12
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
13 struct sc_ent {
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
14 uid_t sc_uid;
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
15 int sc_score;
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
16 unsigned int sc_flags;
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
17 int sc_monster;
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
18 char sc_name[MAXSTR];
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
19 int sc_level;
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
20 unsigned int sc_time;
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
21 };
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
22
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
23 typedef struct sc_ent SCORE;
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
24
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
25 void rd_score(SCORE *top_ten);
f502bf60e6e4 Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
elwin
parents:
diff changeset
26 void wr_score(SCORE *top_ten);