| 925 | } |
| 926 | |
| 927 | void ExportWMF(const char* name, bool grid) |
| 928 | { |
| 929 | GDebugger.PauseCheckingAlive(); |
| 930 | |
| 931 | RECT rect; |
| 932 | rect.left = 0; |
| 933 | rect.right = toInt(Coef * LandSize); |
| 934 | rect.top = 0; |
| 935 | rect.bottom = toInt(Coef * LandSize); |
| 936 | RString description = "Cold War Assault Map"; |
| 937 | HDC hDC = CreateEnhMetaFile(nullptr, name, &rect, description); |
| 938 | SetMapMode(hDC, MM_HIMETRIC); |
| 939 | SetBkMode(hDC, TRANSPARENT); |
| 940 | |
| 941 | brushSea = CreateSolidBrush(colorSea); |
| 942 | brushLand = CreateSolidBrush(colorLand); |
| 943 | brushForest = CreateSolidBrush(colorForest); |
| 944 | penForest = CreatePen(PS_SOLID, 1, colorForestBorder); |
| 945 | penRoads = CreatePen(PS_SOLID, 1, colorRoads); |
| 946 | penCountlines = CreatePen(PS_SOLID, 1, colorCountlines); |
| 947 | penCountlinesWater = CreatePen(PS_SOLID, 1, colorCountlinesWater); |
| 948 | penGrid = CreatePen(PS_SOLID, 1, colorGrid); |
| 949 | penSpot = CreatePen(PS_SOLID, 1, colorSpot); |
| 950 | |
| 951 | #if DRAW_BITMAPS |
| 952 | const ParamEntry& cls = Res >> "RscMapControl"; |
| 953 | infoTree.Load(cls >> "Tree"); |
| 954 | infoSmallTree.Load(cls >> "SmallTree"); |
| 955 | infoBush.Load(cls >> "Bush"); |
| 956 | infoChurch.Load(cls >> "Church"); |
| 957 | infoChapel.Load(cls >> "Chapel"); |
| 958 | infoCross.Load(cls >> "Cross"); |
| 959 | infoRock.Load(cls >> "Rock"); |
| 960 | infoBunker.Load(cls >> "Bunker"); |
| 961 | infoFortress.Load(cls >> "Fortress"); |
| 962 | infoFountain.Load(cls >> "Fountain"); |
| 963 | infoViewTower.Load(cls >> "ViewTower"); |
| 964 | infoLighthouse.Load(cls >> "Lighthouse"); |
| 965 | infoQuay.Load(cls >> "Quay"); |
| 966 | infoFuelstation.Load(cls >> "Fuelstation"); |
| 967 | infoHospital.Load(cls >> "Hospital"); |
| 968 | CreateBitmap(hDC, infoTree, bmpTree, maskTree); |
| 969 | CreateBitmap(hDC, infoSmallTree, bmpSmallTree, maskSmallTree); |
| 970 | CreateBitmap(hDC, infoBush, bmpBush, maskBush); |
| 971 | CreateBitmap(hDC, infoChurch, bmpChurch, maskChurch); |
| 972 | CreateBitmap(hDC, infoChapel, bmpChapel, maskChapel); |
| 973 | CreateBitmap(hDC, infoCross, bmpCross, maskCross); |
| 974 | CreateBitmap(hDC, infoRock, bmpRock, maskRock); |
| 975 | CreateBitmap(hDC, infoBunker, bmpBunker, maskBunker); |
| 976 | CreateBitmap(hDC, infoFortress, bmpFortress, maskFortress); |
| 977 | CreateBitmap(hDC, infoFountain, bmpFountain, maskFountain); |
| 978 | CreateBitmap(hDC, infoViewTower, bmpViewTower, maskViewTower); |
| 979 | CreateBitmap(hDC, infoLighthouse, bmpLighthouse, maskLighthouse); |
| 980 | CreateBitmap(hDC, infoQuay, bmpQuay, maskQuay); |
| 981 | CreateBitmap(hDC, infoFuelstation, bmpFuelstation, maskFuelstation); |
| 982 | CreateBitmap(hDC, infoHospital, bmpHospital, maskHospital); |
| 983 | CreateBitmap(hDC, infoBusStop, bmpBusStop, maskBusStop); |
| 984 | #endif |
no test coverage detected