Skip to content

Instantly share code, notes, and snippets.

View Lain62's full-sized avatar
🏳️‍⚧️
Woooo

Lain Lain62

🏳️‍⚧️
Woooo
View GitHub Profile
@Lain62
Lain62 / sdl3stbtruetype-example.odin
Last active April 16, 2025 16:26
A quick guide on how to set up stb truetype(stbtt) with sdl3 on odin
package sdl3stbtruetypeexample
import SDL "vendor:sdl3"
import stbtt "vendor:stb/truetype"
import "core:strings"
Font :: struct {
bitmap: []u8,
packed_char: []stbtt.packedchar,
atlas: ^SDL.Texture,
@Lain62
Lain62 / snakept2.c
Last active September 25, 2024 01:47
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ncurses.h>
#define BOARDWIDTH 40
#define BOARDHEIGHT 20
#define SNAKEINITPOSX 10
@Lain62
Lain62 / tictactoe.c
Last active August 9, 2024 07:32
This is actually overengineered as hell istg and its AWFUL DONT USE AS REFERENCE PLEASE
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
int WinningCondition[8][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {1, 4, 7}, {2, 5, 8}, {3, 6, 9}, {1, 5, 9}, {7, 5, 3}};
typedef enum
{
Xmarker,
Omarker