- various engine updates from Raze.

* removed refreshFreq variable and related code. This only got into the backend because of stupid interpolation code in some of the Build games which has long been removed.
* save FixedBitArrays as base64 in savegames.
* allow indirections in the string table - by prefixing the language string with '$$' the remaining text is interpreted as another string label to resolve.
* constexpr in palette code, also replacing #defines with enums.
This commit is contained in:
Christoph Oelckers 2020-09-27 10:17:58 +02:00
commit 96ceb11af0
21 changed files with 209 additions and 51 deletions

View file

@ -54,6 +54,7 @@
#include "engineerrors.h"
#include "textures.h"
#include "texturemanager.h"
#include "base64.h"
extern DObject *WP_NOCHANGE;
bool save_full = false; // for testing. Should be removed afterward.
@ -772,6 +773,31 @@ error:
return buff;
}
//==========================================================================
//
//
//
//==========================================================================
FSerializer &FSerializer::SerializeMemory(const char *key, void* mem, size_t length)
{
if (isWriting())
{
auto array = base64_encode((const uint8_t*)mem, length);
AddString(key, (const char*)array.Data());
}
else
{
auto cp = GetString(key);
if (key)
{
base64_decode(mem, length, cp);
}
}
return *this;
}
//==========================================================================
//
//