From de8656a4458f07460e72d960d77d05efc03cf135 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 20 Jun 2021 11:39:06 +0200 Subject: [PATCH] Remove buggy ngca.c meta (now part of musx.c) --- src/formats.c | 2 - src/libvgmstream.vcproj | 4 -- src/libvgmstream.vcxproj | 1 - src/libvgmstream.vcxproj.filters | 3 -- src/meta/meta.h | 2 - src/meta/ngca.c | 68 -------------------------------- src/vgmstream.c | 1 - src/vgmstream.h | 1 - 8 files changed, 82 deletions(-) delete mode 100644 src/meta/ngca.c diff --git a/src/formats.c b/src/formats.c index c2fe9236..040c4e0d 100644 --- a/src/formats.c +++ b/src/formats.c @@ -353,7 +353,6 @@ static const char* extension_list[] = { "naac", "nds", "ndp", //fake extension/header id for .nds - "ngca", "nlsd", "nop", "nps", @@ -1151,7 +1150,6 @@ static const meta_info meta_info_list[] = { {meta_MSF, "Sony MSF header"}, {meta_PS3_PAST, "SNDP header"}, {meta_SGXD, "Sony SGXD header"}, - {meta_NGCA, "NGCA header"}, {meta_WII_RAS, "RAS header"}, {meta_PS2_SPM, "SPM header"}, {meta_X360_TRA, "Terminal Reality .TRA raw header"}, diff --git a/src/libvgmstream.vcproj b/src/libvgmstream.vcproj index b07328b6..6f5d1079 100644 --- a/src/libvgmstream.vcproj +++ b/src/libvgmstream.vcproj @@ -1106,10 +1106,6 @@ RelativePath=".\meta\vid1.c" > - - diff --git a/src/libvgmstream.vcxproj b/src/libvgmstream.vcxproj index 358cfc80..ea852a1f 100644 --- a/src/libvgmstream.vcxproj +++ b/src/libvgmstream.vcxproj @@ -222,7 +222,6 @@ - diff --git a/src/libvgmstream.vcxproj.filters b/src/libvgmstream.vcxproj.filters index 46446d47..63227fb9 100644 --- a/src/libvgmstream.vcxproj.filters +++ b/src/libvgmstream.vcxproj.filters @@ -1579,9 +1579,6 @@ meta\Source Files - - meta\Source Files - meta\Source Files diff --git a/src/meta/meta.h b/src/meta/meta.h index 590b0d7a..e7fffc51 100644 --- a/src/meta/meta.h +++ b/src/meta/meta.h @@ -508,8 +508,6 @@ VGMSTREAM * init_vgmstream_ps3_past(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_sgxd(STREAMFILE* streamFile); -VGMSTREAM * init_vgmstream_ngca(STREAMFILE* streamFile); - VGMSTREAM * init_vgmstream_wii_ras(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_ps2_spm(STREAMFILE* streamFile); diff --git a/src/meta/ngca.c b/src/meta/ngca.c deleted file mode 100644 index fb135204..00000000 --- a/src/meta/ngca.c +++ /dev/null @@ -1,68 +0,0 @@ -#include "meta.h" -#include "../util.h" - -/* NGCA (from GoldenEye 007) */ -VGMSTREAM * init_vgmstream_ngca(STREAMFILE *streamFile) { - VGMSTREAM * vgmstream = NULL; - char filename[PATH_LIMIT]; - off_t start_offset; - - int loop_flag; - int channel_count; - - /* check extension, case insensitive */ - streamFile->get_name(streamFile,filename,sizeof(filename)); - if (strcasecmp("ngca",filename_extension(filename))) goto fail; - - /* check header */ - if (read_32bitBE(0x00,streamFile) != 0x4E474341) /* "NGCA" */ - goto fail; - - loop_flag = 0; - channel_count = 1; - - /* build the VGMSTREAM */ - vgmstream = allocate_vgmstream(channel_count,loop_flag); - if (!vgmstream) goto fail; - - /* fill in the vital statistics */ - start_offset = 0x40; - vgmstream->channels = channel_count; - vgmstream->sample_rate = 32000; - vgmstream->coding_type = coding_NGC_DSP; - vgmstream->num_samples = (((read_32bitBE(0x4,streamFile))/2) - 1) / 8 * 14; - - vgmstream->layout_type = layout_none; - vgmstream->meta_type = meta_NGCA; - vgmstream->allow_dual_stereo = 1; - - if (vgmstream->coding_type == coding_NGC_DSP) { - int i; - for (i=0;i<16;i++) { - vgmstream->ch[0].adpcm_coef[i] = read_16bitBE(0xC+i*2,streamFile); - } - } - - /* open the file for reading */ - { - int i; - STREAMFILE * file; - file = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE); - if (!file) goto fail; - for (i=0;ich[i].streamfile = file; - - vgmstream->ch[i].channel_start_offset= - vgmstream->ch[i].offset=start_offset+ - vgmstream->interleave_block_size*i; - - } - } - - return vgmstream; - - /* clean up anything we may have opened */ -fail: - if (vgmstream) close_vgmstream(vgmstream); - return NULL; -} diff --git a/src/vgmstream.c b/src/vgmstream.c index 1f7d5f92..105c6bee 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -264,7 +264,6 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = { init_vgmstream_msf, init_vgmstream_ps3_past, init_vgmstream_sgxd, - init_vgmstream_ngca, init_vgmstream_wii_ras, init_vgmstream_ps2_spm, init_vgmstream_x360_tra, diff --git a/src/vgmstream.h b/src/vgmstream.h index ecc19035..36e582c7 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -563,7 +563,6 @@ typedef enum { meta_MSF, meta_PS3_PAST, /* Bakugan Battle Brawlers (PS3) */ meta_SGXD, /* Sony: Folklore, Genji, Tokyo Jungle (PS3), Brave Story, Kurohyo (PSP) */ - meta_NGCA, /* GoldenEye 007 (Wii) */ meta_WII_RAS, /* Donkey Kong Country Returns (Wii) */ meta_PS2_SPM, /* Lethal Skies Elite Pilot: Team SW */ meta_X360_TRA, /* Def Jam Rapstar */