-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic -- -- GNU General Public Licence (version 3 or later) with core; package body equipment is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ procedure configure is begin core.echo (core.comment, "Configuring equipment components..."); -- for index in enumeration loop declare folder : constant string := core.lowercase (slot'image (trait (index).kind)); file : constant string := core.lowercase (enumeration'image (index)); begin sprite (index) := core.import_sprite ("./sprite/equipment/" & folder & "/" & file & ".png", 4, 6); end; end loop; end configure; ------------------------------------------------------------------------------------------ procedure draw (index : in enumeration; state : in core.animation; x, y : in integer) is begin core.draw (sprite (index), x, y, state => core.animation'pos (state)); end draw; ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ end equipment;