aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/mods/module.cpp4
-rw-r--r--sound/mods/module.h12
-rw-r--r--sound/mods/protracker.cpp2
-rw-r--r--sound/mods/protracker.h9
4 files changed, 14 insertions, 13 deletions
diff --git a/sound/mods/module.cpp b/sound/mods/module.cpp
index 26abf3147e..f7f343fde5 100644
--- a/sound/mods/module.cpp
+++ b/sound/mods/module.cpp
@@ -161,9 +161,9 @@ bool Module::load(const char *fn) {
}
Module::Module() {
- pattern = NULL;
+ pattern = 0;
for (int i = 0; i < 31; ++i) {
- sample[i].data = NULL;
+ sample[i].data = 0;
}
}
diff --git a/sound/mods/module.h b/sound/mods/module.h
index 3b39f3991e..f16d3eb4f4 100644
--- a/sound/mods/module.h
+++ b/sound/mods/module.h
@@ -21,8 +21,8 @@
*
*/
-#ifndef __SOUND_MODS_MODULE_H__
-#define __SOUND_MODS_MODULE_H__
+#ifndef SOUND_MODS_MODULE_H
+#define SOUND_MODS_MODULE_H
namespace Modules {
@@ -34,15 +34,15 @@ namespace Modules {
* like they are in the file.
*/
-typedef struct {
+struct note_t {
byte sample;
uint16 period;
uint16 effect;
-} note_t;
+};
typedef note_t pattern_t[64][4];
-typedef struct {
+struct sample_t {
byte name[23];
uint16 len;
byte finetune;
@@ -50,7 +50,7 @@ typedef struct {
uint16 repeat;
uint16 replen;
byte *data;
-} sample_t;
+};
class Module {
public:
diff --git a/sound/mods/protracker.cpp b/sound/mods/protracker.cpp
index 31dd2e3dc2..2a308407e4 100644
--- a/sound/mods/protracker.cpp
+++ b/sound/mods/protracker.cpp
@@ -106,7 +106,7 @@ void ProtrackerPlayer::generateSound() {
static bool did_warn_about_finetune = false;
if (!did_warn_about_finetune && _module->sample[sample].finetune != 0) {
did_warn_about_finetune = true;
- puts("Warning! Finetuning not implemented!");
+ warning("Finetuning not implemented!");
}
if (_module->sample[sample].replen > 2) {
diff --git a/sound/mods/protracker.h b/sound/mods/protracker.h
index 6f8bc0bf44..070f972d4a 100644
--- a/sound/mods/protracker.h
+++ b/sound/mods/protracker.h
@@ -21,8 +21,8 @@
*
*/
-#ifndef __SOUND_MODS_PROTRACKER_H__
-#define __SOUND_MODS_PROTRACKER_H__
+#ifndef SOUND_MODS_PROTRACKER_H
+#define SOUND_MODS_PROTRACKER_H
#include "common/stdafx.h"
#include "common/system.h"
@@ -32,7 +32,7 @@
namespace Modules {
class SoundBuffer {
- private:
+private:
int _capacity;
int _size;
int16 *_data;
@@ -82,6 +82,7 @@ public:
};
class ProtrackerPlayer {
+private:
OSystem *_system;
Module *_module;
@@ -129,7 +130,7 @@ class ProtrackerPlayer {
} _track[4];
public:
- ProtrackerPlayer() : _system(NULL), _module(NULL) { };
+ ProtrackerPlayer() : _system(0), _module(0) { };
void init(OSystem *system);