Always allocate D2-sized sound array

This makes other code simpler, and the extra elements will simply be
ignored in D1.
This commit is contained in:
Kp 2020-08-24 01:31:28 +00:00
parent 514c63efad
commit faf37e3c14
2 changed files with 2 additions and 5 deletions

View file

@ -173,13 +173,10 @@ enum sound_effect : unsigned
/* endif */
};
}
namespace dsx {
// I think it would be nice to have a scrape sound...
//#define SOUND_PLAYER_SCRAPE_WALL 72
extern std::array<uint8_t, MAX_SOUNDS> Sounds, AltSounds;
extern std::array<uint8_t, ::d2x::MAX_SOUNDS> Sounds, AltSounds;
}
constexpr std::integral_constant<int, -1> sound_none{};

View file

@ -77,7 +77,6 @@ int Num_object_subtypes = 1;
#endif
namespace dsx {
std::array<uint8_t, MAX_SOUNDS> Sounds, AltSounds;
#if defined(DXX_BUILD_DESCENT_I)
int Num_total_object_types;
@ -100,6 +99,7 @@ std::array<bitmap_index, N_COCKPIT_BITMAPS> cockpit_bitmap;
//right now there's only one player ship, but we can have another by
//adding an array and setting the pointer to the active ship.
namespace dcx {
std::array<uint8_t, ::d2x::MAX_SOUNDS> Sounds, AltSounds;
player_ship only_player_ship;
//----------------- Miscellaneous bitmap pointers ---------------