| author | ecalot
<ecalot> 2004-06-07 01:40:19 UTC |
| committer | ecalot
<ecalot> 2004-06-07 01:40:19 UTC |
| parent | 48b0530fe503d582198f0a63558af12953fa5336 |
| PR/src/include/common.h | +30 | -4 |
| PR/src/include/compress.h | +1 | -1 |
| PR/src/include/dat.h | +12 | -2 |
| PR/src/include/disk.h | +9 | -3 |
| PR/src/include/image.h | +1 | -1 |
| PR/src/include/memory.h | +10 | -1 |
| PR/src/include/pr.h | +30 | -4 |
diff --git a/PR/src/include/common.h b/PR/src/include/common.h index 8221f0c..942aa3c 100644 --- a/PR/src/include/common.h +++ b/PR/src/include/common.h @@ -67,7 +67,7 @@ void prSetOutput(FILE* output); #endif /* Debug options */ -/* #define DEB_FLAG */ +#define DEB_FLAG /* #define MEM_CHECK */ #ifdef MEM_CHECK @@ -79,7 +79,6 @@ void prSetOutput(FILE* output); #include "memory.h" #define malloc(a) mymalloc(a,__FILE__,__LINE__) #define free(a) myfree(a,__FILE__,__LINE__) - #endif #ifdef DEB_FLAG @@ -97,8 +96,9 @@ void prSetOutput(FILE* output); \***************************************************************/ #define PR_URL "http://www.princed.com.ar" -#define PR_VERSION "v1.0b-dev2" +#define PR_VERSION "v1.0-dev1" #define PR_COPY "(c) Copyright 2003, 2004 - Princed Development Team" + /***************************************************************\ | Other defines | \***************************************************************/ @@ -124,7 +124,33 @@ void prSetOutput(FILE* output); | L A N G U A G E | \***************************************************************/ -#include "english.h" +#include "en.lang.pr.h" + +/* Credits */ +#define PARSING_ABOUT PR_TXT_AUTHORS": \n\ + "PR_TXT_CODER"\n\ + Enrique Calot\n\ +\n\ + "PR_TXT_COD_ASSIST"\n\ + Santiago Zamora\n\ +\n\ + "PR_TXT_GFX_COMP"\n\ + Tammo Jan Dijkema\n\ + Enrique Calot\n\ +\n\ + "PR_TXT_GFX_DEV"\n\ + Tammo Jan Dijkema\n\ + Anke Balderer\n\ +\n\ + "PR_TXT_MID"\n\ + Christian Lundheim\n\ +\n\ + "PR_TXT_XML"\n\ + Steven Fayers\n\ +\n\ + "PR_TXT_TRANSLATION"\n\ + "PR_TXT_ABOUT_TRANSLATOR"\n\ +\n" /***************************************************************\ | Prototypes | diff --git a/PR/src/include/compress.h b/PR/src/include/compress.h index 5581951..784830d 100644 --- a/PR/src/include/compress.h +++ b/PR/src/include/compress.h @@ -64,7 +64,7 @@ typedef struct { /* Prototypes */ -int mCompressGraphic(unsigned char* a,tImage* i, int* size); +int mCompressGraphic(unsigned char** a,tImage* i, int* size); int mExpandGraphic(const unsigned char* array,tImage *image, int size); #define getCarry(a) ((a)>>6) diff --git a/PR/src/include/dat.h b/PR/src/include/dat.h index 6369379..e7aff46 100644 --- a/PR/src/include/dat.h +++ b/PR/src/include/dat.h @@ -36,24 +36,34 @@ dat.h: Princed Resources : DAT library headers #include "resources.h" +#define PR_DAT_INCLUDE_DATREAD +#define PR_DAT_INCLUDE_DATWRITE + +#ifdef PR_DAT_INCLUDE_DATREAD +#ifdef PR_DAT_INCLUDE_DATWRITE /* DAT reading and writing primitives primitives */ int mRWBeginDatFile(const char* vFile, unsigned short int *numberOfItems, int optionflag); #define mRWCloseDatFile(dontSave) \ mReadCloseDatFile();\ mWriteCloseDatFile(r,dontSave,optionflag,backupExtension) +#endif +#endif - +#ifdef PR_DAT_INCLUDE_DATREAD /* DAT reading primitives */ int mReadBeginDatFile(unsigned short int *numberOfItems,const char* vFile); int mReadGetFileInDatFile(int indexNumber,unsigned char* *data,unsigned long int *size); int mReadInitResource(tResource** res,const unsigned char* data,long size); void mReadCloseDatFile(); +#endif +#ifdef PR_DAT_INCLUDE_DATWRITE /* DAT writing primitives */ int mWriteBeginDatFile(const char* vFile, int optionflag); -void mWriteSetFileInDatFile(unsigned char* data, int size); +void mWriteSetFileInDatFile(const unsigned char* data, int size); void mWriteSetFileInDatFileIgnoreChecksum(unsigned char* data,int size); void mWriteInitResource(tResource** res); void mWriteCloseDatFile(tResource* r[],int dontSave,int optionflag, const char* backupExtension); +#endif #endif diff --git a/PR/src/include/disk.h b/PR/src/include/disk.h index b68a112..2e92498 100644 --- a/PR/src/include/disk.h +++ b/PR/src/include/disk.h @@ -76,8 +76,14 @@ int mCopy(const char* strSource, const char* strTarget); /* array2vars*/ -#define array2short(a) ((*a))+((*(a+1))<<8) -#define array2long(a) ((*a))+((*(a+1))<<8)+((*(a+2))<<16)+((*(a+3))<<24) +#define array2short(a) ((*(a)))+((*((a)+1))<<8) +#define array2long(a) ((*(a)))+((*((a)+1))<<8)+((*((a)+2))<<16)+((*((a)+3))<<24) +#define freadshort(var,file) fread ((var),2,1,file) +#define freadlong(var,file) fread ((var),4,1,file) +#define fwriteshort(var,file) fwrite((var),2,1,file) +#define fwritelong(var,file) fwrite((var),4,1,file) +#define fwritechar(var,file) fwrite((var),1,1,file) + +#endif -#endif \ No newline at end of file diff --git a/PR/src/include/image.h b/PR/src/include/image.h index 5581951..784830d 100644 --- a/PR/src/include/image.h +++ b/PR/src/include/image.h @@ -64,7 +64,7 @@ typedef struct { /* Prototypes */ -int mCompressGraphic(unsigned char* a,tImage* i, int* size); +int mCompressGraphic(unsigned char** a,tImage* i, int* size); int mExpandGraphic(const unsigned char* array,tImage *image, int size); #define getCarry(a) ((a)>>6) diff --git a/PR/src/include/memory.h b/PR/src/include/memory.h index 3e2bfe7..2211865 100644 --- a/PR/src/include/memory.h +++ b/PR/src/include/memory.h @@ -34,11 +34,20 @@ memory.h: Princed Resources : Memory handling headers #ifndef _MEMORY_H_ #define _MEMORY_H_ -#include <stdlib.h> +/* #define MEM_CHECK */ +#include <stdlib.h> #define getMemory(size) ((unsigned char*)malloc(size)) char* strallocandcopy(const char* text); #define freeAllocation(m) if ((m)!=NULL) free(m) +#ifdef MEM_CHECK +void myfree(void* a,char* fileName,int line); +void* mymalloc(int size,char* fileName,int line); +void showStats(); +#else +#define showInfo(a) +#endif + #endif diff --git a/PR/src/include/pr.h b/PR/src/include/pr.h index 8221f0c..942aa3c 100644 --- a/PR/src/include/pr.h +++ b/PR/src/include/pr.h @@ -67,7 +67,7 @@ void prSetOutput(FILE* output); #endif /* Debug options */ -/* #define DEB_FLAG */ +#define DEB_FLAG /* #define MEM_CHECK */ #ifdef MEM_CHECK @@ -79,7 +79,6 @@ void prSetOutput(FILE* output); #include "memory.h" #define malloc(a) mymalloc(a,__FILE__,__LINE__) #define free(a) myfree(a,__FILE__,__LINE__) - #endif #ifdef DEB_FLAG @@ -97,8 +96,9 @@ void prSetOutput(FILE* output); \***************************************************************/ #define PR_URL "http://www.princed.com.ar" -#define PR_VERSION "v1.0b-dev2" +#define PR_VERSION "v1.0-dev1" #define PR_COPY "(c) Copyright 2003, 2004 - Princed Development Team" + /***************************************************************\ | Other defines | \***************************************************************/ @@ -124,7 +124,33 @@ void prSetOutput(FILE* output); | L A N G U A G E | \***************************************************************/ -#include "english.h" +#include "en.lang.pr.h" + +/* Credits */ +#define PARSING_ABOUT PR_TXT_AUTHORS": \n\ + "PR_TXT_CODER"\n\ + Enrique Calot\n\ +\n\ + "PR_TXT_COD_ASSIST"\n\ + Santiago Zamora\n\ +\n\ + "PR_TXT_GFX_COMP"\n\ + Tammo Jan Dijkema\n\ + Enrique Calot\n\ +\n\ + "PR_TXT_GFX_DEV"\n\ + Tammo Jan Dijkema\n\ + Anke Balderer\n\ +\n\ + "PR_TXT_MID"\n\ + Christian Lundheim\n\ +\n\ + "PR_TXT_XML"\n\ + Steven Fayers\n\ +\n\ + "PR_TXT_TRANSLATION"\n\ + "PR_TXT_ABOUT_TRANSLATOR"\n\ +\n" /***************************************************************\ | Prototypes |