projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added initialization of config and textures for global animations
[rocksndiamonds.git]
/
src
/
libgame
/
system.c
diff --git
a/src/libgame/system.c
b/src/libgame/system.c
index 2efe6dd991da2d4c8d380aca2f2ddcbc2dd9d4e8..a4d3f9e8b2780cae85bc519e2cbc8fef9849b162 100644
(file)
--- a/
src/libgame/system.c
+++ b/
src/libgame/system.c
@@
-63,8
+63,7
@@
int FrameCounter = 0;
/* init/close functions */
/* ========================================================================= */
/* init/close functions */
/* ========================================================================= */
-void InitProgramInfo(char *argv0, char *config_filename,
- char *userdata_subdir, char *userdata_subdir_unix,
+void InitProgramInfo(char *argv0, char *config_filename, char *userdata_subdir,
char *program_title, char *icon_title,
char *icon_filename, char *cookie_prefix,
int program_version)
char *program_title, char *icon_title,
char *icon_filename, char *cookie_prefix,
int program_version)
@@
-75,7
+74,6
@@
void InitProgramInfo(char *argv0, char *config_filename,
program.config_filename = config_filename;
program.userdata_subdir = userdata_subdir;
program.config_filename = config_filename;
program.userdata_subdir = userdata_subdir;
- program.userdata_subdir_unix = userdata_subdir_unix;
program.userdata_path = getUserGameDataDir();
program.program_title = program_title;
program.userdata_path = getUserGameDataDir();
program.program_title = program_title;
@@
-120,7
+118,7
@@
void InitExitFunction(void (*exit_function)(int))
program.exit_function = exit_function;
/* set signal handlers to custom exit function */
program.exit_function = exit_function;
/* set signal handlers to custom exit function */
- signal(SIGINT, exit_function);
+
//
signal(SIGINT, exit_function);
signal(SIGTERM, exit_function);
/* set exit function to automatically cleanup SDL stuff after exit() */
signal(SIGTERM, exit_function);
/* set exit function to automatically cleanup SDL stuff after exit() */
@@
-132,10
+130,6
@@
void InitPlatformDependentStuff(void)
// this is initialized in GetOptions(), but may already be used before
options.verbose = TRUE;
// this is initialized in GetOptions(), but may already be used before
options.verbose = TRUE;
-#if defined(PLATFORM_MACOSX)
- updateUserGameDataDir();
-#endif
-
OpenLogFiles();
#if defined(TARGET_SDL2)
OpenLogFiles();
#if defined(TARGET_SDL2)
@@
-237,6
+231,11
@@
void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void))
gfx.draw_busy_anim_function = draw_busy_anim_function;
}
gfx.draw_busy_anim_function = draw_busy_anim_function;
}
+void InitGfxDrawGlobalAnimFunction(void (*draw_global_anim_function)(void))
+{
+ gfx.draw_global_anim_function = draw_global_anim_function;
+}
+
void InitGfxCustomArtworkInfo()
{
gfx.override_level_graphics = FALSE;
void InitGfxCustomArtworkInfo()
{
gfx.override_level_graphics = FALSE;
@@
-851,7
+850,7
@@
Bitmap *LoadCustomImage(char *basename)
Error(ERR_EXIT, "LoadCustomImage(): cannot find file '%s'", basename);
if ((new_bitmap = LoadImage(filename)) == NULL)
Error(ERR_EXIT, "LoadCustomImage(): cannot find file '%s'", basename);
if ((new_bitmap = LoadImage(filename)) == NULL)
- Error(ERR_EXIT, "LoadImage(
) failed: %s"
, GetError());
+ Error(ERR_EXIT, "LoadImage(
'%s') failed: %s", basename
, GetError());
return new_bitmap;
}
return new_bitmap;
}
@@
-878,7
+877,7
@@
void ReloadCustomImage(Bitmap *bitmap, char *basename)
if ((new_bitmap = LoadImage(filename)) == NULL)
{
if ((new_bitmap = LoadImage(filename)) == NULL)
{
- Error(ERR_WARN, "LoadImage(
) failed: %s"
, GetError());
+ Error(ERR_WARN, "LoadImage(
'%s') failed: %s", basename
, GetError());
return;
}
return;
}
@@
-1131,6
+1130,11
@@
void CreateBitmapWithSmallBitmaps(Bitmap **bitmaps, int zoom_factor,
CreateScaledBitmaps(bitmaps, zoom_factor, tile_size, TRUE);
}
CreateScaledBitmaps(bitmaps, zoom_factor, tile_size, TRUE);
}
+void CreateBitmapTextures(Bitmap **bitmaps)
+{
+ SDLCreateBitmapTextures(bitmaps[IMG_BITMAP_STANDARD]);
+}
+
void ScaleBitmap(Bitmap **bitmaps, int zoom_factor)
{
CreateScaledBitmaps(bitmaps, zoom_factor, 0, FALSE);
void ScaleBitmap(Bitmap **bitmaps, int zoom_factor)
{
CreateScaledBitmaps(bitmaps, zoom_factor, 0, FALSE);