Use more assertions to ensure correct code and data

This commit is contained in:
Rangi
2020-10-26 22:24:38 -04:00
parent 9dcdad5e60
commit c85ba78b77
16 changed files with 50 additions and 17 deletions

View File

@@ -245,7 +245,8 @@ BattleAnim_ClearOAM:
ld c, NUM_SPRITE_OAM_STRUCTS
.loop
ld a, [hl]
and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; PAL_BATTLE_OB_ENEMY (0)
and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits
assert PAL_BATTLE_OB_ENEMY == 0
ld [hli], a
rept SPRITEOAMSTRUCT_LENGTH - 1
inc hl