# HG changeset patch # User William Pitcock # Date 1214882498 18000 # Node ID f0547285577e5b7f5dd798b7c93760ff54913b2b # Parent fd5373830ac11984d87e7c6cb3535906685c097d Start working on tuples. diff -r fd5373830ac1 -r f0547285577e src/psf2/ao.h --- 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; diff -r fd5373830ac1 -r f0547285577e src/psf2/corlett.c --- 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) diff -r fd5373830ac1 -r f0547285577e src/psf2/eng_protos.h --- 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 *); diff -r fd5373830ac1 -r f0547285577e src/psf2/eng_psf.c --- 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; -} diff -r fd5373830ac1 -r f0547285577e src/psf2/eng_psf2.c --- 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; diff -r fd5373830ac1 -r f0547285577e src/psf2/eng_spu.c --- 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; -}