Browse code

Various changes:

* Use enum class instead of enum (except for the enums for the resource IDs, not really necessary there).
* For NCSF specifically, included a function to convert an enum class to its underlying integral type (as this is needed for use with the std::bitset class).
* Cleanup headers so all the ones needed in a file are explicitly included even if they may possibly be included in another header.
* Used forward declarations in a few spots.
* Explicitly namespaced all (u)int*_t uses (this might seem like overkill, but it helps me see when the standard types are being used with a simple search for std::).
* Made sure it all builds with MinGW-w64 as well (both gcc and clang).
* Removed some std::move from DialogBuilder.cpp based on clang's warnings for that.
* Replaced use of std::copy_n on strings in DialogBuilder.cpp with my CopyToString functions that use wcscpy.
* Replaced CHAR_MIN/CHAR_MAX in eqstr.h and ltstr.h with std::numeric_limits<char>::min/max().

Naram Qashat authored on 2021/03/21 03:16:45
Showing 1 changed files
... ...
@@ -9,16 +9,18 @@
9 9
 #pragma once
10 10
 
11 11
 #include <map>
12
+#include <cstdint>
12 13
 #include "INFOEntry.h"
13
-#include "common.h"
14
+
15
+struct PseudoFile;
14 16
 
15 17
 template<typename T> struct INFORecord
16 18
 {
17
-	std::map<uint32_t, T> entries;
19
+	std::map<std::uint32_t, T> entries;
18 20
 
19 21
 	INFORecord();
20 22
 
21
-	void Read(PseudoFile &file, uint32_t startOffset);
23
+	void Read(PseudoFile &file, std::uint32_t startOffset);
22 24
 };
23 25
 
24 26
 struct INFOSection
Browse code

Remove last modification date from files.

(I never remember to update these and besides, GitHub history can show when they were last modified.)

Naram Qashat authored on 2021/03/19 10:58:12
Showing 1 changed files
... ...
@@ -1,7 +1,6 @@
1 1
 /*
2 2
  * SSEQ Player - SDAT INFO Section structures
3 3
  * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
- * Last modification on 2014-10-25
5 4
  *
6 5
  * Nintendo DS Nitro Composer (SDAT) Specification document found at
7 6
  * http://www.feshrine.net/hacking/doc/nds-sdat.html
Browse code

[NCSF] Utilize the PLAYER blocks in the SDAT if they exist.

Backwards compatibility is kept by treating the lack of PLAYER info as
if all channels are able to be allocated.

Naram Qashat authored on 2014/10/25 23:12:53
Showing 1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * SSEQ Player - SDAT INFO Section structures
3 3
  * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
- * Last modification on 2014-09-08
4
+ * Last modification on 2014-10-25
5 5
  *
6 6
  * Nintendo DS Nitro Composer (SDAT) Specification document found at
7 7
  * http://www.feshrine.net/hacking/doc/nds-sdat.html
... ...
@@ -27,6 +27,7 @@ struct INFOSection
27 27
 	INFORecord<INFOEntrySEQ> SEQrecord;
28 28
 	INFORecord<INFOEntryBANK> BANKrecord;
29 29
 	INFORecord<INFOEntryWAVEARC> WAVEARCrecord;
30
+	INFORecord<INFOEntryPLAYER> PLAYERrecord;
30 31
 
31 32
 	INFOSection();
32 33
 
Browse code

Use #pragma once instead of include guards.

Naram Qashat authored on 2014/09/08 14:47:36
Showing 1 changed files
... ...
@@ -1,14 +1,13 @@
1 1
 /*
2 2
  * SSEQ Player - SDAT INFO Section structures
3 3
  * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
- * Last modification on 2013-03-21
4
+ * Last modification on 2014-09-08
5 5
  *
6 6
  * Nintendo DS Nitro Composer (SDAT) Specification document found at
7 7
  * http://www.feshrine.net/hacking/doc/nds-sdat.html
8 8
  */
9 9
 
10
-#ifndef SSEQPLAYER_INFOSECTION_H
11
-#define SSEQPLAYER_INFOSECTION_H
10
+#pragma once
12 11
 
13 12
 #include <map>
14 13
 #include "INFOEntry.h"
... ...
@@ -33,5 +32,3 @@ struct INFOSection
33 32
 
34 33
 	void Read(PseudoFile &file);
35 34
 };
36
-
37
-#endif
Browse code

Import actual code.

Naram Qashat authored on 2013/03/26 02:41:19
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,37 @@
1
+/*
2
+ * SSEQ Player - SDAT INFO Section structures
3
+ * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
+ * Last modification on 2013-03-21
5
+ *
6
+ * Nintendo DS Nitro Composer (SDAT) Specification document found at
7
+ * http://www.feshrine.net/hacking/doc/nds-sdat.html
8
+ */
9
+
10
+#ifndef SSEQPLAYER_INFOSECTION_H
11
+#define SSEQPLAYER_INFOSECTION_H
12
+
13
+#include <map>
14
+#include "INFOEntry.h"
15
+#include "common.h"
16
+
17
+template<typename T> struct INFORecord
18
+{
19
+	std::map<uint32_t, T> entries;
20
+
21
+	INFORecord();
22
+
23
+	void Read(PseudoFile &file, uint32_t startOffset);
24
+};
25
+
26
+struct INFOSection
27
+{
28
+	INFORecord<INFOEntrySEQ> SEQrecord;
29
+	INFORecord<INFOEntryBANK> BANKrecord;
30
+	INFORecord<INFOEntryWAVEARC> WAVEARCrecord;
31
+
32
+	INFOSection();
33
+
34
+	void Read(PseudoFile &file);
35
+};
36
+
37
+#endif