mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
assert
macro OK (#755)
* create assert macro and replace a bunch of __assert Signed-off-by: angie <angheloalf95@gmail.com> * Another bunch of assert Signed-off-by: angie <angheloalf95@gmail.com> * more assert Signed-off-by: angie <angheloalf95@gmail.com> * assert(false) Signed-off-by: angie <angheloalf95@gmail.com> * last assert used in matching code Signed-off-by: angie <angheloalf95@gmail.com> * the non-matchings Signed-off-by: angie <angheloalf95@gmail.com> * typo Signed-off-by: angie <angheloalf95@gmail.com> * format Signed-off-by: angie <angheloalf95@gmail.com> * change macro to uppercase Signed-off-by: angie <angheloalf95@gmail.com> * Apply suggestions from code review Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Change ASSERT(false) to ASSERT(0) Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
0b8252cfe9
commit
98aef8988a
44 changed files with 148 additions and 301 deletions
|
@ -40,9 +40,8 @@ void func_800A663C(GlobalContext* globalCtx, PSkinAwb* skin, SkeletonHeader* ske
|
|||
skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
|
||||
limbCount = skin->skeletonHeader->limbCount;
|
||||
skin->avbTbl = ZeldaArena_MallocDebug(limbCount * sizeof(SkinAvb), "../z_skin_awb.c", 212);
|
||||
if (skin->avbTbl == NULL) {
|
||||
__assert("pskin_awb->avb_tbl != NULL", "../z_skin_awb.c", 214);
|
||||
}
|
||||
|
||||
ASSERT(skin->avbTbl != NULL, "pskin_awb->avb_tbl != NULL", "../z_skin_awb.c", 214);
|
||||
for (i = 0; i < limbCount; i++) {
|
||||
SkinAvb* avbEntry = &skin->avbTbl[i];
|
||||
SkinLimb* limb = SEGMENTED_TO_VIRTUAL(skeleton[i]);
|
||||
|
@ -57,13 +56,9 @@ void func_800A663C(GlobalContext* globalCtx, PSkinAwb* skin, SkeletonHeader* ske
|
|||
|
||||
avbEntry->unk_0 = 0;
|
||||
avbEntry->buf[0] = ZeldaArena_MallocDebug(temp_s1->unk_0 * sizeof(Vtx), "../z_skin_awb.c", 235);
|
||||
if (avbEntry->buf[0] == 0) {
|
||||
__assert("psavb->buf[0] != NULL", "../z_skin_awb.c", 237);
|
||||
}
|
||||
ASSERT(avbEntry->buf[0] != NULL, "psavb->buf[0] != NULL", "../z_skin_awb.c", 237);
|
||||
avbEntry->buf[1] = ZeldaArena_MallocDebug(temp_s1->unk_0 * sizeof(Vtx), "../z_skin_awb.c", 240);
|
||||
if (avbEntry->buf[1] == 0) {
|
||||
__assert("psavb->buf[1] != NULL", "../z_skin_awb.c", 242);
|
||||
}
|
||||
ASSERT(avbEntry->buf[1] != NULL, "psavb->buf[1] != NULL", "../z_skin_awb.c", 242);
|
||||
func_800A6460(globalCtx, skin, i);
|
||||
}
|
||||
if (1) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue