]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/mapEditor.cpp
Incorrect reference to SDL_FRMEWORK
[quix0rs-blobwars.git] / src / mapEditor.cpp
index e8096dec44a725b9fe008bdc71cdf045a061053e..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,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "mapEditor.h"
 
+MedalServer medalServer;
 Config config;
 ReplayData replayData;
 
@@ -267,7 +268,7 @@ void collectMapData()
                if (!strstr(string, " ENEMY \""))
                {
                        str = new String;
-                       strcpy(str->string, string);
+                       strlcpy(str->string, string, sizeof str->string);
                        stringTail->next = str;
                        stringTail = str;
                }
@@ -319,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");
 
@@ -624,11 +625,11 @@ int main(int argc, char *argv[])
                if (mapY > MAPHEIGHT - 30) mapY = MAPHEIGHT - 30;
 
                if (editing == 0)
-                       sprintf(string, "Index : %d:%d ; Screen %d:%d ; Tile %d", mapX + x, mapY + y, (mapX + x) * BRICKSIZE, (mapY + y) * BRICKSIZE, currentBlock);
+                       snprintf(string, sizeof string, "Index : %d:%d ; Screen %d:%d ; Tile %d", mapX + x, mapY + y, (mapX + x) * BRICKSIZE, (mapY + y) * BRICKSIZE, currentBlock);
                else if (editing == 1)
-                       sprintf(string, "Index : %d:%d ; Screen %d:%d ; %s", mapX + x, mapY + y, (mapX + x) * BRICKSIZE, (mapY + y) * BRICKSIZE, defEnemy[currentMonster].name);
+                       snprintf(string, sizeof string, "Index : %d:%d ; Screen %d:%d ; %s", mapX + x, mapY + y, (mapX + x) * BRICKSIZE, (mapY + y) * BRICKSIZE, defEnemy[currentMonster].name);
                else if (editing == 2)
-                       sprintf(string, "Index : %d:%d ; Screen %d:%d ; %s", mapX + x, mapY + y, (mapX + x) * BRICKSIZE, (mapY + y) * BRICKSIZE, defItem[currentItem].name);
+                       snprintf(string, sizeof string, "Index : %d:%d ; Screen %d:%d ; %s", mapX + x, mapY + y, (mapX + x) * BRICKSIZE, (mapY + y) * BRICKSIZE, defItem[currentItem].name);
 
                r.x = 0;
                r.w = 640;