From 82d5a72a7c79f73751a19ddcf8cae5a134a8d0bb Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Wed, 14 Sep 2022 13:45:01 -0500 Subject: [PATCH] removed '@' notes --- src/entity/components/patron.onyx | 4 ++-- src/entity/editor.onyx | 6 +++--- src/entity/entities.onyx | 2 +- src/entity/items.onyx | 2 +- src/entity/scene.onyx | 6 +++--- src/game.onyx | 2 +- src/gfx/mesh.onyx | 2 +- src/gfx/ui.onyx | 16 ++++++++-------- src/main.onyx | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/entity/components/patron.onyx b/src/entity/components/patron.onyx index 48f7e7c..1879bc6 100644 --- a/src/entity/components/patron.onyx +++ b/src/entity/components/patron.onyx @@ -181,7 +181,7 @@ PatronComponent :: struct { if interactor->has(PlayerComponent) { patron.state = .Waiting_For_Order; patron.order_show_animation = 1.0f; - patron.annoy_timeout = random.float(15, 20); @Hardcoded + patron.annoy_timeout = random.float(15, 20); // @Hardcoded Audio_Manager.play_sound("./assets/sounds/prompt-1.wav"); } @@ -226,7 +226,7 @@ PatronComponent :: struct { immediate_set_color(.{0.9, 0.9, 0.9}); immediate_rectangle(r.x, r.y, r.w, r.h); - if annoy_timeout < 10 { @Hardcoded + if annoy_timeout < 10 { // @Hardcoded immediate_set_color(.{1, 0, 0}); ar := r; ar.h *= 1 - annoy_timeout / 10; diff --git a/src/entity/editor.onyx b/src/entity/editor.onyx index 16a4501..69b02b3 100644 --- a/src/entity/editor.onyx +++ b/src/entity/editor.onyx @@ -237,7 +237,7 @@ editor_draw :: () { switch active_tab { case .File { - @Relocate + // @Relocate draw_textbox(.{ x, y, w, 40 }, ^save_path); if draw_button(.{ x, y + 40, w / 2, 40 }, "Save") { @@ -248,7 +248,7 @@ editor_draw :: () { scene->load_from_file(save_path); } - @Cleanup // This is rather expensive to do every frame, I think? + // @Cleanup // This is rather expensive to do every frame, I think? dir, success := os.dir_open("./scenes"); entry: os.DirectoryEntry; y += 80; @@ -641,7 +641,7 @@ editor_draw :: () { active_index := -1; editor_grid_shown := false; - editor_grid_size := 16.0f; @TODO // This should be configurable + editor_grid_size := 16.0f; // @TODO // This should be configurable save_path: [..] u8; diff --git a/src/entity/entities.onyx b/src/entity/entities.onyx index a9cae56..8ee2960 100644 --- a/src/entity/entities.onyx +++ b/src/entity/entities.onyx @@ -87,7 +87,7 @@ door_create :: (scene: ^Scene, pos, size: Vector2) -> ^Entity { -@Relocate +// @Relocate move_towards :: (v: ^$T, target: T, diff: T) { if math.abs(target - *v) <= diff { *v = target; diff --git a/src/entity/items.onyx b/src/entity/items.onyx index 5f727c7..f084e94 100644 --- a/src/entity/items.onyx +++ b/src/entity/items.onyx @@ -27,7 +27,7 @@ item_store_make :: () -> Item_Store { } item_store_load_items_from_file :: (use this: ^Item_Store, path: str) { - @CopyNPaste // from entity/store.onyx + // @CopyNPaste // from entity/store.onyx err, input_file := os.open(path, .Read); if err != .None { diff --git a/src/entity/scene.onyx b/src/entity/scene.onyx index d7042fc..5eb877c 100644 --- a/src/entity/scene.onyx +++ b/src/entity/scene.onyx @@ -130,7 +130,7 @@ Entity :: struct { assert(components[component.type] == component, "Trying to remove a component that the entity doesn't have!"); map.delete(^components, component.type); - @TODO @LEAK // This should free the component, but it needs access to the entity_allocator + // @TODO // @LEAK // This should free the component, but it needs access to the entity_allocator // on the scene. } } @@ -188,7 +188,7 @@ Scene :: struct { scene_create :: (width, height: f32) -> Scene { em: Scene; - em.entity_allocator = context.allocator; @TODO // Replace the allocator here. + em.entity_allocator = context.allocator; // @TODO // Replace the allocator here. em.width = width; em.height = height; @@ -462,7 +462,7 @@ scene_first_component :: (use this: ^Scene, $component_type: type_expr) -> ^comp -@Relocate +// @Relocate Sprite :: struct { sheet: str; pos: Vector2; diff --git a/src/game.onyx b/src/game.onyx index 7ee8441..427df1c 100644 --- a/src/game.onyx +++ b/src/game.onyx @@ -72,7 +72,7 @@ game_update :: (dt: f32) { } game_draw :: () { - @REMOVE @DEBUG + // @REMOVE // @DEBUG // Spritesheet', _ := texture_lookup(#cstr "./assets/images/spritesheet.png"); canvas_use(^scene_canvas); diff --git a/src/gfx/mesh.onyx b/src/gfx/mesh.onyx index 8264dff..981ff11 100644 --- a/src/gfx/mesh.onyx +++ b/src/gfx/mesh.onyx @@ -60,7 +60,7 @@ mesh_make :: (verticies: [] $T, indicies: [] u32, gl_hint := GL_STATIC_DRAW) -> } mesh_update_verticies :: (use mesh: ^Mesh, verticies: [] mesh.Vertex_Type) { - @TODO // Add bounds checking to arrays here. + // @TODO // Add bounds checking to arrays here. glBindBuffer(GL_ARRAY_BUFFER, vertex_handle); glBufferSubData(GL_ARRAY_BUFFER, 0, verticies.count * sizeof mesh.Vertex_Type, verticies.data); diff --git a/src/gfx/ui.onyx b/src/gfx/ui.onyx index 11644bf..ae31eaa 100644 --- a/src/gfx/ui.onyx +++ b/src/gfx/ui.onyx @@ -117,7 +117,7 @@ Slider_Theme :: struct { box_color := Color.{ 0.1, 0.1, 0.1 }; box_border_color := Color.{ 0.2, 0.2, 0.2 }; - box_border_width := 4.0f; @InPixels + box_border_width := 4.0f; // @InPixels bar_color := Color.{ 0.4, 0.4, 0.4 }; bar_hover_color := Color.{ 0, 0, 1 }; @@ -203,10 +203,10 @@ Textbox_Theme :: struct { click_color := Color.{ 0.5, 0.5, 0.7 }; border_color := Color.{ 0.2, 0.2, 0.2 }; - border_width := 6.0f; @InPixels + border_width := 6.0f; // @InPixels cursor_color := Color.{ 0.5, 0.5, 0.5 }; - cursor_width := 4.0f; @InPixels + cursor_width := 4.0f; // @InPixels cursor_blink_speed := 0.04f; // Bigger is faster placeholder_text_color := Color.{ 0.5, 0.5, 0.5 }; @@ -222,7 +222,7 @@ Textbox_Theme :: struct { cursor_animation := 0.0f; cursor_animation_speed := 0.02f; - @HACK // Otherwise the action keys are evaluated every frame. + // @HACK // Otherwise the action keys are evaluated every frame. action_key_timeout := 0.0f; } @@ -407,8 +407,8 @@ Checkbox_Theme :: struct { use animation_theme := Animation_Theme.{}; box_color := Color.{ 0.2, 0.2, 0.2 }; - box_border_width := 4.0f; @InPixels - box_size := 20.0f; @InPixels + box_border_width := 4.0f; // @InPixels + box_size := 20.0f; // @InPixels checked_color := Color.{ 1, 0, 0 }; checked_hover_color := Color.{ 1, 0.6, 0.6 }; @@ -498,8 +498,8 @@ Radio_Theme :: struct { use animation_theme := Animation_Theme.{}; box_color := Color.{ 0.2, 0.2, 0.2 }; - box_border_width := 4.0f; @InPixels - box_size := 20.0f; @InPixels + box_border_width := 4.0f; // @InPixels + box_size := 20.0f; // @InPixels checked_color := Color.{ 0, 0, 1 }; checked_hover_color := Color.{ 0.6, 0.6, 1 }; diff --git a/src/main.onyx b/src/main.onyx index e63f333..d538d19 100644 --- a/src/main.onyx +++ b/src/main.onyx @@ -5,10 +5,10 @@ use glfw3 DEBUG :: #defined(runtime.vars.DEBUG) -@GlobalVariable +// @GlobalVariable window: GLFWwindow_p -@GlobalVariable +// @GlobalVariable window_width: u32 window_height: u32 -- 2.25.1