Bugfixing the runtime (rendering not working yet)

This commit is contained in:
2024-06-11 22:20:19 -04:00
parent 82e7482c85
commit 5bd6519b6a
11 changed files with 31 additions and 16 deletions

View File

@ -79,10 +79,11 @@ array_append_array :: proc( using self: ^Array( $ Type), other : Array(Type)) ->
// Note(Ed) : Original code from gencpp
// libc.memcpy( ptr_offset(data, num), raw_data(items), len(items) * size_of(Type) )
// TODO(Ed) : VERIFY VIA DEBUG THIS COPY IS FINE.
ensure(false, "time to check....")
target := ptr_offset( data, num )
copy( slice_ptr(target, int(capacity - num)), array_to_slice(other) )
dst_slice := slice_ptr(target, int(capacity - num))
src_slice := array_to_slice(other)
copy( dst_slice, src_slice )
num += other.num
return AllocatorError.None