This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package import_scan | |
| import "core:strings" | |
| import "core:strconv" | |
| import "core:path/filepath" | |
| import "core:fmt" | |
| import "core:os/os2" | |
| import "core:odin/ast" | |
| import "core:odin/parser" | |
| import "core:odin/tokenizer" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package foo | |
| import "base:intrinsics" | |
| import "core:math" | |
| import "core:fmt" | |
| import "core:time" | |
| // https://www.desmos.com/calculator/i17pexccum | |
| a: f32 = 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Micro-fmt | |
| // | |
| // Extremely stripped down `core:fmt` alternative. | |
| // Supports only %s, %f, %i, %x, %% | |
| // NOTE: curly braces don't need to be doubled ({{ and }}) like in `core:fmt` | |
| // | |
| // By Jakub Tomšů | |
| package ufmt | |
| import "base:runtime" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A demo app showing how to compute tightest possible oriented bounding box/rectangle of a convex polygon. | |
| // The order of edges matters, so the points should be in order. In case of convex polygons you can just radially sort them. | |
| // | |
| // By Jakub Tomšů | |
| package poly_obb_demo | |
| import "core:fmt" | |
| import "core:math/linalg" | |
| import rl "vendor:raylib" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fp_exceptions | |
| import "core:log" | |
| when ODIN_OS == .Windows { | |
| foreign import libcmt "system:libcmt.lib" | |
| } | |
| @(default_calling_convention = "system") | |
| foreign libcmt { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Failed experiment for a hotreload system. Instead of passing a big global struct pointer, try copying DLL global data sections. | |
| copy_dll_data_sections :: proc( | |
| dst: windows.HMODULE, | |
| src: windows.HMODULE, | |
| ) -> bool { | |
| dst_header := get_dll_nt_header(dst) or_return | |
| src_header := get_dll_nt_header(src) or_return | |
| dst_sections := cast([^]windows_IMAGE_SECTION_HEADER)windows_image_first_section(dst_header) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package obj | |
| import "core:fmt" | |
| import "core:math/linalg" | |
| import "core:os" | |
| import "core:strconv" | |
| import "core:strings" | |
| // https://en.wikipedia.org/wiki/Wavefront_.obj_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package qmap | |
| import "core:fmt" | |
| import "core:os" | |
| import "core:strconv" | |
| import "core:strings" | |
| // https://developer.valvesoftware.com/wiki/MAP_(file_format) | |
| File :: struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package curves | |
| Curve_Kind :: enum u8 { | |
| Linear, | |
| Bezier, | |
| Hermite, | |
| Catmull_Rom, | |
| B_Spline, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package curve_test | |
| import "core:math/linalg" | |
| import rl "vendor:raylib" | |
| main :: proc() { | |
| rl.SetConfigFlags({.MSAA_4X_HINT, .VSYNC_HINT}) | |
| rl.InitWindow(900, 600, "Curves") | |
| defer rl.CloseWindow() |
NewerOlder