Fixed 2 bugs in the veil engine today. Neither were apparent til I tried to use the veil engine on a project other than Janus. The first bug was in the metasprite module's initialization subroutine and it manifested by crashing the game when no metasprites were in a scene. Here is a snippet containing the issue:
INVALID_METASPRITE_CHR_BANK = 255
.export __metasprites_init
.proc __metasprites_init
lda #0
sta updown_flag
sta oam_spr_ptr
lda #INVALID_METASPRITE_CHR_BNK
sta __metaspr