Adiciona registro de formatos no core e tinyblocks-image (ops genericas + Load/Save)
This commit is contained in:
1 parent
fca7aa2f63
commit
f4e2556110
11 files changed
+479
-9
No files matched your search
@@ -167,8 +167,10 @@ static bool bmp_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
|
||||
static const TinyBlocks_SlotDesc load_in[] = {{"caminho", TB_VALUE_TEXT}};
|
||||
static const TinyBlocks_SlotDesc save_in[] = {{"imagem", TB_VALUE_IMAGE}, {"caminho", TB_VALUE_TEXT}};
|
||||
|
||||
return reg(rt, lib, "BMP.Load", load_in, 1, out_img, 1, eval_load)
|
||||
bool ok = reg(rt, lib, "BMP.Load", load_in, 1, out_img, 1, eval_load)
|
||||
&& reg(rt, lib, "BMP.Save", save_in, 2, NULL, 0, eval_save);
|
||||
if (ok) tb_image_register_format("bmp", tb_bmp_load, tb_bmp_save);
|
||||
return ok;
|
||||
}
|
||||
|
||||
TINYBLOCKS_DEFINE_LIBRARY(bmp, "tinyblocks-bmp", "1.0.0", bmp_init, NULL)
|
||||
|
||||
Reference in new issue
Block a user