* 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().
| ... | ... |
@@ -9,15 +9,17 @@ |
| 9 | 9 |
#pragma once |
| 10 | 10 |
|
| 11 | 11 |
#include <map> |
| 12 |
-#include "common.h" |
|
| 12 |
+#include <cstdint> |
|
| 13 |
+ |
|
| 14 |
+struct PseudoFile; |
|
| 13 | 15 |
|
| 14 | 16 |
struct SYMBRecord |
| 15 | 17 |
{
|
| 16 |
- std::map<uint32_t, std::string> entries; |
|
| 18 |
+ std::map<std::uint32_t, std::string> entries; |
|
| 17 | 19 |
|
| 18 | 20 |
SYMBRecord(); |
| 19 | 21 |
|
| 20 |
- void Read(PseudoFile &file, uint32_t startOffset); |
|
| 22 |
+ void Read(PseudoFile &file, std::uint32_t startOffset); |
|
| 21 | 23 |
}; |
| 22 | 24 |
|
| 23 | 25 |
struct SYMBSection |
(I never remember to update these and besides, GitHub history can show when they were last modified.)
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - SDAT SYMB (Symbol/Filename) 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 |
Backwards compatibility is kept by treating the lack of PLAYER info as
if all channels are able to be allocated.
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - SDAT SYMB (Symbol/Filename) 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 |
| ... | ... |
@@ -29,6 +29,7 @@ struct SYMBSection |
| 29 | 29 |
SYMBRecord SEQrecord; |
| 30 | 30 |
SYMBRecord BANKrecord; |
| 31 | 31 |
SYMBRecord WAVEARCrecord; |
| 32 |
+ SYMBRecord PLAYERrecord; |
|
| 32 | 33 |
|
| 33 | 34 |
SYMBSection(); |
| 34 | 35 |
|
| ... | ... |
@@ -1,14 +1,13 @@ |
| 1 | 1 |
/* |
| 2 | 2 |
* SSEQ Player - SDAT SYMB (Symbol/Filename) 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_SYMBSECTION_H |
|
| 11 |
-#define SSEQPLAYER_SYMBSECTION_H |
|
| 10 |
+#pragma once |
|
| 12 | 11 |
|
| 13 | 12 |
#include <map> |
| 14 | 13 |
#include "common.h" |
| ... | ... |
@@ -35,5 +34,3 @@ struct SYMBSection |
| 35 | 34 |
|
| 36 | 35 |
void Read(PseudoFile &file); |
| 37 | 36 |
}; |
| 38 |
- |
|
| 39 |
-#endif |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,39 @@ |
| 1 |
+/* |
|
| 2 |
+ * SSEQ Player - SDAT SYMB (Symbol/Filename) 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_SYMBSECTION_H |
|
| 11 |
+#define SSEQPLAYER_SYMBSECTION_H |
|
| 12 |
+ |
|
| 13 |
+#include <map> |
|
| 14 |
+#include "common.h" |
|
| 15 |
+ |
|
| 16 |
+struct SYMBRecord |
|
| 17 |
+{
|
|
| 18 |
+ std::map<uint32_t, std::string> entries; |
|
| 19 |
+ |
|
| 20 |
+ SYMBRecord(); |
|
| 21 |
+ |
|
| 22 |
+ void Read(PseudoFile &file, uint32_t startOffset); |
|
| 23 |
+}; |
|
| 24 |
+ |
|
| 25 |
+/* |
|
| 26 |
+ * The size has been left out of this structure as it is unused by this player. |
|
| 27 |
+ */ |
|
| 28 |
+struct SYMBSection |
|
| 29 |
+{
|
|
| 30 |
+ SYMBRecord SEQrecord; |
|
| 31 |
+ SYMBRecord BANKrecord; |
|
| 32 |
+ SYMBRecord WAVEARCrecord; |
|
| 33 |
+ |
|
| 34 |
+ SYMBSection(); |
|
| 35 |
+ |
|
| 36 |
+ void Read(PseudoFile &file); |
|
| 37 |
+}; |
|
| 38 |
+ |
|
| 39 |
+#endif |