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
... ...
@@ -8,14 +8,18 @@
8 8
 
9 9
 #pragma once
10 10
 
11
-#include "SBNK.h"
11
+#include <string>
12
+#include <vector>
13
+#include <cstdint>
12 14
 #include "INFOEntry.h"
13
-#include "common.h"
15
+
16
+struct PseudoFile;
17
+struct SBNK;
14 18
 
15 19
 struct SSEQ
16 20
 {
17 21
 	std::string filename;
18
-	std::vector<uint8_t> data;
22
+	std::vector<std::uint8_t> data;
19 23
 
20 24
 	const SBNK *bank;
21 25
 	INFOEntrySEQ info;
Browse code

Remove the copy constructors from SBNK, SDAT and SSEQ.

(They were probably holdovers from copying the code from the NCSF creation tools.)

Naram Qashat authored on 2021/03/19 15:54:35
Showing 1 changed files
... ...
@@ -21,8 +21,6 @@ struct SSEQ
21 21
 	INFOEntrySEQ info;
22 22
 
23 23
 	SSEQ(const std::string &fn = "");
24
-	SSEQ(const SSEQ &sseq);
25
-	SSEQ &operator=(const SSEQ &sseq);
26 24
 
27 25
 	void Read(PseudoFile &file);
28 26
 };
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 SSEQ (Sequence) structure
3 3
  * By Naram Qashat (CyberBotX) [cyberbotx@cyberbotx.com]
4
- * Last modification on 2014-09-08
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

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 SSEQ (Sequence) structure
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_SSEQ_H
11
-#define SSEQPLAYER_SSEQ_H
10
+#pragma once
12 11
 
13 12
 #include "SBNK.h"
14 13
 #include "INFOEntry.h"
... ...
@@ -28,5 +27,3 @@ struct SSEQ
28 27
 
29 28
 	void Read(PseudoFile &file);
30 29
 };
31
-
32
-#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,32 @@
1
+/*
2
+ * SSEQ Player - SDAT SSEQ (Sequence) structure
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_SSEQ_H
11
+#define SSEQPLAYER_SSEQ_H
12
+
13
+#include "SBNK.h"
14
+#include "INFOEntry.h"
15
+#include "common.h"
16
+
17
+struct SSEQ
18
+{
19
+	std::string filename;
20
+	std::vector<uint8_t> data;
21
+
22
+	const SBNK *bank;
23
+	INFOEntrySEQ info;
24
+
25
+	SSEQ(const std::string &fn = "");
26
+	SSEQ(const SSEQ &sseq);
27
+	SSEQ &operator=(const SSEQ &sseq);
28
+
29
+	void Read(PseudoFile &file);
30
+};
31
+
32
+#endif