summaryrefslogtreecommitdiffstats
path: root/src/common/misc.cpp
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-09-09 17:51:10 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-09-09 17:51:10 +0200
commitefe4f0baddf10124581e4fcb88d55a52838b06a1 (patch)
treec07882eb005e486abe1dbb03d008f6cca2898fe6 /src/common/misc.cpp
parentb3d5491af4f953e8d63800897c40d602de9e9305 (diff)
downloadcolobot-efe4f0baddf10124581e4fcb88d55a52838b06a1.tar.gz
colobot-efe4f0baddf10124581e4fcb88d55a52838b06a1.tar.bz2
colobot-efe4f0baddf10124581e4fcb88d55a52838b06a1.zip
Refactoring in src/common
- refactored CInstanceManager and some headers - removed old headers
Diffstat (limited to 'src/common/misc.cpp')
-rw-r--r--src/common/misc.cpp55
1 files changed, 5 insertions, 50 deletions
diff --git a/src/common/misc.cpp b/src/common/misc.cpp
index 2427356..3da8f24 100644
--- a/src/common/misc.cpp
+++ b/src/common/misc.cpp
@@ -17,45 +17,20 @@
// misc.cpp
+#include "common/misc.h"
+
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
-#include <direct.h>
#include <time.h>
-#include <d3d.h>
-
-#include "common/struct.h"
-#include "old/d3dengine.h"
-#include "old/d3dmath.h"
-#include "old/d3dutil.h"
-#include "common/language.h"
-#include "common/event.h"
-#include "common/misc.h"
-
-CMetaFile g_metafile;
-
-static EventMsg g_uniqueEventMsg = EVENT_USER;
static bool g_bUserDir = false;
static char g_userDir[100] = "";
-
-// Gives a single user event.
-
-EventMsg GetUniqueEventMsg()
-{
- int i;
-
- i = (int)g_uniqueEventMsg+1;
- g_uniqueEventMsg = (EventMsg)i;
- return g_uniqueEventMsg;
-}
-
-
-
// Returns a non-accented letter.
char RetNoAccent(char letter)
@@ -311,7 +286,8 @@ bool CopyFileToTemp(char* filename)
UserDir(dst, filename, "textures");
strcpy(g_userDir, save);
- _mkdir("temp");
+ //_mkdir("temp");
+ system("mkdir temp");
if ( !Xfer(src, dst) ) return false;
strcpy(filename, dst);
@@ -418,24 +394,3 @@ void UserDir(char* buffer, char* dir, char* def)
}
*buffer = 0;
}
-
-
-// Returns the letter corresponding to the language.
-
-char RetLanguageLetter()
-{
-#if _FRENCH
- return 'F';
-#endif
-#if _ENGLISH
- return 'E';
-#endif
-#if _GERMAN | _WG
- return 'D';
-#endif
-#if _POLISH
- return 'P';
-#endif
- return 'X';
-}
-