This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
class WebAssemblyScriptResolver;
|
||||
class LibraryMethods {
|
||||
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_LIBRARYMETHODS_H
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
class WebAssemblyScriptResolver;
|
||||
class WASMItemRegistry {
|
||||
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_WASMITEMREGISTRY_H
|
||||
|
||||
@@ -8,9 +8,7 @@ using namespace CreatureLib::Library;
|
||||
|
||||
wasm_func_t* MoveData_HasFlagByHash(WebAssemblyScriptResolver* resolver) {
|
||||
return WasmHelpers::CreateFunc<bool, AttackData*, u32>(
|
||||
resolver, {[](WebAssemblyScriptResolver*, AttackData* move, u32 flag) -> bool {
|
||||
return move->HasFlag(flag);
|
||||
}});
|
||||
resolver, {[](WebAssemblyScriptResolver*, AttackData* move, u32 flag) -> bool { return move->HasFlag(flag); }});
|
||||
}
|
||||
|
||||
void WASMMoveDataRegistry::Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs,
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
class WebAssemblyScriptResolver;
|
||||
class WASMMoveDataRegistry {
|
||||
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_WASMMOVEDATAREGISTRY_H
|
||||
|
||||
@@ -37,7 +37,6 @@ wasm_func_t* Species_HasEggGroupByHash(WebAssemblyScriptResolver* resolver) {
|
||||
}});
|
||||
}
|
||||
|
||||
|
||||
void WASMSpeciesRegistry::Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs,
|
||||
WebAssemblyScriptResolver* resolver) {
|
||||
REGISTER_GETTER("species_get_id", CreatureSpecies, GetId, resolver)
|
||||
|
||||
@@ -7,8 +7,7 @@ class WebAssemblyScriptResolver;
|
||||
|
||||
class WASMSpeciesRegistry {
|
||||
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_WASMSPECIESREGISTRY_HPP
|
||||
|
||||
@@ -39,7 +39,7 @@ wasm_func_t* CreatePrintFunc(WebAssemblyScriptResolver* resolver) {
|
||||
}
|
||||
|
||||
void WASMCoreMethods::Register(ArbUt::Dictionary<std::string, wasm_func_t*>& externs,
|
||||
WebAssemblyScriptResolver* resolver) {
|
||||
WebAssemblyScriptResolver* resolver) {
|
||||
externs.Insert("_error", CreateErrorFunc(resolver));
|
||||
externs.Insert("_print", CreatePrintFunc(resolver));
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ public:
|
||||
WasmExternRef(T* ptr) : _ptr(ptr) {}
|
||||
|
||||
[[nodiscard]] inline T* GetPtr() const noexcept { return _ptr; }
|
||||
|
||||
private:
|
||||
T* _ptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user