commit rocksndiamonds for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rocksndiamonds for openSUSE:Factory checked in at 2024-01-31 23:56:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rocksndiamonds (Old) and /work/SRC/openSUSE:Factory/.rocksndiamonds.new.1815 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rocksndiamonds" Wed Jan 31 23:56:19 2024 rev:40 rq:1143133 version:4.3.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rocksndiamonds/rocksndiamonds.changes 2023-12-25 19:05:28.625869394 +0100 +++ /work/SRC/openSUSE:Factory/.rocksndiamonds.new.1815/rocksndiamonds.changes 2024-01-31 23:56:31.114983066 +0100 @@ -1,0 +2,10 @@ +Tue Jan 30 17:09:20 UTC 2024 - Carsten Ziepke <kieltux@gmail.com> + +- Update to version 4.3.8.1: + * changed setup option to disable global animations to only affect toons + * fixed bug caused by support for only eight global animations in the past + * fixed correctly using defined draw order of global animations + * fixed always drawing pointer-style global animations above everything else + * fixed bug with closing doors when exiting from level editor + +------------------------------------------------------------------- Old: ---- rocksndiamonds-4.3.8.0-linux.tar.gz New: ---- rocksndiamonds-4.3.8.1-linux.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rocksndiamonds.spec ++++++ --- /var/tmp/diff_new_pack.p9yS1v/_old 2024-01-31 23:56:31.739005580 +0100 +++ /var/tmp/diff_new_pack.p9yS1v/_new 2024-01-31 23:56:31.743005724 +0100 @@ -1,7 +1,7 @@ # # spec file for package rocksndiamonds # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: rocksndiamonds -Version: 4.3.8.0 +Version: 4.3.8.1 Release: 0 Summary: Colorful Boulderdash'n'Emerald Mine'n'Sokoban'n'Stuff License: GPL-2.0-or-later ++++++ rocksndiamonds-4.3.8.0-linux.tar.gz -> rocksndiamonds-4.3.8.1-linux.tar.gz ++++++ Binary files old/rocksndiamonds-4.3.8.0/rocksndiamonds and new/rocksndiamonds-4.3.8.1/rocksndiamonds differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/anim.c new/rocksndiamonds-4.3.8.1/src/anim.c --- old/rocksndiamonds-4.3.8.0/src/anim.c 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/anim.c 2023-12-29 10:08:18.000000000 +0100 @@ -34,6 +34,10 @@ #define NUM_GLOBAL_ANIM_PARTS_AND_TOONS MAX(NUM_GLOBAL_ANIM_PARTS_ALL, \ NUM_GLOBAL_TOON_PARTS) +#define MAX_GLOBAL_ANIM_LIST (NUM_GAME_MODES * \ + NUM_GLOBAL_ANIMS_AND_TOONS * \ + NUM_GLOBAL_ANIM_PARTS_AND_TOONS) + #define ANIM_CLASS_BIT_TITLE_INITIAL 0 #define ANIM_CLASS_BIT_TITLE 1 #define ANIM_CLASS_BIT_MAIN 2 @@ -250,6 +254,8 @@ static void ResetGlobalAnim_Clicked(void); static struct GlobalAnimControlInfo global_anim_ctrl[NUM_GAME_MODES]; +static struct GlobalAnimPartControlInfo *global_anim_list[MAX_GLOBAL_ANIM_LIST]; +static int num_global_anim_list = 0; static unsigned int anim_sync_frame = 0; @@ -355,27 +361,17 @@ static int compareGlobalAnimPartControlInfo(const void *obj1, const void *obj2) { const struct GlobalAnimPartControlInfo *o1 = - (struct GlobalAnimPartControlInfo *)obj1; + *(struct GlobalAnimPartControlInfo **)obj1; const struct GlobalAnimPartControlInfo *o2 = - (struct GlobalAnimPartControlInfo *)obj2; - int compare_result; - - // do not sort animations parts by draw order (as it would be confusing) - compare_result = o1->nr - o2->nr; - - return compare_result; -} - -static int compareGlobalAnimMainControlInfo(const void *obj1, const void *obj2) -{ - const struct GlobalAnimMainControlInfo *o1 = - (struct GlobalAnimMainControlInfo *)obj1; - const struct GlobalAnimMainControlInfo *o2 = - (struct GlobalAnimMainControlInfo *)obj2; + *(struct GlobalAnimPartControlInfo **)obj2; int compare_result; if (o1->control_info.draw_order != o2->control_info.draw_order) compare_result = o1->control_info.draw_order - o2->control_info.draw_order; + else if (o1->mode_nr != o2->mode_nr) + compare_result = o1->mode_nr - o2->mode_nr; + else if (o1->anim_nr != o2->anim_nr) + compare_result = o1->anim_nr - o2->anim_nr; else compare_result = o1->nr - o2->nr; @@ -602,19 +598,10 @@ anim->has_base = TRUE; } - // apply special settings for pointer-style animations - if (part->control_info.class == get_hash_from_key("pointer")) - { - // force animation to be on top (must set anim and part control) - if (anim->control_info.draw_order == 0) - anim->control_info.draw_order = 1000000; - if (part->control_info.draw_order == 0) - part->control_info.draw_order = 1000000; - - // force animation to pass-through clicks (must set part control) - if (part->control_info.style == STYLE_DEFAULT) - part->control_info.style |= STYLE_PASSTHROUGH; - } + // force pointer-style animations to pass-through clicks + if (part->control_info.class == get_hash_from_key("pointer") && + part->control_info.style == STYLE_DEFAULT) + part->control_info.style |= STYLE_PASSTHROUGH; } if (anim->num_parts > 0 || anim->has_base) @@ -627,26 +614,18 @@ InitToonControls(); - // sort all animations according to draw_order and animation number + // create list of all animation parts + num_global_anim_list = 0; for (m = 0; m < NUM_GAME_MODES; m++) - { - struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[m]; - - // sort all main animations for this game mode - qsort(ctrl->anim, ctrl->num_anims, - sizeof(struct GlobalAnimMainControlInfo), - compareGlobalAnimMainControlInfo); - - for (a = 0; a < ctrl->num_anims; a++) - { - struct GlobalAnimMainControlInfo *anim = &ctrl->anim[a]; - - // sort all animation parts for this main animation - qsort(anim->part, anim->num_parts, - sizeof(struct GlobalAnimPartControlInfo), - compareGlobalAnimPartControlInfo); - } - } + for (a = 0; a < global_anim_ctrl[m].num_anims; a++) + for (p = 0; p < global_anim_ctrl[m].anim[a].num_parts_all; p++) + global_anim_list[num_global_anim_list++] = + &global_anim_ctrl[m].anim[a].part[p]; + + // sort list of all animation parts according to draw_order and number + qsort(global_anim_list, num_global_anim_list, + sizeof(struct GlobalAnimPartControlInfo *), + compareGlobalAnimPartControlInfo); for (i = 0; i < NUM_GAME_MODES; i++) game_mode_anim_classes[i] = ANIM_CLASS_NONE; @@ -799,8 +778,9 @@ { int game_mode_anim_action[NUM_GAME_MODES]; int mode_nr; + int i; - if (!setup.toons) + if (!setup.global_animations) return; if (drawing_stage == DRAW_GLOBAL_ANIM_STAGE_1 && @@ -898,89 +878,66 @@ if (global.anim_status == GAME_MODE_LOADING) return; - for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++) + for (i = 0; i < num_global_anim_list; i++) { - struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr]; - int anim_nr; + struct GlobalAnimPartControlInfo *part = global_anim_list[i]; + struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[part->mode_nr]; + struct GlobalAnimMainControlInfo *anim = &ctrl->anim[part->anim_nr]; + struct GraphicInfo *g = &part->graphic_info; + Bitmap *src_bitmap; + int src_x, src_y; + int sync_frame; + int frame; + int last_anim_random_frame = gfx.anim_random_frame; + + if (!setup.toons && + part->graphic >= IMG_TOON_1 && + part->graphic <= IMG_TOON_20) + continue; // when preparing source fading buffer, only draw animations to be stopped if (drawing_target == DRAW_TO_FADE_SOURCE && - game_mode_anim_action[mode_nr] != ANIM_STOP) + game_mode_anim_action[part->mode_nr] != ANIM_STOP) continue; // when preparing target fading buffer, only draw animations to be started if (drawing_target == DRAW_TO_FADE_TARGET && - game_mode_anim_action[mode_nr] != ANIM_START) + game_mode_anim_action[part->mode_nr] != ANIM_START) continue; -#if 0 - if (mode_nr != GFX_SPECIAL_ARG_DEFAULT && - mode_nr != game_status) + if (!(anim->state & ANIM_STATE_RUNNING)) continue; -#endif - - for (anim_nr = 0; anim_nr < ctrl->num_anims; anim_nr++) - { - struct GlobalAnimMainControlInfo *anim = &ctrl->anim[anim_nr]; - struct GraphicInfo *c = &anim->control_info; - int part_first, part_last; - int part_nr; - - if (!(anim->state & ANIM_STATE_RUNNING)) - continue; - - part_first = part_last = anim->active_part_nr; - - if (c->anim_mode & ANIM_ALL || anim->num_parts == 0) - { - int num_parts = anim->num_parts + (anim->has_base ? 1 : 0); - - part_first = 0; - part_last = num_parts - 1; - } - - for (part_nr = part_first; part_nr <= part_last; part_nr++) - { - struct GlobalAnimPartControlInfo *part = &anim->part[part_nr]; - struct GraphicInfo *g = &part->graphic_info; - Bitmap *src_bitmap; - int src_x, src_y; - int sync_frame; - int frame; - int last_anim_random_frame = gfx.anim_random_frame; - if (!(part->state & ANIM_STATE_RUNNING)) - continue; - - if (part->drawing_stage != drawing_stage) - continue; - - // if game is paused, also pause playfield and door animations - if (isPausedOnPlayfieldOrDoor(part)) - part->initial_anim_sync_frame++; + if (!(part->state & ANIM_STATE_RUNNING)) + continue; - sync_frame = anim_sync_frame - part->initial_anim_sync_frame; + if (part->drawing_stage != drawing_stage) + continue; - // re-initialize random animation frame after animation delay - if (g->anim_mode == ANIM_RANDOM && - sync_frame % g->anim_delay == 0 && - sync_frame > 0) - part->anim_random_frame = GetSimpleRandom(g->anim_frames); + // if game is paused, also pause playfield and door animations + if (isPausedOnPlayfieldOrDoor(part)) + part->initial_anim_sync_frame++; + + sync_frame = anim_sync_frame - part->initial_anim_sync_frame; + + // re-initialize random animation frame after animation delay + if (g->anim_mode == ANIM_RANDOM && + sync_frame % g->anim_delay == 0 && + sync_frame > 0) + part->anim_random_frame = GetSimpleRandom(g->anim_frames); - gfx.anim_random_frame = part->anim_random_frame; + gfx.anim_random_frame = part->anim_random_frame; - frame = getAnimationFrame(g->anim_frames, g->anim_delay, - g->anim_mode, g->anim_start_frame, - sync_frame); + frame = getAnimationFrame(g->anim_frames, g->anim_delay, + g->anim_mode, g->anim_start_frame, + sync_frame); - gfx.anim_random_frame = last_anim_random_frame; + gfx.anim_random_frame = last_anim_random_frame; - getGlobalAnimGraphicSource(part->graphic, frame, &src_bitmap, - &src_x, &src_y); + getGlobalAnimGraphicSource(part->graphic, frame, &src_bitmap, + &src_x, &src_y); - BlitGlobalAnimation(part, src_bitmap, src_x, src_y, drawing_target); - } - } + BlitGlobalAnimation(part, src_bitmap, src_x, src_y, drawing_target); } if (drawing_target == DRAW_TO_FADE_TARGET) @@ -2081,29 +2038,17 @@ static void InitGlobalAnim_Clickable(void) { - int mode_nr; + int i; - for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++) + for (i = 0; i < num_global_anim_list; i++) { - struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr]; - int anim_nr; - - for (anim_nr = 0; anim_nr < ctrl->num_anims; anim_nr++) - { - struct GlobalAnimMainControlInfo *anim = &ctrl->anim[anim_nr]; - int part_nr; - - for (part_nr = 0; part_nr < anim->num_parts_all; part_nr++) - { - struct GlobalAnimPartControlInfo *part = &anim->part[part_nr]; + struct GlobalAnimPartControlInfo *part = global_anim_list[i]; - if (part->triggered) - part->clicked = TRUE; + if (part->triggered) + part->clicked = TRUE; - part->triggered = FALSE; - part->clickable = FALSE; - } - } + part->triggered = FALSE; + part->clickable = FALSE; } } @@ -2117,107 +2062,93 @@ boolean anything_clicked = FALSE; boolean any_part_clicked = FALSE; boolean any_event_action = FALSE; - int mode_nr; int i; - for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++) + // check animation parts in reverse draw order (to stop when clicked) + for (i = num_global_anim_list - 1; i >= 0; i--) { - struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr]; - int anim_nr; + struct GlobalAnimPartControlInfo *part = global_anim_list[i]; - // check animations in reverse draw order (to stop when clicked) - for (anim_nr = ctrl->num_anims - 1; anim_nr >= 0; anim_nr--) - { - struct GlobalAnimMainControlInfo *anim = &ctrl->anim[anim_nr]; - int part_nr; - - // check animation parts in reverse draw order (to stop when clicked) - for (part_nr = anim->num_parts_all - 1; part_nr >= 0; part_nr--) - { - struct GlobalAnimPartControlInfo *part = &anim->part[part_nr]; - - // if request dialog is active, only handle pointer-style animations - if (game.request_active && - part->control_info.class != get_hash_from_key("pointer")) - continue; + // if request dialog is active, only handle pointer-style animations + if (game.request_active && + part->control_info.class != get_hash_from_key("pointer")) + continue; - if (clicked_event == ANIM_CLICKED_RESET) - { - part->clicked = FALSE; + if (clicked_event == ANIM_CLICKED_RESET) + { + part->clicked = FALSE; - continue; - } + continue; + } - if (!part->clickable) - continue; + if (!part->clickable) + continue; - if (!(part->state & ANIM_STATE_RUNNING)) - continue; + if (!(part->state & ANIM_STATE_RUNNING)) + continue; - // always handle "any" click events (clicking anywhere on screen) ... - if (clicked_event == ANIM_CLICKED_PRESSED && - isClickablePart(part, ANIM_EVENT_ANY)) - { + // always handle "any" click events (clicking anywhere on screen) ... + if (clicked_event == ANIM_CLICKED_PRESSED && + isClickablePart(part, ANIM_EVENT_ANY)) + { #if DEBUG_ANIM_EVENTS - Debug("anim:InitGlobalAnim_Clicked", "%d.%d TRIGGERED BY ANY", - part->old_anim_nr + 1, part->old_nr + 1); + Debug("anim:InitGlobalAnim_Clicked", "%d.%d TRIGGERED BY ANY", + part->old_anim_nr + 1, part->old_nr + 1); #endif - anything_clicked = part->clicked = TRUE; - click_consumed |= clickConsumed(part); - } + anything_clicked = part->clicked = TRUE; + click_consumed |= clickConsumed(part); + } - // always handle "unclick:any" events (releasing anywhere on screen) ... - if (clicked_event == ANIM_CLICKED_RELEASED && - isClickablePart(part, ANIM_EVENT_UNCLICK_ANY)) - { + // always handle "unclick:any" events (releasing anywhere on screen) ... + if (clicked_event == ANIM_CLICKED_RELEASED && + isClickablePart(part, ANIM_EVENT_UNCLICK_ANY)) + { #if DEBUG_ANIM_EVENTS - Debug("anim:InitGlobalAnim_Clicked", "%d.%d TRIGGERED BY UNCLICK:ANY", - part->old_anim_nr + 1, part->old_nr + 1); + Debug("anim:InitGlobalAnim_Clicked", "%d.%d TRIGGERED BY UNCLICK:ANY", + part->old_anim_nr + 1, part->old_nr + 1); #endif - anything_clicked = part->clicked = TRUE; - click_consumed |= clickConsumed(part); - } + anything_clicked = part->clicked = TRUE; + click_consumed |= clickConsumed(part); + } - // ... but only handle the first (topmost) clickable animation - if (any_part_clicked) - continue; + // ... but only handle the first (topmost) clickable animation + if (any_part_clicked) + continue; - if (clicked_event == ANIM_CLICKED_PRESSED && - isClickedPart(part, mx, my, TRUE)) - { + if (clicked_event == ANIM_CLICKED_PRESSED && + isClickedPart(part, mx, my, TRUE)) + { #if 0 - Debug("anim:InitGlobalAnim_Clicked", "%d.%d CLICKED [%d]", - anim_nr, part_nr, part->control_info.anim_event_action); + Debug("anim:InitGlobalAnim_Clicked", "%d.%d CLICKED [%d]", + anim_nr, part_nr, part->control_info.anim_event_action); #endif - // after executing event action, ignore any further actions - if (!any_event_action && DoGlobalAnim_EventAction(part)) - any_event_action = TRUE; + // after executing event action, ignore any further actions + if (!any_event_action && DoGlobalAnim_EventAction(part)) + any_event_action = TRUE; - // determine if mouse clicks should be blocked from other animations - any_part_clicked |= clickConsumed(part); + // determine if mouse clicks should be blocked from other animations + any_part_clicked |= clickConsumed(part); - if (isClickablePart(part, ANIM_EVENT_SELF)) - { + if (isClickablePart(part, ANIM_EVENT_SELF)) + { #if DEBUG_ANIM_EVENTS - Debug("anim:InitGlobalAnim_Clicked", "%d.%d TRIGGERED BY SELF", - part->old_anim_nr + 1, part->old_nr + 1); + Debug("anim:InitGlobalAnim_Clicked", "%d.%d TRIGGERED BY SELF", + part->old_anim_nr + 1, part->old_nr + 1); #endif - anything_clicked = part->clicked = TRUE; - click_consumed |= clickConsumed(part); - } + anything_clicked = part->clicked = TRUE; + click_consumed |= clickConsumed(part); + } - // determine if mouse clicks should be blocked by this animation - click_consumed |= clickBlocked(part); + // determine if mouse clicks should be blocked by this animation + click_consumed |= clickBlocked(part); - // check if this click is defined to trigger other animations - InitGlobalAnim_Triggered(part, &click_consumed, &any_event_action, - ANIM_EVENT_CLICK, "CLICK"); - } - } + // check if this click is defined to trigger other animations + InitGlobalAnim_Triggered(part, &click_consumed, &any_event_action, + ANIM_EVENT_CLICK, "CLICK"); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/confhash.h new/rocksndiamonds-4.3.8.1/src/confhash.h --- old/rocksndiamonds-4.3.8.0/src/confhash.h 2023-12-09 19:48:05.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/confhash.h 2023-12-29 10:08:32.000000000 +0100 @@ -1 +1 @@ -#define SOURCE_HASH_STRING "146e577" +#define SOURCE_HASH_STRING "e498c78" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/conftime.h new/rocksndiamonds-4.3.8.1/src/conftime.h --- old/rocksndiamonds-4.3.8.0/src/conftime.h 2023-12-09 19:48:05.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/conftime.h 2023-12-29 10:08:32.000000000 +0100 @@ -1 +1 @@ -#define SOURCE_DATE_STRING "2023-12-09 18:47" +#define SOURCE_DATE_STRING "2023-12-23 12:48" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/editor.c new/rocksndiamonds-4.3.8.1/src/editor.c --- old/rocksndiamonds-4.3.8.0/src/editor.c 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/editor.c 2023-12-29 10:08:18.000000000 +0100 @@ -15283,7 +15283,7 @@ vp_door_2->height == VYSIZE) CloseDoor(DOOR_CLOSE_ALL | DOOR_NO_DELAY); else - SetDoorState(DOOR_CLOSE_2); + SetDoorState(DOOR_CLOSE_ALL); BackToFront(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/files.c new/rocksndiamonds-4.3.8.1/src/files.c --- old/rocksndiamonds-4.3.8.0/src/files.c 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/files.c 2023-12-29 10:08:18.000000000 +0100 @@ -9492,6 +9492,10 @@ }, { TYPE_SWITCH, + &setup.global_animations, "global_animations" + }, + { + TYPE_SWITCH, &setup.scroll_delay, "scroll_delay" }, { @@ -10409,6 +10413,7 @@ si->sound_music = TRUE; si->sound_simple = TRUE; si->toons = TRUE; + si->global_animations = TRUE; si->scroll_delay = TRUE; si->forced_scroll_delay = FALSE; si->scroll_delay_value = STD_SCROLL_DELAY; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/init.c new/rocksndiamonds-4.3.8.1/src/init.c --- old/rocksndiamonds-4.3.8.0/src/init.c 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/init.c 2023-12-29 10:08:18.000000000 +0100 @@ -1649,7 +1649,7 @@ g->draw_yoffset = parameter[GFX_ARG_DRAW_YOFFSET]; // use a different default value for global animations and toons - if ((graphic >= IMG_GFX_GLOBAL_ANIM_1 && graphic <= IMG_GFX_GLOBAL_ANIM_8) || + if ((graphic >= IMG_GFX_GLOBAL_ANIM_1 && graphic <= IMG_GFX_GLOBAL_ANIM_32) || (graphic >= IMG_TOON_1 && graphic <= IMG_TOON_20)) g->draw_masked = TRUE; @@ -6477,8 +6477,8 @@ BackToFront(); - // deactivate toons on error message screen - setup.toons = FALSE; + // deactivate toons and global animations on error message screen + setup.global_animations = FALSE; WaitForEventToContinue(); } @@ -6671,7 +6671,7 @@ return TRUE; // deactivate global animations (not accessible in game state "loading") - setup.toons = FALSE; + setup.global_animations = FALSE; // set game state to "loading" to be able to show busy animation SetGameStatus(GAME_MODE_LOADING); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/libgame/misc.c new/rocksndiamonds-4.3.8.1/src/libgame/misc.c --- old/rocksndiamonds-4.3.8.0/src/libgame/misc.c 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/libgame/misc.c 2023-12-29 10:08:18.000000000 +0100 @@ -1088,7 +1088,9 @@ // various string functions // ---------------------------------------------------------------------------- -char *getStringCat2WithSeparator(char *s1, char *s2, char *sep) +char *getStringCat2WithSeparator(const char *s1, + const char *s2, + const char *sep) { if (s1 == NULL || s2 == NULL || sep == NULL) return NULL; @@ -1101,7 +1103,10 @@ return complete_string; } -char *getStringCat3WithSeparator(char *s1, char *s2, char *s3, char *sep) +char *getStringCat3WithSeparator(const char *s1, + const char *s2, + const char *s3, + const char *sep) { if (s1 == NULL || s2 == NULL || s3 == NULL || sep == NULL) return NULL; @@ -1115,17 +1120,17 @@ return complete_string; } -char *getStringCat2(char *s1, char *s2) +char *getStringCat2(const char *s1, const char *s2) { return getStringCat2WithSeparator(s1, s2, ""); } -char *getStringCat3(char *s1, char *s2, char *s3) +char *getStringCat3(const char *s1, const char *s2, const char *s3) { return getStringCat3WithSeparator(s1, s2, s3, ""); } -char *getPath2(char *path1, char *path2) +char *getPath2(const char *path1, const char *path2) { #if defined(PLATFORM_ANDROID) // workaround for reading from assets directory -- skip "." subdirs in path @@ -1138,7 +1143,7 @@ return getStringCat2WithSeparator(path1, path2, STRING_PATH_SEPARATOR); } -char *getPath3(char *path1, char *path2, char *path3) +char *getPath3(const char *path1, const char *path2, const char *path3) { #if defined(PLATFORM_ANDROID) // workaround for reading from assets directory -- skip "." subdirs in path @@ -1166,12 +1171,12 @@ return filename; } -char *getImg2(char *path1, char *path2) +char *getImg2(const char *path1, const char *path2) { return getPngOrPcxIfNotExists(getPath2(path1, path2)); } -char *getImg3(char *path1, char *path2, char *path3) +char *getImg3(const char *path1, const char *path2, const char *path3) { return getPngOrPcxIfNotExists(getPath3(path1, path2, path3)); } @@ -1227,14 +1232,14 @@ return s_copy; } -void setString(char **old_value, char *new_value) +void setString(char **old_value, const char *new_value) { checked_free(*old_value); *old_value = getStringCopy(new_value); } -boolean strEqual(char *s1, char *s2) +boolean strEqual(const char *s1, const char *s2) { return (s1 == NULL && s2 == NULL ? TRUE : s1 == NULL && s2 != NULL ? FALSE : @@ -1242,7 +1247,7 @@ strcmp(s1, s2) == 0); } -boolean strEqualN(char *s1, char *s2, int n) +boolean strEqualN(const char *s1, const char *s2, int n) { return (s1 == NULL && s2 == NULL ? TRUE : s1 == NULL && s2 != NULL ? FALSE : @@ -1250,7 +1255,7 @@ strncmp(s1, s2, n) == 0); } -boolean strEqualCase(char *s1, char *s2) +boolean strEqualCase(const char *s1, const char *s2) { return (s1 == NULL && s2 == NULL ? TRUE : s1 == NULL && s2 != NULL ? FALSE : @@ -1258,7 +1263,7 @@ strcasecmp(s1, s2) == 0); } -boolean strEqualCaseN(char *s1, char *s2, int n) +boolean strEqualCaseN(const char *s1, const char *s2, int n) { return (s1 == NULL && s2 == NULL ? TRUE : s1 == NULL && s2 != NULL ? FALSE : @@ -1266,7 +1271,7 @@ strncasecmp(s1, s2, n) == 0); } -boolean strPrefix(char *s, char *prefix) +boolean strPrefix(const char *s, const char *prefix) { return (s == NULL && prefix == NULL ? TRUE : s == NULL && prefix != NULL ? FALSE : @@ -1274,7 +1279,7 @@ strncmp(s, prefix, strlen(prefix)) == 0); } -boolean strSuffix(char *s, char *suffix) +boolean strSuffix(const char *s, const char *suffix) { return (s == NULL && suffix == NULL ? TRUE : s == NULL && suffix != NULL ? FALSE : @@ -1283,7 +1288,7 @@ strcmp(&s[strlen(s) - strlen(suffix)], suffix) == 0); } -boolean strPrefixLower(char *s, char *prefix) +boolean strPrefixLower(const char *s, const char *prefix) { char *s_lower = getStringToLower(s); boolean match = strPrefix(s_lower, prefix); @@ -1293,7 +1298,7 @@ return match; } -boolean strSuffixLower(char *s, char *suffix) +boolean strSuffixLower(const char *s, const char *suffix) { char *s_lower = getStringToLower(s); boolean match = strSuffix(s_lower, suffix); @@ -1303,7 +1308,7 @@ return match; } -boolean isURL(char *s) +boolean isURL(const char *s) { while (*s && *s >= 'a' && *s <= 'z') s++; @@ -3072,7 +3077,7 @@ // functions for checking files and filenames // ---------------------------------------------------------------------------- -boolean directoryExists(char *dir_name) +boolean directoryExists(const char *dir_name) { if (dir_name == NULL) return FALSE; @@ -3100,7 +3105,7 @@ return success; } -boolean fileExists(char *filename) +boolean fileExists(const char *filename) { if (filename == NULL) return FALSE; @@ -3124,7 +3129,7 @@ } #if 0 -static boolean fileHasPrefix(char *basename, char *prefix) +static boolean fileHasPrefix(const char *basename, const char *prefix) { static char *basename_lower = NULL; int basename_length, prefix_length; @@ -3147,7 +3152,7 @@ } #endif -static boolean fileHasSuffix(char *basename, char *suffix) +static boolean fileHasSuffix(const char *basename, const char *suffix) { static char *basename_lower = NULL; int basename_length, suffix_length; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/libgame/misc.h new/rocksndiamonds-4.3.8.1/src/libgame/misc.h --- old/rocksndiamonds-4.3.8.0/src/libgame/misc.h 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/libgame/misc.h 2023-12-29 10:08:18.000000000 +0100 @@ -168,28 +168,28 @@ char *getBaseNamePtr(char *); char *getBaseNameNoSuffix(char *); -char *getStringCat2WithSeparator(char *, char *, char *); -char *getStringCat3WithSeparator(char *, char *, char *, char *); -char *getStringCat2(char *, char *); -char *getStringCat3(char *, char *, char *); -char *getPath2(char *, char *); -char *getPath3(char *, char *, char*); -char *getImg2(char *, char *); -char *getImg3(char *, char *, char*); +char *getStringCat2WithSeparator(const char *, const char *, const char *); +char *getStringCat3WithSeparator(const char *, const char *, const char *, const char *); +char *getStringCat2(const char *, const char *); +char *getStringCat3(const char *, const char *, const char *); +char *getPath2(const char *, const char *); +char *getPath3(const char *, const char *, const char *); +char *getImg2(const char *, const char *); +char *getImg3(const char *, const char *, const char *); char *getStringCopy(const char *); char *getStringCopyN(const char *, int); char *getStringCopyNStatic(const char *, int); char *getStringToLower(const char *); -void setString(char **, char *); -boolean strEqual(char *, char *); -boolean strEqualN(char *, char *, int); -boolean strEqualCase(char *, char *); -boolean strEqualCaseN(char *, char *, int); -boolean strPrefix(char *, char *); -boolean strSuffix(char *, char *); -boolean strPrefixLower(char *, char *); -boolean strSuffixLower(char *, char *); -boolean isURL(char *); +void setString(char **, const char *); +boolean strEqual(const char *, const char *); +boolean strEqualN(const char *, const char *, int); +boolean strEqualCase(const char *, const char *); +boolean strEqualCaseN(const char *, const char *, int); +boolean strPrefix(const char *, const char *); +boolean strSuffix(const char *, const char *); +boolean strPrefixLower(const char *, const char *); +boolean strSuffixLower(const char *, const char *); +boolean isURL(const char *); void GetOptions(int, char **, void (*print_usage_function)(void), @@ -279,8 +279,9 @@ DirectoryEntry *readDirectory(Directory *); void freeDirectoryEntry(DirectoryEntry *); -boolean directoryExists(char *); -boolean fileExists(char *); +boolean directoryExists(const char *); +boolean fileExists(const char *); + boolean FileIsGraphic(char *); boolean FileIsSound(char *); boolean FileIsMusic(char *); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/libgame/sdl.c new/rocksndiamonds-4.3.8.1/src/libgame/sdl.c --- old/rocksndiamonds-4.3.8.0/src/libgame/sdl.c 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/libgame/sdl.c 2023-12-29 10:08:18.000000000 +0100 @@ -70,13 +70,13 @@ if (gfx.draw_envelope_request_function != NULL) gfx.draw_envelope_request_function(draw_target); - // copy global animations to render target buffer, if defined (mouse pointer) - if (gfx.draw_global_anim_function != NULL) - gfx.draw_global_anim_function(draw_target, DRAW_GLOBAL_ANIM_STAGE_3); - // copy tile selection cursor to render target buffer, if defined (part 2) if (gfx.draw_tile_cursor_function != NULL) gfx.draw_tile_cursor_function(draw_target, FALSE); + + // copy global animations to render target buffer, if defined (mouse pointer) + if (gfx.draw_global_anim_function != NULL) + gfx.draw_global_anim_function(draw_target, DRAW_GLOBAL_ANIM_STAGE_3); } static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/libgame/system.h new/rocksndiamonds-4.3.8.1/src/libgame/system.h --- old/rocksndiamonds-4.3.8.0/src/libgame/system.h 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/libgame/system.h 2023-12-29 10:08:18.000000000 +0100 @@ -1518,6 +1518,7 @@ boolean sound_music; boolean sound_simple; boolean toons; + boolean global_animations; boolean scroll_delay; boolean forced_scroll_delay; int scroll_delay_value; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/main.h new/rocksndiamonds-4.3.8.1/src/main.h --- old/rocksndiamonds-4.3.8.0/src/main.h 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/main.h 2023-12-29 10:08:18.000000000 +0100 @@ -2664,7 +2664,7 @@ #define PROGRAM_VERSION_SUPER 4 #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 8 -#define PROGRAM_VERSION_PATCH 0 +#define PROGRAM_VERSION_PATCH 1 #define PROGRAM_VERSION_EXTRA "" #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rocksndiamonds-4.3.8.0/src/screens.c new/rocksndiamonds-4.3.8.1/src/screens.c --- old/rocksndiamonds-4.3.8.0/src/screens.c 2023-12-09 19:47:50.000000000 +0100 +++ new/rocksndiamonds-4.3.8.1/src/screens.c 2023-12-29 10:08:18.000000000 +0100 @@ -7548,7 +7548,7 @@ { TYPE_SWITCH, &setup.quick_switch, "Quick Player Focus Switch:" }, { TYPE_SWITCH, &setup.quick_doors, "Quick Menu Doors:" }, { TYPE_SWITCH, &setup.show_titlescreen,"Show Title Screens:" }, - { TYPE_SWITCH, &setup.toons, "Show Menu Animations:" }, + { TYPE_SWITCH, &setup.toons, "Show Toons:" }, { TYPE_SWITCH, &setup.small_game_graphics, "Small Game Graphics:" }, { TYPE_YES_NO_AUTO, &setup.debug.xsn_mode, debug_xsn_mode }, { TYPE_EMPTY, NULL, "" },
participants (1)
-
Source-Sync