#endif
int redraw_mask = REDRAW_NONE;
-int redraw_tiles = 0;
int FrameCounter = 0;
/* init/close functions */
/* ========================================================================= */
-void InitProgramInfo(char *argv0,
+void InitProgramInfo(char *argv0, char *config_filename,
char *userdata_subdir, char *userdata_subdir_unix,
char *program_title, char *icon_title,
- char *sdl_icon_filename, char *cookie_prefix,
+ char *icon_filename, char *cookie_prefix,
int program_version)
{
program.command_basepath = getBasePath(argv0);
program.command_basename = getBaseName(argv0);
+ program.config_filename = config_filename;
+
program.userdata_subdir = userdata_subdir;
program.userdata_subdir_unix = userdata_subdir_unix;
program.userdata_path = getUserGameDataDir();
program.window_title = "(undefined)";
program.icon_title = icon_title;
- program.sdl_icon_filename = sdl_icon_filename;
+ program.icon_filename = icon_filename;
program.cookie_prefix = cookie_prefix;
program.version_build = VERSION_BUILD(program_version);
program.version_ident = program_version;
- program.error_filename = getErrorFilename(ERROR_BASENAME);
- program.error_file = stderr;
+ program.log_filename[LOG_OUT_ID] = getLogFilename(LOG_OUT_BASENAME);
+ program.log_filename[LOG_ERR_ID] = getLogFilename(LOG_ERR_BASENAME);
+ program.log_file[LOG_OUT_ID] = program.log_file_default[LOG_OUT_ID] = stdout;
+ program.log_file[LOG_ERR_ID] = program.log_file_default[LOG_ERR_ID] = stderr;
}
void SetWindowTitle()
updateUserGameDataDir();
#endif
- openErrorFile();
+ OpenLogFiles();
#if defined(TARGET_SDL2)
int sdl_init_flags = SDL_INIT_EVENTS | SDL_INIT_NOPARACHUTE;
void ClosePlatformDependentStuff(void)
{
-#if defined(PLATFORM_WIN32)
- closeErrorFile();
-#endif
+ CloseLogFiles();
}
void InitGfxFieldInfo(int sx, int sy, int sxsize, int sysize,
SDLInitVideoBuffer(&backbuffer, &window, fullscreen);
+ video.initialized = TRUE;
+
drawto = backbuffer;
}
#endif
}
-boolean PointerInWindow(DrawWindow *window)
-{
- return TRUE;
-}
-
boolean SetVideoMode(boolean fullscreen)
{
return SDLSetVideoMode(&backbuffer, fullscreen);