start of rename to cell

This commit is contained in:
2025-05-30 12:07:03 -05:00
parent f54200a7dd
commit 674eb237e0
424 changed files with 1070 additions and 1061 deletions

View File

@@ -27,7 +27,7 @@
#include <stdint.h>
#include "cute_aseprite.h"
#include "cgltf.h"
#include "prosperon.h"
#include "cell.h"
#include "qjs_blob.h"
#include "qjs_dmon.h"
@@ -151,7 +151,7 @@ double genRand(MTRand* rand) {
double rand_range(JSContext *js, double min, double max)
{
MTRand *mrand = &((prosperon_rt*)JS_GetContextOpaque(js))->mrand;
MTRand *mrand = &((cell_rt*)JS_GetContextOpaque(js))->mrand;
return genRand(mrand) * (max-min)+min;
}
@@ -286,7 +286,7 @@ void *get_gpu_buffer(JSContext *js, JSValue argv, size_t *stride, size_t *size)
JSValue make_quad_indices_buffer(JSContext *js, int quads)
{
prosperon_rt *rt = JS_GetContextOpaque(js);
cell_rt *rt = JS_GetContextOpaque(js);
int count = quads*6;
if (!JS_IsUndefined(rt->idx_buffer) && rt->idx_count >= count)
return JS_DupValue(js,rt->idx_buffer);
@@ -1459,7 +1459,7 @@ static const JSCFunctionListEntry js_video_funcs[] = {
};
JSC_SCALL(os_use_embed,
prosperon_rt *rt = JS_GetContextOpaque(js);
cell_rt *rt = JS_GetContextOpaque(js);
ModuleEntry *module_registry = rt->module_registry;
for (int i = 0; i < arrlen(module_registry); i++) {
if (strcmp(str,module_registry[i].name) == 0) {
@@ -1531,7 +1531,7 @@ JSC_CCALL(os_value_id,
void ffi_load(JSContext *js)
{
prosperon_rt *rt = JS_GetContextOpaque(js);
cell_rt *rt = JS_GetContextOpaque(js);
JS_FreeValue(js, js_blob_use(js)); // juice blob
@@ -1567,7 +1567,7 @@ void ffi_load(JSContext *js)
arrput(rt->module_registry, MISTLINE(graphics));
arrput(rt->module_registry, MISTLINE(video));
arrput(rt->module_registry, MISTLINE(soloud));
arrput(rt->module_registry, MISTLINE(layout));
arrput(rt->module_registry, MISTLINE(layout));
// arrput(rt->module_registry, MISTLINE(imgui));
arrput(rt->module_registry, ((ModuleEntry){"camera", js_camera_use}));
@@ -1611,8 +1611,8 @@ void ffi_load(JSContext *js)
JS_SetPropertyUint32(js,args, i, JS_NewString(js,rt->cmd.argv[i]));
JS_SetPropertyStr(js,prosp,"argv", args);
//JS_SetPropertyStr(js,prosp, "version", JS_NewString(js,PROSPERON_VERSION));
//JS_SetPropertyStr(js,prosp,"revision",JS_NewString(js,PROSPERON_COMMIT));
//JS_SetPropertyStr(js,prosp, "version", JS_NewString(js,CELL_VERSION));
//JS_SetPropertyStr(js,prosp,"revision",JS_NewString(js,CELL_COMMIT));
JSValue hidden_fn = JS_NewObject(js);
// add engine.js-only functions to hidden_fn. It should grab them and then remove so nothing else can use them.
@@ -1632,7 +1632,7 @@ void ffi_load(JSContext *js)
JS_FreeValue(js,globalThis);
prosperon_rt *actor = JS_GetContextOpaque(js);
cell_rt *actor = JS_GetContextOpaque(js);
actor->actor_sym = JS_NewSymbol(js, "actor symbol", 0);
actor->doc_sym = JS_NewSymbol(js, "+documentation+", 0);
JS_SetPropertyStr(js, hidden_fn, "ACTORDATA", actor->actor_sym);