deinit_entity
This commit is contained in:
@@ -201,6 +201,8 @@ entity_should_be_rendered :: (e: *Entity) -> bool {
|
||||
}
|
||||
|
||||
destroy_entity :: (e: *Entity) {
|
||||
call_correct_deinit_entity(e);
|
||||
|
||||
if e.collider.mesh.vertices.data != null {
|
||||
array_free(e.collider.mesh.vertices);
|
||||
}
|
||||
|
||||
25
core/panic_allocator.jai
Normal file
25
core/panic_allocator.jai
Normal file
@@ -0,0 +1,25 @@
|
||||
Panic_Allocator :: struct {
|
||||
|
||||
}
|
||||
|
||||
panic_alloc :: (mode : Allocator_Mode, requested_size : s64, old_size : s64, old_memory : *void, allocator_data : *void) -> *void {
|
||||
if mode == .THREAD_START return null;
|
||||
if mode == .THREAD_STOP return null;
|
||||
|
||||
assert(false, "You are attempting to use the default allocator, which for this project has been set to panic.");
|
||||
return null;
|
||||
}
|
||||
|
||||
make_panic_allocator :: () -> Allocator #c_call {
|
||||
result : Allocator = ---;
|
||||
|
||||
result.proc = panic_alloc;
|
||||
result.data = null;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#scope_module
|
||||
|
||||
#import "Basic";
|
||||
Reference in New Issue
Block a user