Skip to content

Instantly share code, notes, and snippets.

@nandakoryaaa
nandakoryaaa / 5_utf16.c
Created June 11, 2025 15:56
A simple game of guessing 5-letter Russian words (final)
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <process.h>
#include <time.h>
#include <string.h>
#include <windows.h>
#define LETTER_CNT 5
@nandakoryaaa
nandakoryaaa / main.rs
Created June 23, 2025 11:00
Implementing display object list, drawabe & behaviour traits for abstract game in Rust
#[derive (Copy, Clone)]
struct Rect {
w: u32,
h: i32
}
struct Renderer {
canvas: u32 // not used
}
/**
* ZLIB DEFLATE decompressor
* derived from Python code at https://pyokagan.name/blog/2019-10-18-zlibinflate/
*/
struct LZTables {
length_extra_bits: [u8; 29],
length_base: [u16; 29],
dist_extra_bits: [u8; 30],
dist_base: [u16; 30],