This commit is contained in:
luboslenco
2025-03-03 22:50:40 +01:00
parent 26e56261b5
commit 63e5adbb8e
30 changed files with 227 additions and 352 deletions
+9 -9
View File
@@ -245,34 +245,34 @@ function import_arm_run_project(path: string) {
if (is_mask) {
_texpaint = image_from_bytes(lz4_decode(ld.texpaint, ld.res * ld.res * 4), ld.res, ld.res, tex_format_t.RGBA32);
g2_begin(l.texpaint);
// g2_set_pipeline(pipes_copy8);
g2_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy); // Full bits for undo support, R8 is used
// draw_set_pipeline(pipes_copy8);
draw_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy); // Full bits for undo support, R8 is used
draw_image(_texpaint, 0, 0);
g2_set_pipeline(null);
draw_set_pipeline(null);
g2_end();
}
else { // Layer
// TODO: create render target from bytes
_texpaint = image_from_bytes(lz4_decode(ld.texpaint, ld.res * ld.res * 4 * bytes_per_pixel), ld.res, ld.res, format);
g2_begin(l.texpaint);
g2_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy);
draw_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy);
draw_image(_texpaint, 0, 0);
g2_set_pipeline(null);
draw_set_pipeline(null);
g2_end();
///if is_paint
_texpaint_nor = image_from_bytes(lz4_decode(ld.texpaint_nor, ld.res * ld.res * 4 * bytes_per_pixel), ld.res, ld.res, format);
g2_begin(l.texpaint_nor);
g2_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy);
draw_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy);
draw_image(_texpaint_nor, 0, 0);
g2_set_pipeline(null);
draw_set_pipeline(null);
g2_end();
_texpaint_pack = image_from_bytes(lz4_decode(ld.texpaint_pack, ld.res * ld.res * 4 * bytes_per_pixel), ld.res, ld.res, format);
g2_begin(l.texpaint_pack);
g2_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy);
draw_set_pipeline(project.is_bgra ? pipes_copy_bgra : pipes_copy);
draw_image(_texpaint_pack, 0, 0);
g2_set_pipeline(null);
draw_set_pipeline(null);
g2_end();
///end
}