remove more unneeded from the std
This commit is contained in:
@@ -843,13 +843,13 @@ void script_startup(cell_rt *prt)
|
||||
|
||||
// Add core QOP blob to hidden
|
||||
JSValue globalThis = JS_GetGlobalObject(js);
|
||||
JSValue prosp = JS_GetPropertyStr(js, globalThis, "prosperon");
|
||||
JSValue hidden = JS_GetPropertyStr(js, prosp, "hidden");
|
||||
JSValue cell = JS_GetPropertyStr(js, globalThis, "cell");
|
||||
JSValue hidden = JS_GetPropertyStr(js, cell, "hidden");
|
||||
size_t archive_size = qop_core.data_size - qop_core.files_offset;
|
||||
JSValue blob = js_new_blob_stoned_copy(js, qop_core.data + qop_core.files_offset, archive_size);
|
||||
JS_SetPropertyStr(js, hidden, "core_qop_blob", blob);
|
||||
JS_FreeValue(js, hidden);
|
||||
JS_FreeValue(js, prosp);
|
||||
JS_FreeValue(js, cell);
|
||||
JS_FreeValue(js, globalThis);
|
||||
|
||||
// Find and load engine.cm from QOP archive
|
||||
|
||||
@@ -87,14 +87,7 @@ double js2angle(JSContext *js,JSValue v) {
|
||||
return n * HMM_TurnToRad;
|
||||
}
|
||||
|
||||
static uint32_t rng_state = 123456789;
|
||||
static uint32_t xorshift32(){
|
||||
uint32_t x = rng_state;
|
||||
x ^= x << 13;
|
||||
x ^= x >> 17;
|
||||
x ^= x << 5;
|
||||
return rng_state = x;
|
||||
}
|
||||
JSValue js_os_use(JSContext *js);
|
||||
|
||||
void ffi_load(JSContext *js)
|
||||
{
|
||||
@@ -103,19 +96,13 @@ void ffi_load(JSContext *js)
|
||||
|
||||
JSValue globalThis = JS_GetGlobalObject(js);
|
||||
|
||||
JSValue prosp = JS_NewObject(js);
|
||||
JS_SetPropertyStr(js,globalThis,"prosperon", prosp);
|
||||
JSValue cell = JS_NewObject(js);
|
||||
JS_SetPropertyStr(js,globalThis,"cell", cell);
|
||||
|
||||
JSValue hidden_fn = JS_NewObject(js);
|
||||
|
||||
|
||||
#if defined(_WIN32)
|
||||
JS_SetPropertyStr(js, hidden_fn, "dylib_ext", JS_NewString(js, ".dll"));
|
||||
#elif defined(__APPLE__)
|
||||
JS_SetPropertyStr(js, hidden_fn, "dylib_ext", JS_NewString(js, ".dylib"));
|
||||
#else
|
||||
JS_SetPropertyStr(js, hidden_fn, "dylib_ext", JS_NewString(js, ".so"));
|
||||
#endif
|
||||
JS_SetPropertyStr(js, cell, "hidden", hidden_fn);
|
||||
JS_SetPropertyStr(js, hidden_fn, "os", js_os_use(js));
|
||||
|
||||
const char actorsym_script[] = "var sym = Symbol(`actordata`); sym;";
|
||||
|
||||
@@ -132,7 +119,5 @@ void ffi_load(JSContext *js)
|
||||
rt->init_wota = NULL;
|
||||
}
|
||||
|
||||
JS_SetPropertyStr(js, prosp, "hidden", hidden_fn);
|
||||
|
||||
JS_FreeValue(js,globalThis);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user