git » fp-git.git » commit 73a357d

renamed

author ecalot
2006-06-18 14:46:20 UTC
committer ecalot
2006-06-18 14:46:20 UTC
parent ef3976ec5033dd3a0b2c9ee4b878a533f1712d8a

renamed

PR/src/include/common.h +11 -11
PR/src/include/palette.h +3 -3
PR/src/lib/actions/classify.c +2 -2
PR/src/lib/actions/export.c +2 -2
PR/src/lib/object/object.c +37 -37
PR/src/lib/xml/unknown.c +1 -1

diff --git a/PR/src/include/common.h b/PR/src/include/common.h
index 30c37a5..e36935b 100644
--- a/PR/src/include/common.h
+++ b/PR/src/include/common.h
@@ -86,21 +86,21 @@ common.h: Princed Resources : Defines and prototypes common to all PR code
 
 typedef enum {
 	eResTypeNone=-1,
-	eResTypeRaw=0,
-	eResTypeBinary=1,
+	eResTypeOtherRaw=0,
+	eResTypeOtherBinary=1,
 	eResTypeImage16=2,
 	eResTypeImage2=3,
 	eResTypeImage256=4,
-	eResTypePop1Level=5,
-	eResTypeMidi=6,
+	eResTypeLevelPop1=5,
+	eResTypeSoundMidi=6,
 	eResTypePcspeaker=7,
-	eResTypePop1Palette4bits=8,
-	eResTypePop1PaletteGuards=9,
-	eResTypePop1PaletteMono=10,
-	eResTypePop2PaletteNColors=11,
-	eResTypePop2Level=12,
-	eResTypeText=13,
-	eResTypeWave=14
+	eResTypePalettePop1_16=8,
+	eResTypePalettePop1_Guards=9,
+	eResTypePalettePop1_Mono=10,
+	eResTypePalettePop2_NColors=11,
+	eResTypeLevelPop2=12,
+	eResTypeOtherText=13,
+	eResTypeSoundWave=14
 } tResourceType;
 
 /***************************************************************\
diff --git a/PR/src/include/palette.h b/PR/src/include/palette.h
index ad5c870..18c38f1 100644
--- a/PR/src/include/palette.h
+++ b/PR/src/include/palette.h
@@ -87,9 +87,9 @@ tColor* objPalette_pop2_ncolorsGetColors(void* o);
 
 /* Hooks */
 
-#define PAL_COLORS_eResTypePop2PaletteNColors /*256*/ getColorsByPop2PaletteObject(object.obj)
-#define PAL_COLORS_eResTypePop1Palette4bits 16
-#define PAL_COLORS_eResTypePop1PaletteMono 2
+#define PAL_COLORS_eResTypePalettePop2_NColors getColorsByPop2PaletteObject(object.obj)
+#define PAL_COLORS_eResTypePalettePop1_16 16
+#define PAL_COLORS_eResTypePalettePop1_Mono 2
 
 int getColorsByPop2PaletteObject(void* o);
 				
diff --git a/PR/src/lib/actions/classify.c b/PR/src/lib/actions/classify.c
index 4529af7..7caa55f 100644
--- a/PR/src/lib/actions/classify.c
+++ b/PR/src/lib/actions/classify.c
@@ -47,7 +47,7 @@ tasks.c: Princed Resources : File classify routines
 
 int prClassifyDat(const char* vFiledat) {
 	int                indexNumber;
-	tResourceType      type=eResTypeBinary;
+	tResourceType      type=eResTypeOtherBinary;
 	unsigned short int numberOfItems;
 	tPopVersion        popVersion;
 	tResource          res;
@@ -59,7 +59,7 @@ int prClassifyDat(const char* vFiledat) {
 	popVersion=mReadGetVersion();
 
 	/* main loop */
-	for (indexNumber=0;(indexNumber<numberOfItems)&&(type==eResTypeBinary);indexNumber++) {
+	for (indexNumber=0;(indexNumber<numberOfItems)&&(type==eResTypeOtherBinary);indexNumber++) {
 		int ok;
 		ok=mReadFileInDatFile(&res,indexNumber);
 		if (ok==PR_RESULT_INDEX_NOT_FOUND) READ_ERROR; /* Read error */
diff --git a/PR/src/lib/actions/export.c b/PR/src/lib/actions/export.c
index 01af2c5..aad7ade 100644
--- a/PR/src/lib/actions/export.c
+++ b/PR/src/lib/actions/export.c
@@ -111,8 +111,8 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti
 				/* handle palette linking */
 				switch (res.type) {
 					/*case eResTypePop2Palette4bits: */
-					case eResTypePop2PaletteNColors: 
-					case eResTypePop1Palette4bits: { /* save and remember palette file */
+					case eResTypePalettePop2_NColors: 
+					case eResTypePalettePop1_16: { /* save and remember palette file */
 						/*tPaletteListItem e; * deprecated */
 						o=getObject(&res,&ok);
 printf("new palette object: o=%p type=%d\n",o.obj,o.type);
diff --git a/PR/src/lib/object/object.c b/PR/src/lib/object/object.c
index 92e9c17..479cd0f 100644
--- a/PR/src/lib/object/object.c
+++ b/PR/src/lib/object/object.c
@@ -52,27 +52,27 @@ tObject getObject(tResource* r, int* error) {
 
 	o.type=r->type;
 	switch (o.type) {
-	case eResTypePop1Level:
+	case eResTypeLevelPop1:
 		o.obj=objLevelCreate(r->content,r->number,r->datfile,r->name,r->desc,r->datAuthor,error); 
 		break;
-	case eResTypeBinary: /* Binary files */
-	case eResTypeText: /* Text files */
-	case eResTypeRaw: /* Raw files */
+	case eResTypeOtherBinary: /* Binary files */
+	case eResTypeOtherText: /* Text files */
+	case eResTypeOtherRaw: /* Raw files */
 		o.obj=objBinaryCreate(r->content,error); 
 		break;
-	case eResTypePop1Palette4bits: /* save and remember palette file */
+	case eResTypePalettePop1_16: /* save and remember palette file */
 		o.obj=objPalette_pop1_4bitsCreate(r->content,error);
 		break;
-	case eResTypePop2PaletteNColors: /* save and remember palette file */
+	case eResTypePalettePop2_NColors: /* save and remember palette file */
 		o.obj=objPop2PaletteNColorsCreate(r->content,error);
 		break;
 	case eResTypePcspeaker: /* save pcs file */
 		o.obj=objPcspeakerCreate(r->content,error);
 		break;
-	case eResTypeMidi:	/* save midi file */
+	case eResTypeSoundMidi:	/* save midi file */
 		o.obj=objMidiCreate(r->content,error);
 		break;
-	case eResTypeWave: /* save wav file */
+	case eResTypeSoundWave: /* save wav file */
 		o.obj=objWaveCreate(r->content,error);
 		break;
 	case eResTypeImage2: /* save image */
@@ -97,27 +97,27 @@ printf("Exception: Unhooked type %d\n",o.type);
 int writeObject(tObject o, const char* file, int optionflag, const char* backupExtension) {
 	int error;
 	switch (o.type) {
-	case eResTypePop1Level:
+	case eResTypeLevelPop1:
 		error=objLevelWrite(o.obj,file,optionflag,backupExtension);
 		break;
-	case eResTypeBinary: /* Binary files */
-	case eResTypeText: /* Text files */
-	case eResTypeRaw: /* Raw/autodetect files */
+	case eResTypeOtherBinary: /* Binary files */
+	case eResTypeOtherText: /* Text files */
+	case eResTypeOtherRaw: /* Raw/autodetect files */
 		error=objBinaryWrite(o.obj,file,optionflag,backupExtension);
 		break;
-	case eResTypePop1Palette4bits: /* save and remember palette file */
+	case eResTypePalettePop1_16: /* save and remember palette file */
 		error=objPalette_pop1_4bitsWrite(o.obj,file,optionflag,backupExtension);
 		break;
-	case eResTypePop2PaletteNColors: /* save and remember palette file */
+	case eResTypePalettePop2_NColors: /* save and remember palette file */
 		error=objPop2PaletteNColorsWrite(o.obj,file,optionflag,backupExtension);
 		break;
 	case eResTypePcspeaker: /* save pcs file */
 		error=objPcspeakerWrite(o.obj,file,optionflag,backupExtension);
 		break;
-	case eResTypeMidi:	/* save midi file */
+	case eResTypeSoundMidi:	/* save midi file */
 		error=objMidiWrite(o.obj,file,optionflag,backupExtension);
 		break;
-	case eResTypeWave: /* save wav file */
+	case eResTypeSoundWave: /* save wav file */
 		error=objWaveWrite(o.obj,file,optionflag,backupExtension);
 		break;
 	case eResTypeImage2: /* save image */
@@ -141,11 +141,11 @@ printf("Warning: Couldn't write unhooked type %d\n",o.type);
 
 int paletteGetBits(tObject pal) {
 	switch (pal.type) {
-	case eResTypePop2PaletteNColors:
+	case eResTypePalettePop2_NColors:
 		return 8;
-	case eResTypePop1Palette4bits: 
+	case eResTypePalettePop1_16: 
 		return 4;
-	case eResTypePop1PaletteMono: 
+	case eResTypePalettePop1_Mono: 
 		return 1;
 	default:
 		return 0;
@@ -154,12 +154,12 @@ int paletteGetBits(tObject pal) {
 			
 int paletteGetColors(tObject object) { /* TODO: rename to objectGetColors */
 	switch (object.type) {
-	case eResTypePop2PaletteNColors:
-		return PAL_COLORS_eResTypePop2PaletteNColors; /*256;*/
-	case eResTypePop1Palette4bits: 
-		return PAL_COLORS_eResTypePop1Palette4bits; /*16;*/
-	case eResTypePop1PaletteMono: 
-		return  PAL_COLORS_eResTypePop1PaletteMono; /*2;*/
+	case eResTypePalettePop2_NColors:
+		return PAL_COLORS_eResTypePalettePop2_NColors; /*256;*/
+	case eResTypePalettePop1_16: 
+		return PAL_COLORS_eResTypePalettePop1_16; /*16;*/
+	case eResTypePalettePop1_Mono: 
+		return  PAL_COLORS_eResTypePalettePop1_Mono; /*2;*/
 	case eResTypeNone: 
 		return 256; 
 	case eResTypeImage16:
@@ -187,9 +187,9 @@ int getColorsByType(tResourceType t) {
 
 tColor* paletteGetColorArray(tObject pal) {
 	switch (pal.type) {
-	case eResTypePop1Palette4bits: /* save and remember palette file */
+	case eResTypePalettePop1_16: /* save and remember palette file */
 		return objPalette_pop1_4bitsGetColors(pal.obj);
-	case eResTypePop2PaletteNColors:
+	case eResTypePalettePop2_NColors:
 		return objPalette_pop2_ncolorsGetColors(pal.obj);
 	default:
 		return NULL;
@@ -202,25 +202,25 @@ tColor* paletteGetColorArray(tObject pal) {
 
 void setObject(tObject o,int *result,tResource* res) {
 	switch (o.type) {
-		case eResTypePop1Level:
+		case eResTypeLevelPop1:
 			/*result=objLevelSet(o.obj,res); TODO */
 			break;
 		case eResTypeImage16:
 			*result=objImage16Set(o.obj,res);
 			break;
-		case eResTypeWave:
+		case eResTypeSoundWave:
 			*result=objWaveSet(o.obj,res);
 			break;
-		case eResTypeMidi:
+		case eResTypeSoundMidi:
 			*result=objMidiSet(o.obj,res);
 			break;
 		case eResTypePcspeaker:
 			*result=objPcspeakerSet(o.obj,res);
 			break;
-		case eResTypePop1Palette4bits:
+		case eResTypePalettePop1_16:
 			*result=objPop1Palette4bitsSet(o.obj,res);
 			break;
-		case eResTypeBinary:
+		case eResTypeOtherBinary:
 		default:
 			*result=objBinarySet(o.obj,res);
 			break;
@@ -233,25 +233,25 @@ tObject readObject(const char* file,tResource* res,int *result) {
 	/* return true if ok, false if error */
 	tObject o;
 	switch (res->type) {
-		case eResTypePop1Level:
+		case eResTypeLevelPop1:
 			/*o.obj=objLevelRead(file,res.content,result); TODO */
 			break;
 		case eResTypeImage16:
 			o.obj=objImage16Read(file,*res->palette,result);
 			break;
-		case eResTypeWave:
+		case eResTypeSoundWave:
 			o.obj=objWaveRead(file,result);
 			break;
-		case eResTypeMidi:
+		case eResTypeSoundMidi:
 			o.obj=objMidiRead(file,result);
 			break;
 		case eResTypePcspeaker:
 			o.obj=objPcspeakerRead(file,result);
 			break;
-		case eResTypePop1Palette4bits:
+		case eResTypePalettePop1_16:
 			o.obj=objPop1Palette4bitsRead(file,result);
 			break;
-		case eResTypeBinary:
+		case eResTypeOtherBinary:
 		default:
 			o.obj=objBinaryRead(file,result);
 			break;
diff --git a/PR/src/lib/xml/unknown.c b/PR/src/lib/xml/unknown.c
index e3d2b77..d5a5688 100644
--- a/PR/src/lib/xml/unknown.c
+++ b/PR/src/lib/xml/unknown.c
@@ -189,7 +189,7 @@ void getFileName(char* vFileext,const char* vDirExt,const tResource* r,const cha
 	int pos;
 
 	if (r->path==NULL) {
-		pos=((r->type<RES_FILE_TYPES_COUNT)&&(r->type>=0))?r->type:eResTypeBinary;
+		pos=((r->type<RES_FILE_TYPES_COUNT)&&(r->type>=0))?r->type:eResTypeOtherBinary;
 		unknownFile.typeCount[pos]++;
 
 		/* set filename */