diff original_src\eval.c src\eval.c 4971a4972,4974 > #ifdef FEAT_BMBG > "bmbg", > #endif diff original_src\feature.h src\feature.h 591c591 < /* #define FEAT_MBYTE_IME */ --- > #define FEAT_MBYTE_IME 1178a1179,1187 > #endif > > /* > * +bmbg bitmap backgrounds in win32 > */ > #ifdef FEAT_NORMAL > # ifdef FEAT_GUI_W32 > # define FEAT_BMBG > # endif diff original_src\gui_w32.c src\gui_w32.c 273a274,283 > #ifdef FEAT_BMBG > /* Stuff for bitmap background */ > BOOL gui_draw_bkbitmap(RECT*); > BOOL gui_load_bkbitmap(char *); > static HBITMAP s_bkBmp; > static SIZE s_bkSize; > static HDC s_bkDC; > #endif > > 871a882,884 > #ifdef FEAT_BMBG > char_u fname[MAXPATHL]; > #endif 979a993,1001 > #ifdef FEAT_BMBG > /* Load the background tile */ > if (gui_find_bitmap("background", fname, "bmp") == OK) > { > gui_load_bkbitmap(fname); > } > #endif > > 1643d1664 < FillRect(s_hdc, &rc, hbr); 1646a1668,1685 > #ifdef FEAT_BMBG > /* If the background of this rect would not be the default background, then color the area in and do not consider using the bitmap */ > if (gui.back_pixel != gui.currBgColor) > { > FillRect(s_hdc, &rc, hbr); > } > else > { > if(!gui_draw_bkbitmap(&rc)) > { > FillRect(s_hdc, &rc, hbr); > } > } > #else > FillRect(s_hdc, &rc, hbr); > #endif > > 1794a1834,1896 > #ifdef FEAT_BMBG > /* Load a background bitmap and tile it into a dc */ > BOOL > gui_load_bkbitmap(char *name) > { > HDC tmpDC; > HBITMAP oldBmp; > HBITMAP tileBmp; > int x,y; > BITMAP bm; > > if (s_bkBmp == NULL) > { > s_bkBmp = LoadImage(NULL, name, IMAGE_BITMAP, 0,0, LR_LOADFROMFILE|LR_CREATEDIBSECTION); > if (s_bkBmp == NULL) > return FALSE; > > GetObject(s_bkBmp, sizeof(BITMAP), &bm); > s_bkSize.cx=bm.bmWidth; > s_bkSize.cy=bm.bmHeight; > > s_bkDC = CreateCompatibleDC(s_hdc); > > tmpDC = CreateCompatibleDC(s_hdc); > oldBmp = SelectObject(tmpDC, s_bkBmp); > > tileBmp = CreateCompatibleBitmap(s_hdc, 1600, 1200); > SelectObject(s_bkDC, tileBmp); > > for(x=0;x<1600;x+=s_bkSize.cx) > { > for(y=0;y<1200;y+=s_bkSize.cy) > { > BitBlt(s_bkDC, x, y, s_bkSize.cx, s_bkSize.cy, tmpDC, 0, 0, SRCCOPY); > } > } > > SelectObject(tmpDC, oldBmp); > DeleteDC(tmpDC); > } > > return TRUE; > > } > > > /* Draw a bitmap background */ > BOOL > gui_draw_bkbitmap(RECT *rcp) > { > > if (s_bkBmp == FALSE) > { > return FALSE; > } > > BitBlt(s_hdc, rcp->left, rcp->top, rcp->right-rcp->left, rcp->bottom-rcp->top, s_bkDC, rcp->left, rcp->top, SRCCOPY); > > return TRUE; > } > > #endif > 1822,1824c1924,1931 < hbr = CreateSolidBrush(gui.back_pixel); < FillRect(s_hdc, rcp, hbr); < DeleteBrush(hbr); --- > #ifdef FEAT_BMBG > if (!gui_draw_bkbitmap(rcp)) > #endif > { > hbr = CreateSolidBrush(gui.back_pixel); > FillRect(s_hdc, rcp, hbr); > DeleteBrush(hbr); > } diff original_src\screen.c src\screen.c 7349a7350 > * - there is a bitmap background 7350a7352,7355 > #ifdef FEAT_BMBG > return FAIL; > #endif > 7568a7574 > * - there is a bitmap background 7569a7576,7578 > #ifdef FEAT_BMBG > if (!force) return FAIL; > #endif diff original_src\version.c src\version.c 627a628,632 > #ifdef FEAT_BMBG > "+bmbg", > #else > "-bmbg", > #endif