Add missing error checks
Add init_allegro function; split from init
Add init_resources function; split from init
Add RESERVED_SAMPLES constant