summaryrefslogtreecommitdiff
path: root/src/code/z_construct.c
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-04-29 14:39:46 -0400
committerGitHub <noreply@github.com>2021-04-29 14:39:46 -0400
commit98aef8988adbcb5960e8001e70141d0d1a9034bd (patch)
treea0443e402cb6fa06b0f964aad6d38bf185fb2a9b /src/code/z_construct.c
parent0b8252cfe99651b3174ac8652ba133781e8e2105 (diff)
`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>
Diffstat (limited to 'src/code/z_construct.c')
-rw-r--r--src/code/z_construct.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/code/z_construct.c b/src/code/z_construct.c
index d4fdd05ff..7191a5ab4 100644
--- a/src/code/z_construct.c
+++ b/src/code/z_construct.c
@@ -36,10 +36,7 @@ void func_801109B0(GlobalContext* globalCtx) {
osSyncPrintf("parameter->parameterSegment=%x\n", interfaceCtx->parameterSegment);
- if (interfaceCtx->parameterSegment == NULL) {
- __assert("parameter->parameterSegment != NULL", "../z_construct.c", 161);
- }
-
+ ASSERT(interfaceCtx->parameterSegment != NULL, "parameter->parameterSegment != NULL", "../z_construct.c", 161);
DmaMgr_SendRequest1(interfaceCtx->parameterSegment, (u32)_parameter_staticSegmentRomStart, parameterSize,
"../z_construct.c", 162);
@@ -49,9 +46,7 @@ void func_801109B0(GlobalContext* globalCtx) {
osSyncPrintf("DOアクション テクスチャ初期=%x\n", 0x480);
osSyncPrintf("parameter->do_actionSegment=%x\n", interfaceCtx->do_actionSegment);
- if (interfaceCtx->do_actionSegment == NULL) {
- __assert("parameter->do_actionSegment != NULL", "../z_construct.c", 169);
- }
+ ASSERT(interfaceCtx->do_actionSegment != NULL, "parameter->do_actionSegment != NULL", "../z_construct.c", 169);
if (gSaveContext.language == 0) {
do_actionOffset = 0;
@@ -81,9 +76,7 @@ void func_801109B0(GlobalContext* globalCtx) {
osSyncPrintf("アイコンアイテム テクスチャ初期=%x\n", 0x4000);
osSyncPrintf("parameter->icon_itemSegment=%x\n", interfaceCtx->icon_itemSegment);
- if (interfaceCtx->icon_itemSegment == NULL) {
- __assert("parameter->icon_itemSegment != NULL", "../z_construct.c", 193);
- }
+ ASSERT(interfaceCtx->icon_itemSegment != NULL, "parameter->icon_itemSegment != NULL", "../z_construct.c", 193);
osSyncPrintf("Register_Item[%x, %x, %x, %x]\n", gSaveContext.equips.buttonItems[0],
gSaveContext.equips.buttonItems[1], gSaveContext.equips.buttonItems[2],
@@ -194,10 +187,7 @@ void func_80110F68(GlobalContext* globalCtx) {
// Translates to: "Textbox game_alloc=%x"
osSyncPrintf("吹き出しgame_alloc=%x\n", 0x2200);
-
- if (msgCtx->textboxSegment == NULL) {
- __assert("message->fukidashiSegment != NULL", "../z_construct.c", 352);
- }
+ ASSERT(msgCtx->textboxSegment != NULL, "message->fukidashiSegment != NULL", "../z_construct.c", 352);
Font_LoadOrderedFont(&globalCtx->msgCtx.font);