Mercurial > audlegacy-plugins
changeset 2743:f0547285577e
Start working on tuples.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Mon, 30 Jun 2008 22:21:38 -0500 |
parents | fd5373830ac1 |
children | af1338519322 |
files | src/psf2/ao.h src/psf2/corlett.c src/psf2/eng_protos.h src/psf2/eng_psf.c src/psf2/eng_psf2.c src/psf2/eng_spu.c |
diffstat | 6 files changed, 9 insertions(+), 86 deletions(-) [+] |
line wrap: on
line diff
--- a/src/psf2/ao.h Mon Jun 30 22:12:23 2008 -0500 +++ b/src/psf2/ao.h Mon Jun 30 22:21:38 2008 -0500 @@ -83,12 +83,6 @@ #define PATH_MAX 2048 #endif -typedef struct -{ - char title[9][MAX_DISP_INFO_LENGTH]; - char info[9][MAX_DISP_INFO_LENGTH]; -} ao_display_info; - typedef unsigned char uint8; typedef unsigned char UINT8; typedef signed char int8;
--- a/src/psf2/corlett.c Mon Jun 30 22:12:23 2008 -0500 +++ b/src/psf2/corlett.c Mon Jun 30 22:21:38 2008 -0500 @@ -152,9 +152,14 @@ (*c)->res_size = res_area; // Return it - *output = decomp_dat; - *size = decomp_length; - + if (output != NULL && size != NULL) + { + *output = decomp_dat; + *size = decomp_length; + } + else + free(decomp_dat); + // Next check for tags input_len -= (comp_length + 16 + res_area); if (input_len < 5)
--- a/src/psf2/eng_protos.h Mon Jun 30 22:12:23 2008 -0500 +++ b/src/psf2/eng_protos.h Mon Jun 30 22:21:38 2008 -0500 @@ -15,5 +15,5 @@ int32 psf2_execute(InputPlayback *playback); int32 psf2_stop(void); int32 psf2_command(int32, int32); -int32 psf2_fill_info(ao_display_info *); +int32 psf2_fill_info(Tuple *);
--- a/src/psf2/eng_psf.c Mon Jun 30 22:12:23 2008 -0500 +++ b/src/psf2/eng_psf.c Mon Jun 30 22:21:38 2008 -0500 @@ -412,35 +412,3 @@ } return AO_FAIL; } - -int32 psf_fill_info(ao_display_info *info) -{ - if (c == NULL) - return AO_FAIL; - - strcpy(info->title[1], "Name: "); - sprintf(info->info[1], "%s", c->inf_title); - - strcpy(info->title[2], "Game: "); - sprintf(info->info[2], "%s", c->inf_game); - - strcpy(info->title[3], "Artist: "); - sprintf(info->info[3], "%s", c->inf_artist); - - strcpy(info->title[4], "Copyright: "); - sprintf(info->info[4], "%s", c->inf_copy); - - strcpy(info->title[5], "Year: "); - sprintf(info->info[5], "%s", c->inf_year); - - strcpy(info->title[6], "Length: "); - sprintf(info->info[6], "%s", c->inf_length); - - strcpy(info->title[7], "Fade: "); - sprintf(info->info[7], "%s", c->inf_fade); - - strcpy(info->title[8], "Ripper: "); - sprintf(info->info[8], "%s", psfby); - - return AO_SUCCESS; -}
--- a/src/psf2/eng_psf2.c Mon Jun 30 22:12:23 2008 -0500 +++ b/src/psf2/eng_psf2.c Mon Jun 30 22:21:38 2008 -0500 @@ -665,38 +665,6 @@ return AO_FAIL; } -int32 psf2_fill_info(ao_display_info *info) -{ - if (c == NULL) - return AO_FAIL; - - strcpy(info->title[1], "Name: "); - sprintf(info->info[1], "%s", c->inf_title); - - strcpy(info->title[2], "Game: "); - sprintf(info->info[2], "%s", c->inf_game); - - strcpy(info->title[3], "Artist: "); - sprintf(info->info[3], "%s", c->inf_artist); - - strcpy(info->title[4], "Copyright: "); - sprintf(info->info[4], "%s", c->inf_copy); - - strcpy(info->title[5], "Year: "); - sprintf(info->info[5], "%s", c->inf_year); - - strcpy(info->title[6], "Length: "); - sprintf(info->info[6], "%s", c->inf_length); - - strcpy(info->title[7], "Fade: "); - sprintf(info->info[7], "%s", c->inf_fade); - - strcpy(info->title[8], "Ripper: "); - sprintf(info->info[8], "%s", psfby); - - return AO_SUCCESS; -} - uint32 psf2_get_loadaddr(void) { return loadAddr;
--- a/src/psf2/eng_spu.c Mon Jun 30 22:12:23 2008 -0500 +++ b/src/psf2/eng_spu.c Mon Jun 30 22:21:38 2008 -0500 @@ -305,15 +305,3 @@ return AO_FAIL; } - -int32 spu_fill_info(ao_display_info *info) -{ - strcpy(info->title[1], "Game: "); - sprintf(info->info[1], "%.128s", name); - strcpy(info->title[2], "Song: "); - sprintf(info->info[2], "%.128s", song); - strcpy(info->title[3], "Company: "); - sprintf(info->info[3], "%.128s", company); - - return AO_SUCCESS; -}