move infos to spam

This commit is contained in:
John Alanbrook 2024-03-22 13:40:56 -05:00
parent 845fc5d4b8
commit 5e3fb73398
5 changed files with 7 additions and 11 deletions

1
.gitignore vendored
View file

@ -22,3 +22,4 @@ core.cdb.h
jsc
.DS_Store
primum.html
.vscode

View file

@ -99,7 +99,6 @@ globalThis.global = globalThis;
function use(file, env, script)
{
file = Resources.find_script(file);
console.info(`loading up ${file}`);
var st = profile.now();
env ??= {};

View file

@ -281,7 +281,7 @@ var gameobject = {
}
}
console.info(`Creating entity of type ${ent.ur}`);
console.spam(`Creating entity of type ${ent.ur}`);
ent.warp_layer = [true];
ent.components = {};
@ -543,12 +543,9 @@ var gameobject = {
kill() {
if (this.__kill) return;
this.__kill = true;
console.info(`Killing entity of type ${this.ur}`);
console.spam(`Killing entity of type ${this.ur}`);
console.info(`killing ${this.timers.length} timers.`);
this.timers.forEach(t => t());
console.info(`now there are ${this.timers.length}`);
for (var i of this.timers) console.info(i);
this.timers = [];
Event.rm_obj(this);
Player.do_uncontrol(this);

View file

@ -641,7 +641,6 @@ JSValue arb2js(cpArbiter *arb)
void phys_run_post(cpSpace *space, JSValue *fn, JSValue *hit)
{
YughInfo("Run post for %p", fn);
JSValue hh = *hit;
script_call_sym(*fn, 1, &hh);
JS_FreeValue(js, hh);
@ -651,10 +650,10 @@ void phys_run_post(cpSpace *space, JSValue *fn, JSValue *hit)
int script_phys_cb_begin(cpArbiter *arb, cpSpace *space, gameobject *go)
{
if (!arb_valid(arb)) return 1;
YughInfo("Adding begin callbacks for go %p", go);
YughSpam("Adding begin callbacks for go %p", go);
if (!JS_IsUndefined(go->cbs.begin) && cpSpaceAddPostStepCallback(space, phys_run_post, &go->cbs.begin, &go->cbs.bhit)) {
YughInfo("Added begin for %p", &go->cbs.begin);
YughSpam("Added begin for %p", &go->cbs.begin);
go->cbs.bhit = arb2js(arb);
}

View file

@ -105,7 +105,7 @@ void go_shape_moi(cpBody *body, cpShape *shape, gameobject *go) {
}
void gameobject_apply(gameobject *go) {
YughInfo("Applying gameobject %p", go);
YughSpam("Applying gameobject %p", go);
cpBodySetType(go->body, go->phys);
cpBodyEachShape(go->body, go_shape_apply, go);