Fixed sound effects; fix invisible chars

This commit is contained in:
John Alanbrook 2024-04-05 23:03:10 -05:00
parent 403771d7f8
commit 9106ebcc48
4 changed files with 14 additions and 9 deletions

View file

@ -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 |

View file

@ -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]);
},

View file

@ -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;
}
});

View file

@ -9,6 +9,7 @@
#include <stdio.h>
#include "particle.h"
#include "simplex.h"
#include <wctype.h>
#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;