From 649c03a4fb7b1624c4ef422ebf5691314e2cdc40 Mon Sep 17 00:00:00 2001 From: kinther Date: Sun, 31 Aug 2025 07:06:29 -0700 Subject: [PATCH] New sector types and map update --- src/asciimap.c | 46 +++++++++++++++++++++++++++------------------- src/structs.h | 14 +++++++++++--- src/utils.c | 3 +++ 3 files changed, 41 insertions(+), 22 deletions(-) diff --git a/src/asciimap.c b/src/asciimap.c index d42aba0..0039e51 100644 --- a/src/asciimap.c +++ b/src/asciimap.c @@ -121,14 +121,14 @@ static struct map_info_type map_info[] = { SECT_WATER_NOSWIM, "\tc[\tb=\tc]\tn" }, { SECT_FLYING, "\tc[\tC^\tc]\tn" }, { SECT_UNDERWATER, "\tc[\tbU\tc]\tn" }, - { -1, "" }, /* 10 */ - { -1, "" }, - { -1, "" }, - { -1, "" }, - { -1, "" }, - { -1, "" }, /* 15 */ - { -1, "" }, - { -1, "" }, + { SECT_SCRUBLAND, "\tc[\tgS\tc]\tn" }, /* 10 */ + { SECT_SAND, "\tc[\tys\tc]\tn" }, + { SECT_ROCKY, "\tc[\trR\tc]\tn" }, + { SECT_ROAD, "\tc[\tw*\tc]\tn" }, + { SECT_UNDERGROUND, "\tc[\tb+\tc]\tn" }, + { SECT_SILT_SEA, "\tc[\tw#\tc]\tn" }, /* 15 */ + { SECT_ASHLAND, "\tc[\tg@\tc]\tn" }, + { SECT_TABLELANDS, "\tc[\tyT\tc]\tn" }, { -1, "" }, { -1, "" }, { -1, "" }, /* 20 */ @@ -158,14 +158,14 @@ static struct map_info_type world_map_info[] = { SECT_WATER_NOSWIM, "\tb=" }, { SECT_FLYING, "\tC^" }, { SECT_UNDERWATER, "\tbU" }, - { -1, "" }, /* 10 */ - { -1, "" }, - { -1, "" }, - { -1, "" }, - { -1, "" }, - { -1, "" }, /* 15 */ - { -1, "" }, - { -1, "" }, + { SECT_SCRUBLAND, "\tgS" }, /* 10 */ + { SECT_SAND, "\tys" }, + { SECT_ROCKY, "\trR" }, + { SECT_ROAD, "\tw*" }, + { SECT_UNDERGROUND, "\tb+" }, + { SECT_SILT_SEA, "\tw#" }, /* 15 */ + { SECT_ASHLAND, "\tg@" }, + { SECT_TABLELANDS, "\tyT" }, { -1, "" }, { -1, "" }, { -1, "" }, /* 20 */ @@ -513,10 +513,18 @@ static void perform_map( struct char_data *ch, char *argument, bool worldmap ) count += sprintf(buf + count, "\tn%s Forest\\\\", map_info[SECT_FOREST].disp); count += sprintf(buf + count, "\tn%s Hills\\\\", map_info[SECT_HILLS].disp); count += sprintf(buf + count, "\tn%s Mountain\\\\", map_info[SECT_MOUNTAIN].disp); - count += sprintf(buf + count, "\tn%s Swim\\\\", map_info[SECT_WATER_SWIM].disp); - count += sprintf(buf + count, "\tn%s Boat\\\\", map_info[SECT_WATER_NOSWIM].disp); + count += sprintf(buf + count, "\tn%s Water\\\\", map_info[SECT_WATER_SWIM].disp); + count += sprintf(buf + count, "\tn%s Deep Water\\\\", map_info[SECT_WATER_NOSWIM].disp); count += sprintf(buf + count, "\tn%s Flying\\\\", map_info[SECT_FLYING].disp); - sprintf(buf + count, "\tn%s Underwater\\\\", map_info[SECT_UNDERWATER].disp); + count += sprintf(buf + count, "\tn%s Underwater\\\\", map_info[SECT_UNDERWATER].disp); + count += sprintf(buf + count, "\tn%s Scrubland\\\\", map_info[SECT_SCRUBLAND].disp); + count += sprintf(buf + count, "\tn%s Sand\\\\", map_info[SECT_SAND].disp); + count += sprintf(buf + count, "\tn%s Rocky\\\\", map_info[SECT_ROCKY].disp); + count += sprintf(buf + count, "\tn%s Road\\\\", map_info[SECT_ROAD].disp); + count += sprintf(buf + count, "\tn%s Underground\\\\", map_info[SECT_UNDERGROUND].disp); + count += sprintf(buf + count, "\tn%s Silt\\\\", map_info[SECT_SILT_SEA].disp); + count += sprintf(buf + count, "\tn%s Ashland\\\\", map_info[SECT_ASHLAND].disp); + sprintf(buf + count, "\tn%s Tablelands\\\\", map_info[SECT_TABLELANDS].disp); strcpy(buf, strfrmt(buf, LEGEND_WIDTH, CANVAS_HEIGHT + 2, FALSE, TRUE, TRUE)); diff --git a/src/structs.h b/src/structs.h index 4e35bc3..3e0953f 100644 --- a/src/structs.h +++ b/src/structs.h @@ -118,10 +118,18 @@ #define SECT_MOUNTAIN 5 /**< On a mountain */ #define SECT_WATER_SWIM 6 /**< Swimmable water */ #define SECT_WATER_NOSWIM 7 /**< Water - need a boat */ -#define SECT_FLYING 8 /**< Flying */ -#define SECT_UNDERWATER 9 /**< Underwater */ +#define SECT_UNDERWATER 8 /**< Flying */ +#define SECT_FLYING 9 /**< Flying */ +#define SECT_SCRUBLAND 10 /**< Scrublands */ +#define SECT_SAND 11 /**< Sandy Wastes */ +#define SECT_ROCKY 12 /**< Rocky Badlands */ +#define SECT_ROAD 13 /**< Roads (for movement changes) */ +#define SECT_UNDERGROUND 14 /**< Underground */ +#define SECT_SILT_SEA 15 /**< Silt Sea/Edges */ +#define SECT_ASHLAND 16 /**< Ashlands defiled by magic */ +#define SECT_TABLELANDS 17 /**< Tablelands */ /** The total number of room Sector Types */ -#define NUM_ROOM_SECTORS 10 +#define NUM_ROOM_SECTORS 18 /* char and mob-related defines */ diff --git a/src/utils.c b/src/utils.c index 309f005..f4b7008 100644 --- a/src/utils.c +++ b/src/utils.c @@ -850,6 +850,9 @@ int room_is_dark(room_rnum room) if (SECT(room) == SECT_INSIDE || SECT(room) == SECT_CITY) return (FALSE); + if (SECT(room) == SECT_UNDERGROUND) + return (TRUE); + if (weather_info.sunlight == SUN_SET || weather_info.sunlight == SUN_DARK) return (TRUE);