| 1032 | |
| 1033 | |
| 1034 | void Image::MultiSurfaceCreateAltMipmapPicture(const teList<tLayer>& layers) |
| 1035 | { |
| 1036 | tAssert(!layers.IsEmpty()); |
| 1037 | |
| 1038 | int width = 0; |
| 1039 | for (tLayer* layer = layers.First(); layer; layer = layer->Next()) |
| 1040 | width += layer->Width; |
| 1041 | int height = layers.First()->Height; |
| 1042 | |
| 1043 | AltPicture.Set(width, height, tPixel4b::transparent); |
| 1044 | int originY = 0; |
| 1045 | int originX = 0; |
| 1046 | for (tLayer* mipPic = layers.First(); mipPic; mipPic = mipPic->Next()) |
| 1047 | { |
| 1048 | for (int y = 0; y < mipPic->Height; y++) |
| 1049 | { |
| 1050 | for (int x = 0; x < mipPic->Width; x++) |
| 1051 | { |
| 1052 | tPixel4b pixel = mipPic->GetPixel(x, y); |
| 1053 | AltPicture.SetPixel(originX + x, y, pixel); |
| 1054 | } |
| 1055 | } |
| 1056 | originX += mipPic->Width; |
| 1057 | } |
| 1058 | AltPictureTyp = AltPictureType::MipmapSideBySide; |
| 1059 | } |
| 1060 | |
| 1061 | |
| 1062 | bool Image::Unload(bool force) |