paint: merge gc remove

This commit is contained in:
luboslenco
2026-08-21 22:35:41 +02:00
parent 4c77755da0
commit eb25ff4f46
213 changed files with 3104 additions and 2920 deletions
+2 -75
View File
@@ -239,25 +239,18 @@ void plugins_init();
void _kickstart() {
_render_path_cached_shader_contexts = any_map_create();
gc_root(_render_path_cached_shader_contexts);
ui_children = any_map_create();
gc_root(ui_children);
ui_nodes_custom_buttons = any_map_create();
gc_root(ui_nodes_custom_buttons);
g_operators = any_map_create();
gc_root(g_operators);
box_export_htab = ui_handle_create();
gc_root(box_export_htab);
box_export_mesh_handle = ui_handle_create();
gc_root(box_export_mesh_handle);
box_export_hpreset = ui_handle_create();
gc_root(box_export_hpreset);
box_export_channels = any_array_create_from_raw(
(void *[]){
@@ -265,7 +258,6 @@ void _kickstart() {
"smooth", "emis", "subs", "diff_r", "diff_g", "diff_b", "spec_r", "spec_g", "spec_b", "0.0", "1.0",
},
23);
gc_root(box_export_channels);
box_export_color_spaces = any_array_create_from_raw(
(void *[]){
@@ -273,46 +265,32 @@ void _kickstart() {
"srgb",
},
2);
gc_root(box_export_color_spaces);
box_export_h_export_player_target = ui_handle_create();
gc_root(box_export_h_export_player_target);
import_texture_importers = any_map_create();
gc_root(import_texture_importers);
import_text_importers = any_map_create();
gc_root(import_text_importers);
ui_files_path = ui_files_default_path;
gc_root(ui_files_path);
base_res_handle = ui_handle_create();
gc_root(base_res_handle);
base_res_x_handle = ui_handle_create();
gc_root(base_res_x_handle);
base_res_y_handle = ui_handle_create();
gc_root(base_res_y_handle);
base_bits_handle = ui_handle_create();
gc_root(base_bits_handle);
base_drop_paths = any_array_create_from_raw((void *[]){}, 0);
gc_root(base_drop_paths);
ui_base_hwnds = ui_base_init_hwnds();
gc_root(ui_base_hwnds);
ui_base_htabs = ui_base_init_htabs();
gc_root(ui_base_htabs);
ui_base_hwnd_tabs = ui_base_init_hwnd_tabs();
gc_root(ui_base_hwnd_tabs);
ui_toolbar_handle = ui_handle_create();
gc_root(ui_toolbar_handle);
ui_toolbar_tool_names = any_array_create_from_raw(
(void *[]){
@@ -332,7 +310,6 @@ void _kickstart() {
_tr("Bake"), // Hidden, used by Bake Texture node
},
14);
gc_root(ui_toolbar_tool_names);
ui_toolbar_tool_names->length--; // Hide Bake tool
ui_toolbar_tooltip_extras = any_array_create_from_raw(
@@ -352,38 +329,28 @@ void _kickstart() {
"",
},
13);
gc_root(ui_toolbar_tooltip_extras);
uniforms_ext_ortho_p = mat4_ortho(-0.5, 0.5, -0.5, 0.5, -0.5, 0.5);
box_projects_htab = ui_handle_create();
gc_root(box_projects_htab);
box_projects_hsearch = ui_handle_create();
gc_root(box_projects_hsearch);
tab_scripts_hscript = ui_handle_create();
gc_root(tab_scripts_hscript);
import_mesh_importers = any_map_create();
gc_root(import_mesh_importers);
ui_menubar_hwnd = ui_handle_create();
gc_root(ui_menubar_hwnd);
ui_menubar_menu_handle = ui_handle_create();
gc_root(ui_menubar_menu_handle);
ui_menubar_tab = ui_handle_create();
gc_root(ui_menubar_tab);
ui_menubar_w = ui_menubar_default_w;
translator_translations = any_map_create();
gc_root(translator_translations);
g_project = GC_ALLOC_INIT(project_t, {0});
gc_root(g_project);
g_project = ALLOC_INIT(project_t, {0});
g_project->_ = gc_alloc(sizeof(project_runtime_t));
g_project->_ = calloc(1, sizeof(project_runtime_t));
g_project->_->filepath = "";
g_project->_->assets = any_array_create_from_raw((void *[]){}, 0);
@@ -398,88 +365,60 @@ void _kickstart() {
g_project->_->sounds = any_array_create_from_raw((void *[]){}, 0);
ui_view2d_hwnd = ui_handle_create();
gc_root(ui_view2d_hwnd);
ui_view2d_htab = ui_handle_create();
gc_root(ui_view2d_htab);
parser_material_node_values = any_map_create();
gc_root(parser_material_node_values);
parser_material_node_vectors = any_map_create();
gc_root(parser_material_node_vectors);
parser_material_custom_nodes = any_map_create();
gc_root(parser_material_custom_nodes);
parser_material_parsed_map = any_map_create();
gc_root(parser_material_parsed_map);
parser_material_texture_map = any_map_create();
gc_root(parser_material_texture_map);
tab_browser_hpath = ui_handle_create();
gc_root(tab_browser_hpath);
tab_browser_hsearch = ui_handle_create();
gc_root(tab_browser_hsearch);
util_mesh_unwrappers = any_map_create();
gc_root(util_mesh_unwrappers);
ui_header_h = ui_header_default_h;
ui_header_handle = ui_handle_create();
gc_root(ui_header_handle);
g_plugins = any_map_create();
gc_root(g_plugins);
parser_logic_custom_nodes = any_map_create();
gc_root(parser_logic_custom_nodes);
resource_bundled = any_map_create();
gc_root(resource_bundled);
ui_nodes_hwnd = ui_handle_create();
gc_root(ui_nodes_hwnd);
ui_nodes_group_stack = any_array_create_from_raw((void *[]){}, 0);
gc_root(ui_nodes_group_stack);
ui_nodes_htab = ui_handle_create();
gc_root(ui_nodes_htab);
_ui_nodes_htype = ui_handle_create();
gc_root(_ui_nodes_htype);
_ui_nodes_hname = ui_handle_create();
gc_root(_ui_nodes_hname);
_ui_nodes_hmin = ui_handle_create();
gc_root(_ui_nodes_hmin);
_ui_nodes_hmax = ui_handle_create();
gc_root(_ui_nodes_hmax);
_ui_nodes_hval0 = ui_handle_create();
gc_root(_ui_nodes_hval0);
_ui_nodes_hval1 = ui_handle_create();
gc_root(_ui_nodes_hval1);
_ui_nodes_hval2 = ui_handle_create();
gc_root(_ui_nodes_hval2);
_ui_nodes_hval3 = ui_handle_create();
gc_root(_ui_nodes_hval3);
nodes_brush_categories = any_array_create_from_raw(
(void *[]){
_tr("Nodes"),
},
1);
gc_root(nodes_brush_categories);
#if defined(IRON_WINDOWS) || defined(IRON_LINUX) || defined(IRON_MACOS)
nodes_material_categories = any_array_create_from_raw(
@@ -503,7 +442,6 @@ void _kickstart() {
},
5);
#endif
gc_root(nodes_material_categories);
#if defined(IRON_ANDROID) || defined(IRON_IOS)
ui_sidebar_default_w = ui_sidebar_default_w_mini;
@@ -512,30 +450,22 @@ void _kickstart() {
#endif
ui_sidebar_hminimized = ui_handle_create();
gc_root(ui_sidebar_hminimized);
ui_sidebar_w_mini = ui_sidebar_default_w_mini;
console_last_traces = any_array_create(0);
gc_root(console_last_traces);
box_preferences_htab = ui_handle_create();
gc_root(box_preferences_htab);
ui_box_hwnd = ui_handle_create();
gc_root(ui_box_hwnd);
tab_layers_layer_name_handle = ui_handle_create();
gc_root(tab_layers_layer_name_handle);
tab_meshes_mesh_name_handle = ui_handle_create();
gc_root(tab_meshes_mesh_name_handle);
render_path_raytrace_f32a = f32_array_create(24);
gc_root(render_path_raytrace_f32a);
render_path_raytrace_help_mat = mat4_identity();
neural_node_results = any_imap_create();
gc_root(neural_node_results);
sys_on_resize = base_on_resize;
sys_on_w = base_w;
@@ -559,7 +489,6 @@ void _kickstart() {
iron_set_app_name(manifest_title);
data_cached_scene_raws = any_map_create();
gc_root(data_cached_scene_raws);
any_map_set(data_cached_scene_raws, "Scene", startup_get_scene());
scene_set_active("Scene");
@@ -569,12 +498,10 @@ void _kickstart() {
if (g_config->render_mode == RENDER_MODE_FORWARD) {
render_path_forward_init();
render_path_commands = render_path_forward_commands;
gc_root(render_path_commands);
}
else {
render_path_commands = render_path_deferred_commands;
gc_root(render_path_commands);
}
#ifdef WITH_PLUGINS