Skip to content

Commit 1900e20

Browse files
committed
Added namespace.
1 parent 1f18a32 commit 1900e20

File tree

15 files changed

+66
-0
lines changed

15 files changed

+66
-0
lines changed

includes/RhythmGameUtilities/Audio.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
#include "Audio.h"
66

7+
namespace RhythmGameUtilities
8+
{
9+
710
int **ConvertSamplesToWaveform(float *samples, int size, int width, int height)
811
{
912
auto waveform = new int *[width];
@@ -46,3 +49,5 @@ int **ConvertSamplesToWaveform(float *samples, int size, int width, int height)
4649

4750
return waveform;
4851
}
52+
53+
} // namespace RhythmGameUtilities

includes/RhythmGameUtilities/Audio.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
#define PACKAGE_API
88
#endif
99

10+
namespace RhythmGameUtilities
11+
{
12+
1013
extern "C"
1114
{
1215
PACKAGE_API int **ConvertSamplesToWaveform(float *samples, int size,
1316
int width, int height);
1417
}
1518

19+
} // namespace RhythmGameUtilities
20+
1621
#endif

includes/RhythmGameUtilities/Enums/Difficulty.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#pragma once
22

3+
namespace RhythmGameUtilities
4+
{
5+
36
enum Difficulty
47
{
58

@@ -12,3 +15,5 @@ enum Difficulty
1215
Expert
1316

1417
};
18+
19+
} // namespace RhythmGameUtilities

includes/RhythmGameUtilities/Enums/NamedSection.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#include <string>
44

5+
namespace RhythmGameUtilities
6+
{
7+
58
namespace NamedSection
69
{
710
typedef std::string Type;
@@ -22,3 +25,5 @@ Type SyncTrack = "SyncTrack";
2225
Type Events = "Events";
2326

2427
}; // namespace NamedSection
28+
29+
} // namespace RhythmGameUtilities

includes/RhythmGameUtilities/Enums/TypeCode.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#include <string>
44

5+
namespace RhythmGameUtilities
6+
{
7+
58
namespace TypeCode
69
{
710
typedef std::string Type;
@@ -27,3 +30,5 @@ Type Note = "N";
2730
Type Event = "E";
2831

2932
} // namespace TypeCode
33+
34+
} // namespace RhythmGameUtilities

includes/RhythmGameUtilities/Parsers.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#include "Utilities.h"
1111
#include <iostream>
1212

13+
namespace RhythmGameUtilities
14+
{
15+
1316
std::regex CHART_SECTION_PATTERN("\\[([a-z]+)\\]\\s*\\{([^\\}]+)\\}",
1417
std::regex_constants::icase);
1518

@@ -109,3 +112,5 @@ ChartSectionInternal *ParseSectionsFromChartInternal(const char *contents,
109112

110113
return sections;
111114
}
115+
116+
} // namespace RhythmGameUtilities

includes/RhythmGameUtilities/Parsers.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#define PACKAGE_API
99
#endif
1010

11+
namespace RhythmGameUtilities
12+
{
13+
1114
typedef struct
1215
{
1316
char *key;
@@ -35,3 +38,5 @@ extern "C"
3538
PACKAGE_API ChartSectionInternal *
3639
ParseSectionsFromChartInternal(const char *contents, int *outSize);
3740
}
41+
42+
} // namespace RhythmGameUtilities
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#pragma once
22

3+
namespace RhythmGameUtilities
4+
{
5+
36
struct BeatBar
47
{
58

69
int Position;
710

811
int BPM;
912
};
13+
14+
} // namespace RhythmGameUtilities

includes/RhythmGameUtilities/Structs/Note.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#pragma once
22

3+
namespace RhythmGameUtilities
4+
{
5+
36
struct Note
47
{
58

@@ -9,3 +12,5 @@ struct Note
912

1013
int Length;
1114
};
15+
16+
} // namespace RhythmGameUtilities

includes/RhythmGameUtilities/Structs/TrackEvent.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#include <string>
44

5+
namespace RhythmGameUtilities
6+
{
7+
58
struct TrackEvent
69
{
710

@@ -11,3 +14,5 @@ struct TrackEvent
1114

1215
std::vector<std::string> *Values;
1316
};
17+
18+
} // namespace RhythmGameUtilities

0 commit comments

Comments
 (0)