5 #include "GVOWorldMap.h"
10 bool GVOWorldMap::loadFromFile( const std::wstring& fileNmee )
13 std::wstring filePath;
15 filePath = g_makeFullPath( fileNmee );
16 if ( !workImage.loadFromFile( filePath.c_str() ) ) {
19 m_mapImage.copy( workImage );
25 POINT GVOWorldMap::imageCoordFromWorldCoord( const POINT& worldCoord ) const
27 const double xNormPos = worldCoord.x / (double)k_worldWidth;
28 const double yNormPos = worldCoord.y / (double)k_worldHeight;
29 const POINT worldPosInImage = {
30 LONG( m_mapImage.width() * xNormPos ),
31 LONG( m_mapImage.height() * yNormPos )
33 return worldPosInImage;