Linha de comando: pasta é ignorada com aviso, projeto é aberto

Todo argumento ia para o dlopen como library: abrir o editor com uma pasta
(./TinyBlocks.AppDir) dava "dlopen: ... Is a directory". Agora .so é
library, pasta é ignorada com um aviso claro e qualquer outro arquivo é
aberto como projeto (.json, ou .txt em scratchblocks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mguinhosandClaude Opus 5.5 committed 2026-10-23 15:55:37 -03:00
1 parent 2a2d22a64a
commit bfa17eecea
15 files changed
+9784 -124

No files matched your search

+8 -2
View File
@@ -105,14 +105,19 @@ void tb_stage_text(const char* text, float x, float y) {
}
}
bool tb_stage_image(const TinyBlocks_Image* img, float x, float y) {
bool tb_stage_image_zoom(const TinyBlocks_Image* img, float x, float y, float zoom) {
if (!img) return false;
StageCmd* c = push(SC_IMAGE);
if (!c) return false;
c->a = x; c->b = y;
c->d = zoom > 0.f ? zoom : 1.f;
c->img = img;
return true;
}
bool tb_stage_image(const TinyBlocks_Image* img, float x, float y) {
return tb_stage_image_zoom(img, x, y, 1.f);
}
bool tb_stage_image_named(const char* name, float x, float y) {
return tb_stage_image(tb_image_store_get(name), x, y);
}
@@ -178,7 +183,8 @@ bool tb_stage_render(TinyBlocks_RenderableBlock* rb) {
const TinyBlocks_Image* im = c->img;
int iw = tb_image_width(im), ih = tb_image_height(im);
if (iw > 0 && ih > 0) {
float dw = iw * sc, dh = ih * sc;
float z = c->d > 0.f ? c->d : 1.f;
float dw = iw * sc * z, dh = ih * sc * z;
tb_draw_image(rb, SX(c->a) - dw * 0.5f, SY(c->b) - dh * 0.5f, dw, dh, im);
}
break;