diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-11 17:28:27 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-11 17:28:27 +0200 |
commit | a8665d204255b4b0ad9ae6982f77ecd5e053c1b6 (patch) | |
tree | 5f7e58785f5175e7f067ffaf8f96d16272c92d1e /src/sound | |
parent | 8ffdf2583e4ea77731490dcaad51dbc08d7f26fa (diff) | |
download | colobot-a8665d204255b4b0ad9ae6982f77ecd5e053c1b6.tar.gz colobot-a8665d204255b4b0ad9ae6982f77ecd5e053c1b6.tar.bz2 colobot-a8665d204255b4b0ad9ae6982f77ecd5e053c1b6.zip |
Changed #defined constants to consts; typedef struct -> struct
Diffstat (limited to 'src/sound')
-rw-r--r-- | src/sound/sound.cpp | 4 | ||||
-rw-r--r-- | src/sound/sound.h | 18 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/sound/sound.cpp b/src/sound/sound.cpp index 5965c50..5b8f469 100644 --- a/src/sound/sound.cpp +++ b/src/sound/sound.cpp @@ -35,8 +35,8 @@ /////////////////////////////////////////////////////////////////////////////
-#define LXIMAGE 640
-#define LYIMAGE 480
+const int LXIMAGE = 640;
+const int LYIMAGE = 480;
diff --git a/src/sound/sound.h b/src/sound/sound.h index ce1c79e..e2ddb99 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -22,10 +22,10 @@ #include <dsound.h>
-#define MAXFILES 200
-#define MAXSOUND 32
-#define MAXVOLUME 20
-#define MAXOPER 4
+const int MAXFILES = 200;
+const int MAXSOUND = 32;
+const int MAXVOLUME = 20;
+const int MAXOPER = 4;
class CInstanceManager;
@@ -123,7 +123,7 @@ enum SoundNext SOPER_LOOP = 3,
};
-typedef struct
+struct SoundOper
{
char bUsed;
float finalAmplitude;
@@ -131,10 +131,9 @@ typedef struct float totalTime;
float currentTime;
SoundNext nextOper;
-}
-SoundOper;
+};
-typedef struct
+struct SoundChannel
{
char bUsed; // buffer used?
char bMute; // silence?
@@ -151,8 +150,7 @@ typedef struct float volume; // 2D: volume 1..0 depending on position
float pan; // 2D: pan -1..+1 depending on position
SoundOper oper[MAXOPER];
-}
-SoundChannel;
+};
|