mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 08:50:23 +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
|
@ -200,14 +200,10 @@ void func_80B2A570(EnViewer* this, GlobalContext* globalCtx) {
|
|||
struct_80B2CEE8* unkStruct = &D_80B2CEE8[this->actor.params >> 8];
|
||||
s32 objIndex = Object_GetIndex(&globalCtx->objectCtx, unkStruct->objId1);
|
||||
|
||||
if (objIndex < 0) {
|
||||
__assert("bank_ID >= 0", "../z_en_viewer.c", 576);
|
||||
}
|
||||
ASSERT(objIndex >= 0, "bank_ID >= 0", "../z_en_viewer.c", 576);
|
||||
|
||||
this->animObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, unkStruct->objId2);
|
||||
if (this->animObjBankIndex < 0) {
|
||||
__assert("this->anime_bank_ID >= 0", "../z_en_viewer.c", 579);
|
||||
}
|
||||
ASSERT(this->animObjBankIndex >= 0, "this->anime_bank_ID >= 0", "../z_en_viewer.c", 579);
|
||||
|
||||
if (!Object_IsLoaded(&globalCtx->objectCtx, objIndex) ||
|
||||
!Object_IsLoaded(&globalCtx->objectCtx, this->animObjBankIndex)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue