mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-08-03 20:57:55 -04:00
remove UMAPDEF (#2093)
This commit is contained in:
parent
f07688a73d
commit
3f41e8f14d
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@ -165,7 +165,6 @@ jobs:
|
|||||||
--inconclusive \
|
--inconclusive \
|
||||||
--inline-suppr \
|
--inline-suppr \
|
||||||
--std=c99 \
|
--std=c99 \
|
||||||
--suppress="memleak:${{ github.workspace }}/src/u_scanner.c" \
|
|
||||||
--project="${{ github.workspace }}/build/compile_commands.json" \
|
--project="${{ github.workspace }}/build/compile_commands.json" \
|
||||||
-i"${{ github.workspace }}/third-party" \
|
-i"${{ github.workspace }}/third-party" \
|
||||||
-D__GNUC__
|
-D__GNUC__
|
||||||
|
@ -199,18 +199,18 @@ set(BASE_SOURCES
|
|||||||
all-all/sprites/pls2e0.png
|
all-all/sprites/pls2e0.png
|
||||||
all-all/sprites/tnt1a0.png
|
all-all/sprites/tnt1a0.png
|
||||||
|
|
||||||
betalevl.wad/umapdef.lmp
|
betalevl.wad/umapinfo.lmp
|
||||||
|
|
||||||
chex.wad/brghtmps.lmp
|
chex.wad/brghtmps.lmp
|
||||||
chex.wad/dehacked.lmp
|
chex.wad/dehacked.lmp
|
||||||
chex.wad/umapdef.lmp
|
chex.wad/umapinfo.lmp
|
||||||
|
|
||||||
chex2.wad/brghtmps.lmp
|
chex2.wad/brghtmps.lmp
|
||||||
|
|
||||||
doom-all/brghtmps.lmp
|
doom-all/brghtmps.lmp
|
||||||
|
|
||||||
e1m4b.wad/umapdef.lmp
|
e1m4b.wad/umapinfo.lmp
|
||||||
e1m8b.wad/umapdef.lmp
|
e1m8b.wad/umapinfo.lmp
|
||||||
|
|
||||||
extras.wad/sbardef.lmp
|
extras.wad/sbardef.lmp
|
||||||
|
|
||||||
@ -219,16 +219,10 @@ set(BASE_SOURCES
|
|||||||
|
|
||||||
id1.wad/sbardef.lmp
|
id1.wad/sbardef.lmp
|
||||||
|
|
||||||
masterlevels.wad/umapdef.lmp
|
|
||||||
|
|
||||||
nerve.wad/umapdef.lmp
|
|
||||||
|
|
||||||
rekkr.wad/dehacked.lmp
|
rekkr.wad/dehacked.lmp
|
||||||
rekkrsa.wad/dehacked.lmp
|
rekkrsa.wad/dehacked.lmp
|
||||||
rekkrsl.wad/dehacked.lmp
|
rekkrsl.wad/dehacked.lmp
|
||||||
|
|
||||||
sigil_v1_21.wad/umapdef.lmp
|
|
||||||
|
|
||||||
tnt.wad/brghtmps.lmp)
|
tnt.wad/brghtmps.lmp)
|
||||||
|
|
||||||
add_custom_command(OUTPUT "${BASE_PK3_PATH}"
|
add_custom_command(OUTPUT "${BASE_PK3_PATH}"
|
||||||
|
@ -1,162 +0,0 @@
|
|||||||
map MAP01
|
|
||||||
{
|
|
||||||
levelname = "Attack"
|
|
||||||
levelpic = "CWILV00"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP02
|
|
||||||
{
|
|
||||||
levelname = "Canyon"
|
|
||||||
levelpic = "CWILV01"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP03
|
|
||||||
{
|
|
||||||
levelname = "The Catwalk"
|
|
||||||
levelpic = "CWILV02"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP04
|
|
||||||
{
|
|
||||||
levelname = "The Combine"
|
|
||||||
levelpic = "CWILV03"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP05
|
|
||||||
{
|
|
||||||
levelname = "The Fistula"
|
|
||||||
levelpic = "CWILV04"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP06
|
|
||||||
{
|
|
||||||
levelname = "The Garrison"
|
|
||||||
levelpic = "CWILV05"
|
|
||||||
intertext = clear
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP07
|
|
||||||
{
|
|
||||||
levelname = "Titan Manor"
|
|
||||||
levelpic = "CWILV06"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP08
|
|
||||||
{
|
|
||||||
levelname = "Paradox"
|
|
||||||
levelpic = "CWILV07"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP09
|
|
||||||
{
|
|
||||||
levelname = "Subspace"
|
|
||||||
levelpic = "CWILV08"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP10
|
|
||||||
{
|
|
||||||
levelname = "Subterra"
|
|
||||||
levelpic = "CWILV09"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP11
|
|
||||||
{
|
|
||||||
levelname = "Trapped On Titan"
|
|
||||||
levelpic = "CWILV10"
|
|
||||||
intertext = clear
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP12
|
|
||||||
{
|
|
||||||
levelname = "Virgil's Lead"
|
|
||||||
levelpic = "CWILV11"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP13
|
|
||||||
{
|
|
||||||
levelname = "Minos' Judgement"
|
|
||||||
levelpic = "CWILV12"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP14
|
|
||||||
{
|
|
||||||
levelname = "Bloodsea Keep"
|
|
||||||
levelpic = "CWILV13"
|
|
||||||
bossaction = Fatso, 23, 666
|
|
||||||
bossaction = Arachnotron, 30, 667
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP15
|
|
||||||
{
|
|
||||||
levelname = "Mephisto's Maosoleum"
|
|
||||||
levelpic = "CWILV14"
|
|
||||||
bossaction = Fatso, 23, 666
|
|
||||||
bossaction = Arachnotron, 30, 667
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP16
|
|
||||||
{
|
|
||||||
levelname = "Nessus"
|
|
||||||
levelpic = "CWILV15"
|
|
||||||
bossaction = Fatso, 23, 666
|
|
||||||
bossaction = Arachnotron, 30, 667
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP17
|
|
||||||
{
|
|
||||||
levelname = "Geryon"
|
|
||||||
levelpic = "CWILV16"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP18
|
|
||||||
{
|
|
||||||
levelname = "Vesperas"
|
|
||||||
levelpic = "CWILV17"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP19
|
|
||||||
{
|
|
||||||
levelname = "Black Tower"
|
|
||||||
levelpic = "CWILV18"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP20
|
|
||||||
{
|
|
||||||
levelname = "The Express Elevator To Hell"
|
|
||||||
levelpic = "CWILV19"
|
|
||||||
nextsecret = "MAP21"
|
|
||||||
intertextsecret = clear
|
|
||||||
endcast = true
|
|
||||||
intertext = "CONGRATULATIONS YOU HAVE FINISHED... ",
|
|
||||||
"",
|
|
||||||
"MOST OF THE MASTER LEVELS",
|
|
||||||
"",
|
|
||||||
"You have ventured through the most",
|
|
||||||
"twisted levels that hell had to",
|
|
||||||
"offer and you have survived. ",
|
|
||||||
"",
|
|
||||||
"But alas the demons laugh at you",
|
|
||||||
"since you have shown cowardice and didn't",
|
|
||||||
"reach the most hideous level",
|
|
||||||
"they had made for you."
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP21
|
|
||||||
{
|
|
||||||
levelname = "Bad Dream"
|
|
||||||
levelpic = "CWILV20"
|
|
||||||
endcast = true
|
|
||||||
intertext = "CONGRATULATIONS YOU HAVE FINISHED... ",
|
|
||||||
"",
|
|
||||||
"ALL THE MASTER LEVELS",
|
|
||||||
"",
|
|
||||||
"You have ventured through all the",
|
|
||||||
"twisted levels that hell had to",
|
|
||||||
"offer and you have survived. ",
|
|
||||||
"",
|
|
||||||
"The Flames of rage flow through",
|
|
||||||
"your veins, you are ready",
|
|
||||||
"for more - but you don't know where",
|
|
||||||
"to find more when the demons hide",
|
|
||||||
"like cowards when they see you."
|
|
||||||
}
|
|
@ -1,111 +0,0 @@
|
|||||||
map MAP01
|
|
||||||
{
|
|
||||||
levelname = "The Earth Base"
|
|
||||||
label = "Level 1"
|
|
||||||
levelpic = "CWILV00"
|
|
||||||
music = "D_MESSAG"
|
|
||||||
skytexture = "SKY1"
|
|
||||||
partime = 75
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP02
|
|
||||||
{
|
|
||||||
levelname = "The Pain Labs"
|
|
||||||
label = "Level 2"
|
|
||||||
levelpic = "CWILV01"
|
|
||||||
music = "D_DDTBLU"
|
|
||||||
skytexture = "SKY1"
|
|
||||||
partime = 105
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP03
|
|
||||||
{
|
|
||||||
levelname = "Canyon of the Dead"
|
|
||||||
label = "Level 3"
|
|
||||||
levelpic = "CWILV02"
|
|
||||||
music = "D_DOOM"
|
|
||||||
skytexture = "SKY1"
|
|
||||||
partime = 120
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP04
|
|
||||||
{
|
|
||||||
levelname = "Hell Mountain"
|
|
||||||
label = "Level 4"
|
|
||||||
levelpic = "CWILV03"
|
|
||||||
music = "D_SHAWN"
|
|
||||||
nextsecret = "map09"
|
|
||||||
skytexture = "SKY3"
|
|
||||||
partime = 105
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP05
|
|
||||||
{
|
|
||||||
levelname = "Vivisection"
|
|
||||||
label = "Level 5"
|
|
||||||
levelpic = "CWILV04"
|
|
||||||
music = "D_IN_CIT"
|
|
||||||
skytexture = "SKY3"
|
|
||||||
partime = 210
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP06
|
|
||||||
{
|
|
||||||
levelname = "Inferno of Blood"
|
|
||||||
label = "Level 6"
|
|
||||||
levelpic = "CWILV05"
|
|
||||||
music = "D_THE_DA"
|
|
||||||
skytexture = "SKY3"
|
|
||||||
partime = 105
|
|
||||||
intertext = clear
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP07
|
|
||||||
{
|
|
||||||
levelname = "Baron's Banquet"
|
|
||||||
label = "Level 7"
|
|
||||||
levelpic = "CWILV06"
|
|
||||||
music = "D_IN_CIT"
|
|
||||||
skytexture = "SKY3"
|
|
||||||
partime = 165
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP08
|
|
||||||
{
|
|
||||||
levelname = "Tomb of Malevolence"
|
|
||||||
label = "Level 8"
|
|
||||||
levelpic = "CWILV07"
|
|
||||||
music = "D_SHAWN"
|
|
||||||
skytexture = "SKY3"
|
|
||||||
partime = 105
|
|
||||||
endcast = true
|
|
||||||
intertext = "TROUBLE WAS BREWING AGAIN IN YOUR FAVORITE",
|
|
||||||
"VACATION SPOT... HELL. SOME CYBERDEMON",
|
|
||||||
"PUNK THOUGHT HE COULD TURN HELL INTO A",
|
|
||||||
"PERSONAL AMUSEMENT PARK, AND MAKE EARTH",
|
|
||||||
"THE TICKET BOOTH.",
|
|
||||||
"",
|
|
||||||
"WELL THAT HALF-ROBOT FREAK SHOW DIDN'T",
|
|
||||||
"KNOW WHO WAS COMING TO THE FAIR. THERE'S",
|
|
||||||
"NOTHING LIKE A SHOOTING GALLERY FULL OF",
|
|
||||||
"HELLSPAWN TO GET THE BLOOD PUMPING...",
|
|
||||||
"",
|
|
||||||
"NOW THE WALLS OF THE DEMON'S LABYRINTH",
|
|
||||||
"ECHO WITH THE SOUND OF HIS METALLIC LIMBS",
|
|
||||||
"HITTING THE FLOOR. HIS DEATH MOAN GURGLES",
|
|
||||||
"OUT THROUGH THE MESS YOU LEFT OF HIS FACE.",
|
|
||||||
"",
|
|
||||||
"THIS RIDE IS CLOSED."
|
|
||||||
interbackdrop = "SLIME16"
|
|
||||||
}
|
|
||||||
|
|
||||||
map MAP09
|
|
||||||
{
|
|
||||||
levelname = "March of the Demons"
|
|
||||||
label = "Level 9"
|
|
||||||
levelpic = "CWILV08"
|
|
||||||
music = "D_DDTBLU"
|
|
||||||
next = "map05"
|
|
||||||
skytexture = "SKY1"
|
|
||||||
partime = 135
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
map E5M8
|
|
||||||
{
|
|
||||||
bossaction = clear
|
|
||||||
}
|
|
@ -2365,8 +2365,6 @@ void D_DoomMain(void)
|
|||||||
I_Error("\nThis is not the registered version.");
|
I_Error("\nThis is not the registered version.");
|
||||||
}
|
}
|
||||||
|
|
||||||
W_ProcessInWads("UMAPDEF", U_ParseMapDefInfo, PROCESS_PWAD);
|
|
||||||
|
|
||||||
//!
|
//!
|
||||||
// @category mod
|
// @category mod
|
||||||
//
|
//
|
||||||
|
11
src/g_game.c
11
src/g_game.c
@ -3851,23 +3851,16 @@ void G_SetFastParms(int fast_pending)
|
|||||||
|
|
||||||
mapentry_t *G_LookupMapinfo(int episode, int map)
|
mapentry_t *G_LookupMapinfo(int episode, int map)
|
||||||
{
|
{
|
||||||
char lumpname[9];
|
char lumpname[9] = {0};
|
||||||
strcpy(lumpname, MapName(episode, map));
|
M_StringCopy(lumpname, MapName(episode, map), sizeof(lumpname));
|
||||||
|
|
||||||
mapentry_t *entry;
|
mapentry_t *entry;
|
||||||
|
|
||||||
array_foreach(entry, umapinfo)
|
array_foreach(entry, umapinfo)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(lumpname, entry->mapname))
|
if (!strcasecmp(lumpname, entry->mapname))
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
array_foreach(entry, umapdef)
|
|
||||||
{
|
|
||||||
if (!strcasecmp(lumpname, entry->mapname))
|
|
||||||
return entry;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,9 @@
|
|||||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
// SUCH DAMAGE.
|
// SUCH DAMAGE.
|
||||||
|
|
||||||
|
#ifndef M_SCANNER_H
|
||||||
|
#define M_SCANNER_H
|
||||||
|
|
||||||
#include "doomtype.h"
|
#include "doomtype.h"
|
||||||
|
|
||||||
typedef struct scanner_s scanner_t;
|
typedef struct scanner_s scanner_t;
|
||||||
@ -69,3 +72,5 @@ void SC_Rewind(scanner_t *s); // Only can rewind one step.
|
|||||||
void SC_GetNextTokenLumpName(scanner_t *s);
|
void SC_GetNextTokenLumpName(scanner_t *s);
|
||||||
|
|
||||||
void SC_Error(scanner_t *s, const char *msg, ...) PRINTF_ATTR(2, 3);
|
void SC_Error(scanner_t *s, const char *msg, ...) PRINTF_ATTR(2, 3);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -646,7 +646,7 @@ void ST_ResetTitle(void)
|
|||||||
announce_string[0] = '\0';
|
announce_string[0] = '\0';
|
||||||
if (hud_map_announce && leveltime == 0)
|
if (hud_map_announce && leveltime == 0)
|
||||||
{
|
{
|
||||||
if (gamemapinfo && U_CheckField(gamemapinfo->author))
|
if (gamemapinfo && gamemapinfo->author)
|
||||||
{
|
{
|
||||||
M_snprintf(announce_string, sizeof(announce_string), "%s by %s",
|
M_snprintf(announce_string, sizeof(announce_string), "%s by %s",
|
||||||
string, gamemapinfo->author);
|
string, gamemapinfo->author);
|
||||||
|
176
src/u_mapinfo.c
176
src/u_mapinfo.c
@ -177,12 +177,17 @@ static const char *const actor_names[] =
|
|||||||
"Deh_Actor_249", // Extra thing 99
|
"Deh_Actor_249", // Extra thing 99
|
||||||
};
|
};
|
||||||
|
|
||||||
static void FreeMap(mapentry_t *mape)
|
static void ReplaceString(char **to, const char *from)
|
||||||
{
|
{
|
||||||
if (mape->mapname)
|
if (*to != NULL)
|
||||||
{
|
{
|
||||||
free(mape->mapname);
|
free(*to);
|
||||||
}
|
}
|
||||||
|
*to = M_StringDuplicate(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void FreeMapEntry(mapentry_t *mape)
|
||||||
|
{
|
||||||
if (mape->levelname)
|
if (mape->levelname)
|
||||||
{
|
{
|
||||||
free(mape->levelname);
|
free(mape->levelname);
|
||||||
@ -203,114 +208,13 @@ static void FreeMap(mapentry_t *mape)
|
|||||||
{
|
{
|
||||||
free(mape->author);
|
free(mape->author);
|
||||||
}
|
}
|
||||||
|
array_free(mape->bossactions);
|
||||||
memset(mape, 0, sizeof(*mape));
|
memset(mape, 0, sizeof(*mape));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ReplaceString(char **pptr, const char *newstring)
|
|
||||||
{
|
|
||||||
if (*pptr != NULL)
|
|
||||||
{
|
|
||||||
free(*pptr);
|
|
||||||
}
|
|
||||||
*pptr = M_StringDuplicate(newstring);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void UpdateMapEntry(mapentry_t *mape, mapentry_t *newe)
|
|
||||||
{
|
|
||||||
if (newe->mapname)
|
|
||||||
{
|
|
||||||
ReplaceString(&mape->mapname, newe->mapname);
|
|
||||||
}
|
|
||||||
if (newe->levelname)
|
|
||||||
{
|
|
||||||
ReplaceString(&mape->levelname, newe->levelname);
|
|
||||||
}
|
|
||||||
if (newe->label)
|
|
||||||
{
|
|
||||||
ReplaceString(&mape->label, newe->label);
|
|
||||||
}
|
|
||||||
if (newe->author)
|
|
||||||
{
|
|
||||||
ReplaceString(&mape->author, newe->author);
|
|
||||||
}
|
|
||||||
if (newe->intertext)
|
|
||||||
{
|
|
||||||
ReplaceString(&mape->intertext, newe->intertext);
|
|
||||||
}
|
|
||||||
if (newe->intertextsecret)
|
|
||||||
{
|
|
||||||
ReplaceString(&mape->intertextsecret, newe->intertextsecret);
|
|
||||||
}
|
|
||||||
if (newe->levelpic[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->levelpic, newe->levelpic);
|
|
||||||
}
|
|
||||||
if (newe->nextmap[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->nextmap, newe->nextmap);
|
|
||||||
}
|
|
||||||
if (newe->nextsecret[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->nextsecret, newe->nextsecret);
|
|
||||||
}
|
|
||||||
if (newe->music[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->music, newe->music);
|
|
||||||
}
|
|
||||||
if (newe->skytexture[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->skytexture, newe->skytexture);
|
|
||||||
}
|
|
||||||
if (newe->endpic[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->endpic, newe->endpic);
|
|
||||||
}
|
|
||||||
if (newe->exitpic[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->exitpic, newe->exitpic);
|
|
||||||
}
|
|
||||||
if (newe->enterpic[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->enterpic, newe->enterpic);
|
|
||||||
}
|
|
||||||
if (newe->exitanim[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->exitanim, newe->exitanim);
|
|
||||||
}
|
|
||||||
if (newe->enteranim[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->enteranim, newe->enteranim);
|
|
||||||
}
|
|
||||||
if (newe->interbackdrop[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->interbackdrop, newe->interbackdrop);
|
|
||||||
}
|
|
||||||
if (newe->intermusic[0])
|
|
||||||
{
|
|
||||||
strcpy(mape->intermusic, newe->intermusic);
|
|
||||||
}
|
|
||||||
if (newe->partime)
|
|
||||||
{
|
|
||||||
mape->partime = newe->partime;
|
|
||||||
}
|
|
||||||
if (newe->nointermission)
|
|
||||||
{
|
|
||||||
mape->nointermission = newe->nointermission;
|
|
||||||
}
|
|
||||||
if (array_size(newe->bossactions))
|
|
||||||
{
|
|
||||||
if (mape->bossactions)
|
|
||||||
{
|
|
||||||
array_free(mape->bossactions);
|
|
||||||
}
|
|
||||||
mape->bossactions = newe->bossactions;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------
|
|
||||||
// Parses a set of string and concatenates them
|
// Parses a set of string and concatenates them
|
||||||
// Returns a pointer to the string (must be freed)
|
// Returns a pointer to the string (must be freed)
|
||||||
// -----------------------------------------------
|
|
||||||
static char *ParseMultiString(scanner_t *s)
|
static char *ParseMultiString(scanner_t *s)
|
||||||
{
|
{
|
||||||
char *build = NULL;
|
char *build = NULL;
|
||||||
@ -571,15 +475,15 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int i, special, tag;
|
int type, special, tag;
|
||||||
for (i = 0; arrlen(actor_names); i++)
|
for (type = 0; arrlen(actor_names); ++type)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(SC_GetString(s), actor_names[i]))
|
if (!strcasecmp(SC_GetString(s), actor_names[type]))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i == arrlen(actor_names))
|
if (type == arrlen(actor_names))
|
||||||
{
|
{
|
||||||
SC_Error(s, "bossaction: unknown thing type '%s'",
|
SC_Error(s, "bossaction: unknown thing type '%s'",
|
||||||
SC_GetString(s));
|
SC_GetString(s));
|
||||||
@ -594,7 +498,7 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape)
|
|||||||
if (tag != 0 || special == 11 || special == 51 || special == 52
|
if (tag != 0 || special == 11 || special == 51 || special == 52
|
||||||
|| special == 124)
|
|| special == 124)
|
||||||
{
|
{
|
||||||
bossaction_t bossaction = {i, special, tag};
|
bossaction_t bossaction = {type, special, tag};
|
||||||
array_push(mape->bossactions, bossaction);
|
array_push(mape->bossactions, bossaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -634,38 +538,6 @@ static void ParseMapEntry(scanner_t *s, mapentry_t *entry)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------
|
|
||||||
//
|
|
||||||
// Parses a complete UMAPINFO lump
|
|
||||||
//
|
|
||||||
// -----------------------------------------------
|
|
||||||
|
|
||||||
static void SetDefaults(mapentry_t *entry, const char *mapname)
|
|
||||||
{
|
|
||||||
mapentry_t *default_entry;
|
|
||||||
array_foreach(default_entry, umapdef)
|
|
||||||
{
|
|
||||||
if (!strcmp(mapname, default_entry->mapname))
|
|
||||||
{
|
|
||||||
UpdateMapEntry(entry, default_entry);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void U_ParseMapDefInfo(int lumpnum)
|
|
||||||
{
|
|
||||||
scanner_t *s = SC_Open("UMAPDEF", W_CacheLumpNum(lumpnum, PU_CACHE),
|
|
||||||
W_LumpLength(lumpnum));
|
|
||||||
while (SC_TokensLeft(s))
|
|
||||||
{
|
|
||||||
mapentry_t parsed = {0};
|
|
||||||
ParseMapEntry(s, &parsed);
|
|
||||||
array_push(umapdef, parsed);
|
|
||||||
}
|
|
||||||
SC_Close(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
void U_ParseMapInfo(int lumpnum)
|
void U_ParseMapInfo(int lumpnum)
|
||||||
{
|
{
|
||||||
scanner_t *s = SC_Open("UMAPINFO", W_CacheLumpNum(lumpnum, PU_CACHE),
|
scanner_t *s = SC_Open("UMAPINFO", W_CacheLumpNum(lumpnum, PU_CACHE),
|
||||||
@ -713,24 +585,20 @@ void U_ParseMapInfo(int lumpnum)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Does this entry already exist? If yes, replace it.
|
// Does this entry already exist? If yes, replace it.
|
||||||
mapentry_t *entry;
|
int i;
|
||||||
array_foreach(entry, umapinfo)
|
for (i = 0; i < array_size(umapinfo); ++i)
|
||||||
{
|
{
|
||||||
if (!strcmp(parsed.mapname, entry->mapname))
|
if (!strcmp(parsed.mapname, umapinfo[i].mapname))
|
||||||
{
|
{
|
||||||
FreeMap(entry);
|
FreeMapEntry(&umapinfo[i]);
|
||||||
SetDefaults(entry, parsed.mapname);
|
umapinfo[i] = parsed;
|
||||||
UpdateMapEntry(entry, &parsed);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Not found so create a new one.
|
// Not found so create a new one.
|
||||||
if (entry == array_end(umapinfo))
|
if (i == array_size(umapinfo))
|
||||||
{
|
{
|
||||||
mapentry_t new = {0};
|
array_push(umapinfo, parsed);
|
||||||
SetDefaults(&new, parsed.mapname);
|
|
||||||
UpdateMapEntry(&new, &parsed);
|
|
||||||
array_push(umapinfo, new);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ typedef struct mapentry_s
|
|||||||
boolean nobossactions;
|
boolean nobossactions;
|
||||||
} mapentry_t;
|
} mapentry_t;
|
||||||
|
|
||||||
extern mapentry_t *umapinfo, *umapdef;
|
extern mapentry_t *umapinfo;
|
||||||
|
|
||||||
extern boolean EpiCustom;
|
extern boolean EpiCustom;
|
||||||
|
|
||||||
@ -64,8 +64,6 @@ mapentry_t *G_LookupMapinfo(int episode, int map);
|
|||||||
|
|
||||||
boolean U_CheckField(char *str);
|
boolean U_CheckField(char *str);
|
||||||
|
|
||||||
void U_ParseMapDefInfo(int lumpnum);
|
|
||||||
|
|
||||||
void U_ParseMapInfo(int lumpnum);
|
void U_ParseMapInfo(int lumpnum);
|
||||||
|
|
||||||
boolean U_IsSecretMap(int episode, int map);
|
boolean U_IsSecretMap(int episode, int map);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user