From 3fa4de1578dd53e71b893c19477056e851e2ad73 Mon Sep 17 00:00:00 2001 From: Daniel Bross Date: Wed, 2 Apr 2025 23:36:05 +0200 Subject: [PATCH] Changed default perspective camera far plane | Added string support when copying entities. --- core/camera.jai | 2 +- metaprogram.jai | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/camera.jai b/core/camera.jai index 078cf54..87d5540 100644 --- a/core/camera.jai +++ b/core/camera.jai @@ -35,7 +35,7 @@ Camera :: struct { dirty : bool; } -create_perspective_camera :: (position: Vector3 = .{}, fov: float, aspect: float, yaw: float = 0.0, pitch: float = 0.0, roll: float = 0.0, z_near: float = 0.1, z_far: float = 100.0) -> Camera { +create_perspective_camera :: (position: Vector3 = .{}, fov: float, aspect: float, yaw: float = 0.0, pitch: float = 0.0, roll: float = 0.0, z_near: float = 0.1, z_far: float = 1000.0) -> Camera { camera : Camera; camera.type = .PERSPECTIVE; camera.world_up = .{0,1,0}; diff --git a/metaprogram.jai b/metaprogram.jai index 640b313..86edc2d 100644 --- a/metaprogram.jai +++ b/metaprogram.jai @@ -394,6 +394,9 @@ generate_member_copy :: (type: *Type_Info_Struct, builder: *String_Builder, path case .INTEGER; { print_to_builder(builder, "\tcopy.% = e.%;\n", new_path, new_path); } + case .STRING; { + print_to_builder(builder, "\tcopy.% = copy_string(e.%,,allocator=e.scene.allocator);\n", new_path, new_path); + } } } }