mirror of
https://github.com/Ed94/metadesk.git
synced 2026-06-19 10:32:24 -07:00
beginning to tackle compile errors
This commit is contained in:
Vendored
+4
-1
@@ -73,7 +73,10 @@
|
||||
"chrono": "c",
|
||||
"misc.h": "c",
|
||||
"gencpp_c11.h": "c",
|
||||
"push_ignores.inline.h": "c"
|
||||
"push_ignores.inline.h": "c",
|
||||
"list": "c",
|
||||
"xhash": "c",
|
||||
"xtree": "c"
|
||||
},
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#713fb8",
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ arena_push(Arena *arena, U64 size, U64 align)
|
||||
}
|
||||
|
||||
void
|
||||
arena_pop_to(Arena *arena, U64 pos)
|
||||
arena_pop_to(Arena *arena, SSIZE pos)
|
||||
{
|
||||
SPTR const header_size = align_pow2(size_of(Arena), MD_DEFAULT_MEMORY_ALIGNMENT);
|
||||
|
||||
|
||||
+6
-6
@@ -66,8 +66,8 @@ struct TempArena
|
||||
|
||||
MD_API void* arena_allocator_proc(void* allocator_data, AllocatorMode mode, SSIZE size, SSIZE alignment, void* old_memory, SSIZE old_size, U64 flags);
|
||||
|
||||
force_inline
|
||||
AllocatorInfo arena_allocator(Arena* arena) {
|
||||
force_inline AllocatorInfo
|
||||
arena_allocator(Arena* arena) {
|
||||
AllocatorInfo info = { arena_allocator_proc, arena};
|
||||
return info;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ void arena_release(Arena *arena);
|
||||
|
||||
//- rjf: arena push/pop/pos core functions
|
||||
|
||||
MD_API void *arena_push (Arena* arena, SSIZE size, SSIZE align);
|
||||
MD_API void* arena_push (Arena* arena, SSIZE size, SSIZE align);
|
||||
U64 arena_pos (Arena* arena);
|
||||
MD_API void arena_pop_to(Arena* arena, SSIZE pos);
|
||||
|
||||
@@ -126,9 +126,9 @@ arena_pos(Arena *arena) {
|
||||
force_inline void arena_clear(Arena* arena) { arena_pop_to(arena, 0); }
|
||||
|
||||
inline void
|
||||
arena_pop(Arena* arena, U64 amt) {
|
||||
U64 pos_old = arena_pos(arena);
|
||||
U64 pos_new = pos_old;
|
||||
arena_pop(Arena* arena, SSIZE amt) {
|
||||
SSIZE pos_old = arena_pos(arena);
|
||||
SSIZE pos_new = pos_old;
|
||||
if (amt < pos_old)
|
||||
{
|
||||
pos_new = pos_old - amt;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#undef MARKUP_LAYER_COLOR
|
||||
#define MARKUP_LAYER_COLOR 0.20f, 0.60f, 0.80f
|
||||
|
||||
#include "base.h"
|
||||
|
||||
#include "platform.c"
|
||||
|
||||
MD_NS_BEGIN
|
||||
|
||||
@@ -98,16 +98,16 @@ typedef void VoidProc(void);
|
||||
////////////////////////////////
|
||||
//~ NOTE(allen): Constants
|
||||
|
||||
#define SIGN32 0x80000000;
|
||||
#define EXPONENT32 0x7F800000;
|
||||
#define MANTISSA32 0x007FFFFF;
|
||||
#define SIGN32 0x80000000
|
||||
#define EXPONENT32 0x7F800000
|
||||
#define MANTISSA32 0x007FFFFF
|
||||
|
||||
#define BIG_GOLDEN32 1.61803398875f;
|
||||
#define SMALL_GOLDEN32 0.61803398875f;
|
||||
#define BIG_GOLDEN32 1.61803398875f
|
||||
#define SMALL_GOLDEN32 0.61803398875f
|
||||
|
||||
#define PI32 3.1415926535897f;
|
||||
#define PI32 3.1415926535897f
|
||||
|
||||
#define MACHINE_EPSILON64 4.94065645841247e-324;
|
||||
#define MACHINE_EPSILON64 4.94065645841247e-324
|
||||
|
||||
#define MIN_U8 0u
|
||||
#define MAX_U8 0xffu
|
||||
|
||||
+6
-1
@@ -864,7 +864,7 @@ inline B32 contains_2s64 (Rng2S64 r, Vec2S64 x) { B32 c = (r.min.x <
|
||||
inline Vec2S64 dim_2s64 (Rng2S64 r) { Vec2S64 dim = {r.max.x - r.min.x, r.max.y - r.min.y}; return dim; }
|
||||
inline Rng2S64 union_2s64 (Rng2S64 a, Rng2S64 b) { Rng2S64 c; c.p0.x = md_min(a.min.x, b.min.x); c.p0.y = md_min(a.min.y, b.min.y); c.p1.x = md_max(a.max.x, b.max.x); c.p1.y = md_max(a.max.y, b.max.y); return c; }
|
||||
inline Rng2S64 intersect_2s64(Rng2S64 a, Rng2S64 b) { Rng2S64 c; c.p0.x = md_max(a.min.x, b.min.x); c.p0.y = md_max(a.min.y, b.min.y); c.p1.x = md_min(a.max.x, b.max.x); c.p1.y = md_min(a.max.y, b.max.y); return c; }
|
||||
inline Vec2S64 clamp_2s32 (Rng2S64 r, Vec2S64 v) { v.x = clamp(r.min.x, v.x, r.max.x); v.y = clamp(r.min.y, v.y, r.max.y); return v; }
|
||||
inline Vec2S64 clamp_2s64 (Rng2S64 r, Vec2S64 v) { v.x = clamp(r.min.x, v.x, r.max.x); v.y = clamp(r.min.y, v.y, r.max.y); return v; }
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Miscellaneous Ops
|
||||
@@ -967,6 +967,11 @@ u32_from_rgba(Vec4F32 rgba)
|
||||
////////////////////////////////
|
||||
//~ rjf: List Type Functions
|
||||
|
||||
void rng1s64_list_push (Arena* arena, Rng1S64List* list, Rng1S64 rng);
|
||||
void rng1s64_list_alloc (AllocatorInfo ainfo, Rng1S64List* list, Rng1S64 rng);
|
||||
Rng1S64Array rng1s64_array_from_list (Arena* arena, Rng1S64List* list);
|
||||
Rng1S64Array rng1s64_array_from_list_alloc(AllocatorInfo ainfo, Rng1S64List* list);
|
||||
|
||||
inline void
|
||||
rng1s64_list_push(Arena* arena, Rng1S64List* list, Rng1S64 rng)
|
||||
{
|
||||
|
||||
+4
-4
@@ -81,7 +81,7 @@
|
||||
//~ rjf: Memory Operation Macros
|
||||
|
||||
|
||||
// TODO(Ed): Review usage of memmove here...
|
||||
// TODO(Ed): Review usage of memmove here...(I guess wanting to avoid overlap faults..)
|
||||
#ifndef memory_copy
|
||||
# if USE_VENDOR_MEMORY_OPS
|
||||
# define memory_copy(dst, src, size) memmove((dst), (src), (size))
|
||||
@@ -198,7 +198,7 @@ void* mem_move( void* destination, void const* source, SSIZE byte_count )
|
||||
return dest_ptr;
|
||||
|
||||
if ( src_ptr + byte_count <= dest_ptr || dest_ptr + byte_count <= src_ptr ) // NOTE: Non-overlapping
|
||||
return mem_copy( dest_ptr, src_ptr, byte_count );
|
||||
return memory_copy( dest_ptr, src_ptr, byte_count );
|
||||
|
||||
if ( dest_ptr < src_ptr )
|
||||
{
|
||||
@@ -604,8 +604,8 @@ inline void
|
||||
sll__queue_pop_nz(void* nil, void** f, void* f_next, void** l)
|
||||
{
|
||||
if (*f == *l) {
|
||||
*f == nil;
|
||||
*l == nil;
|
||||
*f = nil;
|
||||
*l = nil;
|
||||
}
|
||||
else {
|
||||
*f = f_next;
|
||||
|
||||
Reference in New Issue
Block a user