X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=ba94035e224cd3963a6fa907fa1a0172cac7ce00;hb=462bca0782be497b984922afda26b5bf12bd3d75;hp=aabc7026b630dd834afa213b6a4685ac9c16cf95;hpb=44daf525cec5664a3de0ce6e7516cd6c0081cf5b;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index aabc7026..ba94035e 100644 --- a/src/init.c +++ b/src/init.c @@ -104,6 +104,8 @@ void InitGadgets() CreateToolButtons(); CreateScreenGadgets(); + InitGadgetsSoundCallback(PlaySoundActivating, PlaySoundSelecting); + gadgets_initialized = TRUE; } @@ -165,7 +167,7 @@ static int getFontBitmapID(int font_nr) { int special = -1; - if (game_status >= GAME_MODE_MAIN && game_status <= GAME_MODE_PSEUDO_PREVIEW) + if (game_status >= GAME_MODE_TITLE && game_status <= GAME_MODE_PSEUDO_PREVIEW) special = game_status; else if (game_status == GAME_MODE_PSEUDO_TYPENAME) special = GFX_SPECIAL_ARG_MAIN; @@ -1233,6 +1235,7 @@ static void InitGraphicInfo() IMG_BACKGROUND, IMG_BACKGROUND_TITLE, + IMG_BACKGROUND_MESSAGE, IMG_BACKGROUND_MAIN, IMG_BACKGROUND_LEVELS, IMG_BACKGROUND_SCORES, @@ -4580,7 +4583,7 @@ void InitGfx() DrawInitText(PROGRAM_COPYRIGHT_STRING, 50, FC_RED); DrawInitText(PROGRAM_WEBSITE_STRING, WIN_YSIZE - 20 - font_height, FC_RED); - DrawInitText("Loading graphics:", 120, FC_GREEN); + DrawInitText("Loading graphics", 120, FC_GREEN); } void RedrawBackground() @@ -4595,7 +4598,6 @@ void InitGfxBackground() { int x, y; - drawto = backbuffer; fieldbuffer = bitmap_db_field; SetDrawtoField(DRAW_BACKBUFFER); @@ -4910,8 +4912,7 @@ void OpenAll() InitJoysticks(); InitVideoDisplay(); - InitVideoBuffer(&backbuffer, &window, WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, - setup.fullscreen); + InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen); InitEventFilter(FilterMouseMotionEvents); @@ -4920,8 +4921,11 @@ void OpenAll() InitGfx(); + // debug_print_timestamp(0, "INIT"); InitLevelInfo(); + // debug_print_timestamp(0, "TIME InitLevelInfo: "); InitLevelArtworkInfo(); + // debug_print_timestamp(0, "TIME InitLevelArtworkInfo: "); InitImages(); /* needs to know current level directory */ InitSound(NULL); /* needs to know current level directory */