mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 19:35:28 +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
|
@ -16,9 +16,7 @@ void EffectSs_InitInfo(GlobalContext* globalCtx, s32 tableSize) {
|
|||
|
||||
sEffectSsInfo.table =
|
||||
GameState_Alloc(&globalCtx->state, tableSize * sizeof(EffectSs), "../z_effect_soft_sprite.c", 289);
|
||||
if (sEffectSsInfo.table == NULL) {
|
||||
__assert("EffectSS2Info.data_table != NULL", "../z_effect_soft_sprite.c", 290);
|
||||
}
|
||||
ASSERT(sEffectSsInfo.table != NULL, "EffectSS2Info.data_table != NULL", "../z_effect_soft_sprite.c", 290);
|
||||
|
||||
sEffectSsInfo.searchStartIndex = 0;
|
||||
sEffectSsInfo.tableSize = tableSize;
|
||||
|
@ -175,9 +173,7 @@ void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* init
|
|||
|
||||
overlayEntry = &gEffectSsOverlayTable[type];
|
||||
|
||||
if (type >= EFFECT_SS_TYPE_MAX) {
|
||||
__assert("type < EFFECT_SS2_TYPE_LAST_LABEL", "../z_effect_soft_sprite.c", 556);
|
||||
}
|
||||
ASSERT(type < EFFECT_SS_TYPE_MAX, "type < EFFECT_SS2_TYPE_LAST_LABEL", "../z_effect_soft_sprite.c", 556);
|
||||
|
||||
if (EffectSs_FindSlot(priority, &index) != 0) {
|
||||
// Abort because we couldn't find a suitable slot to add this effect in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue