void blit_gg_scale(BITMAP *src, BITMAP *dst) { //stretch_blit(src, dst, bitmap.viewport.x, bitmap.viewport.y + (vdp.height-bitmap.viewport.h)/2, bitmap.viewport.w, bitmap.viewport.h, (SCREEN_W-200)/2, (SCREEN_H-144)/2, 200, 144); if (sms.console == CONSOLE_GGMS) stretch_blit(src, dst, option.overscan ? 8:0, option.overscan ? 11: 0, option.overscan ? 240 : 256, option.overscan ? 218 : 240, (SCREEN_W - 200)/2, (SCREEN_H - 144)/2, 200, 144); else stretch_blit(src, dst, option.overscan ? 0:bitmap.viewport.x, 0, bitmap.viewport.w + (option.overscan ? 2*bitmap.viewport.x:0), bitmap.viewport.h+2*bitmap.viewport.y, (SCREEN_W - (option.overscan ? 360 : 320))/2, (SCREEN_H - 240)/2, option.overscan ? 360 : 320, 240); }
//Perform frame by frame updates and blits. Set the stream //state to STOP if there are no more frames to update. void RenderToSurface(BITMAP *vscreen) { //update each frame if (g_pSample->Update(0, NULL, NULL, 0) != S_OK) { g_bAppactive = FALSE; g_pMMStream->SetState(STREAMSTATE_STOP); } else { g_bAppactive = TRUE; acquire_screen(); // Because vscreen is a DX Video Bitmap, it can be stretched // onto the screen (also a Video Bmp) but not onto a memory // bitmap (which is what "screen" is when using gfx filters) if (is_video_bitmap(screen)) { stretch_blit(vscreen, screen, 0, 0, vscreen->w, vscreen->h, screen->w / 2 - newWidth / 2, screen->h / 2 - newHeight / 2, newWidth, newHeight); } else { blit(vscreen, vsMemory, 0, 0, 0, 0, vscreen->w, vscreen->h); stretch_blit(vsMemory, screen, 0, 0, vscreen->w, vscreen->h, screen->w / 2 - newWidth / 2, screen->h / 2 - newHeight / 2, newWidth, newHeight); } release_screen(); render_to_screen(screen, 0, 0); // if we're not playing AVI sound, poll the game MP3 if (!useSound) update_polled_stuff_and_crossfade(); } }
void Level::DrawMiniMap( BITMAP *buffer, BITMAP *tileset, int MAX_X, int MAX_Y, System *system ) { if ( drawMiniMap ) { int x = 370, y = 670; int w = MAX_X*32, h = MAX_Y*32; int scale = miniMapScale; BITMAP *temp = create_bitmap( w, h ); for ( int i=0; i<MAX_X; i++ ) { for ( int j=0; j<MAX_Y; j++ ) { for ( int k=0; k<3; k++ ) { tile[0][i][j].Draw( temp, tileset, 0, 0 ); tile[1][i][j].Draw( temp, tileset, 0, 0 ); tile[2][i][j].Draw( temp, tileset, 0, 0 ); } } } //stretch_blit(src, dest, xsrc, ysrc, srcw, srch, xdest, ydest, destw, desth) stretch_blit( temp, buffer, 0, 0, w, h, x, y, w/scale, h/scale ); destroy_bitmap( temp ); } }
void IntroSequence::DrawZoomedLogoInCenter(int y1, int y2) { int logowidth = fixtoi(fixmul(itofix(al_get_bitmap_width(iLogo)), iZoom)); int logoheight = fixtoi(fixmul(itofix(al_get_bitmap_height(iLogo)), iZoom)); int targetwidth = width; int targetheight = y2 - y1; int xs, ys, ws, hs; int xd, yd, wd, hd; if (logowidth > targetwidth) { ws = fixtoi(fixdiv(itofix(targetwidth), iZoom)); xs = (al_get_bitmap_width(iLogo) - ws) / 2; xd = 0; wd = targetwidth; } else { xs = 0; ws = al_get_bitmap_width(iLogo); xd = (targetwidth - logowidth) / 2; wd = logowidth; } if (logoheight > targetheight) { hs = fixtoi(fixdiv(itofix(targetheight), iZoom)); ys = (al_get_bitmap_height(iLogo) - hs) / 2; yd = 0; hd = targetheight; } else { ys = 0; hs = al_get_bitmap_height(iLogo); yd = (targetheight - logoheight) / 2; hd = logoheight; } stretch_blit(iLogo, iDoublebuffer, xs, ys, ws, hs, xd, yd, wd, hd); }
bool flip() override { #ifdef ALLEGRO4_WITH_RESIZE_PATCH if (display_flags & DISPLAY_FLAG_WINDOW_RESIZE) { display_flags ^= DISPLAY_FLAG_WINDOW_RESIZE; acknowledge_resize(); int scale = m_scale; m_scale = 0; setScale(scale); return false; } #endif BITMAP* bmp = reinterpret_cast<BITMAP*>(m_surface->nativeHandle()); if (m_scale == 1) { blit(bmp, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); } else { stretch_blit(bmp, screen, 0, 0, bmp->w, bmp->h, 0, 0, SCREEN_W, SCREEN_H); } return true; }
TileMap *create_bubble( std::vector<TileMap*> &landChunks ) { int ndx = ((float)rand() / (float)RAND_MAX) * landChunks.size(); TileMap *bub = new TileMap( landChunks[ndx]->m_size ); bub->bub_age = (float)rand() / (float)RAND_MAX; bub->paste( landChunks[ndx], 0, 0 ); int sz = bub->m_size * 12; BITMAP *tmpBmp = create_bitmap( sz, sz ); rectfill( tmpBmp, 0, 0, sz, sz, makecol( 0xff, 0x00, 0xff) ); bub->draw( tmpBmp, 0, 0, emptyObjs ); bub->bub_bmp = create_bitmap( 20, 20 ); stretch_blit( tmpBmp, bub->bub_bmp, 0, 0, tmpBmp->w, tmpBmp->h, 0, 0, bub->bub_bmp->w, bub->bub_bmp->h ); destroy_bitmap( tmpBmp ); circle( bub->bub_bmp, 10, 10, 9, makecol( 0x66, 0xee, 0xff ) ); circlefill( bub->bub_bmp, 6, 6, 2, makecol( 0xff, 0xff, 0xff ) ); hline( bub->bub_bmp, 2, 17, 18, makecol( 155, 193, 212 ) ); hline( bub->bub_bmp, 2, 18, 18, makecol( 0xff, 0x00, 0xff ) ); hline( bub->bub_bmp, 2, 19, 18, makecol( 0xff, 0x00, 0xff ) ); return bub; }
void initialize_oneplayer_screen() { clear(screen_buffer); clear(screen); for (int i=0;i< NR_OF_LAYERS;i++) playfield->draw(screen_buffer,i); if (screen_buffer->w == SCREEN_W) { blit(screen_buffer,screen,0,0,0,0,SCREEN_W,SCREEN_H- 96); } else { stretch_blit(screen_buffer,screen,0,0, screen_buffer->w, screen_buffer->h,0,0,SCREEN_W,SCREEN_H- 96); } BITMAP *frame; for (int i=0; i<SCREEN_W;i+=640) { blit(board, screen, 0, 0 ,i , SCREEN_H - 96, 640, 96); } draw_rle_sprite(screen, (RLE_SPRITE *)(objects[GFXDATA_OBJECTS_GOUD].dat), 10, SCREEN_H - 86); draw_rle_sprite(screen, (RLE_SPRITE *)(objects[GFXDATA_OBJECTS_ENERG].dat),10, SCREEN_H - 44); draw_rle_sprite(screen, (RLE_SPRITE *)(objects[GFXDATA_OBJECTS_STER].dat),200, SCREEN_H - 86); draw_rle_sprite(screen, (RLE_SPRITE *)(objects[GFXDATA_OBJECTS_STUT].dat),200, SCREEN_H - 44); frame = create_sub_bitmap((BITMAP *)(anims[GFXDATA_ANIMS_MANS].dat), 0,0,32,32); masked_blit(frame,screen,0,0,400,SCREEN_H - 86,32,32); destroy_bitmap(frame); draw_rle_sprite(screen, (RLE_SPRITE *)(objects[GFXDATA_OBJECTS_HOUWEEL].dat),400, SCREEN_H - 44); }
static void dirty_blit(int x, int y) { if (screen_buffer->w == SCREEN_W) { blit(screen_buffer, screen, x * TILESIZE_X, y * TILESIZE_Y, x * TILESIZE_X, y * TILESIZE_Y,TILESIZE_X,TILESIZE_Y); } else { int scale = SCREEN_W / screen_buffer->w; int xfrom = x * TILESIZE_X; int yfrom = y * TILESIZE_Y; int wfrom = TILESIZE_X; int hfrom = TILESIZE_Y; if (xfrom + wfrom > screen_buffer->w) { wfrom = screen_buffer->w - xfrom; } if (yfrom + hfrom > screen_buffer->h) { hfrom = screen_buffer->h - yfrom; } if (wfrom > 0 && hfrom > 0) { stretch_blit(screen_buffer, screen, xfrom, yfrom, wfrom, hfrom, xfrom * scale, yfrom * scale,wfrom*scale,hfrom*scale); } } }
void SuperEagle(ALLEGRO_BITMAP * src, ALLEGRO_BITMAP * dest, int s_x, int s_y, int d_x, int d_y, int w, int h) { int sbpp, dbpp; ALLEGRO_BITMAP *dst2 = NULL; if (!src || !dest) return; sbpp = bitmap_color_depth(src); dbpp = bitmap_color_depth(dest); if ((sbpp != xsai_depth) || (sbpp != dbpp)) /* Must be same color depth */ return; BLIT_CLIP2(src, dest, s_x, s_y, d_x, d_y, w, h, 2, 2); if (w < 4 || h < 4) { /* Image is too small to be 2xSaI'ed. */ stretch_blit(src, dest, s_x, s_y, w, h, d_x, d_y, w * 2, h * 2); return; } sbpp = BYTES_PER_PIXEL(sbpp); if (d_x || d_y) dst2 = create_sub_bitmap(dest, d_x, d_y, w * 2, h * 2); SuperEagle_ex(src->line[s_y] + s_x * sbpp, (unsigned int)(src->line[1] - src->line[0]), NULL, dst2 ? dst2 : dest, w, h); if (dst2) destroy_bitmap(dst2); return; }
/***************************************************************************** Function: osd_gfx_put_image_normal Description: draw the raw computed picture to screen, without any effect trying to center it (I bet there is still some work on this, maybe not in this function) Parameters: none Return: nothing *****************************************************************************/ void osd_gfx_put_image_normal(void) { int dum; if (message_delay) draw_sprite(XBuf,OSD_MESSAGE_SPR,screen_blit_x + 8,min(io.screen_h,vheight)-16); blit(XBuf,screen,screen_blit_x,screen_blit_y,blit_x,blit_y - 8,io.screen_w,io.screen_h); }/***************************************************************************** Function: osd_gfx_put_image_scanline Description: draw the raw computed picture to the screen using a 50% scanline algo Parameters: none Return: nothing Remark: Adapted from Vlendr'it 's code *****************************************************************************/ void osd_gfx_put_image_scanline(void) { int dum; int i,y = 0; BITMAP *temp = create_bitmap((io.screen_w << 1), (io.screen_h << 1)); if (message_delay) draw_sprite(XBuf,OSD_MESSAGE_SPR,screen_blit_x+8,min(io.screen_h,vheight)-16); clear(temp); for(i = 0; i < io.screen_h; i++) { stretch_blit(XBuf, temp, screen_blit_x - 8, i, io.screen_w, 1, 0, y, io.screen_w << 1, 1); y += 2; } /* blit the bitmap onto the screen */ blit(temp, screen, 0, 0, blit_x , blit_y, temp->w, temp->h); destroy_bitmap(temp); }
void draw_display_bitmap(display_item *pDI, int undo, BITMAP *pScreen, RECT *pRect) { BITMAP *pContents = (BITMAP*) pDI->pContents; BITMAP *pOldContents = pDI->pOldContents; BITMAP *p = (BITMAP*) (undo?pOldContents:pContents); RECT r = {pDI->x, pDI->y, undo?p->w:pDI->is_scaled?pDI->w:p->w, undo?p->h:pDI->is_scaled?pDI->h:p->h}; RECT tmp_r; // dirty rectangle. if (pRect) { rect_copy(&tmp_r, pRect); if (pRect->x == -1) { rect_copy(pRect, &r); } else { rect_combine(pRect, &tmp_r, &r); } } if (undo) { // draw it if (pDI->is_saving) blit(pOldContents, pScreen, 0, 0, pDI->x, pDI->y, pOldContents->w, pOldContents->h); } else { // draw it. if (pDI->is_scaled) { if (pDI->is_saving) blit(pScreen, pOldContents, pDI->x, pDI->y, 0, 0, pDI->w, pDI->h); if (pDI->is_sprite) { stretch_sprite((BITMAP*) pContents, pScreen, pDI->x, pDI->y, pDI->w, pDI->h); } else { stretch_blit((BITMAP*) pContents, pScreen, 0, 0, pContents->w, pContents->h, pDI->x, pDI->y, pDI->w, pDI->h); } } else { if (pDI->is_saving) blit(pScreen, pOldContents, pDI->x, pDI->y, 0, 0, pContents->w, pContents->h); if (pDI->is_sprite) { draw_sprite(pScreen, pContents, pDI->x, pDI->y); } else if (pDI->is_translucent) { pDI->pParent->display_prev_table = color_map; color_map = pDI->type==DISPLAY_LIGHT?pDI->pParent->display_light_table:pDI->pParent->display_trans_table; draw_trans_sprite(pScreen, pContents, pDI->x, pDI->y); color_map = pDI->pParent->display_prev_table; } else { blit(pContents, pScreen, 0, 0, pDI->x, pDI->y, pContents->w, pContents->h); } } } }
void VideoManager::renderToSurfaceStretched(BITMAP* surface, int x, int y, int width, int height) { if ( frameData == NULL ) { return; } stretch_blit(frameData, surface, 0, 0, 320, 192, x, y, width, height); }
void ce_game::drawTitle(const char *text, ce_cord center){ //Draw a title dependant on parameters given BITMAP *bmp = create_bitmap(text_length(font, text),text_height(font)); clear_to_color(bmp,makecol(0,0,0)); textout_ex(bmp, font, text, 0, 0, makecol(240,0,240), -1); stretch_blit(bmp,buffer, 0,0,bmp->w, bmp->h, center.x - ((bmp->w*5)/2), center.y - ((bmp->h*5)/2),bmp->w * 5, bmp->h * 5); destroy_bitmap(bmp); }
void Area::overwritebackgr(BITMAP *newb, double scale, int col) { STACKTRACE; if (newb && backgr) { clear_to_color(backgr, col); stretch_blit(newb, backgr, 0, 0, newb->w, newb->h, 0, 0, iround(newb->w * scale), iround(newb->h * scale)); } }
int ModeXShowPage() { CheckTimerStuff(); acquire_bitmap(screen); stretch_blit(get_offscreen(), screen, 0, 0, tsx, tsy, 0, 0, SCREEN_W, SCREEN_H); release_bitmap(screen); return 0; }
void renderStepZonePiece_DDR(BITMAP* src, int x, int y, int scale) { // copy to a temporary space, scale there, then do a transparent blit clear_to_color(rm.m_temp64, 0x00000000); // argb format for the color int s = (64 * scale) / 100; int d = (64 - s) / 2; stretch_blit(src, rm.m_temp64, 0, 0, 64, 64, d, d, s, s); draw_trans_sprite(rm.m_backbuf, rm.m_temp64, x, y); }
/* psp_do_stretch_blit8: * Hook to capture the call to stretch_blit(). */ void psp_do_stretch_blit8(BITMAP *source, BITMAP *dest, int source_x, int source_y, int source_width, int source_height, int dest_x, int dest_y, int dest_width, int dest_height, int masked) { source->vtable->do_stretch_blit = NULL; stretch_blit(source, dest, source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height); if (is_same_bitmap(dest, displayed_video_bitmap)) psp_draw_to_screen(); source->vtable->do_stretch_blit = psp_do_stretch_blit8; }
/* draws one of the ready, steady, go messages */ static void draw_intro_item(int item, int size) { BITMAP *b = (BITMAP *) data[item].dat; int w = MIN(SCREEN_W, (SCREEN_W * 2 / size)); int h = SCREEN_H / size; clear_bitmap(screen); stretch_blit(b, screen, 0, 0, b->w, b->h, (SCREEN_W - w) / 2, (SCREEN_H - h) / 2, w, h); }
void distort_blit(BITMAP* src, BITMAP* dst, int sx, int sy, int dx, int dy, int w, int h) { float k = h / 6.2831 / 2; for (int y = 0; y < h; y++) { float v = (cos(y / k) + 1) * (w / 5); stretch_blit(src, dst, int(sx + v/2), sy + y, int(w - v), 1, dx, dy + y, w, 1); } }
//fonction d'affichage du menu int menu_main() { // 0. déclaration des ressources BITMAP* back = NULL; BITMAP* buffer = NULL; t_button* game = NULL; t_button* quit = NULL; //t_button* options = NULL; int ret; // 1. chargement du fond : back = load_bitmap_check("res/menu/menu_fond.bmp"); // 2. création de la bitmap générale : buffer = create_bitmap(back->w, back->h); // 3. création des bouttons : game = button_create("res/menu/b_main_jouer_off.bmp", "res/menu/b_main_jouer_on.bmp", 100, 100); quit = button_create("res/menu/b_main_quitter_off.bmp", "res/menu/b_main_quitter_on.bmp", 800, 600); //option = button_create_m("res/menu/b_main_options_off.bmp", "res/menu/b_main_options_on.bmp", 300, 500); // 4. lancement de la routine d'affichage : do { // 4.1 on met à jouer les bouttons button_maj(game); button_maj(quit); //button_maj(options); // 4.2 on blit les images sur le buffer : blit(back, buffer, 0, 0, 0, 0, back->w, back->h); button_blit(game, buffer); button_blit(quit, buffer); // 4.3 on test si un des bouttons a été cliqué : ret = 0; if(button_is_clicked(game)) ret = GAME; if(button_is_clicked(quit)) ret = QUIT; //if(button_is_clicked(option)) option(); // 4.4 on affiche le menu à l'écran : stretch_blit(buffer, screen, 0, 0, buffer->w, buffer->h, 0, 0, SCREEN_W, SCREEN_H); }while(ret == 0); // 5. on détruit les images : destroy_bitmap(back); destroy_bitmap(buffer); button_destroy(quit); button_destroy(game); // 6. on retourne la valeur de l'utilisateur return ret; }
void blit_resize( BITMAP* *bmpold, int wnew, int hnew) { STACKTRACE; //int wold = (*bmpold)->w; //int hold = (*bmpold)->h; BITMAP *bmpnew = create_bitmap(wnew, hnew); stretch_blit(*bmpold, bmpnew, 0, 0, (*bmpold)->w, (*bmpold)->h, 0, 0, bmpnew->w, bmpnew->h); destroy_bitmap(*bmpold); *bmpold = bmpnew; // point to the scaled bitmap ! }
void Bitmap::StretchBlt(Bitmap *src, const Rect &src_rc, const Rect &dst_rc, BitmapMaskOption mask) { BITMAP *al_src_bmp = src->_alBitmap; if (mask == kBitmap_Transparency) { masked_stretch_blit(al_src_bmp, _alBitmap, src_rc.Left, src_rc.Top, src_rc.GetWidth(), src_rc.GetHeight(), dst_rc.Left, dst_rc.Top, dst_rc.GetWidth(), dst_rc.GetHeight()); } else { stretch_blit(al_src_bmp, _alBitmap, src_rc.Left, src_rc.Top, src_rc.GetWidth(), src_rc.GetHeight(), dst_rc.Left, dst_rc.Top, dst_rc.GetWidth(), dst_rc.GetHeight()); } }
void Bitmap::StretchBlt(Bitmap *src, const Rect &dst_rc, BitmapMaskOption mask) { BITMAP *al_src_bmp = src->_alBitmap; // WARNING: For some evil reason Allegro expects dest and src bitmaps in different order for blit and draw_sprite if (mask == kBitmap_Transparency) { stretch_sprite(_alBitmap, al_src_bmp, dst_rc.Left, dst_rc.Top, dst_rc.GetWidth(), dst_rc.GetHeight()); } else { stretch_blit(al_src_bmp, _alBitmap, 0, 0, al_src_bmp->w, al_src_bmp->h, dst_rc.Left, dst_rc.Top, dst_rc.GetWidth(), dst_rc.GetHeight()); } }
void BlitToScreen(void) { if (in_gui) { float x_ratio = (float)BUFFER_WIDTH / (float)SCREEN_W; float y_ratio = (float)BUFFER_HEIGHT / (float)SCREEN_H; int mx = (int)((float)mouse_x * x_ratio); int my = (int)((float)mouse_y * y_ratio); draw_sprite(buffer, mouse_sprite, mx, my); } if (SCREEN_W == BUFFER_WIDTH && SCREEN_H == BUFFER_HEIGHT) { blit(buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); } else { stretch_blit(buffer, screen, 0, 0, BUFFER_WIDTH, BUFFER_HEIGHT, 0, 0, SCREEN_W, SCREEN_H); } }
void renderDDRComboNum(int num, int size, int color, int x, int y) { static int heights[] = { 43, 40, 48, 56, 64 }; // copy to a temporary space, maybe scale there, then do a transparent blit clear_to_color(rm.m_temp64, 0x00000000); // argb format for the color if ( size == 0 ) { blit(m_comboNums, rm.m_temp64, num*32, color*43, 0, 0, 32, 43); } else { stretch_blit(m_comboNums, rm.m_temp64, num*32, color*43, 32, 43, 0, 0, 32, heights[size]); } draw_trans_sprite(rm.m_backbuf, rm.m_temp64, x, y-heights[size]); }
void DrawMainWindow(void) { rectfill(buffer,MAINWINDX,MAINWINDY,MAINWINDLARGH, MAINWINDALT,BACKG_COL); for(i=0,y=0,k=0;i<NSPRITEY;i++,y+=MUNITY){ for(j=0,x=0;j<NSPRITEX;j++,x+=MUNITX,k++){ stretch_blit(sprites[livello.retsprite(k)], buffer,0,0,UNITX,UNITY,x,y,MUNITX,MUNITY); } } rect(buffer,cursorx,cursory,cursorx+MUNITX-1,cursory+MUNITY-1, CURS_COL); return; }
//Samantha int dispMainMenu(){ BITMAP *background = NULL; BITMAP *buffer = NULL; buffer = create_bitmap(SCREEN_W, SCREEN_H); clear_to_color(buffer, makecol(0,0,0)); background = loadBMP("background.bmp"); stretch_blit(background, buffer, 0, 0, background->w, background->h, 0, 0, SCREEN_W, SCREEN_H); blit(buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); while(!key[KEY_SPACE] || !key[KEY_ESC]){ if (key[KEY_SPACE]) { return 0; } } return 0; }
int theora_playing_callback(BITMAP *theoraBuffer) { if (theoraBuffer == NULL) { // No video, only sound return check_if_user_input_should_cancel_video(); } int drawAtX = 0, drawAtY = 0; if (fli_ddb == NULL) { fli_ddb = gfxDriver->CreateDDBFromBitmap(theoraBuffer, false, true); } if (stretch_flc) { drawAtX = scrnwid / 2 - fliTargetWidth / 2; drawAtY = scrnhit / 2 - fliTargetHeight / 2; if (!gfxDriver->HasAcceleratedStretchAndFlip()) { stretch_blit(theoraBuffer, fli_target, 0, 0, BMP_W(theoraBuffer), BMP_H(theoraBuffer), drawAtX, drawAtY, fliTargetWidth, fliTargetHeight); gfxDriver->UpdateDDBFromBitmap(fli_ddb, fli_target, false); drawAtX = 0; drawAtY = 0; } else { gfxDriver->UpdateDDBFromBitmap(fli_ddb, theoraBuffer, false); fli_ddb->SetStretch(fliTargetWidth, fliTargetHeight); } } else { gfxDriver->UpdateDDBFromBitmap(fli_ddb, theoraBuffer, false); drawAtX = scrnwid / 2 - BMP_W(theoraBuffer) / 2; drawAtY = scrnhit / 2 - BMP_H(theoraBuffer) / 2; } gfxDriver->DrawSprite(drawAtX, drawAtY, fli_ddb); render_to_screen(virtual_screen, 0, 0); update_polled_stuff_and_crossfade (); return check_if_user_input_should_cancel_video(); }
void Alleg4Display::flip(const gfx::Rect& bounds) { if (is_display_resize_awaiting()) return; BITMAP* bmp = reinterpret_cast<BITMAP*>(m_surface->nativeHandle()); if (m_scale == 1) { blit(bmp, screen, bounds.x, bounds.y, bounds.x, bounds.y, bounds.w, bounds.h); } else { stretch_blit(bmp, screen, bounds.x, bounds.y, bounds.w, bounds.h, bounds.x*m_scale, bounds.y*m_scale, bounds.w*m_scale, bounds.h*m_scale); } }
static long ipp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { int ret = 0; switch (cmd) { case IPP_BLIT_SYNC: case IPP_BLIT_ASYNC: ret = stretch_blit(arg, cmd); break; case IPP_GET_RESULT: ret = ipp_get_result(arg); break; default: ERR("unknown ioctl cmd!\n"); ret = -EINVAL; break; } return ret; }