mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 17:03:13 +00:00
Removing two FIXMEs, based on what madmoose told me on #scummvm
svn-id: r25216
This commit is contained in:
parent
3be5b0cca2
commit
8205cd9d3d
@ -33,12 +33,7 @@ bool Module::load(Common::ReadStream &st) {
|
||||
st.read(songname, 20);
|
||||
songname[20] = '\0';
|
||||
|
||||
// FIXME: We define sample to have 32 entries,
|
||||
// yet we only setup 31 of these -- is this on
|
||||
// purpose, or an off-by-one error? This should
|
||||
// be clarified by either adding a comment explaining
|
||||
// this odditiy, or by fixing the off-by-one-bug.
|
||||
for (int i = 0; i < 31; ++i) {
|
||||
for (int i = 0; i < NUM_SAMPLES; ++i) {
|
||||
st.read(sample[i].name, 22);
|
||||
sample[i].name[22] = '\0';
|
||||
sample[i].len = 2 * st.readUint16BE();
|
||||
@ -79,7 +74,7 @@ bool Module::load(Common::ReadStream &st) {
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 31; ++i) {
|
||||
for (int i = 0; i < NUM_SAMPLES; ++i) {
|
||||
if (!sample[i].len)
|
||||
sample[i].data = 0;
|
||||
else {
|
||||
@ -96,14 +91,14 @@ bool Module::load(Common::ReadStream &st) {
|
||||
|
||||
Module::Module() {
|
||||
pattern = 0;
|
||||
for (int i = 0; i < 31; ++i) {
|
||||
for (int i = 0; i < NUM_SAMPLES; ++i) {
|
||||
sample[i].data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Module::~Module() {
|
||||
delete[] pattern;
|
||||
for (int i = 0; i < 31; ++i) {
|
||||
for (int i = 0; i < NUM_SAMPLES; ++i) {
|
||||
delete[] sample[i].data;
|
||||
}
|
||||
}
|
||||
|
@ -28,19 +28,6 @@
|
||||
|
||||
namespace Modules {
|
||||
|
||||
/*
|
||||
* FIXME: Is the following comment still valid? If so,
|
||||
* it should be marked accordingly, and maybe added to our
|
||||
* TODO list on the Wiki (conserving memory is always a big
|
||||
* boon for our smaller targets).
|
||||
*
|
||||
* Storing notes and patterns like this
|
||||
* wastes insane amounts of memory.
|
||||
*
|
||||
* They should be stored in memory
|
||||
* like they are in the file.
|
||||
*/
|
||||
|
||||
#include "common/pack-start.h" // START STRUCT PACKING
|
||||
|
||||
struct note_t {
|
||||
@ -67,7 +54,8 @@ class Module {
|
||||
public:
|
||||
byte songname[21];
|
||||
|
||||
sample_t sample[32];
|
||||
static const int NUM_SAMPLES = 31;
|
||||
sample_t sample[NUM_SAMPLES];
|
||||
|
||||
byte songlen;
|
||||
byte undef;
|
||||
|
Loading…
x
Reference in New Issue
Block a user