| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,76 +0,0 @@ |
| 1 |
-/* |
|
| 2 |
- Copyright (C) 2008-2010 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 |
-//TODO - dismantle this file |
|
| 19 |
- |
|
| 20 |
-#ifndef _COMMON_H_ |
|
| 21 |
-#define _COMMON_H_ |
|
| 22 |
- |
|
| 23 |
-#include <string> |
|
| 24 |
-#include <cstdio> |
|
| 25 |
-#include <cstring> |
|
| 26 |
- |
|
| 27 |
-#include "types.h" |
|
| 28 |
- |
|
| 29 |
-extern const uint8_t logo_data[156]; |
|
| 30 |
- |
|
| 31 |
-#ifdef WIN32 |
|
| 32 |
-# include "windowsh_wrapper.h" |
|
| 33 |
-//# define WIN32_LEAN_AND_MEAN |
|
| 34 |
-//# include <winsock2.h> |
|
| 35 |
- |
|
| 36 |
-/*# define CLASSNAME "DeSmuME" |
|
| 37 |
- |
|
| 38 |
-extern HINSTANCE hAppInst; |
|
| 39 |
- |
|
| 40 |
-extern bool romloaded; |
|
| 41 |
- |
|
| 42 |
-extern char IniName[MAX_PATH]; |
|
| 43 |
-extern void GetINIPath(); |
|
| 44 |
-extern void WritePrivateProfileInt(char *appname, char *keyname, int val, char *file); |
|
| 45 |
- |
|
| 46 |
-bool GetPrivateProfileBool(const char *appname, const char *keyname, bool defval, const char *filename); |
|
| 47 |
-void WritePrivateProfileBool(char *appname, char *keyname, bool val, char *file); |
|
| 48 |
-#else // non Windows |
|
| 49 |
-#define sscanf_s sscanf*/ |
|
| 50 |
-#endif |
|
| 51 |
- |
|
| 52 |
-/*template<typename T> T reverseBits(T x) |
|
| 53 |
-{
|
|
| 54 |
- T h = 0; |
|
| 55 |
- |
|
| 56 |
- for (unsigned i = 0; i < sizeof(T) * 8; ++i) |
|
| 57 |
- {
|
|
| 58 |
- h = (h << 1) + (x & 1); |
|
| 59 |
- x >>= 1; |
|
| 60 |
- } |
|
| 61 |
- |
|
| 62 |
- return h; |
|
| 63 |
-}*/ |
|
| 64 |
- |
|
| 65 |
-/*template<typename T> char *intToBin(T val) |
|
| 66 |
-{
|
|
| 67 |
- char buf[256] = ""; |
|
| 68 |
- for (int i = sizeof(T) * 8, t = 0; i > 0; --i, ++t) |
|
| 69 |
- buf[i - 1] = val & (1<<t) ? '1' : '0'; |
|
| 70 |
- return _strdup(buf); |
|
| 71 |
-}*/ |
|
| 72 |
- |
|
| 73 |
-//extern char *trim(char *s, int len = -1); |
|
| 74 |
-//extern char *removeSpecialChars(char *s); |
|
| 75 |
- |
|
| 76 |
-#endif |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,76 @@ |
| 1 |
+/* |
|
| 2 |
+ Copyright (C) 2008-2010 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 |
+//TODO - dismantle this file |
|
| 19 |
+ |
|
| 20 |
+#ifndef _COMMON_H_ |
|
| 21 |
+#define _COMMON_H_ |
|
| 22 |
+ |
|
| 23 |
+#include <string> |
|
| 24 |
+#include <cstdio> |
|
| 25 |
+#include <cstring> |
|
| 26 |
+ |
|
| 27 |
+#include "types.h" |
|
| 28 |
+ |
|
| 29 |
+extern const uint8_t logo_data[156]; |
|
| 30 |
+ |
|
| 31 |
+#ifdef WIN32 |
|
| 32 |
+# include "windowsh_wrapper.h" |
|
| 33 |
+//# define WIN32_LEAN_AND_MEAN |
|
| 34 |
+//# include <winsock2.h> |
|
| 35 |
+ |
|
| 36 |
+/*# define CLASSNAME "DeSmuME" |
|
| 37 |
+ |
|
| 38 |
+extern HINSTANCE hAppInst; |
|
| 39 |
+ |
|
| 40 |
+extern bool romloaded; |
|
| 41 |
+ |
|
| 42 |
+extern char IniName[MAX_PATH]; |
|
| 43 |
+extern void GetINIPath(); |
|
| 44 |
+extern void WritePrivateProfileInt(char *appname, char *keyname, int val, char *file); |
|
| 45 |
+ |
|
| 46 |
+bool GetPrivateProfileBool(const char *appname, const char *keyname, bool defval, const char *filename); |
|
| 47 |
+void WritePrivateProfileBool(char *appname, char *keyname, bool val, char *file); |
|
| 48 |
+#else // non Windows |
|
| 49 |
+#define sscanf_s sscanf*/ |
|
| 50 |
+#endif |
|
| 51 |
+ |
|
| 52 |
+/*template<typename T> T reverseBits(T x) |
|
| 53 |
+{
|
|
| 54 |
+ T h = 0; |
|
| 55 |
+ |
|
| 56 |
+ for (unsigned i = 0; i < sizeof(T) * 8; ++i) |
|
| 57 |
+ {
|
|
| 58 |
+ h = (h << 1) + (x & 1); |
|
| 59 |
+ x >>= 1; |
|
| 60 |
+ } |
|
| 61 |
+ |
|
| 62 |
+ return h; |
|
| 63 |
+}*/ |
|
| 64 |
+ |
|
| 65 |
+/*template<typename T> char *intToBin(T val) |
|
| 66 |
+{
|
|
| 67 |
+ char buf[256] = ""; |
|
| 68 |
+ for (int i = sizeof(T) * 8, t = 0; i > 0; --i, ++t) |
|
| 69 |
+ buf[i - 1] = val & (1<<t) ? '1' : '0'; |
|
| 70 |
+ return _strdup(buf); |
|
| 71 |
+}*/ |
|
| 72 |
+ |
|
| 73 |
+//extern char *trim(char *s, int len = -1); |
|
| 74 |
+//extern char *removeSpecialChars(char *s); |
|
| 75 |
+ |
|
| 76 |
+#endif |