Remove asserts

This commit is contained in:
MegaMech
2024-11-20 22:50:36 -07:00
parent e5d512b3e8
commit 097a3ff550
4 changed files with 4 additions and 11 deletions
+4 -1
View File
@@ -117,7 +117,10 @@ void Course::Load() {
// Extract packed DLs
u8* packed = reinterpret_cast<u8*>(LOAD_ASSET_RAW(this->gfx));
Gfx* gfx = (Gfx*) allocate_memory(sizeof(Gfx) * this->gfxSize); // Size of unpacked DLs
assert(gfx != NULL);
if (gfx == NULL) {
printf("Failed to allocate course displaylist memory\n");
}
gSegmentTable[7] = reinterpret_cast<uintptr_t>(&gfx[0]);
displaylist_unpack(reinterpret_cast<uintptr_t *>(gfx), reinterpret_cast<uintptr_t>(packed), 0);
-5
View File
@@ -9,7 +9,6 @@
#include "collision.h"
#include "math_util.h"
#include "code_800029B0.h"
#include <assert.h>
#include <defines.h>
#include "port/Game.h"
@@ -1818,10 +1817,6 @@ void set_vtx_buffer(uintptr_t addr, u32 numVertices, u32 bufferIndex) {
u32 i;
Vtx* vtx = (Vtx*) addr;
for (i = 0; i < numVertices; i++) {
// printf("VTX: 0x%llX",vtx);
if (vtx == 0) {
assert(false);
}
vtxBuffer[bufferIndex] = vtx;
vtx++;
bufferIndex++;
-4
View File
@@ -19,7 +19,6 @@
#include "courses/all_course_offsets.h"
#include "defines.h"
#include <assert.h>
#include <course_offsets.h>
#include "engine/courses/Course.h"
@@ -63,7 +62,6 @@ void* get_next_available_memory_addr(uintptr_t size) {
if (gNextFreeMemoryAddress > sPoolEnd) {
printf("[memory.c] get_next_available_memory_addr(): Memory Pool Out of Bounds! Out of memory!\n");
PRINT_MEMPOOL;
assert(true);
}
return (void*) freeSpace;
@@ -199,7 +197,6 @@ void* allocate_memory(size_t size) {
printf("[memory.c] allocate_memory(): gFreeMemorySize below zero!\n");
printf("gFreeMemorySize: 0x%X", gFreeMemorySize);
PRINT_MEMPOOL;
assert(false);
}
freeSpace = (uintptr_t) gNextFreeMemoryAddress;
@@ -208,7 +205,6 @@ void* allocate_memory(size_t size) {
if (gNextFreeMemoryAddress > sPoolEnd) {
printf("[memory.c] allocate_memory(): Memory Pool Out of Bounds! Out of memory!\n");
PRINT_MEMPOOL;
assert(false);
}
return (void*) freeSpace;
-1
View File
@@ -20,7 +20,6 @@
#include "courses/all_course_data.h"
#include "courses/all_course_packed.h"
#include "courses/all_course_offsets.h"
#include <assert.h>
#include "port/Game.h"
#include "enhancements/collision_viewer.h"