diff --git a/sc2/src/sc2code/libs/reslib.h b/sc2/src/sc2code/libs/reslib.h index a33166e7f..23c28f99a 100644 --- a/sc2/src/sc2code/libs/reslib.h +++ b/sc2/src/sc2code/libs/reslib.h @@ -142,5 +142,7 @@ BOOLEAN res_IsBoolean (const char *key); BOOLEAN res_GetBoolean (const char *key); void res_PutBoolean (const char *key, BOOLEAN value); +BOOLEAN res_Remove (const char *key); + #endif /* _RESLIB_H */ diff --git a/sc2/src/sc2code/libs/resource/mapres.c b/sc2/src/sc2code/libs/resource/mapres.c index bf07e4b49..3c61389c1 100644 --- a/sc2/src/sc2code/libs/resource/mapres.c +++ b/sc2/src/sc2code/libs/resource/mapres.c @@ -42,6 +42,12 @@ res_ClearTables (void) } } +BOOLEAN +res_Remove (const char *key) +{ + return (Alist_RemoveString (map, key) != NULL); +} + /* Type conversion routines. */ static const char * bool2str (BOOLEAN b)