luboslenco 2 veckor sedan
förälder
incheckning
84c1dad19c

+ 1 - 1
base/assets/text_coloring.json

@@ -4,7 +4,7 @@
 		{ "color": 4294627760, "start": ["'"], "end": "'", "separated": false },
 		{ "color": 4284384616, "start": ["//"], "end": "\n", "separated": false },
 		{ "color": 4288038789, "start": ["#pragma", "#include", "#ifdef", "#ifndef", "#undef", "#else", "#elif", "#define", "#if", "defined", "#endif"], "end": "", "separated": true  },
-		{ "color": 4291204550, "start": ["void", "const", "extern", "char", "bool", "int32_t", "float", "double", "unsigned", "for", "while", "if", "else", "NULL", "null", "nullptr", "var", "let", "new", "delete", "import", "typedef", "class", "struct", "String", "Bool", "Int", "Float", "Dynamic", "Array", "Void", "static", "package", "enum", "abstract", "to", "from", "int", "public", "private", "function", "true", "false", "size_t", "wchar_t", "in", "using", "namespace", "return"], "end": "", "separated": true },
+		{ "color": 4291204550, "start": ["void", "const", "extern", "char", "bool", "float", "double", "unsigned", "for", "while", "if", "else", "NULL", "null", "var", "let", "type", "typedef", "struct", "static", "enum", "int", "function", "true", "false", "return"], "end": "", "separated": true },
 		{ "color": 4289117513, "start": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], "end": "", "separated": true },
 		{ "color": 4287269514, "start": ["=", "(", ")", "<", ">", "[", "]", "{", "}", ";", "-", "+", "/", "*", "@", "#", "$", "%", ":", ",", ".", "&", "!", "?"], "end": "", "separated": false }
 	],

+ 2 - 2
base/sources/ts/iron/object.ts

@@ -28,7 +28,7 @@ function object_create(is_empty: bool = true): object_t {
 	raw.uid = _object_uid_counter++;
 	raw.transform = transform_create(raw);
 	raw.is_empty = is_empty;
-	if (raw.is_empty && _scene_ready) {
+	if (raw.is_empty) {
 		array_push(scene_empties, raw);
 	}
 	return raw;
@@ -59,7 +59,7 @@ function object_set_parent(raw: object_t, parent_object: object_t, parent_inv: b
 }
 
 function object_remove_super(raw: object_t) {
-	if (raw.is_empty && _scene_ready) {
+	if (raw.is_empty) {
 		array_remove(scene_empties, raw);
 	}
 	///if arm_anim

+ 1 - 5
base/sources/ts/iron/scene.ts

@@ -12,7 +12,6 @@ let scene_animations: anim_raw_t[];
 ///end
 let scene_embedded: map_t<string, gpu_texture_t>;
 
-let _scene_ready: bool;
 let _scene_uid_counter: i32 = 0;
 let _scene_uid: i32;
 let _scene_raw: scene_t;
@@ -35,8 +34,6 @@ function scene_create(format: scene_t): object_t {
 	scene_embedded = map_create();
 	_scene_root = object_create();
 	_scene_root.name = "Root";
-
-	_scene_ready = false;
 	_scene_raw = format;
 
 	scene_world = data_get_world(format.name, format.world_ref);
@@ -49,7 +46,6 @@ function scene_create(format: scene_t): object_t {
 
 	scene_camera = scene_get_camera(format.camera_ref);
 	_scene_scene_parent = scene_object;
-	_scene_ready = true;
 	return scene_object;
 }
 
@@ -86,7 +82,7 @@ function scene_set_active(scene_name: string): object_t {
 }
 
 function scene_render_frame() {
-	if (!_scene_ready || render_path_commands == null) {
+	if (render_path_commands == null) {
 		return;
 	}
 

+ 0 - 4
base/sources/ts/iron/sys.ts

@@ -404,10 +404,6 @@ function sys_real_delta(): f32 {
 }
 
 function sys_render() {
-	if (!_scene_ready) {
-		return;
-	}
-
 	if (_sys_on_next_frames.length > 0) {
 		_sys_run_callbacks(_sys_on_next_frames);
 		array_splice(_sys_on_next_frames, 0, _sys_on_next_frames.length);