18. ABC & AS

This commit is contained in:
Edward R. Gonzalez 2024-04-13 10:19:45 -04:00
parent 8c698a176b
commit e465749f9a
15 changed files with 81 additions and 6 deletions

Binary file not shown.

BIN
Project/Content/Core/Game/BP_GasaPlayerState.uasset (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
#include "GasaAbilitySystemComponent.h"

View File

@ -0,0 +1,12 @@
#pragma once
#include "AbilitySystemComponent.h"
#include "GasaAbilitySystemComponent.generated.h"
UCLASS()
class GASA_API UGasaAbilitySystemComp : public UAbilitySystemComponent
{
GENERATED_BODY()
public:
};

View File

@ -0,0 +1,2 @@
#include "GasaAttributeSet.h"

View File

@ -0,0 +1,15 @@
#pragma once
#include "AttributeSet.h"
#include "GasaAttributeSet.generated.h"
UCLASS()
class GASA_API UGasaAttributeSet : public UAttributeSet
{
GENERATED_BODY()
public:
};

View File

@ -0,0 +1,7 @@
#include "GasaPlayerState.h"
AGasaPlayerState::AGasaPlayerState()
{
// Replication
NetUpdateFrequency = 100.f;
}

View File

@ -0,0 +1,13 @@
#pragma once
#include "GameFramework/PlayerState.h"
#include "GasaPlayerState.generated.h"
UCLASS(Blueprintable)
class GASA_API AGasaPlayerState : public APlayerState
{
GENERATED_BODY()
public:
AGasaPlayerState();
};

View File

@ -1,3 +1,3 @@
#include "GasaCommon.h"
DEFINE_LOG_CATEGORY(LogGasa);
DEFINE_LOG_CATEGORY(LogGasa);

View File

@ -36,9 +36,30 @@ AGasaPlayerController* UGasaLib::GetPrimaryGasaPlayerController(UObject* Context
#pragma endregion Game
#pragma region Logging
DEFINE_LOG_CATEGORY_STATIC(LogGasaBP, Log, All);
void UGasaLib::Log(UObject* Context, FString Message, EGasaVerbosity Verbosity, bool bPrintToScreen)
{
Gasa::Log(Message, Verbosity, LogGasa, false, 0, "", TCHAR_TO_ANSI( *Context->GetName() ));
#if !UE_BUILD_SHIPPING && !NO_LOGGING
{
ELogVerbosity::Type EngineVerbosity = (ELogVerbosity::Type) Verbosity;
static UE::Logging::Private::FStaticBasicLogDynamicData LOG_Dynamic;
static UE::Logging::Private::FStaticBasicLogRecord
LOG_Static(TEXT("%s -- %s"), __builtin_FILE(), __builtin_LINE(), EngineVerbosity, LOG_Dynamic);
if ((EngineVerbosity & ELogVerbosity::VerbosityMask) <= ELogVerbosity::COMPILED_IN_MINIMUM_VERBOSITY)
{
if ((EngineVerbosity & ELogVerbosity::VerbosityMask) <= LogGasaBP.GetVerbosity())
{
if ( ! LogGasaBP.IsSuppressed(EngineVerbosity))
{
BasicLog( LogGasaBP, &LOG_Static, *Message, *Context->GetName() );
}
}
}
}
#endif
if (bPrintToScreen)
{
if (GAreScreenMessagesEnabled)

View File

@ -6,13 +6,14 @@ The project is organized as a monolothic module with an auxillary editor module.
Implementation design perfs:
* Flat data structures with abstraction patterns only when necessary.
* Keep data structures and codepaths flat with minimal abstraction patterns
* Lift to more specific or generalized code-pathsonly when necessary
* Minimize distinct code-paths
* Use classes as "filters", keep things "mega-structed"
* Never pre-emtively make interfaces or interface-like patterns
* Keep everything data-wise in the runtime unless there is a measurable performance cost.
* Some exploratory optimizations for educational purposes.
* Plugins are installed in the engine repo unless not possible.
* Code almost exclusively in C++ for everything but cosmetics (this is a engineering portfolio).
* Code almost exclusively in C++ for everything but cosmetics (this is an engineering portfolio piece).
* Keep static module functions within C++ namesapces and have the in BP function libraries to expose to BPs.
* Perfer stage-metaprogramming to C++ compiler provided templating (when possible).