1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-13 11:24:40 +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:
Anghelo Carvajal 2021-04-29 14:39:46 -04:00 committed by GitHub
parent 0b8252cfe9
commit 98aef8988a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 148 additions and 301 deletions

View file

@ -18,9 +18,7 @@ void func_800BC450(GlobalContext* globalCtx) {
}
void func_800BC490(GlobalContext* globalCtx, s16 point) {
if (!(point == 1 || point == 2)) {
__assert("point == 1 || point == 2", "../z_play.c", 2160);
}
ASSERT(point == 1 || point == 2, "point == 1 || point == 2", "../z_play.c", 2160);
globalCtx->unk_1242B = point;
@ -1469,9 +1467,8 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
globalCtx->sceneSegment = Gameplay_LoadFile(globalCtx, &scene->sceneFile);
scene->unk_13 = 0;
if (globalCtx->sceneSegment == NULL) {
__assert("this->sceneSegment != NULL", "../z_play.c", 4960);
}
ASSERT(globalCtx->sceneSegment != NULL, "this->sceneSegment != NULL", "../z_play.c", 4960);
gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment);
Gameplay_InitScene(globalCtx, spawn);