Update CreatureLib.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-27 17:26:25 +02:00
parent 0d111739f4
commit f42ce8865d
53 changed files with 316 additions and 269 deletions

View File

@@ -10,7 +10,6 @@
#include <iostream>
#include "AngelScriptScript.hpp"
#include "AngelScriptTypeInfo.hpp"
using namespace Arbutils::Collections;
class AngelScriptResolver : public CreatureLib::Battling::ScriptResolver {
private:
@@ -21,12 +20,14 @@ private:
static void MessageCallback(const asSMessageInfo* msg, void* param);
static void Print(const std::string& str) { std::cout << str << std::endl; }
Dictionary<ScriptCategory, Dictionary<ConstString, AngelScriptTypeInfo*>> _typeDatabase;
Dictionary<ConstString, asITypeInfo*> _baseTypes;
ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::CaseInsensitiveConstString, AngelScriptTypeInfo*>>
_typeDatabase;
ArbUt::Dictionary<ConstString, asITypeInfo*> _baseTypes;
void RegisterTypes();
void InitializeByteCode(asIBinaryStream* stream,
const Dictionary<ScriptCategory, Dictionary<ConstString, uint32_t>>& types);
void InitializeByteCode(
asIBinaryStream* stream,
const ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::CaseInsensitiveConstString, uint32_t>>& types);
public:
~AngelScriptResolver() override {
@@ -51,7 +52,8 @@ public:
uint8_t* WriteByteCodeToMemory(size_t& size, bool stripDebugInfo = false);
void LoadByteCodeFromMemory(uint8_t*, size_t size);
const Dictionary<ScriptCategory, Dictionary<ConstString, AngelScriptTypeInfo*>>& GetTypeDatabase() const noexcept {
const ArbUt::Dictionary<ScriptCategory, ArbUt::Dictionary<ArbUt::CaseInsensitiveConstString, AngelScriptTypeInfo*>>&
GetTypeDatabase() const noexcept {
return _typeDatabase;
}