• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision281bbd9dda0a347695a9c33440b35eb11184a9c2 (tree)
Time2002-01-29 23:56:32
Authormogami <mogami@0568...>
Commitermogami

Log Message

スフセョ・゙・テ・ラノスシィ、ヌ。「テマキチ、ホヘ・タ霰ル、witch(feat)、ヌコル、ォ、ッス、、ソ。」

Change Summary

Incremental Difference

--- a/src/cave.c
+++ b/src/cave.c
@@ -877,8 +877,6 @@ void map_info(int y, int x, byte *ap, char *cp)
877877 /* Feature code */
878878 feat = c_ptr->feat;
879879
880- feat_priority = 10;
881-
882880 /* Floors (etc) */
883881 if ((feat <= FEAT_INVIS) || (feat == FEAT_DIRT) || (feat == FEAT_GRASS))
884882 {
@@ -1043,8 +1041,10 @@ void map_info(int y, int x, byte *ap, char *cp)
10431041 /* Unknown */
10441042 else
10451043 {
1044+ feat = FEAT_NONE;
1045+
10461046 /* Access darkness */
1047- f_ptr = &f_info[FEAT_NONE];
1047+ f_ptr = &f_info[feat];
10481048
10491049 /* Normal attr */
10501050 a = f_ptr->x_attr;
@@ -1242,16 +1242,15 @@ void map_info(int y, int x, byte *ap, char *cp)
12421242 /* "Simple Lighting" */
12431243 else
12441244 {
1245- /* Access feature */
1246- f_ptr = &f_info[feat];
1247-
12481245 /* Handle "blind" */
12491246 if (!(c_ptr->info & CAVE_MARK))
12501247 {
1251- /* Access darkness */
1252- f_ptr = &f_info[FEAT_NONE];
1248+ feat = FEAT_NONE;
12531249 }
12541250
1251+ /* Access feature */
1252+ f_ptr = &f_info[feat];
1253+
12551254 /* Normal attr */
12561255 a = f_ptr->x_attr;
12571256
@@ -1260,6 +1259,109 @@ void map_info(int y, int x, byte *ap, char *cp)
12601259 }
12611260 }
12621261
1262+ switch (feat)
1263+ {
1264+ case FEAT_NONE:
1265+ case FEAT_FLOOR:
1266+ case FEAT_INVIS:
1267+ case FEAT_TRAP_TRAPDOOR:
1268+ case FEAT_TRAP_PIT:
1269+ case FEAT_TRAP_SPIKED_PIT:
1270+ case FEAT_TRAP_POISON_PIT:
1271+ case FEAT_TRAP_TY_CURSE:
1272+ case FEAT_TRAP_TELEPORT:
1273+ case FEAT_TRAP_FIRE:
1274+ case FEAT_TRAP_ACID:
1275+ case FEAT_TRAP_SLOW:
1276+ case FEAT_TRAP_LOSE_STR:
1277+ case FEAT_TRAP_LOSE_DEX:
1278+ case FEAT_TRAP_LOSE_CON:
1279+ case FEAT_TRAP_BLIND:
1280+ case FEAT_TRAP_CONFUSE:
1281+ case FEAT_TRAP_POISON:
1282+ case FEAT_TRAP_SLEEP:
1283+ case FEAT_TRAP_TRAPS:
1284+ case FEAT_DIRT:
1285+ case FEAT_GRASS:
1286+ case FEAT_FLOWER:
1287+ case FEAT_DEEP_GRASS:
1288+ case FEAT_SWAMP:
1289+ case FEAT_TREES:
1290+ feat_priority = 0;
1291+ break;
1292+
1293+ case FEAT_OPEN:
1294+ case FEAT_BROKEN:
1295+ feat_priority = 5;
1296+ break;
1297+
1298+ case FEAT_SECRET:
1299+ case FEAT_RUBBLE:
1300+ case FEAT_MAGMA:
1301+ case FEAT_QUARTZ:
1302+ case FEAT_MAGMA_H:
1303+ case FEAT_QUARTZ_H:
1304+ case FEAT_WALL_EXTRA:
1305+ case FEAT_WALL_INNER:
1306+ case FEAT_WALL_OUTER:
1307+ case FEAT_WALL_SOLID:
1308+ case FEAT_DEEP_WATER:
1309+ case FEAT_SHAL_WATER:
1310+ case FEAT_DEEP_LAVA:
1311+ case FEAT_SHAL_LAVA:
1312+ case FEAT_DARK_PIT:
1313+ feat_priority = 6;
1314+ break;
1315+
1316+ case FEAT_MAGMA_K:
1317+ case FEAT_QUARTZ_K:
1318+ feat_priority = 7;
1319+ break;
1320+
1321+ case FEAT_MOUNTAIN:
1322+ case FEAT_PERM_EXTRA:
1323+ case FEAT_PERM_INNER:
1324+ case FEAT_PERM_OUTER:
1325+ case FEAT_PERM_SOLID:
1326+ feat_priority = 8;
1327+ break;
1328+
1329+ case FEAT_GLYPH:
1330+ case FEAT_MINOR_GLYPH:
1331+ case FEAT_MIRROR:
1332+ case FEAT_PATTERN_START:
1333+ case FEAT_PATTERN_1:
1334+ case FEAT_PATTERN_2:
1335+ case FEAT_PATTERN_3:
1336+ case FEAT_PATTERN_4:
1337+ case FEAT_PATTERN_END:
1338+ case FEAT_PATTERN_OLD:
1339+ case FEAT_PATTERN_XTRA1:
1340+ case FEAT_PATTERN_XTRA2:
1341+ feat_priority = 16;
1342+ break;
1343+
1344+ /* objects have feat_priority = 20 */
1345+ /* monsters have feat_priority = 30 */
1346+
1347+ case FEAT_LESS:
1348+ case FEAT_MORE:
1349+ case FEAT_QUEST_ENTER:
1350+ case FEAT_QUEST_EXIT:
1351+ case FEAT_QUEST_DOWN:
1352+ case FEAT_QUEST_UP:
1353+ case FEAT_LESS_LESS:
1354+ case FEAT_MORE_MORE:
1355+ case FEAT_TOWN:
1356+ case FEAT_ENTRANCE:
1357+ feat_priority = 35;
1358+ break;
1359+
1360+ default:
1361+ feat_priority = 10;
1362+ break;
1363+ }
1364+
12631365 /* Hack -- rare random hallucination, except on outer dungeon walls */
12641366 if (p_ptr->image && (c_ptr->feat < FEAT_PERM_SOLID) && !rand_int(256))
12651367 {
@@ -1317,7 +1419,7 @@ void map_info(int y, int x, byte *ap, char *cp)
13171419 /* Normal attr */
13181420 (*ap) = object_attr(o_ptr);
13191421
1320- feat_priority = 15;
1422+ feat_priority = 20;
13211423
13221424 /* Hack -- hallucination */
13231425 if (p_ptr->image) image_object(ap, cp);
@@ -1346,7 +1448,7 @@ void map_info(int y, int x, byte *ap, char *cp)
13461448 /* Desired char */
13471449 c = r_ptr->x_char;
13481450
1349- feat_priority = 20;
1451+ feat_priority = 30;
13501452
13511453 /* Mimics' colors vary */
13521454 if (strchr("\"!=", c) && !(r_ptr->flags1 & RF1_UNIQUE))
@@ -1481,7 +1583,7 @@ void map_info(int y, int x, byte *ap, char *cp)
14811583 {
14821584 monster_race *r_ptr = &r_info[0];
14831585
1484- feat_priority = 21;
1586+ feat_priority = 31;
14851587
14861588 /* Get the "player" attr */
14871589 a = r_ptr->x_attr;
@@ -2239,16 +2341,6 @@ static void display_shortened_item_name(object_type *o_ptr, int y)
22392341
22402342 /*
22412343 * Display a "small-scale" map of the dungeon in the active Term
2242- *
2243- * Note that the "map_info()" function must return fully colorized
2244- * data or this function will not work correctly.
2245- *
2246- * Note that this function must "disable" the special lighting
2247- * effects so that the "priority" function will work.
2248- *
2249- * Note the use of a specialized "priority" function to allow this
2250- * function to work with any graphic attr/char mappings, and the
2251- * attempts to optimize this function where possible.
22522344 */
22532345 void display_map(int *cy, int *cx)
22542346 {
Show on old repository browser