network.server_host = server_host;
network.server_port = server_port;
+
+ network.server_thread = NULL;
+ network.is_server_thread = FALSE;
}
void InitRuntimeInfo()
{
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
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();
}
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;
}
if (filename == NULL) // (should never happen)
{
- Error(ERR_WARN, "ReloadCustomImage(): cannot find file '%s'", basename);
+ Warn("ReloadCustomImage(): cannot find file '%s'", basename);
+
return;
}
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;
}