diff --git a/doc/prosperon.org b/doc/prosperon.org index 2fd2aa3..c8a82f3 100644 --- a/doc/prosperon.org +++ b/doc/prosperon.org @@ -238,6 +238,10 @@ This method allows high composability of game objects. If an entity is created without an ur, is ur is defined as its given text and data. It cannot be saved. It must be given a new ur name. +Objects can be composed on the fly by stringing together urs. For example, a "2x.json" might define scale as 2x. Then, you can create a goblin with `ur.goblin`, or a large goblin with `ur.goblin.2x`. This creates a goblin object, and then applies the 2x scripts and jsons onto the object. + +*** Urs in game + Each ur has the following fields. | field | description | diff --git a/scripts/editor.js b/scripts/editor.js index ac417cb..51101d3 100644 --- a/scripts/editor.js +++ b/scripts/editor.js @@ -1246,8 +1246,8 @@ editor.inputs.g = function() { var comp = editor.sel_comp; var o = { pos: editor.sel_comp.pos, - move(d) { comp.pos = comp.pos.add(comp.gameobject.dir_world2this(d)); }, - sync: comp.sync.bind(comp), + move(d) { comp.pos = comp.pos.add(comp.gameobject.dir_world2this(d)); }, + sync: comp.sync.bind(comp), }; editor.grabselect = [o]; return; @@ -1423,14 +1423,12 @@ var inputpanel = { var itms = this.guibody(); if (!Array.isArray(itms)) itms = [itms]; if (this.title) - this.win.items = [ - Mum.column({items: [ - Mum.text({str:this.title}), - ...itms - ]}) - ]; + this.win.items = [ + Mum.column({items: [Mum.text({str:this.title}), ...itms ]}) + ]; else this.win.items = itms; + this.win.draw([100, window.size.y-50]); }, diff --git a/scripts/sound.js b/scripts/sound.js index 4a384e2..be512e0 100644 --- a/scripts/sound.js +++ b/scripts/sound.js @@ -32,7 +32,8 @@ var killer = Register.appupdate.register(function() { for (var i in cries) { var cry = cries[i]; if (!cry.ended) continue; - if (cry.frame < cry.lastframe || cry.frame === cry.lastframe) cry.ended(); + if (cry.frame < cry.lastframe || cry.frame === cry.frames()) + cry.ended(); cry.lastframe = cry.frame; } }); diff --git a/source/engine/yugine.c b/source/engine/yugine.c index c971570..0a4b7ee 100644 --- a/source/engine/yugine.c +++ b/source/engine/yugine.c @@ -9,6 +9,7 @@ #include #include "particle.h" #include "simplex.h" +#include #include "datastream.h" @@ -119,6 +120,7 @@ void c_event(const sapp_event *e) break; case SAPP_EVENTTYPE_CHAR: + if (iswcntrl(e->char_code)) break; snprintf(lcfmt, 5, "%lc", e->char_code); script_evalf("prosperon.textinput(`%s`);", lcfmt); break;