]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/mapEditor.cpp
Updated PNG icon files.
[quix0rs-blobwars.git] / src / mapEditor.cpp
index fb0000425356e2c2aafe9eac5b047ed83f9db390..bffe1c7554b9ce9622b567c0c068689ebcca0239 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -20,6 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "mapEditor.h"
 
+MedalServer medalServer;
+Config config;
+ReplayData replayData;
+
 void drawMap(int mapX, int mapY)
 {
        SDL_Rect r;
@@ -264,7 +268,7 @@ void collectMapData()
                if (!strstr(string, " ENEMY \""))
                {
                        str = new String;
-                       strncpy(str->string, string, sizeof str->string);
+                       strlcpy(str->string, string, sizeof str->string);
                        stringTail->next = str;
                        stringTail = str;
                }
@@ -316,7 +320,7 @@ void newMap(const char *name)
 
                fprintf(fp, "EMH TILESET gfx/grasslands\n");
                fprintf(fp, "EMH BACKGROUND gfx/grasslands/stone.jpg\n");
-               fprintf(fp, "EMH MUSIC music/viking.mod\n");
+               fprintf(fp, "EMH MUSIC music/tunnel\n");
 
                fprintf(fp, "EMH ALPHATILES 1 2 3 200 201 202 203 204 244 245 246 -1\n");
 
@@ -431,6 +435,10 @@ int main(int argc, char *argv[])
                exit(1);
        }
 
+       config.engine = &engine;
+
+       replayData.reset();
+
        atexit(cleanup);
        
        engine.useAudio = 0;
@@ -469,7 +477,7 @@ int main(int argc, char *argv[])
        {
                engine.getInput();
                config.populate();
-               engine.doPause();
+               config.doPause();
                engine.doFrameLoop();
 
                graphics.updateScreen();