Move piggy_is_needed to dcx
This commit is contained in:
parent
faf37e3c14
commit
edb9b46b55
|
@ -223,10 +223,10 @@ static void write_int(int i,PHYSFS_File *file);
|
|||
#endif
|
||||
#endif
|
||||
}
|
||||
static int piggy_is_needed(int soundnum);
|
||||
}
|
||||
|
||||
namespace dcx {
|
||||
namespace {
|
||||
|
||||
static void get_bitmap_name_from_header(std::array<char, 13> &output_name, const DiskBitmapHeader &bmh)
|
||||
{
|
||||
|
@ -239,6 +239,20 @@ static void get_bitmap_name_from_header(std::array<char, 13> &output_name, const
|
|||
}
|
||||
}
|
||||
|
||||
static int piggy_is_needed(const int soundnum)
|
||||
{
|
||||
if (!CGameArg.SysLowMem)
|
||||
return 1;
|
||||
constexpr std::size_t upper_bound = Sounds.size();
|
||||
for (const auto i : AltSounds)
|
||||
{
|
||||
if (i < upper_bound && Sounds[i] == soundnum)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1161,19 +1175,6 @@ int properties_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int piggy_is_needed(int soundnum)
|
||||
{
|
||||
if (!CGameArg.SysLowMem)
|
||||
return 1;
|
||||
|
||||
for (const auto i : AltSounds)
|
||||
{
|
||||
if (i < Sounds.size() && Sounds[i] == soundnum)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I)
|
||||
void piggy_read_sounds(int pc_shareware)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue