author | ecalot
<ecalot> 2006-02-24 22:10:35 UTC |
committer | ecalot
<ecalot> 2006-02-24 22:10:35 UTC |
parent | 87e9c6245eca2e03f0d9b9b8094601385de7eb9a |
PR/src/lib/object/other/binary.c | +1 | -1 |
PR/src/lib/object/palette/pop1_16c.c | +1 | -1 |
PR/src/lib/object/palette/pop2_256c.c | +1 | -1 |
PR/src/lib/object/palette/pop2_4bit.c | +1 | -1 |
PR/src/lib/object/sound/sound_common.c | +3 | -4 |
diff --git a/PR/src/lib/object/other/binary.c b/PR/src/lib/object/other/binary.c index 0dcd22c..f530d03 100644 --- a/PR/src/lib/object/other/binary.c +++ b/PR/src/lib/object/other/binary.c @@ -55,7 +55,7 @@ void* objBinaryCreate(tBinary cont, int *error) { /* use get like main.c */ int objBinaryWrite(void* o, const char* file, int optionflag, const char* backupExtension) { tBinary* b=o; - return writeData(b->data,1,file,b->size,optionflag,backupExtension)?PR_RESULT_SUCCESS:PR_RESULT_ERR_FILE_NOT_WRITE_ACCESS; + return writeData(b->data,0,file,b->size,optionflag,backupExtension)?PR_RESULT_SUCCESS:PR_RESULT_ERR_FILE_NOT_WRITE_ACCESS; } void* objBinaryRead(const char* file,int *result) { diff --git a/PR/src/lib/object/palette/pop1_16c.c b/PR/src/lib/object/palette/pop1_16c.c index be4b4ea..09016a9 100644 --- a/PR/src/lib/object/palette/pop1_16c.c +++ b/PR/src/lib/object/palette/pop1_16c.c @@ -199,7 +199,7 @@ int objPalette_pop1_4bitsWrite(void* o, const char* file, int optionflag, const /* TODO: add the write of the extra information */ /* Export extra palette information */ /*sprintf((char*)aux,"%s.more",file); - writeData(data,1,(char*)aux,size,optionflag,backupExtension); TODO fix that */ + writeData(data,0,(char*)aux,size,optionflag,backupExtension); TODO fix that */ return writePal(file,16,pal->c,optionflag,backupExtension); } diff --git a/PR/src/lib/object/palette/pop2_256c.c b/PR/src/lib/object/palette/pop2_256c.c index be4b4ea..09016a9 100644 --- a/PR/src/lib/object/palette/pop2_256c.c +++ b/PR/src/lib/object/palette/pop2_256c.c @@ -199,7 +199,7 @@ int objPalette_pop1_4bitsWrite(void* o, const char* file, int optionflag, const /* TODO: add the write of the extra information */ /* Export extra palette information */ /*sprintf((char*)aux,"%s.more",file); - writeData(data,1,(char*)aux,size,optionflag,backupExtension); TODO fix that */ + writeData(data,0,(char*)aux,size,optionflag,backupExtension); TODO fix that */ return writePal(file,16,pal->c,optionflag,backupExtension); } diff --git a/PR/src/lib/object/palette/pop2_4bit.c b/PR/src/lib/object/palette/pop2_4bit.c index be4b4ea..09016a9 100644 --- a/PR/src/lib/object/palette/pop2_4bit.c +++ b/PR/src/lib/object/palette/pop2_4bit.c @@ -199,7 +199,7 @@ int objPalette_pop1_4bitsWrite(void* o, const char* file, int optionflag, const /* TODO: add the write of the extra information */ /* Export extra palette information */ /*sprintf((char*)aux,"%s.more",file); - writeData(data,1,(char*)aux,size,optionflag,backupExtension); TODO fix that */ + writeData(data,0,(char*)aux,size,optionflag,backupExtension); TODO fix that */ return writePal(file,16,pal->c,optionflag,backupExtension); } diff --git a/PR/src/lib/object/sound/sound_common.c b/PR/src/lib/object/sound/sound_common.c index 2707d4f..1a44e27 100644 --- a/PR/src/lib/object/sound/sound_common.c +++ b/PR/src/lib/object/sound/sound_common.c @@ -71,7 +71,6 @@ int objWaveWrite(void* o, const char* file, int optionflag, const char* backupEx return (void*)o; }*/ - void* objWaveRead(const char* file, int *result) { int channels; long samplerate; @@ -93,7 +92,7 @@ void* objWaveRead(const char* file, int *result) { return (void*)o; } - +/* TODO: factorize */ int objWaveSet(void* o,tResource* res) { tBinary* wave=o; res->content.size=wave->size+1; @@ -108,7 +107,7 @@ int objMidiSet(void* o,tResource* res) { tBinary* midi=o; res->content.size=midi->size+1; res->content.data=malloc(midi->size+1); - res->content.data[0]=0x01; /* TODO: use MIDI_MAGIC */ + res->content.data[0]=0x02; /* TODO: use MIDI_MAGIC */ memcpy(res->content.data+1,midi->data,midi->size); mWriteFileInDatFile(res); return PR_RESULT_SUCCESS; @@ -118,7 +117,7 @@ int objPcspeakerSet(void* o,tResource* res) { tBinary* pcspeaker=o; res->content.size=pcspeaker->size+1; res->content.data=malloc(pcspeaker->size+1); - res->content.data[0]=0x01; /* TODO: use PCSPEAKER_MAGIC */ + res->content.data[0]=0x00; /* TODO: use PCSPEAKER_MAGIC */ memcpy(res->content.data+1,pcspeaker->data,pcspeaker->size); mWriteFileInDatFile(res); return PR_RESULT_SUCCESS;