rename to only use js instead of jso
This commit is contained in:
parent
1e4a142030
commit
f95249f147
4
Makefile
4
Makefile
|
@ -294,3 +294,7 @@ TAGINC != find . -name "*.[chj]"
|
|||
tags: $(TAGINC)
|
||||
@echo Making tags.
|
||||
@etags $(TAGINC)
|
||||
|
||||
MYFILES != (ls scripts/*.js* source/engine/*.[ch] source/engine/sound/*.[ch])
|
||||
pretty:
|
||||
clang-format -i $(MYFILES)
|
|
@ -232,7 +232,7 @@ var editor = {
|
|||
Object.dainty_assign(this.desktop, this.stash);
|
||||
}
|
||||
this.selectlist = [];
|
||||
editor.camera = world.spawn("scripts/camera2d.jso");
|
||||
editor.camera = world.spawn("scripts/camera2d");
|
||||
editor.camera._ed.selectable = false;
|
||||
game.camera = editor.camera;
|
||||
},
|
||||
|
|
|
@ -728,6 +728,7 @@ var ur_from_file = function(file) {
|
|||
}
|
||||
|
||||
game.loadurs = function() {
|
||||
return;
|
||||
ur = {};
|
||||
ur._list = [];
|
||||
/* FIND ALL URS IN A PROJECT */
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
|
||||
var t_units = [ "ns", "us", "ms", "s", "ks", "Ms" ];
|
||||
|
||||
function calc_cpu(fn, times, diff=0)
|
||||
{
|
||||
function calc_cpu (fn, times, diff = 0) {
|
||||
var series = [];
|
||||
|
||||
for (var i = 0; i < times; i++) {
|
||||
|
@ -169,10 +168,7 @@ function get_line(file, line) {
|
|||
return text.trim();
|
||||
}
|
||||
|
||||
profile.stop_cpu_instr = function()
|
||||
{
|
||||
return;
|
||||
}
|
||||
profile.stop_cpu_instr = function () { return; }
|
||||
|
||||
profile.best_t = function (t) {
|
||||
var qq = 0;
|
||||
|
@ -185,11 +181,13 @@ profile.best_t = function (t) {
|
|||
return `${t.toPrecision(4)} ${t_units[qq]}`;
|
||||
};
|
||||
|
||||
profile.report = function (start, msg = "[undefined report]") { console.info(`${msg} in ${profile.best_t(profile.now() - start)}`); };
|
||||
|
||||
profile.report = function (start, msg = "[undefined report]") {
|
||||
console.info(`${msg} in ${profile.best_t(profile.now() - start)}`);
|
||||
};
|
||||
|
||||
/*
|
||||
Frame averages are an instrumented profiling technique. Place frame() calls in your code to get a call graph for things you are interested in.
|
||||
Frame averages are an instrumented profiling technique. Place frame() calls
|
||||
in your code to get a call graph for things you are interested in.
|
||||
*/
|
||||
|
||||
var frame_avg = false;
|
||||
|
@ -315,7 +313,8 @@ function addreport(group, line, start) {
|
|||
};
|
||||
|
||||
function printreport (cache, name) {
|
||||
var report = `==${name}==` + "\n";
|
||||
var report = `==${name}==` +
|
||||
"\n";
|
||||
|
||||
var reports = [];
|
||||
for (var i in cache) {
|
||||
|
@ -333,7 +332,8 @@ function printreport(cache, name) {
|
|||
});
|
||||
|
||||
for (var rep of reports)
|
||||
report += `${rep.name} ${profile.best_t(rep.avg)} (${rep.hits} hits) (total ${profile.best_t(rep.time)})\n`;
|
||||
report += `${rep.name} ${profile.best_t(rep.avg)} (${
|
||||
rep.hits} hits) (total ${profile.best_t(rep.time)})\n`;
|
||||
|
||||
return report;
|
||||
};
|
||||
|
@ -341,12 +341,10 @@ function printreport(cache, name) {
|
|||
profile.data = {};
|
||||
profile.curframe = 0;
|
||||
|
||||
function prof_add_stats(obj, stat)
|
||||
{
|
||||
function prof_add_stats (obj, stat) {
|
||||
for (var i in stat) {
|
||||
obj[i] ??= [];
|
||||
if (obj[i].last() !== stat[i])
|
||||
obj[i][profile.curframe] = stat[i];
|
||||
if (obj[i].last() !== stat[i]) obj[i][profile.curframe] = stat[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -401,9 +401,7 @@ var Event = {
|
|||
|
||||
global.mixin("scripts/spline");
|
||||
global.mixin("scripts/components");
|
||||
|
||||
global.mixin("scripts/actor");
|
||||
|
||||
global.mixin("scripts/entity");
|
||||
|
||||
function world_start() {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
this.phys = physics.static;
|
||||
this.add_component(component.sprite);
|
Loading…
Reference in a new issue