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");
}
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;
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") {
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;
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;
-@Relocate
+// @Relocate
move_towards :: (v: ^$T, target: T, diff: T) {
if math.abs(target - *v) <= diff {
*v = target;
}
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 {
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.
}
}
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;
-@Relocate
+// @Relocate
Sprite :: struct {
sheet: str;
pos: Vector2;
}
game_draw :: () {
- @REMOVE @DEBUG
+ // @REMOVE // @DEBUG
// Spritesheet', _ := texture_lookup(#cstr "./assets/images/spritesheet.png");
canvas_use(^scene_canvas);
}
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);
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 };
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 };
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;
}
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 };
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 };
DEBUG :: #defined(runtime.vars.DEBUG)
-@GlobalVariable
+// @GlobalVariable
window: GLFWwindow_p
-@GlobalVariable
+// @GlobalVariable
window_width: u32
window_height: u32