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. 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. Each ur has the following fields.
| field | description | | field | description |

View file

@ -1424,13 +1424,11 @@ var inputpanel = {
if (!Array.isArray(itms)) itms = [itms]; if (!Array.isArray(itms)) itms = [itms];
if (this.title) if (this.title)
this.win.items = [ this.win.items = [
Mum.column({items: [ Mum.column({items: [Mum.text({str:this.title}), ...itms ]})
Mum.text({str:this.title}),
...itms
]})
]; ];
else else
this.win.items = itms; this.win.items = itms;
this.win.draw([100, window.size.y-50]); 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) { for (var i in cries) {
var cry = cries[i]; var cry = cries[i];
if (!cry.ended) continue; 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; cry.lastframe = cry.frame;
} }
}); });

View file

@ -9,6 +9,7 @@
#include <stdio.h> #include <stdio.h>
#include "particle.h" #include "particle.h"
#include "simplex.h" #include "simplex.h"
#include <wctype.h>
#include "datastream.h" #include "datastream.h"
@ -119,6 +120,7 @@ void c_event(const sapp_event *e)
break; break;
case SAPP_EVENTTYPE_CHAR: case SAPP_EVENTTYPE_CHAR:
if (iswcntrl(e->char_code)) break;
snprintf(lcfmt, 5, "%lc", e->char_code); snprintf(lcfmt, 5, "%lc", e->char_code);
script_evalf("prosperon.textinput(`%s`);", lcfmt); script_evalf("prosperon.textinput(`%s`);", lcfmt);
break; break;