projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed compiler warning
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index c2a197819d61fb2d7f21b17adfc5dea21ab2eb30..2529a8baba97aa4f9b16bab81a2a764ae82ff1d9 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-244,6
+244,10
@@
static void InitElementSmallImagesScaledUp(int graphic)
{
struct GraphicInfo *g = &graphic_info[graphic];
{
struct GraphicInfo *g = &graphic_info[graphic];
+ // if graphic was cloned, scale cloned graphic
+ if (graphic_info[graphic].clone_from != -1)
+ graphic = graphic_info[graphic].clone_from;
+
// create small and game tile sized bitmaps (and scale up, if needed)
CreateImageWithSmallImages(graphic, g->scale_up_factor, g->tile_size);
}
// create small and game tile sized bitmaps (and scale up, if needed)
CreateImageWithSmallImages(graphic, g->scale_up_factor, g->tile_size);
}
@@
-307,6
+311,10
@@
static void InitScaledImagesScaledUp(int graphic)
{
struct GraphicInfo *g = &graphic_info[graphic];
{
struct GraphicInfo *g = &graphic_info[graphic];
+ // if graphic was cloned, scale cloned graphic
+ if (graphic_info[graphic].clone_from != -1)
+ graphic = graphic_info[graphic].clone_from;
+
ScaleImage(graphic, g->scale_up_factor);
}
ScaleImage(graphic, g->scale_up_factor);
}
@@
-1147,6
+1155,8
@@
static void InitElementGraphicInfo(void)
// look for special default action graphic (classic game specific)
if (IS_BD_ELEMENT(i) && element_info[EL_BD_DEFAULT].graphic[act] != -1)
default_action_graphic = element_info[EL_BD_DEFAULT].graphic[act];
// look for special default action graphic (classic game specific)
if (IS_BD_ELEMENT(i) && element_info[EL_BD_DEFAULT].graphic[act] != -1)
default_action_graphic = element_info[EL_BD_DEFAULT].graphic[act];
+ if (IS_BDX_ELEMENT(i) && element_info[EL_BDX_DEFAULT].graphic[act] != -1)
+ default_action_graphic = element_info[EL_BDX_DEFAULT].graphic[act];
if (IS_SP_ELEMENT(i) && element_info[EL_SP_DEFAULT].graphic[act] != -1)
default_action_graphic = element_info[EL_SP_DEFAULT].graphic[act];
if (IS_SB_ELEMENT(i) && element_info[EL_SB_DEFAULT].graphic[act] != -1)
if (IS_SP_ELEMENT(i) && element_info[EL_SP_DEFAULT].graphic[act] != -1)
default_action_graphic = element_info[EL_SP_DEFAULT].graphic[act];
if (IS_SB_ELEMENT(i) && element_info[EL_SB_DEFAULT].graphic[act] != -1)
@@
-1156,6
+1166,8
@@
static void InitElementGraphicInfo(void)
if (IS_BD_ELEMENT(i) && element_info[EL_BD_DEFAULT].crumbled[act] != -1)
default_action_crumbled = element_info[EL_BD_DEFAULT].crumbled[act];
if (IS_BD_ELEMENT(i) && element_info[EL_BD_DEFAULT].crumbled[act] != -1)
default_action_crumbled = element_info[EL_BD_DEFAULT].crumbled[act];
+ if (IS_BDX_ELEMENT(i) && element_info[EL_BDX_DEFAULT].crumbled[act] != -1)
+ default_action_crumbled = element_info[EL_BDX_DEFAULT].crumbled[act];
if (IS_SP_ELEMENT(i) && element_info[EL_SP_DEFAULT].crumbled[act] != -1)
default_action_crumbled = element_info[EL_SP_DEFAULT].crumbled[act];
if (IS_SB_ELEMENT(i) && element_info[EL_SB_DEFAULT].crumbled[act] != -1)
if (IS_SP_ELEMENT(i) && element_info[EL_SP_DEFAULT].crumbled[act] != -1)
default_action_crumbled = element_info[EL_SP_DEFAULT].crumbled[act];
if (IS_SB_ELEMENT(i) && element_info[EL_SB_DEFAULT].crumbled[act] != -1)
@@
-2158,6
+2170,8
@@
static void InitElementSoundInfo(void)
// look for special default action sound (classic game specific)
if (IS_BD_ELEMENT(i) && element_info[EL_BD_DEFAULT].sound[act] != -1)
default_action_sound = element_info[EL_BD_DEFAULT].sound[act];
// look for special default action sound (classic game specific)
if (IS_BD_ELEMENT(i) && element_info[EL_BD_DEFAULT].sound[act] != -1)
default_action_sound = element_info[EL_BD_DEFAULT].sound[act];
+ if (IS_BDX_ELEMENT(i) && element_info[EL_BDX_DEFAULT].sound[act] != -1)
+ default_action_sound = element_info[EL_BDX_DEFAULT].sound[act];
if (IS_SP_ELEMENT(i) && element_info[EL_SP_DEFAULT].sound[act] != -1)
default_action_sound = element_info[EL_SP_DEFAULT].sound[act];
if (IS_SB_ELEMENT(i) && element_info[EL_SB_DEFAULT].sound[act] != -1)
if (IS_SP_ELEMENT(i) && element_info[EL_SP_DEFAULT].sound[act] != -1)
default_action_sound = element_info[EL_SP_DEFAULT].sound[act];
if (IS_SB_ELEMENT(i) && element_info[EL_SB_DEFAULT].sound[act] != -1)
@@
-4291,16
+4305,17
@@
void InitElementPropertiesStatic(void)
EL_AMOEBA_DRY,
EL_AMOEBA_FULL,
EL_BD_AMOEBA,
EL_AMOEBA_DRY,
EL_AMOEBA_FULL,
EL_BD_AMOEBA,
- EL_BD_AMOEBA_2,
- EL_BD_SLIME,
- EL_BD_ACID,
- EL_BD_BITER,
- EL_BD_BITER_RIGHT,
- EL_BD_BITER_UP,
- EL_BD_BITER_LEFT,
- EL_BD_BITER_DOWN,
- EL_BD_BLADDER,
- EL_BD_NUT,
+ EL_BDX_AMOEBA_1,
+ EL_BDX_AMOEBA_2,
+ EL_BDX_SLIME,
+ EL_BDX_ACID,
+ EL_BDX_BITER,
+ EL_BDX_BITER_RIGHT,
+ EL_BDX_BITER_UP,
+ EL_BDX_BITER_LEFT,
+ EL_BDX_BITER_DOWN,
+ EL_BDX_BLADDER,
+ EL_BDX_NUT,
EL_EMC_MAGIC_BALL,
EL_EMC_ANDROID,
EL_MM_GRAY_BALL,
EL_EMC_MAGIC_BALL,
EL_EMC_ANDROID,
EL_MM_GRAY_BALL,
@@
-4596,8
+4611,8
@@
void InitElementPropertiesStatic(void)
static int ep_editor_cascade_active[] =
{
EL_INTERNAL_CASCADE_BD_ACTIVE,
static int ep_editor_cascade_active[] =
{
EL_INTERNAL_CASCADE_BD_ACTIVE,
- EL_INTERNAL_CASCADE_BD
_NATIVE
_ACTIVE,
- EL_INTERNAL_CASCADE_BD_EFFECTS_ACTIVE,
+ EL_INTERNAL_CASCADE_BD
X
_ACTIVE,
+ EL_INTERNAL_CASCADE_BD
X
_EFFECTS_ACTIVE,
EL_INTERNAL_CASCADE_EM_ACTIVE,
EL_INTERNAL_CASCADE_EMC_ACTIVE,
EL_INTERNAL_CASCADE_RND_ACTIVE,
EL_INTERNAL_CASCADE_EM_ACTIVE,
EL_INTERNAL_CASCADE_EMC_ACTIVE,
EL_INTERNAL_CASCADE_RND_ACTIVE,
@@
-4622,8
+4637,8
@@
void InitElementPropertiesStatic(void)
static int ep_editor_cascade_inactive[] =
{
EL_INTERNAL_CASCADE_BD,
static int ep_editor_cascade_inactive[] =
{
EL_INTERNAL_CASCADE_BD,
- EL_INTERNAL_CASCADE_BD
_NATIVE
,
- EL_INTERNAL_CASCADE_BD_EFFECTS,
+ EL_INTERNAL_CASCADE_BD
X
,
+ EL_INTERNAL_CASCADE_BD
X
_EFFECTS,
EL_INTERNAL_CASCADE_EM,
EL_INTERNAL_CASCADE_EMC,
EL_INTERNAL_CASCADE_RND,
EL_INTERNAL_CASCADE_EM,
EL_INTERNAL_CASCADE_EMC,
EL_INTERNAL_CASCADE_RND,
@@
-6270,9
+6285,9
@@
static void InitOverrideArtwork(void)
gfx.override_level_music = FALSE;
// now check if this level set has definitions for custom elements
gfx.override_level_music = FALSE;
// now check if this level set has definitions for custom elements
- if (setup.override_level_graphics ==
MOD
E_AUTO ||
- setup.override_level_sounds ==
MOD
E_AUTO ||
- setup.override_level_music ==
MOD
E_AUTO)
+ if (setup.override_level_graphics ==
STAT
E_AUTO ||
+ setup.override_level_sounds ==
STAT
E_AUTO ||
+ setup.override_level_music ==
STAT
E_AUTO)
redefined_ce_found =
(CheckArtworkTypeForRedefinedCustomElements(ARTWORK_TYPE_GRAPHICS) |
CheckArtworkTypeForRedefinedCustomElements(ARTWORK_TYPE_SOUNDS) |
redefined_ce_found =
(CheckArtworkTypeForRedefinedCustomElements(ARTWORK_TYPE_GRAPHICS) |
CheckArtworkTypeForRedefinedCustomElements(ARTWORK_TYPE_SOUNDS) |