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
// IMPORTANT: THIS IS A NON WORKING EXAMPLE | |
// ATTENTION: THIS IS NOT WORKING | |
import "core:fmt.odin"; | |
QueueNode :: struct(T: type) { | |
data: T, | |
prev: int, | |
used: bool = false, | |
} |
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
when ODIN_OS == "windows" { | |
foreign_library openal "OpenAL32.lib"; | |
} else { | |
_ := compile_assert(false); | |
} | |
/* | |
ALboolean -> u8 | |
ALchar -> u8 | |
ALbyte -> i8 |
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
window.addEventListener("scroll", function() { | |
var spoiler = document.getElementById("spoiler2"); | |
var div = document.getElementsByClassName("problem")[0]; | |
var divs = document.querySelectorAll(".divspoiler"); | |
var spoilers = document.querySelectorAll("input[id^=\"spoiler\"]"); | |
//console.log(labels); | |
var divsfratop = []; | |
divs.forEach(function(item, index) { |
This file has been truncated, but you can view the full 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
; ModuleID = 'test.bc' | |
source_filename = "odin-module" | |
; Function Attrs: nounwind | |
declare void @llvm.assume() #0 | |
; Function Attrs: nounwind | |
declare void @llvm.debugtrap() #0 | |
; Function Attrs: noreturn nounwind |
This file has been truncated, but you can view the full 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
; ModuleID = 'test.bc' | |
source_filename = "odin-module" | |
; Function Attrs: nounwind | |
declare void @llvm.assume(i1) #0 | |
; Function Attrs: nounwind | |
declare void @llvm.debugtrap() #0 | |
; Function Attrs: noreturn nounwind |
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
using import "core:c.odin" | |
foreign import ftlib "freetype271.lib"; | |
/* | |
when ODIN_OS == "windows" do foreign import ftlib "freetype271.lib"; | |
else do _ :: compiler_assert(false); | |
*/ | |
FT_Library_ :: struct {} | |
FT_Library :: ^FT_Library_; |
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
using import "core:c.odin" | |
foreign import ftlib "freetype271.lib"; | |
/* | |
when ODIN_OS == "windows" do foreign import ftlib "freetype271.lib"; | |
else do _ :: compiler_assert(false); | |
*/ | |
FT_Library_ :: struct {} | |
FT_Library :: ^FT_Library_; |
This file has been truncated, but you can view the full 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
target triple = "x86_64-pc-windows-msvc" | |
%..opaque = type {}; | |
%..string = type {i8*, i64} ; Basic_string | |
%..rawptr = type i8* ; Basic_rawptr | |
%..complex32 = type {half, half} ; Basic_complex32 | |
%..complex64 = type {float, float} ; Basic_complex64 | |
%..complex128 = type {double, double} ; Basic_complex128 | |
%..any = type {%..rawptr, %Type_Info*} ; Basic_any | |
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone |
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
// Store the glyph index in the font for faster kerning lookup? | |
Glyph :: struct { | |
bearingX, bearingY: int, | |
width, height: int, | |
advanceX: int, | |
} | |
Font :: struct { | |
face: FT_Face, | |
contex: stbrp_context, |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <stdarg.h> | |
#include <assert.h> | |
#include <string.h> | |
#ifdef _WIN32 | |
# define _strdup strdup | |
# define NORETURN __declspec(noreturn) |
OlderNewer