1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-14 20:05:02 +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

@ -157,18 +157,10 @@ void func_800AA550(View* view) {
lrx = view->viewport.rightX - varX;
lry = view->viewport.bottomY - varY;
if (ulx < 0) {
__assert("ulx >= 0", "../z_view.c", 454);
}
if (uly < 0) {
__assert("uly >= 0", "../z_view.c", 455);
}
if (lrx > SCREEN_WIDTH) {
__assert("lrx <= SCREEN_WD", "../z_view.c", 456);
}
if (lry > SCREEN_HEIGHT) {
__assert("lry <= SCREEN_HT", "../z_view.c", 457);
}
ASSERT(ulx >= 0, "ulx >= 0", "../z_view.c", 454);
ASSERT(uly >= 0, "uly >= 0", "../z_view.c", 455);
ASSERT(lrx <= SCREEN_WIDTH, "lrx <= SCREEN_WD", "../z_view.c", 456);
ASSERT(lry <= SCREEN_HEIGHT, "lry <= SCREEN_HT", "../z_view.c", 457);
OPEN_DISPS(gfxCtx, "../z_view.c", 459);