public void ShutDown() { // Release the point bitmap object. Point?.Shutdown(); Point = null; // Release the border bitmap object. Border?.Shutdown(); Border = null; // Release the mini-map bitmap object. MiniMapBitmap?.Shutdown(); MiniMapBitmap = null; }
// Methods public bool Initialize(Device device, IntPtr windowHandler, int screenWidth, int screenHeight, Matrix viewMatrix, float terrainWidth, float terrainHeight) { // Initialize the location of the mini-map on the screen. m_MapLocationX = 150; m_MapLocationY = 75; // Set the size of the mini-map. m_MapSizeX = 150.0f; m_MapSizeY = 150.0f; // Store the base view matrix. ViewMatrix = viewMatrix; // Store the terrain size. m_TerrainWidth = terrainWidth; m_TerrainHeight = terrainHeight; // Create the mini-map bitmap object. MiniMapBitmap = new DBitmap(); // Initialize the mini-map bitmap object. if (!MiniMapBitmap.Initialize(device, screenWidth, screenHeight, "colorm01.bmp", 150, 150)) { return(false); } // Create the border bitmap object. Border = new DBitmap(); // Initialize the border bitmap object. if (!Border.Initialize(device, screenWidth, screenHeight, "border01.bmp", 154, 154)) { return(false); } // Create the point bitmap object. Point = new DBitmap(); // Initialize the point bitmap object. if (!Point.Initialize(device, screenWidth, screenHeight, "point01.bmp", 3, 3)) { return(false); } return(true); }