removed unused functions to set/get internal error messages
[rocksndiamonds.git] / src / libgame / system.c
index 9a8d117b85f1f2c7e6f78c3b35d8b582d0e9f311..67995e3d82c2da295693988cc924af443b93dfa4 100644 (file)
@@ -4,7 +4,7 @@
 // (c) 1995-2014 by Artsoft Entertainment
 //                         Holger Schemel
 //                 info@artsoft.org
-//                 http://www.artsoft.org/
+//                 https://www.artsoft.org/
 // ----------------------------------------------------------------------------
 // system.c
 // ============================================================================
@@ -114,6 +114,9 @@ void InitNetworkInfo(boolean enabled, boolean connected, boolean serveronly,
 
   network.server_host = server_host;
   network.server_port = server_port;
+
+  network.server_thread = NULL;
+  network.is_server_thread = FALSE;
 }
 
 void InitRuntimeInfo()
@@ -137,14 +140,14 @@ void InitScoresInfo(void)
   {
     if (program.global_scores)
     {
-      Error(ERR_DEBUG, "Using global, multi-user scores directory '%s'.",
+      Debug("internal:path", "Using global, multi-user scores directory '%s'.",
            global_scores_dir);
-      Error(ERR_DEBUG, "Remove to enable single-user scores directory.");
-      Error(ERR_DEBUG, "(This enables multipe score entries per user.)");
+      Debug("internal:path", "Remove to enable single-user scores directory.");
+      Debug("internal:path", "(This enables multipe score entries per user.)");
     }
     else
     {
-      Error(ERR_DEBUG, "Using private, single-user scores directory.");
+      Debug("internal:path", "Using private, single-user scores directory.");
     }
   }
 #endif
@@ -191,7 +194,7 @@ void InitPlatformDependentStuff(void)
   int sdl_init_flags = SDL_INIT_EVENTS | SDL_INIT_NOPARACHUTE;
 
   if (SDL_Init(sdl_init_flags) < 0)
-    Error(ERR_EXIT, "SDL_Init() failed: %s", SDL_GetError());
+    Fail("SDL_Init() failed: %s", SDL_GetError());
 
   SDLNet_Init();
 }
@@ -1154,10 +1157,10 @@ Bitmap *LoadCustomImage(char *basename)
   Bitmap *new_bitmap;
 
   if (filename == NULL)
-    Error(ERR_EXIT, "LoadCustomImage(): cannot find file '%s'", basename);
+    Fail("LoadCustomImage(): cannot find file '%s'", basename);
 
   if ((new_bitmap = LoadImage(filename)) == NULL)
-    Error(ERR_EXIT, "LoadImage('%s') failed: %s", basename, GetError());
+    Fail("LoadImage('%s') failed", basename);
 
   return new_bitmap;
 }
@@ -1169,7 +1172,8 @@ void ReloadCustomImage(Bitmap *bitmap, char *basename)
 
   if (filename == NULL)                // (should never happen)
   {
-    Error(ERR_WARN, "ReloadCustomImage(): cannot find file '%s'", basename);
+    Warn("ReloadCustomImage(): cannot find file '%s'", basename);
+
     return;
   }
 
@@ -1184,16 +1188,19 @@ void ReloadCustomImage(Bitmap *bitmap, char *basename)
 
   if ((new_bitmap = LoadImage(filename)) == NULL)
   {
-    Error(ERR_WARN, "LoadImage('%s') failed: %s", basename, GetError());
+    Warn("LoadImage('%s') failed", basename);
+
     return;
   }
 
   if (bitmap->width != new_bitmap->width ||
       bitmap->height != new_bitmap->height)
   {
-    Error(ERR_WARN, "ReloadCustomImage: new image '%s' has wrong dimensions",
+    Warn("ReloadCustomImage: new image '%s' has wrong dimensions",
          filename);
+
     FreeBitmap(new_bitmap);
+
     return;
   }