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:
1 parent
2a2d22a64a
commit
bfa17eecea
15 files changed
+9784
-124
No files matched your search
@@ -19,13 +19,13 @@
|
||||
#include <stdbool.h>
|
||||
#include <tinyblocks/tb_json_block.h>
|
||||
|
||||
#define TB_BP_MAX_WS 256
|
||||
#define TB_BP_MAX_WS 65536 /* teto de blocos por aba (o vetor cresce sob demanda) */
|
||||
#define TB_BP_MAX_INPUTS 16
|
||||
#define TB_BP_MAX_TABS 8
|
||||
#define TB_BP_MAX_UBLOCKS 16
|
||||
#define TB_BP_MAX_UBLOCKS 64
|
||||
#define TB_BP_MAX_UPARTS 16
|
||||
#define TB_BP_MAX_USLOTS 8
|
||||
#define TB_BP_MAX_VARS 64
|
||||
#define TB_BP_MAX_VARS 4096
|
||||
#define TB_BP_LIT_CAP 512
|
||||
#define TB_BP_MAX_GROUPS 32
|
||||
|
||||
@@ -59,8 +59,14 @@ typedef struct {
|
||||
} TbBpGroup;
|
||||
|
||||
typedef struct {
|
||||
TbBpBlock blocks[TB_BP_MAX_WS];
|
||||
int top[TB_BP_MAX_WS];
|
||||
/* O indice do bloco e a identidade dele: o vetor pode crescer (realloc)
|
||||
sem invalidar os vinculos, mas nunca compacta. */
|
||||
TbBpBlock* blocks;
|
||||
int blocks_cap; /* slots alocados */
|
||||
int blocks_n; /* maior indice usado + 1 */
|
||||
int blocks_scan; /* dica do proximo slot livre */
|
||||
int* top;
|
||||
int top_cap;
|
||||
int top_n;
|
||||
float ws_sx, ws_sy;
|
||||
char name[48];
|
||||
@@ -114,9 +120,13 @@ void tb_blueprint_clear(TbBlueprint* bp);
|
||||
/* Cria uma aba; devolve o indice ou -1. */
|
||||
int tb_blueprint_add_tab(TbBlueprint* bp, const char* name, bool composite);
|
||||
TbBpTab* tb_blueprint_tab(TbBlueprint* bp, int i);
|
||||
/* Solta o pool de uma TbBpTab isolada (a struct em si e de quem chamou) */
|
||||
void tb_blueprint_tab_free(TbBpTab* t);
|
||||
|
||||
/* Aloca um bloco no pool da aba; devolve o indice ou -1. */
|
||||
int tb_blueprint_alloc_block(TbBpTab* t);
|
||||
/* Garante que o slot i existe (zerado); devolve o bloco ou NULL. */
|
||||
TbBpBlock* tb_blueprint_tab_slot(TbBpTab* t, int i);
|
||||
/* Liga child ao pai na relacao rel (child < 0 desliga). */
|
||||
void tb_blueprint_link(TbBpTab* t, int parent, int rel, int child);
|
||||
void tb_blueprint_top_add(TbBpTab* t, int bi);
|
||||
|
||||
Reference in new issue
Block a user