basic file format

This commit is contained in:
2025-11-02 16:15:12 +01:00
parent 75b41c49bb
commit 1d86d24ed1
5 changed files with 95 additions and 3 deletions

21
src/common.h Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#include <cstdint>
#define ASSERT(cond) \
if (!(cond)) { \
std::cerr << "ASSERTION FAILED at " << __FILE__ << ":" << __LINE__ << "\n" \
<< #cond << std::endl; \
abort(); \
}
using u8 = unsigned char;
using i8 = char;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
static_assert(sizeof(float) * 8 == 32);
using f32 = float;
static_assert(sizeof(double) * 8 == 64);
using f64 = double;