Compiles again

This commit is contained in:
2024-10-13 00:54:26 +02:00
parent 8f2dad9cec
commit 9939c84f09
9 changed files with 172 additions and 147 deletions

View File

@@ -72,8 +72,6 @@ Editor :: struct {
menu_position: Vector2;
}
editor : Editor;
update_transform_gizmo :: (ray: Ray, mouse_position: Vector2) -> bool {
return false;
// selected_entity := engine.editor.selected_entity;

View File

@@ -7,7 +7,7 @@ pick_scene_view_at :: (coordinates: Vector2) {
hit_entity : *Entity;
closest : float = 100000000;
for game_state.current_scene.entities {
for current_scene.entities {
if !(it.flags & .RENDERABLE) continue;
//if it.flags & Entity_Flags.DELETED || !it.selectable || it.parent != null continue;
@@ -64,7 +64,7 @@ editor_ui :: () {
//if ui_button_with_texture(editor.icons.play) {
// play_current_editor_scene();
//}
ui_label(tprint("Editing '%'", game_state.current_scene.name), .{1,1,1,1});
ui_label(tprint("Editing '%'", current_scene.name), .{1,1,1,1});
//}
//}
}
@@ -93,7 +93,7 @@ editor_ui :: () {
ui_set_next_size_x(.PCT, 1.0);
ui_tab_title_bar("ENTITIES");
for game_state.current_scene.entities {
for current_scene.entities {
ui_set_next_padding(20);
clicked := false;
if it.name.count == 0 {
@@ -124,7 +124,7 @@ editor_ui :: () {
ui_set_next_size_x(.PCT, 1.0);
ui_set_next_size_y(.PCT, 0.9);
state := ui_interactable_texture(get_texture_from_pass("FXAA"));
state := ui_interactable_texture(get_texture_from_pass("UI Blend Pass"));
if state.left_mouse_down {
//pick_scene_view_at(.{state.normalized_local_mouse_coordinates.x, 1.0 - state.normalized_local_mouse_coordinates.y});
@@ -206,7 +206,7 @@ base_editor_update :: () {
camera := *editor.camera;
if key_pressed(.CTRL) && key_down(.S) {
save_scene(game_state.current_scene, "../assets/scenes/");
save_scene(current_scene, "../assets/scenes/");
//show_message("Saved scene");
}
@@ -232,7 +232,7 @@ base_editor_update :: () {
// editor_undo();
//}
if game_state.mode == .EDITING {
if mode == .EDITING {
if key_pressed(.MOUSE_RIGHT) {
set_show_cursor(false);
// Update camera