Change some class naming conventions

This commit is contained in:
2023-09-15 13:28:18 -04:00
parent 40881ec284
commit cd3c82f2c4
20 changed files with 160 additions and 157 deletions

View File

@@ -10,7 +10,7 @@
//
////////////////////////////////////////////////
enum EAnimValueType {
enum ElxAnimValueType {
T_STRING,
T_NUMBER,
T_BOOLEAN,
@@ -22,28 +22,28 @@ enum EAnimValueType {
//
// An single animation step.
//
// The body consists of a sequence of FAnimField
// The body consists of a sequence of FlxAnimField
// records. The body is encoded, to read the
// FAnimField records you need an FAnimStepDecoder.
// FlxAnimField records you need an FlxAnimStepDecoder.
// This comes in two versions: the string version,
// and the string_view version.
//
////////////////////////////////////////////////
struct FAnimStep {
struct FlxAnimStep {
uint64 Hash;
std::string_view Body;
FAnimStep() : Hash(0), Body("") {}
FAnimStep(uint64 h, std::string_view b) : Hash(h), Body(b) {}
FlxAnimStep() : Hash(0), Body("") {}
FlxAnimStep(uint64 h, std::string_view b) : Hash(h), Body(b) {}
};
struct FAnimStoredStep {
struct FlxAnimStoredStep {
uint64 Hash;
std::string Body;
FAnimStoredStep() : Hash(0), Body("") {}
FAnimStoredStep(uint64 h, std::string_view b) : Hash(h), Body(b) {}
FlxAnimStoredStep() : Hash(0), Body("") {}
FlxAnimStoredStep(uint64 h, std::string_view b) : Hash(h), Body(b) {}
};
////////////////////////////////////////////////
@@ -60,10 +60,10 @@ struct FAnimStoredStep {
//
////////////////////////////////////////////////
struct FAnimField {
struct FlxAnimField {
std::string_view Name;
bool Persistent;
EAnimValueType Type;
ElxAnimValueType Type;
double X, Y, Z;
std::string_view S;
};
@@ -79,14 +79,14 @@ struct FAnimField {
//
////////////////////////////////////////////////
class FAnimQueueDecoder {
class FlxAnimQueueDecoder {
private:
FStringDecoder Decoder;
FlxStringDecoder Decoder;
public:
// Initialize the FAnimQueueDecoder with the encoded animation queue.
// Initialize the FlxAnimQueueDecoder with the encoded animation queue.
//
FAnimQueueDecoder(std::string_view s) : Decoder(s) {}
FlxAnimQueueDecoder(std::string_view s) : Decoder(s) {}
// Return true if the parser has reached the end of the string.
//
@@ -94,7 +94,7 @@ public:
// Read one animation step.
//
FAnimStep ReadStep();
FlxAnimStep ReadStep();
// Convert an AnimQueue to an FString.
//
@@ -106,21 +106,21 @@ public:
// An Animation Step Decoder.
//
// This acts a lot like a stream reader,
// it reads one FAnimField at a time from
// it reads one FlxAnimField at a time from
// the animation queue until you reach
// 'end-of-file'.
//
////////////////////////////////////////////////
class FAnimStepDecoder {
class FlxAnimStepDecoder {
private:
FStringDecoder Decoder;
FlxStringDecoder Decoder;
public:
// Initialize the FAnimStepDecoder from the FAnimStep.
// Initialize the FlxAnimStepDecoder from the FlxAnimStep.
//
FAnimStepDecoder(const FAnimStep &step) : Decoder(step.Body) {}
FAnimStepDecoder(const FAnimStoredStep& step) : Decoder(step.Body) {}
FlxAnimStepDecoder(const FlxAnimStep &step) : Decoder(step.Body) {}
FlxAnimStepDecoder(const FlxAnimStoredStep& step) : Decoder(step.Body) {}
// Return true if the parser has reached the end of the string.
//
@@ -128,16 +128,16 @@ public:
// Read one field.
//
FAnimField ReadField();
FlxAnimField ReadField();
// Convert an AnimStep to an FString.
//
static FString DebugString(const FAnimStep &step);
static FString DebugString(const FlxAnimStep &step);
};
////////////////////////////////////////////////
//
// FAnimTracker
// FlxAnimTracker
//
// This class monitors the animation queue for a single
// tangible. It can identify when a new animation has
@@ -147,13 +147,13 @@ public:
//
////////////////////////////////////////////////
class FAnimTracker {
class FlxAnimTracker {
public:
// Our own copy of the animation queue. We only
// store the hashes, not the steps. The First element
// of the queue is the oldest item.
//
TDeque<FAnimStoredStep> AQ;
TDeque<FlxAnimStoredStep> AQ;
// The sequence number of the first item in AQ.
//
@@ -175,7 +175,7 @@ public:
//
// Initially, the tracker is in the empty (Clear) state.
//
FAnimTracker();
FlxAnimTracker();
// Update from the specified animation queue.
//
@@ -199,7 +199,7 @@ public:
//
// You may only call this if AnyUnstarted returns true.
//
FAnimStoredStep GetUnstarted();
FlxAnimStoredStep GetUnstarted();
// Declare that an animation has been started.
//