author | ecalot
<ecalot> 2006-06-19 16:14:44 UTC |
committer | ecalot
<ecalot> 2006-06-19 16:14:44 UTC |
parent | 80d8cd12950b77aca17c897f158ec991428ee3ce |
PR/doc/changelog.txt | +7 | -7 |
PR/src/.cvsignore | +1 | -0 |
PR/src/lib/layers/pallist.c | +0 | -27 |
PR/src/lib/object/palette/pop1_16c.c | +0 | -110 |
PR/src/ports/winfiles/.cvsignore | +4 | -0 |
PR/src/ports/winfiles/pr.dev | +1 | -1 |
diff --git a/PR/doc/changelog.txt b/PR/doc/changelog.txt index 8782106..9368a17 100644 --- a/PR/doc/changelog.txt +++ b/PR/doc/changelog.txt @@ -180,15 +180,14 @@ 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-07-08) - x Add a fatal error check when importing from a different palette size and a - warning when importing from an incorrect palette. - Added support for all POP2 palettes - - Create a priority list for the palettes + - Created a priority list for the palettes - Moved tResource* from reslist to types.h - - Prepeare the skeletton abstraction layer for bitmap to support .png files - - Renamed "uncompress" to "decomporess" + - Prepared the skeleton abstraction layer for bitmap to support .png files + - Renamed "uncompress" to "decompress" + 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 RLEV decompression algorithm - x Check for memory leak x Clean the source x Common factor in LGZ compression (a .h or compress.h) for win size, etc. x Common palette calculation @@ -197,10 +196,11 @@ Versions: 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 Rename all xbit names with xcolor + - Rename all xbit names with xcolor x Transform flags from the hex form to the [a-y]* form (a is 1, b is 2, c is 4...) * PR v1.4 (future plans) x Added full POP2 RLEV compression algorithm + x Check for memory leak x Code a palette adapting feature x Finish python interface x Fix buffer overflows (in entered filename sizes) diff --git a/PR/src/.cvsignore b/PR/src/.cvsignore index 21efc2f..23e8693 100644 --- a/PR/src/.cvsignore +++ b/PR/src/.cvsignore @@ -1,3 +1,4 @@ .*.o .*.obj +.obj bin diff --git a/PR/src/lib/layers/pallist.c b/PR/src/lib/layers/pallist.c index eb9979f..b8245ab 100644 --- a/PR/src/lib/layers/pallist.c +++ b/PR/src/lib/layers/pallist.c @@ -35,16 +35,6 @@ pallist.c: Princed Resources : Palette list layer implementation #include "pallist.h" #include "reslist.h" /* resourceListCompareId */ -/* palette list layer (that uses the abstract list layer primitives) */ -#if 0 -int pallist_compare(const void* a,const void* b) { - return resourceListCompareId(((tPaletteListItem*)a)->id,((tPaletteListItem*)b)->id); -} - -tPaletteList paletteListCreate() { - return list_create(sizeof(tPaletteListItem),pallist_compare,NULL); -} -#endif /* Priority list */ #include <stdlib.h> #include "object.h" @@ -55,23 +45,6 @@ void showobj(tObject o) { } #endif -#if 0 -pl_dellist_add(tPL* pl, tResourceId idres, tObject* obj) { - /* TODO: use an ordered list */ - /* result=resourceListCompareId(idres,);*/ - tPL_Node* node=pl->list_deleted_first; - - while (node) { - if (resourceListCompareId(node->resid,idres)==0)e - } - - - - -} - -#endif - tPL pl_create() { tPL r; diff --git a/PR/src/lib/object/palette/pop1_16c.c b/PR/src/lib/object/palette/pop1_16c.c index 1449395..8851196 100644 --- a/PR/src/lib/object/palette/pop1_16c.c +++ b/PR/src/lib/object/palette/pop1_16c.c @@ -53,116 +53,6 @@ void addPop1Raw(tPalette* p,unsigned char* data, int dataSize); static tColor sample_pal4[]={{0,0,0},{4,4,4}}; /*SAMPLE_PAL16;*/ -#if 0 -int setPalette(tPalette* p, int bits, tColor* palette) { - switch(bits) { - case 1: - memcpy(p->p1,palette,2*sizeof(tColor)); - break; - case 4: - memcpy(p->p4,palette,16*sizeof(tColor)); - break; - case 8: - memcpy(p->p8,palette,256*sizeof(tColor)); - break; - default: - return -1; /* unsupported bit rate */ - } - return 0; -} - -int getPalette(const tPalette* p, int bits, const tColor** apalette) { - switch(bits) { - case 1: - *apalette=p->p1; - break; - case 4: - *apalette=p->p4; - break; - case 8: - *apalette=p->p8; - break; - default: - return -1; /* unsupported bit rate */ - } - return 0; -} - -tPalette createPalette() { - tPalette r; - int i; - - /* Palette 1 bit */ - r.p1[0].r=0; - r.p1[0].g=0; - r.p1[0].b=0; - r.p1[1].r=255; - r.p1[1].g=255; - r.p1[1].b=255; - - /* Palette 4 bits */ - memcpy(r.p4, sample_pal4, 16); - - /* Palette 8 bits */ - for (i=0;i<256;i++) { - r.p8[i].r=i; - r.p8[i].g=i; - r.p8[i].b=i; - } - - /* initialize the rest */ - r.pop1raw=NULL; - return r; -} - - -/* reads the information in data and tries to remember it in the palette */ -int readPalette(tPalette* p, unsigned char* data, int dataSize) { - tColor c[256]; - int i,bits=0; - *p=createPalette(); - /*printf("reading a palette from data (%d)\n",dataSize);*/ - /* TODO: validate checksum */ - - switch (dataSize) { - case 101: - for (i=0;i<16;i++) { - c[i].r=data[(i*3)+5]<<2; - c[i].g=data[(i*3)+6]<<2; - c[i].b=data[(i*3)+7]<<2; - } - bits=4; - /* this palette needs to be remembered as binary */ - /*addPop1Raw(p,data+1,dataSize-1);*/ - break; - case 3*256+1: - case 3*320+1: - for (i=0;i<256;i++) { - c[i].r=data[(i*3)+1]<<2; - c[i].g=data[(i*3)+2]<<2; - c[i].b=data[(i*3)+3]<<2; - } - bits=8; - break; - } - - if (bits) setPalette(p,bits,c); - return bits; -} -/* -int applyPalette(tPalette* p,tImage *i) { - i->pal=*p; - return 0; -} - -void addPop1Raw(tPalette* p,unsigned char* data, int dataSize) { - freeAllocation(p->pop1raw); - p->pop1raw=binaryallocandcopy(data,dataSize); - p->pop1rawSize=dataSize; -} -*/ -#endif - typedef struct { tColor c[16]; unsigned char raw[100]; diff --git a/PR/src/ports/winfiles/.cvsignore b/PR/src/ports/winfiles/.cvsignore new file mode 100644 index 0000000..81c8568 --- /dev/null +++ b/PR/src/ports/winfiles/.cvsignore @@ -0,0 +1,4 @@ +pr_private.rc +pr_private.h +pr.layout +Makefile.win \ No newline at end of file diff --git a/PR/src/ports/winfiles/pr.dev b/PR/src/ports/winfiles/pr.dev index b27894a..b7326c6 100644 --- a/PR/src/ports/winfiles/pr.dev +++ b/PR/src/ports/winfiles/pr.dev @@ -933,7 +933,7 @@ BuildCmd= Major=1 Minor=3 Release=0 -Build=40 +Build=42 LanguageID=2057 CharsetID=1252 CompanyName=Princed development team