Implement FlxStreamBuffer and beginnings of ConsoleCommands in unreal

This commit is contained in:
2023-10-24 01:44:09 -04:00
parent 9dc9d31d54
commit 5381b5708a
6 changed files with 106 additions and 219 deletions

View File

@@ -5,20 +5,6 @@
#include "Containers/Deque.h"
#include "AnimQueue.generated.h"
////////////////////////////////////////////////
//
// This is copied over from Luprex source. Not ideal.
//
////////////////////////////////////////////////
enum class ElxAnimValueType {
STRING,
NUMBER,
BOOLEAN,
XYZ,
INVALID
};
////////////////////////////////////////////////
//
// An single animation step.
@@ -161,7 +147,7 @@ struct FlxAnimationStepView {
struct FlxAnimationField {
std::string_view Name;
bool Persistent;
ElxAnimValueType Type;
SimpleDynamicTag Type;
double X, Y, Z;
std::string_view S;
};
@@ -179,7 +165,7 @@ struct FlxAnimationField {
class FlxAnimQueueDecoder {
private:
FlxStringDecoder Decoder;
FlxStreamBuffer Decoder;
// These values are immediately read from the header.
//
@@ -201,7 +187,7 @@ public:
// Return true if the parser has reached the end of the string.
//
bool AtEOF() { return Decoder.at_eof(); }
bool AtEOF() { return Decoder.empty(); }
// Read one animation step.
//
@@ -229,7 +215,7 @@ public:
class FlxAnimationStepDecoder {
private:
FlxStringDecoder Decoder;
FlxStreamBuffer Decoder;
public:
// Initialize the FlxAnimationStepDecoder from the FlxAnimationStepView.
@@ -238,7 +224,7 @@ public:
// Return true if the parser has reached the end of the string.
//
bool AtEOF() { return Decoder.at_eof(); }
bool AtEOF() { return Decoder.empty(); }
// Read one field.
//