6 * © 1994-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Steel library.
13 * Steel is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Steel is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Steel. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 static sprite_area *resspr__area=(sprite_area *)1;
40 * void resspr_init(void)
43 * Loads the applications `Sprites' file into memory.
46 void resspr_init(void)
51 /* --- Find the file and it's length --- */
53 f.name=res_name("Sprites");
55 if (os_file(&f) || f.action!=1)
58 /* --- Create a buffer the right size --- *
60 * The sprite file size may not be word aligned -- cope with this.
63 size=(f.start+7) & ~3;
64 resspr__area=mem_alloc(size);
67 werr(FALSE,msgs_lookup("ressprNEM:Not enough memory to load sprites."));
71 /* --- Load the sprites into memory --- */
73 resspr__area->size=size;
75 f.loadaddr=((int)resspr__area)+4;
81 * sprite_area *resspr_area(void)
84 * Returns the address of the application's sprite area.
87 sprite_area *resspr_area(void)
89 return (resspr__area);