/* Princed V3 - Prince of Persia Level Editor for PC Version
Copyright (C) 2003 Princed Development Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The authors of this program may be contacted at http://forum.princed.com.ar
*/
/*
resources.h: Free Prince : Resource Handler
�����������
Copyright 2003,2004 Princed Development Team
Created: 23 Mar 2004
Author: Enrique Calot <ecalot.cod@princed.com.ar>
Note:
DO NOT remove this copyright notice
*/
#ifndef _PR_RESOURCES_H_
#define _PR_RESOURCES_H_
#include "config.h"
typedef enum {eImages=2,eWave,eMidi,eLevels}tDataType;
#define MAX_RES_COUNT 25000
/* Item Types */
#define RES_TYPE_RAW 0
#define RES_TYPE_LEVEL 1
#define RES_TYPE_IMAGE 2
#define RES_TYPE_WAVE 3
#define RES_TYPE_MIDI 4
#define RES_TYPE_BINARY 5
#define RES_TYPE_PALETTE 6
#define RES_TYPE_PCSPEAKER 7
#define RES_TYPECOUNT 8
/* types */
typedef struct {
unsigned short int palette;
unsigned short int size;
unsigned long int offset;
unsigned char number; /* Used for level number */
char type;
char* path;
unsigned char* palAux;
char* name;
char* desc;
}tResource;
typedef struct {
unsigned char* array;
long int size;
}tMemory;
typedef struct {
int frames;
tDataType type;
void** pFrames;
}tData;
tData* resLoad(long id);
/* Function for getting data previously loaded into memory. All id's are
* defined in data.h generated by the resource manager and indexer.
*
* In case the data couldn't be retreived the NULL value will be returned
* in any other case a struct to the tData structure will be returned.
*/
void resFree(tData* resource);
/* This function frees all the memory allocated by the resLoad function
*/
void resInit();
void resStop();
/* Resource handling includes */
#include "res_conf.h"
#define BW_COLORS {252/4,252/4,252/4,252/4,0,0,0,252/4,0,0,0,252/4}
#endif