
- We just add to a frame of quads which the renderer deals with in gfx_update - draw_quad, draw_rect, draw_rect_rotated - Currently just implemented with legacy opengl, so we can't do custom shading - Added third party code from lodepng so we can load pngs without any other dependencies (no C includes) - ALLOCATOR_REALLOCATE - Basic Vector2, Vector3, Vector4 stuff, and some math utilities - Added <math.h> dependency for now. - Graphics renderer frontend layer - Naive get_random() implementation
13 lines
332 B
C
13 lines
332 B
C
// This is a naive implementation for now (LCG)
|
|
// Distribution will probably suck.
|
|
|
|
#define RAND_MAX_64 0xFFFFFFFFFFFFFFFFull
|
|
#define MULTIPLIER 6364136223846793005ull
|
|
#define INCREMENT 1ull
|
|
|
|
u64 seed_for_random = 1;
|
|
|
|
u64 get_random() {
|
|
seed_for_random = seed_for_random * MULTIPLIER + INCREMENT;
|
|
return seed_for_random;
|
|
}
|