Remove .leg fake ext (use TXTH) [Legaia 2 (PS2)]

This commit is contained in:
bnnm 2023-06-25 20:59:38 +02:00
parent 8fe3caba59
commit a2400271c9
7 changed files with 2 additions and 77 deletions

View File

@ -1053,10 +1053,9 @@ static const meta_info meta_info_list[] = {
{meta_PS2_XA30, "Reflections XA30 PS2 header"},
{meta_MUSC, "Krome MUSC header"},
{meta_MUSX, "Eurocom MUSX header"},
{meta_LEG, "Legaia 2 - Duel Saga LEG Header"},
{meta_FILP, "Bio Hazard - Gun Survivor FILp Header"},
{meta_IKM, "MiCROViSiON IKM header"},
{meta_STER, "ALCHEMY STER header"},
{meta_STER, "ALCHEMY STER header"},
{meta_SAT_DVI, "Konami KCEN DVI. header"},
{meta_DC_KCEY, "Konami KCEY KCEYCOMP header"},
{meta_BG00, "Falcom BG00 Header"},
@ -1334,7 +1333,7 @@ static const meta_info meta_info_list[] = {
{meta_ADPCM_CAPCOM, "Capcom .ADPCM header"},
{meta_UE4OPUS, "Epic Games UE4OPUS header"},
{meta_XWMA, "Microsoft XWMA RIFF header"},
{meta_VA3, "Konami VA3 header" },
{meta_VA3, "Konami VA3 header"},
{meta_XOPUS, "Exient XOPUS header"},
{meta_VS_SQUARE, "Square VS header"},
{meta_NWAV, "Chunsoft NWAV header"},

View File

@ -558,7 +558,6 @@
<ClCompile Include="meta\ps2_iab.c" />
<ClCompile Include="meta\ps2_joe.c" />
<ClCompile Include="meta\ps2_kces.c" />
<ClCompile Include="meta\ps2_leg.c" />
<ClCompile Include="meta\ps2_mcg.c" />
<ClCompile Include="meta\ps2_mic.c" />
<ClCompile Include="meta\ps2_mihb.c" />

View File

@ -1495,9 +1495,6 @@
<ClCompile Include="meta\ps2_kces.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\ps2_leg.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\ps2_mcg.c">
<Filter>meta\Source Files</Filter>
</ClCompile>

View File

@ -219,8 +219,6 @@ VGMSTREAM * init_vgmstream_musc(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_musx(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_leg(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_filp(STREAMFILE * streamFile);
VGMSTREAM* init_vgmstream_ikm(STREAMFILE* sf);

View File

@ -1,66 +0,0 @@
#include "meta.h"
#include "../util.h"
/* LEG - found in Legaia 2 - Duel Saga (PS2)
the headers are stored seperately in the main executable... */
VGMSTREAM * init_vgmstream_leg(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
off_t start_offset;
int loop_flag = 0;
int channel_count;
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("leg",filename_extension(filename))) goto fail;
/* comparing the filesize with (num_samples*0x800) + headersize,
if it doesn't match, we will abort the vgmstream... */
if ((read_32bitLE(0x48,streamFile)*0x800)+0x4C != get_streamfile_size(streamFile))
goto fail;
loop_flag = (read_32bitLE(0x44,streamFile)!=0);
channel_count = 2;
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail;
/* fill in the vital statistics */
start_offset = 0x4C;
vgmstream->channels = channel_count;
vgmstream->sample_rate = read_32bitLE(0x40,streamFile);
vgmstream->coding_type = coding_PSX;
vgmstream->num_samples = (read_32bitLE(0x48,streamFile)*0x800)*28/16/channel_count;
if (loop_flag) {
vgmstream->loop_start_sample = (read_32bitLE(0x44,streamFile)*0x800)*28/16/channel_count;
vgmstream->loop_end_sample = (read_32bitLE(0x48,streamFile)*0x800)*28/16/channel_count;
}
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = 0x400;
vgmstream->meta_type = meta_LEG;
/* 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;i<channel_count;i++) {
vgmstream->ch[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;
}

View File

@ -84,7 +84,6 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_ps2_xa30,
init_vgmstream_musc,
init_vgmstream_musx,
init_vgmstream_leg,
init_vgmstream_filp,
init_vgmstream_ikm,
init_vgmstream_ster,

View File

@ -331,7 +331,6 @@ typedef enum {
meta_PS2_XA30, /* Driver - Parallel Lines (PS2) */
meta_MUSC, /* Krome PS2 games */
meta_MUSX,
meta_LEG, /* Legaia 2 [no header_id] */
meta_FILP, /* Resident Evil - Dead Aim */
meta_IKM,
meta_STER,