This commit is contained in:
John Alanbrook 2023-08-14 22:20:30 +00:00
parent 1e8d82ce39
commit c8ba538f5b
5 changed files with 13 additions and 5 deletions

View file

@ -150,6 +150,10 @@ $(objprefix)/%.o:%.c
@echo Making C object $@
@$(CC) $(COMPILER_FLAGS)
.PHONY: docs
docs:
asciidoctor docs/*.adoc
.PHONY: clean
clean:
@echo Cleaning project

View file

@ -103,7 +103,7 @@ assets for it.
.Collider controls
* Alt-S Toggle sensor
= Yugine Programming
== Yugine Programming
.Object functions

View file

@ -35,6 +35,7 @@ var Debug = {
},
boundingbox(bb, color) {
color ??= Color.white;
cmd_points(0, bb2points(bb), color);
},

View file

@ -1324,7 +1324,7 @@ var editor = {
GUI.text(lvlstr, [0, ypos], 1, lvlcolor);
lvlcolor = Color.gray;
drawarrows = true;
clvl = clvl.level;
if (clvl) {
GUI.text("^^^^^^", [0,ypos+5],1);
@ -1412,7 +1412,9 @@ var editor = {
wh[1] = Math.abs(endpos[1] - this.sel_start[1]);
wh[0] /= editor.camera.zoom;
wh[1] /= editor.camera.zoom;
Debug.box(world2screen(c), wh);
var bb = cwh2bb(world2screen(c),wh);
Debug.boundingbox(bb, [255,255,255,10]);
Debug.line(bb2points(bb).wrapped(1), Color.white);
}
if (this.curpanel && this.curpanel.on)

View file

@ -338,7 +338,7 @@ var GUI = {
},
input_s_pressed() {
if (GUI.selected.down) {
if (GUI.selected?.down) {
GUI.selected.selected = false;
GUI.selected = GUI.selected.down;
GUI.selected.selected = true;
@ -346,7 +346,7 @@ var GUI = {
},
input_w_pressed() {
if (GUI.selected.up) {
if (GUI.selected?.up) {
GUI.selected.selected = false;
GUI.selected = GUI.selected.up;
GUI.selected.selected = true;
@ -1725,6 +1725,7 @@ var World = Level.create();
World.name = "World";
var gameobjects = {};
var Prefabs = gameobjects;
/* Returns the index of the smallest element in array, defined by a function that returns a number */
Object.defineProperty(Array.prototype, 'min', {