X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Finit.c;h=2b43180b42f937d8bb27bf2fb4d4ceea0b6cb754;hp=a022f3944ab4858500e60a9021175b0935ae3dc7;hb=b641818c787e48bbf03ce2a0cd5b542c4c21e523;hpb=baed6f0a85ade21358cde876c3c044c34749c434 diff --git a/src/init.c b/src/init.c index a022f394..2b43180b 100644 --- a/src/init.c +++ b/src/init.c @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // init.c // ============================================================================ @@ -77,6 +77,11 @@ static int copy_properties[][5] = EL_MOLE_LEFT, EL_MOLE_RIGHT, EL_MOLE_UP, EL_MOLE_DOWN }, + { + EL_SPRING, + EL_SPRING_LEFT, EL_SPRING_RIGHT, + EL_SPRING_LEFT, EL_SPRING_RIGHT, // (to match array size) + }, { -1, -1, -1, -1, -1 @@ -275,6 +280,19 @@ static void InitBitmapPointers(void) void InitImageTextures(void) { + static int texture_graphics[] = + { + IMG_GFX_REQUEST_BUTTON_TOUCH_YES, + IMG_GFX_REQUEST_BUTTON_TOUCH_NO, + IMG_GFX_REQUEST_BUTTON_TOUCH_CONFIRM, + IMG_GFX_GAME_BUTTON_TOUCH_STOP, + IMG_GFX_GAME_BUTTON_TOUCH_PAUSE, + IMG_MENU_BUTTON_TOUCH_BACK, + IMG_MENU_BUTTON_TOUCH_NEXT, + IMG_MENU_BUTTON_TOUCH_BACK2, + IMG_MENU_BUTTON_TOUCH_NEXT2, + -1 + }; int i, j, k; FreeAllImageTextures(); @@ -300,24 +318,10 @@ void InitImageTextures(void) } } } -} - -#if 1 -// !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!! -void SetBitmaps_EM(Bitmap **em_bitmap) -{ - em_bitmap[0] = graphic_info[IMG_EMC_OBJECT].bitmap; - em_bitmap[1] = graphic_info[IMG_EMC_SPRITE].bitmap; -} -#endif -#if 0 -// !!! FIX THIS (CHANGE TO USING NORMAL ELEMENT GRAPHIC DEFINITIONS) !!! -void SetBitmaps_SP(Bitmap **sp_bitmap) -{ - *sp_bitmap = graphic_info[IMG_SP_OBJECTS].bitmap; + for (i = 0; texture_graphics[i] > -1; i++) + CreateImageTextures(texture_graphics[i]); } -#endif static int getFontBitmapID(int font_nr) { @@ -2358,6 +2362,8 @@ static int get_special_property_bit(int element, int property_bit_nr) { EL_SP_ELECTRON, 15 }, { EL_BALLOON, 16 }, { EL_SPRING, 17 }, + { EL_SPRING_LEFT, 17 }, + { EL_SPRING_RIGHT, 17 }, { EL_EMC_ANDROID, 18 }, { -1, -1 }, @@ -2863,6 +2869,7 @@ void InitElementPropertiesStatic(void) EL_BOMB, EL_NUT, EL_AMOEBA_DROP, + EL_AMOEBA_DROPPING, EL_QUICKSAND_FULL, EL_QUICKSAND_FAST_FULL, EL_MAGIC_WALL_FULL, @@ -5909,6 +5916,7 @@ void ReloadCustomArtwork(int force_reload) InitOverrideArtwork(); force_reload_gfx |= AdjustGraphicsForEMC(); + force_reload_snd |= AdjustSoundsForEMC(); gfx_new_identifier = getNewArtworkIdentifier(ARTWORK_TYPE_GRAPHICS); snd_new_identifier = getNewArtworkIdentifier(ARTWORK_TYPE_SOUNDS);