Browse code

Use #pragma once instead of include guards.

Naram Qashat authored on 2014/09/08 14:47:36
Showing 1 changed files
... ...
@@ -15,8 +15,7 @@
15 15
 	along with the this software.  If not, see <http://www.gnu.org/licenses/>.
16 16
 */
17 17
 
18
-#ifndef __SLOT1_H__
19
-#define __SLOT1_H__
18
+#pragma once
20 19
 
21 20
 #include "types.h"
22 21
 
... ...
@@ -58,5 +57,3 @@ enum NDS_SLOT1_TYPE
58 57
 	NDS_SLOT1_RETAIL,
59 58
 	NDS_SLOT1_COUNT // use for counter addons - MUST TO BE LAST!!!
60 59
 };
61
-
62
-#endif // __ADDONS_H__
Browse code

Updating in_2sf to use a newish version of DeSmuME, 0.9.9 from SVN. Somewhat cleaned up as well, but not everything because it's a pain in the ass.

Naram Qashat authored on 2013/04/18 17:22:55
Showing 1 changed files
... ...
@@ -18,54 +18,45 @@
18 18
 #ifndef __SLOT1_H__
19 19
 #define __SLOT1_H__
20 20
 
21
-#include "common.h"
22 21
 #include "types.h"
23
-//#include "debug.h"
24 22
 
25 23
 struct SLOT1INTERFACE
26 24
 {
27 25
 	// The name of the plugin, this name will appear in the plugins list
28
-	const char * name;
26
+	const char *name;
29 27
 
30
-	//called once when the plugin starts up
28
+	// called once when the plugin starts up
31 29
 	bool (*init)();
32 30
 
33
-	//called when the emulator resets
31
+	// called when the emulator resets
34 32
 	void (*reset)();
35 33
 
36
-	//called when the plugin shuts down
34
+	// called when the plugin shuts down
37 35
 	void (*close)();
38 36
 
39
-	//called when the user configurating plugin
37
+	// called when the user configurating plugin
40 38
 	void (*config)();
41 39
 
42
-	//called when the emulator write to addon
40
+	// called when the emulator write to addon
43 41
 	void (*write08)(uint8_t PROCNUM, uint32_t adr, uint8_t val);
44 42
 	void (*write16)(uint8_t PROCNUM, uint32_t adr, uint16_t val);
45 43
 	void (*write32)(uint8_t PROCNUM, uint32_t adr, uint32_t val);
46 44
 
47
-	//called when the emulator read from addon
45
+	// called when the emulator read from addon
48 46
 	uint8_t  (*read08)(uint8_t PROCNUM, uint32_t adr);
49 47
 	uint16_t (*read16)(uint8_t PROCNUM, uint32_t adr);
50 48
 	uint32_t (*read32)(uint8_t PROCNUM, uint32_t adr);
51 49
 
52
-	//called when the user get info about addon pak (description)
50
+	// called when the user get info about addon pak (description)
53 51
 	void (*info)(char *info);
54 52
 };
55 53
 
56
-extern SLOT1INTERFACE slot1_device;						// current slot1 device
54
+extern SLOT1INTERFACE slot1_device; // current slot1 device
57 55
 
58 56
 enum NDS_SLOT1_TYPE
59 57
 {
60
-	//NDS_SLOT1_NONE,
61 58
 	NDS_SLOT1_RETAIL,
62
-	//NDS_SLOT1_R4,
63
-	NDS_SLOT1_COUNT		// use for counter addons - MUST TO BE LAST!!!
59
+	NDS_SLOT1_COUNT // use for counter addons - MUST TO BE LAST!!!
64 60
 };
65 61
 
66
-//extern bool slot1Init();
67
-//extern void slot1Close();
68
-//extern void slot1Reset();
69
-//extern bool slot1Change(NDS_SLOT1_TYPE type);				// change current adddon
70
-
71
-#endif //__ADDONS_H__
62
+#endif // __ADDONS_H__
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,71 @@
1
+/*
2
+	Copyright (C) 2010-2011 DeSmuME team
3
+
4
+	This file is free software: you can redistribute it and/or modify
5
+	it under the terms of the GNU General Public License as published by
6
+	the Free Software Foundation, either version 2 of the License, or
7
+	(at your option) any later version.
8
+
9
+	This file is distributed in the hope that it will be useful,
10
+	but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+	GNU General Public License for more details.
13
+
14
+	You should have received a copy of the GNU General Public License
15
+	along with the this software.  If not, see <http://www.gnu.org/licenses/>.
16
+*/
17
+
18
+#ifndef __SLOT1_H__
19
+#define __SLOT1_H__
20
+
21
+#include "common.h"
22
+#include "types.h"
23
+//#include "debug.h"
24
+
25
+struct SLOT1INTERFACE
26
+{
27
+	// The name of the plugin, this name will appear in the plugins list
28
+	const char * name;
29
+
30
+	//called once when the plugin starts up
31
+	bool (*init)();
32
+
33
+	//called when the emulator resets
34
+	void (*reset)();
35
+
36
+	//called when the plugin shuts down
37
+	void (*close)();
38
+
39
+	//called when the user configurating plugin
40
+	void (*config)();
41
+
42
+	//called when the emulator write to addon
43
+	void (*write08)(uint8_t PROCNUM, uint32_t adr, uint8_t val);
44
+	void (*write16)(uint8_t PROCNUM, uint32_t adr, uint16_t val);
45
+	void (*write32)(uint8_t PROCNUM, uint32_t adr, uint32_t val);
46
+
47
+	//called when the emulator read from addon
48
+	uint8_t  (*read08)(uint8_t PROCNUM, uint32_t adr);
49
+	uint16_t (*read16)(uint8_t PROCNUM, uint32_t adr);
50
+	uint32_t (*read32)(uint8_t PROCNUM, uint32_t adr);
51
+
52
+	//called when the user get info about addon pak (description)
53
+	void (*info)(char *info);
54
+};
55
+
56
+extern SLOT1INTERFACE slot1_device;						// current slot1 device
57
+
58
+enum NDS_SLOT1_TYPE
59
+{
60
+	//NDS_SLOT1_NONE,
61
+	NDS_SLOT1_RETAIL,
62
+	//NDS_SLOT1_R4,
63
+	NDS_SLOT1_COUNT		// use for counter addons - MUST TO BE LAST!!!
64
+};
65
+
66
+//extern bool slot1Init();
67
+//extern void slot1Close();
68
+//extern void slot1Reset();
69
+//extern bool slot1Change(NDS_SLOT1_TYPE type);				// change current adddon
70
+
71
+#endif //__ADDONS_H__