Adds a lot more WASM type registry
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#include "WASMAbilityRegistry.hpp"
|
||||
#include "../WASMHelperFile.hpp"
|
||||
#include "wasm.h"
|
||||
|
||||
using namespace CreatureLib::Library;
|
||||
using namespace PkmnLib::Library;
|
||||
|
||||
void WASMAbilityRegistry::Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs,
|
||||
WebAssemblyScriptResolver* resolver) {
|
||||
REGISTER_GETTER("ability_get_name", Talent, GetName, resolver);
|
||||
REGISTER_GETTER("ability_get_effect", Talent, GetEffect, resolver);
|
||||
REGISTER_GETTER("ability_get_parameters", Talent, GetParameters, resolver);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef PKMNLIB_WASMABILITYREGISTRY_HPP
|
||||
#define PKMNLIB_WASMABILITYREGISTRY_HPP
|
||||
#include "../../WebAssemblyScriptResolver.hpp"
|
||||
|
||||
class WASMAbilityRegistry {
|
||||
public:
|
||||
static void Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs, WebAssemblyScriptResolver* resolver);
|
||||
};
|
||||
|
||||
#endif // PKMNLIB_WASMABILITYREGISTRY_HPP
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "WASMEffectParameter.hpp"
|
||||
#include "../../../../Battling/Library/BattleLibrary.hpp"
|
||||
#include "../../WebAssemblyScriptResolver.hpp"
|
||||
#include "../WASMHelperFile.hpp"
|
||||
#include "wasm.h"
|
||||
|
||||
using namespace CreatureLib::Library;
|
||||
|
||||
void WASMEffectParameter::Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs,
|
||||
WebAssemblyScriptResolver* resolver) {
|
||||
REGISTER_GETTER("effect_parameter_get_type", EffectParameter, GetType, resolver)
|
||||
REGISTER_GETTER("effect_parameter_as_bool", EffectParameter, AsBool, resolver)
|
||||
REGISTER_GETTER("effect_parameter_as_int", EffectParameter, AsInt, resolver)
|
||||
REGISTER_GETTER("effect_parameter_as_float", EffectParameter, AsFloat, resolver)
|
||||
REGISTER_GETTER("effect_parameter_as_string", EffectParameter, AsString, resolver)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef PKMNLIB_WASMEFFECTPARAMETER_HPP
|
||||
#define PKMNLIB_WASMEFFECTPARAMETER_HPP
|
||||
#include "../../WebAssemblyScriptResolver.hpp"
|
||||
|
||||
class WASMEffectParameter {
|
||||
public:
|
||||
static void Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs, WebAssemblyScriptResolver* resolver);
|
||||
};
|
||||
|
||||
#endif // PKMNLIB_WASMEFFECTPARAMETER_HPP
|
||||
@@ -7,8 +7,7 @@ class WebAssemblyScriptResolver;
|
||||
|
||||
class WASMFormeRegistry {
|
||||
public:
|
||||
static void Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs,
|
||||
WebAssemblyScriptResolver* resolver);
|
||||
static void Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs, WebAssemblyScriptResolver* resolver);
|
||||
};
|
||||
|
||||
#endif // PKMNLIB_WASMFORMEREGISTRY_HPP
|
||||
|
||||
Reference in New Issue
Block a user