X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=9b553f1e419672c5990263cd805a235cb1ba70cf;hb=8afc6199767a6fcb7451efd2b3d5b070f6c99efb;hp=8f957e30837f16165db67f41dee238b7f5fcc3ca;hpb=6279921cda22181d9ca97cc65fdfe832ee699be0;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 8f957e30..9b553f1e 100644 --- a/src/init.c +++ b/src/init.c @@ -29,15 +29,17 @@ static char *image_filename[NUM_PICTURES] = { "RocksScreen.pcx", + "RocksElements.pcx", "RocksDoor.pcx", "RocksHeroes.pcx", "RocksToons.pcx", "RocksSP.pcx", "RocksDC.pcx", "RocksMore.pcx", - "RocksFont.pcx", - "RocksFont2.pcx", - "RocksFont3.pcx" + "RocksFontBig.pcx", + "RocksFontSmall.pcx", + "RocksFontMedium.pcx", + "RocksFontEM.pcx" }; static void InitSetup(void); @@ -55,6 +57,7 @@ static void InitGadgets(void); static void InitElementProperties(void); static void InitElementInfo(void); static void InitGraphicInfo(void); +static void InitSoundInfo(); static void Execute_Debug_Command(char *); void OpenAll(void) @@ -100,7 +103,6 @@ void OpenAll(void) InitGfx(); InitElementProperties(); /* initializes IS_CHAR() for el2gfx() */ InitElementInfo(); - InitGraphicInfo(); InitLevelInfo(); InitLevelArtworkInfo(); @@ -176,16 +178,19 @@ void InitNetworkServer() static void InitImages() { - InitImageList(image_config, NUM_IMAGE_CONFIG_ENTRIES); + InitImageList(image_config, image_config_suffix, NUM_IMAGE_FILES); /* load custom images */ ReloadCustomImages(); + + InitGraphicInfo(); } static void InitMixer() { OpenAudio(); - InitSoundList(sound_config, NUM_SOUND_CONFIG_ENTRIES); + + InitSoundList(sound_config, sound_config_suffix, NUM_SOUND_FILES); StartMixer(); } @@ -196,8 +201,7 @@ static void InitSound() InitReloadSounds(artwork.snd_current->identifier); InitReloadMusic(artwork.mus_current->identifier); - /* initialize sound effect lookup table for element actions */ - InitGameSound(); + InitSoundInfo(); } static void InitTileClipmasks() @@ -379,9 +383,9 @@ void InitGfx() pix[PIX_DB_DOOR] = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH); pix[PIX_DB_FIELD] = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH); - pix[PIX_SMALLFONT] = LoadCustomImage(image_filename[PIX_SMALLFONT]); + pix[PIX_FONT_SMALL] = LoadCustomImage(image_filename[PIX_FONT_SMALL]); - InitFontInfo(NULL, NULL, pix[PIX_SMALLFONT]); + InitFontInfo(NULL, NULL, pix[PIX_FONT_SMALL], NULL); DrawInitText(WINDOW_TITLE_STRING, 20, FC_YELLOW); DrawInitText(WINDOW_SUBTITLE_STRING, 50, FC_RED); @@ -390,7 +394,7 @@ void InitGfx() for(i=0; i %d\n", image_files[GFX_BD_DIAMOND].parameter[GFXARG_NUM_FRAMES]); + printf("W> %d\n", image_files[GFX_ROBOT_WHEEL].parameter[GFXARG_NUM_FRAMES]); + + graphic_info[GFX_ABLENK].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL); + graphic_info[GFX_ABLENK].src_x = 0; + graphic_info[GFX_ABLENK].src_y = 0; + + graphic_info[GFX_ABLENK + 1].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL); + graphic_info[GFX_ABLENK + 2].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL); + graphic_info[GFX_ABLENK + 3].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL); + graphic_info[GFX_ABLENK + 1].src_x = 1 * TILEX; + graphic_info[GFX_ABLENK + 2].src_x = 2 * TILEX; + graphic_info[GFX_ABLENK + 3].src_x = 3 * TILEX; + graphic_info[GFX_ABLENK + 1].src_y = 0; + graphic_info[GFX_ABLENK + 2].src_y = 0; + graphic_info[GFX_ABLENK + 3].src_y = 0; +#endif +} + +static void InitSoundInfo() +{ + sound_files = getCurrentSoundList(); + + /* initialize sound effect lookup table for element actions */ + InitGameSound(); } void InitElementProperties() @@ -2069,10 +2119,10 @@ void Execute_Debug_Command(char *command) printf("%s\n", getFormattedSetupEntry("sort_priority", "100")); printf("\n"); - for (i=0; i