Skip to content

Instantly share code, notes, and snippets.

View Platin21's full-sized avatar
🏠
Working from home

Platin21

🏠
Working from home
View GitHub Profile
; ModuleID = 'odin_package'
source_filename = "odin_package"
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-unknown-linux-gnu"
%runtime.Type_Info = type { i64, i64, i32, i64, { [0 x i64], [120 x i8], i64 } }
%..string = type { i8*, i64 }
%runtime.Default_Temp_Allocator = type { { i8*, i64 }, i64, i8*, %runtime.Allocator, { { i8*, i64 }*, i64, i64, %runtime.Allocator } }
%runtime.Allocator = type { i8*, i8* }
%strconv.Float_Info = type { i64, i64, i64 }
Handle :: distinct rawptr;
File :: distinct rawptr;
stdin :: Handle;
stdout :: Handle;
stderr :: Handle;
args :: ^[string];
clear_env :: proc();
environ :: proc();
get_env :: proc();
@Platin21
Platin21 / os2_read.odin
Last active February 23, 2020 18:00
Just proc signatures for odin os2
/*# Most native proc read_ptr #*/
read_ptr :: proc (file: File, bytes: u64, data: rawptr) -> (bytes: u64, err: Error)
read_slice :: proc (file: File, bytes: u64, data: []u8) -> (bytes: u64, err: Error)
/*# Extendet procs read_ptr #*/
read_ptr_at :: proc (file: File, bytes: u64, data: rawptr, offset: u64) -> (bytes: u64, err: Error)
read_slice_at :: proc (file: File, data: u8[], offset: u64) -> (bytes: u64, err: Error)
read :: proc (file: File, bytes: u64) -> (data: []u8, err: Error)
read_str :: proc (file: File, runes: u64) -> (str: string, err: Error)
let data = {
type: "folder",
children: [
{
type: "folder",
name: "DEPTH2-0",
children: [
{
type: "folder",
name: "DEPTH3-0",
@Platin21
Platin21 / Design.hpp
Created December 17, 2017 00:34
Spirit Graphics
//==@ 3d Spirit! @==\\
enum spType;
enum spDrawType;
enum spStatus;
struct spContext;
spContext spCreateContext();
//
@Platin21
Platin21 / FileAbstraction.cpp
Created November 15, 2017 20:25
Tried to build an Abstraction around files is only a pattern not more.
#ifdef __CHAR_UNSIGNED__
using UChar = unsigned char;
#else
using UChar = char;
#endif
using i64 = long long;
i64 CStrLenghtOf(UChar* text)