1 /* Princed V3 - Prince of Persia Level Editor for PC Version
2 Copyright (C) 2003 Princed Development Team
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 The authors of this program may be contacted at http://forum.princed.com.ar
22 resources.h: Free Prince : Resource Handler
24 Copyright 2003,2004 Princed Development Team
27 Author: Enrique Calot <ecalot.cod@princed.com.ar>
30 DO NOT remove this copyright notice
36 //int resOpenFile(const char* file);
37 /* Opens file, loads the data into memory, closes the file and
38 * returns an ID number (data descriptor) for the new structure. */
39 //resCloseFile(int dd); /* dd = data descriptor */
40 /* Frees the data from memory. */
43 /* Functions for getting data previously loaded into memory. Each dd points
44 * to an array of elements, and resId indicates the index in this array. */
45 //tMidi resGetMidi(int dd, int resId);
46 //tWave resGetWave(int dd, int resId);
47 //tImage resGetImage(int dd, int resId);
49 enum tDataType {eImages=2,eWave,eMidi,eLevels}
51 typedef struct tData {
57 tData* resLoad(int id);
58 /* Function for getting data previously loaded into memory. All id's are
59 * defined in data.h generated by the resource manager and indexer.
61 * In case the data couldn't be retreived the NULL value will be returned
62 * in any other case a struct to the tData structure will be returned.
66 void resFree(tData* resource);
67 /* This function frees all the memory allocated by the resLoad function