author | ecalot
<ecalot> 2006-06-14 23:00:49 UTC |
committer | ecalot
<ecalot> 2006-06-14 23:00:49 UTC |
parent | 2d1ca7aaff096887156338ce67a0a428d8482111 |
PR/src/Makefile | +2 | -2 |
PR/src/include/pallist.h | +1 | -1 |
PR/src/lib/actions/export.c | +5 | -5 |
PR/src/lib/layers/pallist.c | +1 | -1 |
diff --git a/PR/src/Makefile b/PR/src/Makefile index 6f7d8c5..418f122 100644 --- a/PR/src/Makefile +++ b/PR/src/Makefile @@ -167,9 +167,9 @@ $(XMLFILE): xml/resources.xml $(INFO) Compiling palette list module... $(CC) $(OPTIONS) -c lib/layers/pallist.c -o $@ -.object.o: lib/object/main.c include/common.h include/object.h include/types.h include/image.h include/other.h include/palette.h include/sound.h +.object.o: lib/object/object.c include/common.h include/object.h include/types.h include/image.h include/other.h include/palette.h include/sound.h $(INFO) Compiling main item class... - $(CC) $(OPTIONS) -c lib/object/main.c -o $@ + $(CC) $(OPTIONS) -c lib/object/object.c -o $@ .image2.o: lib/object/image/image2.c include/compress.h include/common.h include/image.h include/memory.h include/disk.h include/dat.h include/object.h include/palette.h include/bmp.h $(INFO) Compiling 2 colors image type class... diff --git a/PR/src/include/pallist.h b/PR/src/include/pallist.h index 241124c..591314b 100644 --- a/PR/src/include/pallist.h +++ b/PR/src/include/pallist.h @@ -67,7 +67,7 @@ typedef struct { void pl_free (tPL* pl); int pl_tryAdd(tPL* pl, tResourceId resid, tPriority p); -int pl_add (tPL* pl, tObject* o, tResourceId resid, tPriority p); +void pl_add (tPL* pl, tObject* o, tResourceId resid, tPriority p); int pl_hasPriority(tPL* pl, tResourceId resid); tPL pl_create(); tObject* pl_get(tPL* pl, int* priorityRight, int colors); diff --git a/PR/src/lib/actions/export.c b/PR/src/lib/actions/export.c index d343a70..6a0cc81 100644 --- a/PR/src/lib/actions/export.c +++ b/PR/src/lib/actions/export.c @@ -72,8 +72,8 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti tObject currentPalette=getObject(NULL,&ok); /*TODO: move to pallist */ unsigned short int numberOfItems; tResourceId bufferedPalette={0,"",0}; -/* tPaletteList paletteBuffer; - tResource res;*/ +/* tPaletteList paletteBuffer;*/ + tResource res; tPL palettes=pl_create(); int count=0; @@ -117,7 +117,7 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti 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); + /*list_insert(&paletteBuffer,(void*)&e);*/ } } break; case eResTypeImage16: /* save image */ @@ -133,7 +133,7 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti /* All right, it's not so bad, I can handle it! I'll buffer the new palette */ e.pal=currentPalette=getObject(&otherPalette,&ok); e.id=res.id; - list_insert(&paletteBuffer,(void*)&e); + /*list_insert(&paletteBuffer,(void*)&e);*/ } /* else, that's bad, I'll have to use the previous palette, even if it is the default */ } /* else, good, the palette is buffered */ res.palette=currentPalette; @@ -168,7 +168,7 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti /* Free allocated resources, dynamic strings and the index */ resourceListDrop(r); mReadCloseDatFile(); - list_drop(&paletteBuffer); + /*list_drop(&paletteBuffer);*/ /* Close unknownXML */ return ok?count:PR_RESULT_ERR_EXTRACTION; diff --git a/PR/src/lib/layers/pallist.c b/PR/src/lib/layers/pallist.c index 0134352..ab65f13 100644 --- a/PR/src/lib/layers/pallist.c +++ b/PR/src/lib/layers/pallist.c @@ -96,7 +96,7 @@ void pl_add(tPL* pl, tObject* o, tResourceId resid, tPriority p) { /* high priority insertion */ if (pl->priority_field.object) { /* if there was another object proprized, move it to the list */ tObject* obj_old_priority=pl->priority_field.object; - if (resourceListCompareId(resid,pl->priority_field.idres)==0) return 0; /* same object, take no action */ + if (resourceListCompareId(resid,pl->priority_field.idres)==0) return; /* same object, take no action */ /* drop the object from the priority field and reinsert it with low priority */ pl->priority_field.object=NULL; pl_add(pl,obj_old_priority,pl->priority_field.idres,lowPriority);