- if (SelectionImages[0] == NULL) {
- // calculate big selection image from small one
-
- SelectionImages[0] = egCreateImage(ROW0_TILESIZE, ROW0_TILESIZE, TRUE);
- if (SelectionImages[0] == NULL) {
- egFreeImage(SelectionImages[1]);
- SelectionImages[1] = NULL;
- return;
- }
-
- DestPtr = SelectionImages[0]->PixelData;
- SrcPtr = SelectionImages[1]->PixelData;
- for (y = 0; y < ROW0_TILESIZE; y++) {
- if (y < (ROW1_TILESIZE >> 1))
- src_y = y;
- else if (y < (ROW0_TILESIZE - (ROW1_TILESIZE >> 1)))
- src_y = (ROW1_TILESIZE >> 1);
- else
- src_y = y - (ROW0_TILESIZE - ROW1_TILESIZE);
-
- for (x = 0; x < ROW0_TILESIZE; x++) {
- if (x < (ROW1_TILESIZE >> 1))
- src_x = x;
- else if (x < (ROW0_TILESIZE - (ROW1_TILESIZE >> 1)))
- src_x = (ROW1_TILESIZE >> 1);
- else
- src_x = x - (ROW0_TILESIZE - ROW1_TILESIZE);
-
- *DestPtr++ = SrcPtr[src_y * ROW1_TILESIZE + src_x];
- }
+ if (TempBigImage == NULL) {
+ if (LoadedSmallImage) {
+ // calculate big selection image from small one
+ TempBigImage = egCopyImage(TempSmallImage);
+ } else {
+ TempBigImage = egPrepareEmbeddedImage(&egemb_back_selected_big, TRUE);