@@ -69,8 +69,6 @@ void NGAGE_DestroyTextureData(NGAGE_TextureData *data)
69
69
if (data) {
70
70
delete data->bitmap ;
71
71
data->bitmap = NULL ;
72
- delete data->mask ;
73
- data->mask = NULL ;
74
72
}
75
73
}
76
74
@@ -352,29 +350,7 @@ bool CRenderer::Copy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rec
352
350
if (phdata->bitmap ) {
353
351
TRect aSource (TPoint (srcrect->x , srcrect->y ), TSize (srcrect->w , srcrect->h ));
354
352
TPoint aDest (dstrect->x , dstrect->y );
355
-
356
- w = phdata->surface ->w ;
357
- pitch = phdata->surface ->pitch ;
358
- Uint16 *src = (Uint16 *)phdata->surface ->pixels ;
359
- Uint16 *mask = (Uint16 *)phdata->mask ->DataAddress ();
360
-
361
- for (int y = 0 ; y < srcrect->h ; ++y) {
362
- int src_y = srcrect->y + y;
363
- if (src_y < 0 || src_y >= phdata->surface ->h ) {
364
- continue ;
365
- }
366
- for (int x = 0 ; x < srcrect->w ; ++x) {
367
- int src_x = srcrect->x + x;
368
- if (src_x < 0 || src_x >= phdata->surface ->w ) {
369
- continue ;
370
- }
371
- Uint16 pixel = src[src_y * (pitch / 2 ) + src_x];
372
- Uint8 alpha = (pixel & 0xF000 ) >> 12 ;
373
- mask[src_y * w + src_x] = (alpha == 0 ) ? 0x0000 : 0xFFFF ;
374
- }
375
- }
376
-
377
- iRenderer->Gc ()->BitBltMasked (aDest, phdata->bitmap , aSource, phdata->mask , EFalse);
353
+ iRenderer->Gc ()->BitBlt (aDest, phdata->bitmap , aSource);
378
354
}
379
355
380
356
return true ;
@@ -440,29 +416,7 @@ bool CRenderer::CopyEx(SDL_Renderer *renderer, SDL_Texture *texture, const NGAGE
440
416
if (phdata->bitmap ) {
441
417
TRect aSource (TPoint (copydata->srcrect .x , copydata->srcrect .y ), TSize (copydata->srcrect .w , copydata->srcrect .h ));
442
418
TPoint aDest (copydata->dstrect .x , copydata->dstrect .y );
443
-
444
- w = phdata->surface ->w ;
445
- pitch = phdata->surface ->pitch ;
446
- Uint16 *src = (Uint16 *)phdata->surface ->pixels ;
447
- Uint16 *mask = (Uint16 *)phdata->mask ->DataAddress ();
448
-
449
- for (int y = 0 ; y < copydata->srcrect .h ; ++y) {
450
- int src_y = copydata->srcrect .y + y;
451
- if (src_y < 0 || src_y >= phdata->surface ->h ) {
452
- continue ;
453
- }
454
- for (int x = 0 ; x < copydata->srcrect .w ; ++x) {
455
- int src_x = copydata->srcrect .x + x;
456
- if (src_x < 0 || src_x >= phdata->surface ->w ) {
457
- continue ;
458
- }
459
- Uint16 pixel = src[src_y * (pitch / 2 ) + src_x];
460
- Uint8 alpha = (pixel & 0xF000 ) >> 12 ;
461
- mask[src_y * w + src_x] = (alpha == 0 ) ? 0x0000 : 0xFFFF ;
462
- }
463
- }
464
-
465
- iRenderer->Gc ()->BitBltMasked (aDest, phdata->bitmap , aSource, phdata->mask , EFalse);
419
+ iRenderer->Gc ()->BitBlt (aDest, phdata->bitmap , aSource);
466
420
}
467
421
468
422
return true ;
@@ -486,18 +440,6 @@ bool CRenderer::CreateTextureData(NGAGE_TextureData *aTextureData, const TInt aW
486
440
return false ;
487
441
}
488
442
489
- aTextureData->mask = new CFbsBitmap ();
490
- if (!aTextureData->mask ) {
491
- return false ;
492
- }
493
-
494
- error = aTextureData->mask ->Create (TSize (aWidth, aHeight), EColor4K);
495
- if (error != KErrNone) {
496
- delete aTextureData->mask ;
497
- aTextureData->mask = NULL ;
498
- return false ;
499
- }
500
-
501
443
return true ;
502
444
}
503
445
0 commit comments