2019-12-09 23:01:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "gstrings.h"
|
2019-12-10 16:35:28 +00:00
|
|
|
#include "cmdlib.h"
|
2019-12-09 23:01:45 +00:00
|
|
|
|
|
|
|
// Localization capable replacement of the game specific solutions.
|
|
|
|
|
|
|
|
inline void MakeStringLocalizable(FString "e)
|
|
|
|
{
|
|
|
|
// Only prepend a quote if the string is localizable.
|
|
|
|
if (quote.Len() > 0 && quote[0] != '$' && GStrings[quote]) quote.Insert(0, "$");
|
|
|
|
}
|
|
|
|
|
|
|
|
struct MapRecord
|
|
|
|
{
|
|
|
|
int parTime;
|
|
|
|
int designerTime;
|
|
|
|
FString fileName;
|
2019-12-10 16:35:28 +00:00
|
|
|
FString labelName;
|
2019-12-09 23:01:45 +00:00
|
|
|
FString name;
|
|
|
|
FString music;
|
|
|
|
int cdSongId;
|
|
|
|
|
|
|
|
// The rest is only used by Blood
|
|
|
|
int nextLevel;
|
|
|
|
int nextSecret;
|
|
|
|
int messageStart; // messages are stored in the quote array to reduce clutter.
|
|
|
|
FString author;
|
|
|
|
// bool fog, weather; // Blood defines these but they aren't used.
|
|
|
|
|
|
|
|
const char *DisplayName()
|
|
|
|
{
|
2019-12-10 16:35:28 +00:00
|
|
|
if (name.IsEmpty()) return labelName;
|
2019-12-09 23:01:45 +00:00
|
|
|
return GStrings.localize(name);
|
|
|
|
}
|
|
|
|
void SetName(const char *n)
|
|
|
|
{
|
|
|
|
name = n;
|
|
|
|
MakeStringLocalizable(name);
|
|
|
|
}
|
2019-12-10 16:35:28 +00:00
|
|
|
void SetFileName(const char* n)
|
|
|
|
{
|
|
|
|
fileName = n;
|
|
|
|
labelName = ExtractFileBase(n);
|
|
|
|
}
|
|
|
|
|
2019-12-09 23:01:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern MapRecord mapList[512];
|
|
|
|
extern MapRecord *currentLevel;
|