More progress, I think...
authorMartin Read <martin@blackswordsonics.com>
Wed, 2 Oct 2013 19:50:42 +0000 (20:50 +0100)
committerMartin Read <martin@blackswordsonics.com>
Wed, 2 Oct 2013 19:50:42 +0000 (20:50 +0100)
combat.hh
display-nc.cc
map.cc
map.hh
objects.hh
permobj.cc
rng.cc
u.cc
victrix-abyssi.hh

index 149db04..33f4ce7 100644 (file)
--- a/combat.hh
+++ b/combat.hh
@@ -2,7 +2,7 @@
  * \brief Combat functions header
  */
 
-/* Copyright 2005-2012 Martin Read
+/* Copyright 2005-2013 Martin Read
  * 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
index fc8831c..faa6524 100644 (file)
@@ -58,7 +58,7 @@ int map_updated;
 int show_terrain;
 int hard_redraw;
 
-attr_t colour_attrs[15] =
+attr_t colour_attrs[1 + LAST_COLOUR] =
 {
     0,
     0 | A_BOLD,
@@ -74,12 +74,15 @@ attr_t colour_attrs[15] =
     0 | A_BOLD,
     0 | A_BOLD,
     0 | A_BOLD,
-    0 | A_BOLD
+    0 | A_BOLD,
+    0,
+    A_BOLD,
+    A_BOLD
 };
 
-short colour_cpairs[15] =
+short colour_cpairs[1 + LAST_COLOUR] =
 {
-    0,
+    Gcol_l_grey,
     Gcol_d_grey,
     Gcol_red,
     Gcol_blue,
@@ -87,13 +90,17 @@ short colour_cpairs[15] =
     Gcol_purple,
     Gcol_brown,
     Gcol_cyan,
-    0,
+    Gcol_l_grey,
     Gcol_red,
     Gcol_blue,
     Gcol_green,
     Gcol_purple,
     Gcol_brown,
     Gcol_cyan,
+    /* Fancy colours */
+    Gcol_cyan, // Iron = dark cyan
+    Gcol_brown, // Gold = yellow
+    Gcol_l_grey // Silver = white
 };
 
 wchar_t terrain_wchars[NUM_TERRAINS] = 
diff --git a/map.cc b/map.cc
index ab9ef86..2b96705 100644 (file)
--- a/map.cc
+++ b/map.cc
@@ -315,7 +315,7 @@ static void build_level_shrine(void)
                 lvl.set_terrain_at(c, FLOOR);
                 break;
             case '#':
-                lvl.set_terrain_at(c, HARDWALL);
+                lvl.set_terrain_at(c, MASONRY_WALL);
                 break;
             case '+':
                 lvl.set_terrain_at(c, DOOR);
@@ -383,7 +383,6 @@ static int intrusion_write(Coord c, void *data)
         return 2;
     }
     lvl.set_flags_at(c, MAPFLAG_HARDWALL);
-    lvl.set_terrain_at(c, HARDWALL);
     return 1;
 }
 
@@ -514,6 +513,26 @@ void look_around_you(void)
     touch_back_buffer();
 }
 
+Terrain_props terrain_props[NUM_TERRAINS] = 
+{
+    { "cave wall", '#', "█", Gcol_brown, TFLAG_opaque | TFLAG_block_beings | TFLAG_block_missile },
+    { "masonry wall", '#', "█", Gcol_l_grey, TFLAG_opaque | TFLAG_block_beings | TFLAG_block_missile },
+    { "amethyst wall", '#', "█", Gcol_purple, TFLAG_opaque | TFLAG_block_beings | TFLAG_block_missile },
+    { "iron wall", '#', "█", Gcol_purple, TFLAG_opaque | TFLAG_block_beings | TFLAG_block_missile },
+    { "skin wall", '#', "█", Gcol_l_purple, TFLAG_opaque | TFLAG_block_beings | TFLAG_block_missile },
+    { "bone wall", '#', "█", Gcol_white, TFLAG_opaque | TFLAG_block_beings | TFLAG_block_missile },
+    { "door", '+', "+", Gcol_l_grey, TFLAG_opaque | TFLAG_block_missile },
+    { "floor", '.', "·", Gcol_l_grey, 0 },
+    { "amethyst floor", '.', "·", Gcol_purple, 0 },
+    { "iron floor", '.', "·", Gcol_iron, 0 },
+    { "skin floor", '.', "·", Gcol_l_purple, 0 },
+    { "bone floor", '.', "·", Gcol_white, 0 },
+    { "altar", '_', "_", Gcol_l_grey, 0 },
+    { "stairs", '>', ">", Gcol_l_grey, 0 },
+    { "lava", '}', "}", Gcol_red, TFLAG_fire_hazard },
+    { "water", '}', "}", Gcol_blue, TFLAG_drown_hazard },
+};
+
 bool terrain_opacity[NUM_TERRAINS] =
 {
     true, true, true, false,
@@ -522,7 +541,7 @@ bool terrain_opacity[NUM_TERRAINS] =
 
 bool terrain_is_opaque(Terrain terr)
 {
-    return terrain_opacity[terr];
+    return terrain_props[terr].flags & TFLAG_opaque;
 }
 
 /* map.c */
diff --git a/map.hh b/map.hh
index 5ecf5f6..b364121 100644 (file)
--- a/map.hh
+++ b/map.hh
@@ -36,7 +36,7 @@
 /* XXX enum terrain_num */
 enum Terrain {
     // cheap hack: opaque terrain goes first, and walls very first.
-    WALL = 0, HARDWALL, DOOR, FLOOR, ALTAR, STAIRS, LAVA, WATER
+    WALL = 0, MASONRY_WALL, AMETHYST_WALL, IRON_WALL, SKIN_WALL, BONE_WALL, DOOR, FLOOR, AMETHYST_FLOOR, IRON_FLOOR, SKIN_FLOOR, BONE_FLOOR, ALTAR, STAIRS, LAVA, WATER
 };
 #define MAX_TERRAIN (WATER)
 #define NUM_TERRAINS (1 + MAX_TERRAIN)
@@ -71,6 +71,24 @@ struct shrine
     const char *grid[SHRINE_HEIGHT];
 };
 
+struct Terrain_props
+{
+    const char *name; // UTF-8 English
+    char ascii;
+    const char * unicode; // UTF-8
+    Gamecolour colour;
+    uint32_t flags;
+};
+
+#define TFLAG_opaque        0x00000001u
+#define TFLAG_block_beings  0x00000002u
+#define TFLAG_block_ether   0x00000004u
+#define TFLAG_block_missile 0x00000008u
+#define TFLAG_fire_hazard   0x00010000u
+#define TFLAG_fall_hazard   0x00020000u
+#define TFLAG_drown_hazard  0x00040000u
+#define TFLAG_flammable     0x10000000u
+
 /* XXX map.c data and funcs*/
 struct Level
 {
index cdaee32..35908d5 100644 (file)
@@ -41,8 +41,9 @@ enum poclass_num {
 enum Permobj_nums
 {
     // weapons
-    PO_DAGGER=0, PO_LONG_SWORD, PO_MACE, PO_RUNESWORD, PO_BOW, PO_CROSSBOW,
-    PO_THUNDERBOW, PO_TORMENTORS_LASH, PO_STAFF_OF_FIRE,
+    PO_DAGGER=0, PO_LONG_SWORD, PO_MACE, PO_RUNESWORD, PO_TORMENTORS_LASH,
+    PO_STAFF_OF_FIRE,
+    PO_BOW, PO_CROSSBOW, PO_THUNDERBOW,
     // potions
     PO_POT_HEAL, PO_POT_BODY, PO_POT_AGILITY, PO_POT_RESTORATION,
     // flasks
@@ -86,6 +87,7 @@ struct permobj {
     int rarity; /* Chance in 100 of being thrown away and regen'd. */
     char sym;   /* ASCII */
     const char *unicode; /* UTF-8 */
+    Gamecolour colour;
     int power;  /* AC for armour; damage for weapons; colour/title for
                  * scrolls and potions and rings and such. */
     int power2; /* evasion for armour */
index 8c2d1cf..2da6bd5 100644 (file)
@@ -1,7 +1,8 @@
 /* \file permobj.cc
  * \brief object database for Victrix Abyssi
  */
-/* Copyright 2005-2012 Martin Read
+
+/* Copyright 2005-2013 Martin Read
  * 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 struct permobj permobjs[NUM_OF_PERMOBJS] =
 {
-    { "dagger", "daggers", "A long knife, designed for stabbing.", POCLASS_WEAPON, 25, ')', ")", 4, 0, 1 },
-    { "long sword", "long swords", "A steel sword of simple but sturdy construction; the\nblade is three feet long.", POCLASS_WEAPON, 30, ')', ")", 10, 0, 4 },
-    { "mace", "maces", "A flanged lump of iron on an iron haft.", POCLASS_WEAPON, 30, ')', ")", 7, 0, 2 },
-    { "runesword", "runeswords", "An eerily glowing sword engraved with many strange\nrunes.", POCLASS_WEAPON, 80, ')', ")", 20, 0, 12 },
-    { "bow", "bows", "A recurve composite bow.", POCLASS_WEAPON, 45, '(', "(", 8, 0, 1 },
-    { "crossbow", "crossbows", "A crossbow.", POCLASS_WEAPON, 70, '(', "(", 16, 0, 6 },
-    { "thunderbow", "thunderbows", "A recurve composite bow decorated with eldritch signs.\nArrows fired with this bow strike with staggering force.", POCLASS_WEAPON, 70, '(', "(", 16, 0, 30 },
-     { "tormentor's lash", "tormentor's lash", "A bone-handled whip that crackles with malefic energies.", POCLASS_WEAPON, 80, ')', ")", 20, 0, 30 },
-    { "staff of fire", "staff of fire", "A jet-black staff with a glowing ruby in its headpiece.", POCLASS_WEAPON, 80, ')', ")", 10, 0, 20 },
-    { "healing potion", "healing potions", "This magic elixir restores some lost hit points.", POCLASS_POTION, 10, '!', "!", 0, 0, 1 },
-    { "body potion", "body potions", "This magic elixir will improve your physique.", POCLASS_POTION, 70, '!', "!", 0, 0, 5 },
-    { "agility potion", "agility potions", "This magic elixir will sharpen your reflexes.", POCLASS_POTION, 70, '!', "!", 0, 0, 5 },
-    { "restoration potion", "restoration potions", "This magic elixir cures temporary damage to one's\nabilities.", POCLASS_POTION, 70, '!', "!", 0, 0, 1 },
-    { "poison flask", "poison flask", "This fragile bottle is full of contact poison.", POCLASS_FLASK, 10, '~', "~", 0, 0, 1 },
-    { "fire flask", "fire flasks", "The volatile, phosphorus-laced liquid in this sealed\nflask will ignite spontaneously when exposed to the air.", POCLASS_FLASK, 40, '~', "~", 0, 0, 20 },
-    { "weakness flask", "weakness flasks", "Dousing the living in this vile liquid causes immediate\nand severe physical degeneration.", POCLASS_FLASK, 40, '~', "~", 0, 0, 20 },
-    { "teleport scroll", "teleport scrolls", "Reading this scroll will teleport you to a random\nlocation.", POCLASS_SCROLL, 40, '?', "?", 0, 0, 1 },
-    { "fire scroll", "fire scrolls", "Reading this scroll will engulf all nearby creatures\n(including you) in flames.", POCLASS_SCROLL, 30, '?', "?", 0, 0, 1 },
-    { "protection scroll", "protection scrolls", "Reading this scroll will dispel any curses afflicting\nyou and protect you from curses for a time.", POCLASS_SCROLL, 80, '?', "?", 0, 0, 8 },
-    { "leather armour", "suits of leather armour", "A heavy leather jerkin and breeches, providing some\nprotection.", POCLASS_ARMOUR, 25, '[', "[", 3, 10, 1 },
-    { "chainmail", "suits of chainmail", "A suit of interlocking metal rings, providing better\nprotection than leather.", POCLASS_ARMOUR, 30, '[', "[", 6, 25, 3 },
-    { "plate armour", "suits of plate armour", "A suit of steel plates, providing better protection than\nchainmail.", POCLASS_ARMOUR, 40, '[', "[", 10, 40, 6 },
-    { "mage armour", "suits of mage armour", "A suit of glowing steel plates bearing enchantments of\ndefence.", POCLASS_ARMOUR, 70, '[', "[", 15, 40, 12 },
-    { "mundane robe", "mundane robes", "A simple woolen robe. It's better protection than your\nskin, but not by much.", POCLASS_ARMOUR, 50, '[', "[", 2, 5, 1 },
-    { "robe of swiftness", "robes of swiftness", "A simple woolen robe that bears a potent enchantment,\nprotecting the wearer and making him unnaturally swift.", POCLASS_ARMOUR, 70, '[', "[", 8, 0, 8 },
-    { "robe of shadows", "robes of shadows", "A simple woolen robe that bears an awesome enchantment,\nprotecting the wearer better than steel plate.", POCLASS_ARMOUR, 90, '[', "[", 14, -15, 18 },
-    { "dragonhide armour", "suits of dragonhide armour", "The skin of a dragon, formed into a jerkin and breeches;\nit turns blows like steel plate and turns away\nflames.", POCLASS_ARMOUR, 90, '[', "[", 12, 10, 21 },
-    { "meteoric plate armour", "suits of meteoric plate armour", "This plate armour has been forged out of metal taken from\na fallen star.", POCLASS_ARMOUR, 90, '[', "[", 18, 40, 27 },
-    { "sacred chainmail", "suits of sacred chainmail", "This suit of interlocking rings has been consecrated to\nthe gods of the Light.", POCLASS_ARMOUR, 90, '[', "[", 15, 25, 24 },
-    { "ragged shift", "ragged shifts", "This sorry-looking collection of rags is all that remains\nof an imposing armoured dress.", POCLASS_ARMOUR, 100, '[', "[", 1, 0, 1 },
-    { "battle ballgown", "battle ballgowns", "Partially armoured dresses such as this are a\ntraditional part of a princess's wardrobe.", POCLASS_ARMOUR, 95, '[', "[", 3, 10, 1 },
-    { "imperatrix gown", "imperatrix gowns", "This armoured, enchanted, and elaborately decorated dress\nwould be worthy of an empress regnant.", POCLASS_ARMOUR, 95, '[', "[", 15, 10, 24 },
-    { "set of ribbons", "sets of ribbons", "These ribbons, arranged as if to form an alleged\ngarment, make your fingers tingle with magic.", POCLASS_ARMOUR, 90, '[', "[", 15, -15, 30 },
-    { "regeneration ring", "regeneration rings", "This magical ring increases the wearer's healing rate,\nbut also increases the rate at which they must consume\nfood.", POCLASS_RING, 70, '=', "=", 0, 0, 1 },
-    { "fire ring", "fire rings", "This magical ring protects the wearer from mundane and\nmagical fire, and imbues their blows in combat with the\npower of fire.", POCLASS_RING, 50, '=', "=", 0, 0, 1 },
-    { "vampire ring", "vampire rings", "This magical ring protects the wearer from necromantic\nenergies, and imbues their blows in combat with such\nenergies as well.", POCLASS_RING, 90, '=', "=", 0, 0, 12 },
-    { "frost ring", "frost rings", "This magical ring protects the wearer from mundane and\nmagical cold, and imbues their blows in combat with the\npower of cold. Rumour suggests it might also allow walking\non water.\n", POCLASS_RING, 40, '=', "=", 0, 0, 1 },
-    { "teleport ring", "teleport rings", "This magical ring allows the wearer to teleport for a\nmodest cost in nutrition.", POCLASS_RING, 70, '=', "=", 0, 0, 1 },
-    { "iron ration", "iron rations", "A parcel of hardtack and beef jerky. Dull but nutritious.", POCLASS_FOOD, 75, '%', "%", 0, 0, 1 },
-    { "parcel of dried fruit", "parcels of dried fruit", "A parcel of mixed dried fruit. It sure beats hardtack\nand beef jerky.", POCLASS_FOOD, 75, '%', "%", 0, 0, 1 },
-    { "round of elven waybread", "rounds of elven waybread", "A tasty, filling, nutritious piece of elven waybread.", POCLASS_FOOD, 85, '%', "%", 0, 0, 1 },
-    { "devil spleen", "devil spleens", "A weirdly pulsing organ ripped from the torso of a devil.", POCLASS_FOOD, 100, '%', "%", 0, 0, 1 }
+    { "dagger", "daggers", "A long knife, designed for stabbing.", POCLASS_WEAPON, 25, ')', ")", Gcol_iron, 4, 0, 1 },
+    { "long sword", "long swords", "A steel sword of simple but sturdy construction; the\nblade is three feet long.", POCLASS_WEAPON, 30, ')', ")", Gcol_iron, 10, 0, 4 },
+    { "mace", "maces", "A flanged lump of iron on an iron haft.", POCLASS_WEAPON, 30, ')', ")", Gcol_iron, 7, 0, 2 },
+    { "runesword", "runeswords", "An eerily glowing sword engraved with many strange\nrunes.", POCLASS_WEAPON, 80, ')', ")", Gcol_l_cyan, 20, 0, 12 },
+     { "tormentor's lash", "tormentor's lash", "A bone-handled whip that crackles with malefic energies.", POCLASS_WEAPON, 80, ')', ")", Gcol_white, 20, 0, 30 },
+    { "staff of fire", "staff of fire", "A jet-black staff with a glowing ruby in its headpiece.", POCLASS_WEAPON, 80, ')', ")", Gcol_d_grey, 10, 0, 20 },
+    { "bow", "bows", "A recurve composite bow.", POCLASS_WEAPON, 45, '(', "(", Gcol_brown, 8, 0, 1 },
+    { "crossbow", "crossbows", "A crossbow.", POCLASS_WEAPON, 70, '(', "(", Gcol_brown, 16, 0, 6 },
+    { "thunderbow", "thunderbows", "A recurve composite bow decorated with eldritch signs.\nArrows fired with this bow strike with staggering force.", POCLASS_WEAPON, 70, '(', "(", Gcol_l_cyan, 16, 0, 30 },
+    { "healing potion", "healing potions", "This magic elixir restores some lost hit points.", POCLASS_POTION, 10, '!', "!", Gcol_l_grey, 0, 0, 1 },
+    { "body potion", "body potions", "This magic elixir will improve your physique.", POCLASS_POTION, 70, '!', "!", Gcol_l_grey, 0, 0, 5 },
+    { "agility potion", "agility potions", "This magic elixir will sharpen your reflexes.", POCLASS_POTION, 70, '!', "!", Gcol_l_grey, 0, 0, 5 },
+    { "restoration potion", "restoration potions", "This magic elixir cures temporary damage to one's\nabilities.", POCLASS_POTION, 70, '!', "!", Gcol_l_grey, 0, 0, 1 },
+    { "poison flask", "poison flask", "This fragile bottle is full of contact poison.", POCLASS_FLASK, 10, '~', "~", Gcol_l_grey, 0, 0, 1 },
+    { "fire flask", "fire flasks", "The volatile, phosphorus-laced liquid in this sealed\nflask will ignite spontaneously when exposed to the air.", POCLASS_FLASK, 40, '~', "~", Gcol_l_grey, 0, 0, 20 },
+    { "weakness flask", "weakness flasks", "Dousing the living in this vile liquid causes immediate\nand severe physical degeneration.", POCLASS_FLASK, 40, '~', "~", Gcol_l_grey, 0, 0, 20 },
+    { "teleport scroll", "teleport scrolls", "Reading this scroll will teleport you to a random\nlocation.", POCLASS_SCROLL, 40, '?', "?", Gcol_l_grey, 0, 0, 1 },
+    { "fire scroll", "fire scrolls", "Reading this scroll will engulf all nearby creatures\n(including you) in flames.", POCLASS_SCROLL, 30, '?', "?", Gcol_l_grey, 0, 0, 1 },
+    { "protection scroll", "protection scrolls", "Reading this scroll will dispel any curses afflicting\nyou and protect you from curses for a time.", POCLASS_SCROLL, 80, '?', "?", Gcol_l_grey, 0, 0, 8 },
+    { "leather armour", "suits of leather armour", "A heavy leather jerkin and breeches, providing some\nprotection.", POCLASS_ARMOUR, 25, '[', "[", Gcol_brown, 3, 10, 1 },
+    { "chainmail", "suits of chainmail", "A suit of interlocking metal rings, providing better\nprotection than leather.", POCLASS_ARMOUR, 30, '[', "[", Gcol_iron, 6, 25, 3 },
+    { "plate armour", "suits of plate armour", "A suit of steel plates, providing better protection than\nchainmail.", POCLASS_ARMOUR, 40, '[', "[", Gcol_iron, 10, 40, 6 },
+    { "mage armour", "suits of mage armour", "A suit of glowing steel plates bearing enchantments of\ndefence.", POCLASS_ARMOUR, 70, '[', "[", Gcol_l_cyan, 15, 40, 12 },
+    { "mundane robe", "mundane robes", "A simple woolen robe. It's better protection than your\nskin, but not by much.", POCLASS_ARMOUR, 50, '[', "[", Gcol_green, 2, 5, 1 },
+    { "robe of swiftness", "robes of swiftness", "A simple woolen robe that bears a potent enchantment,\nprotecting the wearer and making him unnaturally swift.", POCLASS_ARMOUR, 70, '[', "[", Gcol_green, 8, 0, 8 },
+    { "robe of shadows", "robes of shadows", "A dusky grey woolen robe that bears an awesome enchantment,\nprotecting the wearer better than steel plate.", POCLASS_ARMOUR, 90, '[', "[", Gcol_d_grey, 14, -15, 18 },
+    { "dragonhide armour", "suits of dragonhide armour", "The skin of a dragon, formed into a jerkin and breeches;\nit turns blows like steel plate and turns away\nflames.", POCLASS_ARMOUR, 90, '[', "[", Gcol_red, 12, 10, 21 },
+    { "meteoric plate armour", "suits of meteoric plate armour", "This plate armour has been forged out of metal taken from\na fallen star.", POCLASS_ARMOUR, 90, '[', "[", Gcol_iron, 18, 40, 27 },
+    { "sacred chainmail", "suits of sacred chainmail", "This suit of interlocking rings has been consecrated to\nthe gods of the Light.", POCLASS_ARMOUR, 90, '[', "[", Gcol_white, 15, 25, 24 },
+    { "ragged shift", "ragged shifts", "This sorry-looking collection of rags is all that remains\nof an imposing armoured dress.", POCLASS_ARMOUR, 100, '[', "[", Gcol_l_grey, 1, 0, 1 },
+    { "battle ballgown", "battle ballgowns", "Partially armoured dresses such as this are a\ntraditional part of a princess's wardrobe.", POCLASS_ARMOUR, 95, '[', "[", Gcol_green, 3, 10, 1 },
+    { "imperatrix gown", "imperatrix gowns", "This armoured, enchanted, and elaborately decorated dress\nwould be worthy of an empress regnant.", POCLASS_ARMOUR, 95, '[', "[", Gcol_purple, 15, 10, 24 },
+    { "set of ribbons", "sets of ribbons", "These ribbons, arranged as if to form an alleged\ngarment, make your fingers tingle with magic.", POCLASS_ARMOUR, 90, '[', "[", Gcol_l_purple, 15, -15, 30 },
+    { "regeneration ring", "regeneration rings", "This magical ring increases the wearer's healing rate,\nbut also increases the rate at which they must consume\nfood.", POCLASS_RING, 70, '=', "=", Gcol_l_grey, 0, 0, 1 },
+    { "fire ring", "fire rings", "This magical ring protects the wearer from mundane and\nmagical fire, and imbues their blows in combat with the\npower of fire.", POCLASS_RING, 50, '=', "=", Gcol_l_grey, 0, 0, 1 },
+    { "vampire ring", "vampire rings", "This magical ring protects the wearer from necromantic\nenergies, and imbues their blows in combat with such\nenergies as well.", POCLASS_RING, 90, '=', "=", Gcol_l_grey, 0, 0, 12 },
+    { "frost ring", "frost rings", "This magical ring protects the wearer from mundane and\nmagical cold, and imbues their blows in combat with the\npower of cold. Rumour suggests it might also allow walking\non water.\n", POCLASS_RING, 40, '=', "=", Gcol_l_grey, 0, 0, 1 },
+    { "teleport ring", "teleport rings", "This magical ring allows the wearer to teleport for a\nmodest cost in nutrition.", POCLASS_RING, 70, '=', "=", Gcol_l_grey, 0, 0, 1 },
+    { "iron ration", "iron rations", "A parcel of hardtack and beef jerky. Dull but nutritious.", POCLASS_FOOD, 75, '%', "%", Gcol_brown, 0, 0, 1 },
+    { "parcel of dried fruit", "parcels of dried fruit", "A parcel of mixed dried fruit. It sure beats hardtack\nand beef jerky.", POCLASS_FOOD, 75, '%', "%", Gcol_yellow, 0, 0, 1 },
+    { "round of elven waybread", "rounds of elven waybread", "A tasty, filling, nutritious piece of elven waybread.", POCLASS_FOOD, 85, '%', "%", Gcol_white, 0, 0, 1 },
+    { "devil spleen", "devil spleens", "A weirdly pulsing organ ripped from the torso of a devil.", POCLASS_FOOD, 100, '%', "%", Gcol_l_red, 0, 0, 1 }
 };
 
 /* permobj.c */
diff --git a/rng.cc b/rng.cc
index 7448079..1e9fe55 100644 (file)
--- a/rng.cc
+++ b/rng.cc
@@ -2,7 +2,7 @@
  * \brief xorshift PRNG
  */
 
-/* Copyright 2005-2012 Martin Read
+/* Copyright 2005-2013 Martin Read
  * 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
diff --git a/u.cc b/u.cc
index 23d1a90..a7dec2c 100644 (file)
--- a/u.cc
+++ b/u.cc
@@ -1,8 +1,9 @@
 /*! \file u.cc
  *  \brief player-character
  */
+
 /* 
- * Copyright 2005-2012 Martin Read
+ * Copyright 2005-2013 Martin Read
  * 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
index 3ddcf22..2efc637 100644 (file)
@@ -80,8 +80,12 @@ enum Gamecolour
     Gcol_l_grey, Gcol_d_grey, Gcol_red, Gcol_blue,
     Gcol_green, Gcol_purple, Gcol_brown, Gcol_cyan,
     Gcol_white, Gcol_l_red, Gcol_l_blue, Gcol_l_green,
-    Gcol_l_purple, Gcol_yellow, Gcol_l_cyan 
+    Gcol_l_purple, Gcol_yellow, Gcol_l_cyan,
+    /* Fancy colours now! */
+    Gcol_iron, Gcol_gold, Gcol_silver
 };
+#define LAST_CORE_COLOUR Gcol_l_cyan
+#define LAST_COLOUR Gcol_silver
 /* XXX enum damtyp - types of damage. */
 enum Damtyp {
     DT_PHYS = 0, DT_COLD, DT_FIRE, DT_NECRO,