git » fp-git.git » commit 6513e8c

finished PR 1.2 testing

author ecalot
2006-06-06 00:10:04 UTC
committer ecalot
2006-06-06 00:10:04 UTC
parent 263da0f0a6ace724b39e65446b3151d3fe1e10b2

finished PR 1.2 testing

PR/doc/changelog.txt +4 -2
PR/src/lib/actions/export.c +6 -3
PR/src/lib/object/image/image16.c +1 -0
PR/src/lib/object/image/image_common.c +1 -0
PR/src/lib/object/object.c +1 -0
PR/src/lib/object/palette/pop1_16c.c +1 -0

diff --git a/PR/doc/changelog.txt b/PR/doc/changelog.txt
index 130fd4e..6974b6a 100644
--- a/PR/doc/changelog.txt
+++ b/PR/doc/changelog.txt
@@ -180,18 +180,20 @@ Versions:
   - Restructured the repository and source to support an object layer
   - When extracting, generated unknown.xml's are now all merged into one
  * PR v1.3 (scheduled 2006-04-22)
-  x Fix ./pr -ie it -f bug
-  x Move tResource* from reslist to types.h
   X Add a fatal error check when importing from a different palette size and a
     warning when importing from an incorrect palette.
   x Added full POP2 RLEC decompression algorithm
+  x Add the pop2 4-bits palette object
   x Check for memory leak
   x Clean the source
   x Common factor in LGZ compression (a .h) for win size, etc.
   x Common palette calculation
   x Create a new isDirSep in disk.h and handle all the / and \ as the same char
   x Don't create empry unknown.xml
+  x Fix ./pr -ie it -f bug
+  x Fix repeated resource name in CPALACE.DAT bug
   x Fork compress to code images as a new object in a separated file
+  x Move tResource* from reslist to types.h
   x Rename "uncompress" to "decomporess"
   x Replaced .bmp by .png files.
   x Transform flags from the hex form to the [a-y]* form (a is 1, b is 2, c is 4...)
diff --git a/PR/src/lib/actions/export.c b/PR/src/lib/actions/export.c
index c07038c..f68e860 100644
--- a/PR/src/lib/actions/export.c
+++ b/PR/src/lib/actions/export.c
@@ -118,9 +118,12 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti
 					case eResTypePop2PaletteNColors: 
 					case eResTypePop1Palette4bits: { /* save and remember palette file */
 						tPaletteListItem e; /* TODO: decide if the palette list has to be erased from the code */
-						o=e.pal=currentPalette=getObject(&res,&ok);
-						e.id=res.id;
-						list_insert(&paletteBuffer,(void*)&e);
+						o=getObject(&res,&ok);
+						if (!ok) { /* if SUCCESS remember the palette, otherwise keep using the default one */
+							e.pal=currentPalette=o;
+							e.id=res.id;
+							list_insert(&paletteBuffer,(void*)&e);
+						}
 					}	break;
 					case eResTypeImage16: /* save image */
 					case eResTypeImage256: /* save image */
diff --git a/PR/src/lib/object/image/image16.c b/PR/src/lib/object/image/image16.c
index 8924cc1..0e836af 100644
--- a/PR/src/lib/object/image/image16.c
+++ b/PR/src/lib/object/image/image16.c
@@ -391,6 +391,7 @@ int objImage16Write(void* img,const char* file,int optionflag,const char* backup
 	if (i->pal.type!=eResTypeNone) {
 		bits=paletteGetBits(i->pal);
 		colors=paletteGetColors(i->pal);
+printf("paso por aqui\n");
 		colorArray=paletteGetColorArray(i->pal);
 	} else {
 		bits=getCarry(i->type);
diff --git a/PR/src/lib/object/image/image_common.c b/PR/src/lib/object/image/image_common.c
index 8924cc1..0e836af 100644
--- a/PR/src/lib/object/image/image_common.c
+++ b/PR/src/lib/object/image/image_common.c
@@ -391,6 +391,7 @@ int objImage16Write(void* img,const char* file,int optionflag,const char* backup
 	if (i->pal.type!=eResTypeNone) {
 		bits=paletteGetBits(i->pal);
 		colors=paletteGetColors(i->pal);
+printf("paso por aqui\n");
 		colorArray=paletteGetColorArray(i->pal);
 	} else {
 		bits=getCarry(i->type);
diff --git a/PR/src/lib/object/object.c b/PR/src/lib/object/object.c
index b26f16d..fef8d4d 100644
--- a/PR/src/lib/object/object.c
+++ b/PR/src/lib/object/object.c
@@ -61,6 +61,7 @@ tObject getObject(tResource* r, int* error) {
 		o.obj=objBinaryCreate(r->content,error); 
 		break;
 	case eResTypePop1Palette4bits: /* save and remember palette file */
+printf("debug\n");
 		o.obj=objPalette_pop1_4bitsCreate(r->content,error);
 		break;
 	case eResTypePop2PaletteNColors: /* save and remember palette file */
diff --git a/PR/src/lib/object/palette/pop1_16c.c b/PR/src/lib/object/palette/pop1_16c.c
index f42e715..800d924 100644
--- a/PR/src/lib/object/palette/pop1_16c.c
+++ b/PR/src/lib/object/palette/pop1_16c.c
@@ -172,6 +172,7 @@ void* objPalette_pop1_4bitsCreate(tBinary cont, int *error) {
 	
 	if (cont.size!=100) {
 		*error=PR_RESULT_XML_AND_DAT_FORMAT_DO_NOT_MATCH;
+printf("yes\n");
 		return NULL;
 	}