Ticket #19 (closed feature: fixed)

Opened 2 years ago

Last modified 5 months ago

Add trap detection indicator

Reported by: takkaria Assigned to:
Milestone: 3.1.0 Version:
Keywords: ui patch Cc:

Description

Patch available: http://entai.co.uk/angband/patches/dtrap-vanilla.v1.diff

Related to #18.

Attachments

dtrap-vanilla.v1.diff (11.9 kB) - added by takkaria on 06/16/07 08:05:53.
Old patch as a basis for future work

Change History

05/01/07 09:01:32 changed by takkaria

Related idea:

http://angband.oook.cz/forum/showpost.php?p=223&postcount=28

Shouldn't be so hard; just need yet another flag.

05/10/07 09:16:08 changed by andrewdoull

You've got 8 bits and 8 flags...

There are three ways to do this:

1. Change cave_info into a 16 bit array. Add CAVE_SAFE flags for where you have detected traps.

2. Add a second 8 bit play_info array. Separate out 'player'-related flags into the play_info array and keep 'cave'-related flags in the cave_info array. Add PLAY_SAFE flags for where you have detected traps.

3. Have dun_rooms[by][bx] array preserved after generating the dungeon, have a set of room_flags[n], and convert cave_info[y][x] & (CAVE_ICKY) into room_has_flag(ROOM_ICKY). This has the added benefit of allowing you to expand out to other types of room flags. ROOM_GREATER_VAULT springs to mind, for recording when you enter a vault as a part of the notes patch.

Add CAVE_SAFE flags for where you have detected traps.

3 is more of a hack than 1 or two, but cuts down on the total in memory (note you have to save very few of the cave_info flags, so on disk storage shouldn't be a problem). Note this saving applies only until you have to another flag (unless it's a room based flag like CAVE_GREATER_VAULT).

2 is better than 1 from the perspective of the code in update_view() relies on having very fast byte lookups, which may not be the case any more on modern processors.

06/03/07 12:03:07 changed by takkaria

  • keywords set to ui patch.
  • component changed from Interface to Main game.

06/16/07 08:05:53 changed by takkaria

  • attachment dtrap-vanilla.v1.diff added.

Old patch as a basis for future work

07/08/07 13:10:45 changed by takkaria

  • status changed from new to closed.
  • resolution set to fixed.

see [305].

04/28/08 23:27:04 changed by takkaria

  • milestone changed from 3.2.0 to 3.1.0.

Add/Change #19 (Add trap detection indicator)




Action