author | ecalot
<ecalot> 2006-06-24 02:07:51 UTC |
committer | ecalot
<ecalot> 2006-06-24 02:07:51 UTC |
parent | 1f164a5a54b61ab8d92d9ea4151150b06a00468a |
PR/doc/changelog.txt | +1 | -1 |
PR/src/console/main.c | +5 | -6 |
PR/src/include/other.h | +1 | -1 |
PR/src/include/palette.h | +2 | -2 |
PR/src/include/pallist.h | +7 | -7 |
PR/src/lib/actions/classify.c | +2 | -2 |
PR/src/lib/compression/lzg_compress.c | +1 | -2 |
PR/src/lib/compression/rle_decompress.c | +2 | -2 |
PR/src/lib/compression/rlev_decompress.c | +2 | -2 |
PR/src/lib/formats/wav.c | +12 | -12 |
PR/src/lib/layers/stringflag.c | +1 | -1 |
PR/src/lib/object/image/image16.c | +2 | -2 |
PR/src/lib/object/image/image2.c | +2 | -2 |
PR/src/lib/object/image/image256.c | +1 | -1 |
PR/src/lib/object/image/image_common.c | +2 | -2 |
PR/src/lib/object/level/level_common.c | +2 | -2 |
PR/src/lib/object/object.c | +2 | -2 |
PR/src/lib/object/other/binary.c | +2 | -2 |
PR/src/lib/object/palette/pop2_256c.c | +2 | -2 |
PR/src/lib/object/sound/sound_common.c | +10 | -10 |
PR/src/ports/winfiles/pr.dev | +1 | -1 |
diff --git a/PR/doc/changelog.txt b/PR/doc/changelog.txt index 9368a17..8d87b9c 100644 --- a/PR/doc/changelog.txt +++ b/PR/doc/changelog.txt @@ -197,7 +197,7 @@ Versions: x Fix repeated resource name in CPALACE.DAT bug x Fork compress to code images as a new object in a separated file - 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...) + x Transform flags from the hex form to the comma-separated form (010=2; 110=2,3) * PR v1.4 (future plans) x Added full POP2 RLEV compression algorithm x Check for memory leak diff --git a/PR/src/console/main.c b/PR/src/console/main.c index cd1b49a..9801375 100644 --- a/PR/src/console/main.c +++ b/PR/src/console/main.c @@ -32,12 +32,12 @@ main.c: PR console program parsing and IDE */ #ifdef UNIX - #include <unistd.h> - #ifndef LINUX - #include "getopt.h" - #endif +#include <unistd.h> +#ifndef LINUX +#include "getopt.h" +#endif #else - #include "getopt.h" +#include "getopt.h" #endif #include "common.h" @@ -264,4 +264,3 @@ int main (int argc, char **argv) { return result; } - diff --git a/PR/src/include/other.h b/PR/src/include/other.h index b79751e..499b94f 100644 --- a/PR/src/include/other.h +++ b/PR/src/include/other.h @@ -19,7 +19,7 @@ */ /* -other.h: Princed Resources : +other.h: Princed Resources : Other objects headers \xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 17 Feb 2006 diff --git a/PR/src/include/palette.h b/PR/src/include/palette.h index 4c2ce07..6d34a40 100644 --- a/PR/src/include/palette.h +++ b/PR/src/include/palette.h @@ -19,8 +19,8 @@ */ /* -pal.h: Princed Resources : JASC PAL files support headers -\xaf\xaf\xaf\xaf\xaf +palette.h: Princed Resources : Palette object support headers +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2003 Princed Development Team Created: 24 Aug 2003 diff --git a/PR/src/include/pallist.h b/PR/src/include/pallist.h index e8a3187..4542b12 100644 --- a/PR/src/include/pallist.h +++ b/PR/src/include/pallist.h @@ -19,7 +19,7 @@ */ /* -.h: Princed Resources : Resource list prototypes +pallist.h: Princed Resources : Resource list prototypes \xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 05 Jun 2005 @@ -45,26 +45,26 @@ typedef tList tPaletteList; typedef struct { tResourceId id; tObject pal; -}tPaletteListItem; +} tPaletteListItem; tPaletteList paletteListCreate(); typedef enum {highPriority, lowPriority}tPriority; -typedef struct pln{ - tResourceId resid; +typedef struct pln { + tResourceId resid; tObject object; struct pln* next; -} tPL_Node; +} tPL_Node; typedef struct { struct { int enabled; - tResourceId idres; + tResourceId idres; tObject object; } priority_field; tPL_Node* list_first; tPL_Node* list_deleted_first; -} tPL; +} tPL; void pl_free (tPL* pl); int pl_tryAdd(tPL* pl, tResourceId resid, tPriority p); diff --git a/PR/src/lib/actions/classify.c b/PR/src/lib/actions/classify.c index 7caa55f..9c02791 100644 --- a/PR/src/lib/actions/classify.c +++ b/PR/src/lib/actions/classify.c @@ -19,8 +19,8 @@ */ /* -tasks.c: Princed Resources : File classify routines -\xaf\xaf\xaf\xaf\xaf\xaf\xaf +classify.c: Princed Resources : File classify routines +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2003 Princed Development Team Created: 24 Aug 2003 diff --git a/PR/src/lib/compression/lzg_compress.c b/PR/src/lib/compression/lzg_compress.c index e336535..8dcee3e 100644 --- a/PR/src/lib/compression/lzg_compress.c +++ b/PR/src/lib/compression/lzg_compress.c @@ -163,8 +163,7 @@ void pushBit(int b, unsigned char *output, int *oCursor) /* Insert the two bytes describing the pattern repetition to the output. */ void addPattern(unsigned char *input, int iCursor, unsigned char *output, int oCursor, - unsigned char *pattern, int pattern_len) -{ + unsigned char *pattern, int pattern_len) { int loc = (pattern - input) + WIN_SIZE - MAX_PATTERN_SIZE; output[oCursor] = (((pattern_len - MIN_PATTERN_SIZE) << 2) & 0xfc) + ((loc & 0x0300) >> 8); diff --git a/PR/src/lib/compression/rle_decompress.c b/PR/src/lib/compression/rle_decompress.c index 6ce6cb2..9a974d6 100644 --- a/PR/src/lib/compression/rle_decompress.c +++ b/PR/src/lib/compression/rle_decompress.c @@ -19,7 +19,7 @@ */ /* -rle_uncompress.c: Princed Resources : Image Compression Library +rle_decompress.c: Princed Resources : Image Compression Library \xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2003, 2004 Princed Development Team Created: 24 Aug 2003 @@ -38,7 +38,7 @@ rle_uncompress.c: Princed Resources : Image Compression Library /* Expands RLE algorithm */ int expandRle(const unsigned char* input, int inputSize, - unsigned char** output, int *outputSize) { + unsigned char** output, int *outputSize) { register signed char rep=1; int oCursor=0; int iCursor=0; diff --git a/PR/src/lib/compression/rlev_decompress.c b/PR/src/lib/compression/rlev_decompress.c index 01b4cf3..5b36732 100644 --- a/PR/src/lib/compression/rlev_decompress.c +++ b/PR/src/lib/compression/rlev_decompress.c @@ -19,7 +19,7 @@ */ /* -rlec_uncompress.c: Princed Resources : Image Compression Library : +rlev_decompress.c: Princed Resources : Image Compression Library : \xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Run length encoding variant for POP2 Copyright 2003, 2004, 2005, 2006 Princed Development Team @@ -61,7 +61,7 @@ int expandRleV(const unsigned char* input, int inputSize, } } } - + *outputSize=oCursor; return (rep==255)?PR_RESULT_SUCCESS:PR_RESULT_COMPRESS_RESULT_WARNING; } diff --git a/PR/src/lib/formats/wav.c b/PR/src/lib/formats/wav.c index de04685..b189670 100644 --- a/PR/src/lib/formats/wav.c +++ b/PR/src/lib/formats/wav.c @@ -75,9 +75,9 @@ int readWav(const char* file, tBinary* snd, int *pchannels, long *psamplerate, l short int BlockAlign; short int BitsPerSample; long int SubChunk2Size=0; - + fd=fopen(file,"rb"); - if (!fd) return PR_RESULT_ERR_FILE_NOT_READ_ACCESS; + if (!fd) return PR_RESULT_ERR_FILE_NOT_READ_ACCESS; /* Read headers */ ok=fread(magic,4,1,fd); @@ -97,15 +97,15 @@ int readWav(const char* file, tBinary* snd, int *pchannels, long *psamplerate, l ok=ok&&fread(magic,4,1,fd); ok=ok&&!strncmp(magic,"data",4); ok=ok&&freadlong(&SubChunk2Size,fd); - - /* Validate input vars */ - ok=ok&& (AudioFormat == 1 ); /* PCM */ - ok=ok&& (BlockAlign == NumChannels * BitsPerSample/8 ); + + /* Validate input vars */ + ok=ok&& (AudioFormat == 1 ); /* PCM */ + ok=ok&& (BlockAlign == NumChannels * BitsPerSample/8 ); /* ok=ok&& ((int)ByteRate == (int)(SampleRate * NumChannels * BitsPerSample/8) ); * why int? because I can't compare it with long, never tried in 32 bits */ ok=ok&& ((int)ChunkSize == (int)(4 + (8 + SubChunk1Size) + (8 + SubChunk2Size)) ); - ok=ok&& ((int)SubChunk1Size == (int)16 ); /* PCM chunk */ + ok=ok&& ((int)SubChunk1Size == (int)16 ); /* PCM chunk */ /* ok=ok&& (SubChunk2Size == NumSamples * NumChannels * BitsPerSample/8 );*/ - + /* Read data*/ if (ok) { snd->size=SubChunk2Size; @@ -117,7 +117,7 @@ int readWav(const char* file, tBinary* snd, int *pchannels, long *psamplerate, l return PR_RESULT_ERR_FILE_NOT_READ_ACCESS; /* TODO: use a bad format code */ } /* TODO: check eof */ - + /* unsigned char wav[]=WAVE_HEADER; int i=sizeof(wav); @@ -136,11 +136,11 @@ int readWav(const char* file, tBinary* snd, int *pchannels, long *psamplerate, l free(snd->data); return PR_RESULT_ERR_FILE_NOT_READ_ACCESS; /* TODO: use a bad format code */ } - + *pchannels = NumChannels; *psamplerate = SampleRate; *pbps = BitsPerSample; - - return PR_RESULT_SUCCESS; + + return PR_RESULT_SUCCESS; } diff --git a/PR/src/lib/layers/stringflag.c b/PR/src/lib/layers/stringflag.c index 2c75d73..c7f9504 100644 --- a/PR/src/lib/layers/stringflag.c +++ b/PR/src/lib/layers/stringflag.c @@ -19,7 +19,7 @@ */ /* -stringflag.c: Princed Resources : Format string parsing feature routines +stringflag.c: Princed Resources : Flag string parsing feature routines \xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 22 Jun 2006 diff --git a/PR/src/lib/object/image/image16.c b/PR/src/lib/object/image/image16.c index f9384db..654c6b0 100644 --- a/PR/src/lib/object/image/image16.c +++ b/PR/src/lib/object/image/image16.c @@ -19,8 +19,8 @@ */ /* -image.c: Princed Resources : Image Compression Library -\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf +image16.c: Princed Resources : Image Compression Library +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2003, 2004, 2005, 2006 Princed Development Team Created: 24 Aug 2003 diff --git a/PR/src/lib/object/image/image2.c b/PR/src/lib/object/image/image2.c index 42e7c84..3912803 100644 --- a/PR/src/lib/object/image/image2.c +++ b/PR/src/lib/object/image/image2.c @@ -19,8 +19,8 @@ */ /* -image.c: Princed Resources : Image Compression Library -\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf +image2.c: Princed Resources : Image Compression Library +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2003, 2004, 2005, 2006 Princed Development Team Created: 24 Aug 2003 diff --git a/PR/src/lib/object/image/image256.c b/PR/src/lib/object/image/image256.c index 4f51f3a..d2db51a 100644 --- a/PR/src/lib/object/image/image256.c +++ b/PR/src/lib/object/image/image256.c @@ -19,7 +19,7 @@ */ /* -image.c: Princed Resources : Image Compression Library +image256.c: Princed Resources : Image Compression Library \xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2003, 2004, 2005, 2006 Princed Development Team Created: 24 Aug 2003 diff --git a/PR/src/lib/object/image/image_common.c b/PR/src/lib/object/image/image_common.c index f9384db..654c6b0 100644 --- a/PR/src/lib/object/image/image_common.c +++ b/PR/src/lib/object/image/image_common.c @@ -19,8 +19,8 @@ */ /* -image.c: Princed Resources : Image Compression Library -\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf +image16.c: Princed Resources : Image Compression Library +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2003, 2004, 2005, 2006 Princed Development Team Created: 24 Aug 2003 diff --git a/PR/src/lib/object/level/level_common.c b/PR/src/lib/object/level/level_common.c index 6926405..2cff295 100644 --- a/PR/src/lib/object/level/level_common.c +++ b/PR/src/lib/object/level/level_common.c @@ -19,8 +19,8 @@ */ /* -.c: Princed Resources : -\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf +level.c: Princed Resources : Common POP level object implementation +\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 5 Mar 2006 diff --git a/PR/src/lib/object/object.c b/PR/src/lib/object/object.c index 8bea77f..2150ca5 100644 --- a/PR/src/lib/object/object.c +++ b/PR/src/lib/object/object.c @@ -19,8 +19,8 @@ */ /* -main.c: Princed Resources : Main item class implementation -\xaf\xaf\xaf\xaf\xaf\xaf +object.c: Princed Resources : Main item class implementation +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 16 Feb 2006 diff --git a/PR/src/lib/object/other/binary.c b/PR/src/lib/object/other/binary.c index b8b4375..c9a472d 100644 --- a/PR/src/lib/object/other/binary.c +++ b/PR/src/lib/object/other/binary.c @@ -19,8 +19,8 @@ */ /* -.c: Princed Resources : -\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf +binary.c: Princed Resources : Binary object implementation +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 17 Feb 2006 diff --git a/PR/src/lib/object/palette/pop2_256c.c b/PR/src/lib/object/palette/pop2_256c.c index b2f2a53..1057a4b 100644 --- a/PR/src/lib/object/palette/pop2_256c.c +++ b/PR/src/lib/object/palette/pop2_256c.c @@ -19,8 +19,8 @@ */ /* -palette.c: Princed Resources : The palette object implementation -\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf +pop2_256c.c: Princed Resources : The POP2 palette object implementation +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 09 Feb 2006 diff --git a/PR/src/lib/object/sound/sound_common.c b/PR/src/lib/object/sound/sound_common.c index c45b243..775684b 100644 --- a/PR/src/lib/object/sound/sound_common.c +++ b/PR/src/lib/object/sound/sound_common.c @@ -19,8 +19,8 @@ */ /* -wave.c: Princed Resources : -\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf +sounds.c: Princed Resources : Common sound object implementation +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf Copyright 2006 Princed Development Team Created: 19 Feb 2006 @@ -37,11 +37,11 @@ wave.c: Princed Resources : #include "binary.h" /* tBinary */ #include "common.h" -#include "wav.h" +#include "wav.h" #include <stdlib.h> #include <string.h> /* memcpy */ -#include "dat.h" -#include "types.h" +#include "dat.h" +#include "types.h" /***************************************************************\ | Binary Object | @@ -50,7 +50,7 @@ wave.c: Princed Resources : void* objSoundCreate(tBinary cont, int *error) { /* use get like main.c */ tBinary* r; *error=PR_RESULT_SUCCESS; - + r=(tBinary*)malloc(sizeof(tBinary)); r->data=cont.data+1; r->size=cont.size-1; @@ -74,21 +74,21 @@ int objWaveWrite(void* o, const char* file, int optionflag, const char* backupEx void* objWaveRead(const char* file, int *result) { int channels; long samplerate; - long bps; + long bps; tBinary* o=(tBinary*)malloc(sizeof(tBinary)); - + *result=readWav(file,o,&channels,&samplerate,&bps); if (*result==PR_RESULT_SUCCESS) { if (bps!=8) *result=PR_RESULT_WAV_UNSUPPORTED_BITRATE; if (samplerate!=11025) *result=PR_RESULT_WAV_UNSUPPORTED_SAMPLERATE; - if (channels!=1) *result=PR_RESULT_WAV_UNSUPPORTED_STEREO; + if (channels!=1) *result=PR_RESULT_WAV_UNSUPPORTED_STEREO; } if (*result!=PR_RESULT_SUCCESS) { free(o->data); return NULL; } - + return (void*)o; } diff --git a/PR/src/ports/winfiles/pr.dev b/PR/src/ports/winfiles/pr.dev index b7326c6..235980b 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=42 +Build=43 LanguageID=2057 CharsetID=1252 CompanyName=Princed development team