| 925 | } |
| 926 | |
| 927 | void CStaticMapMain::DrawInfo() |
| 928 | { |
| 929 | if (_scaleX > 0.2) |
| 930 | { |
| 931 | return; |
| 932 | } |
| 933 | |
| 934 | float coef = 100.0; // width of field in global coord. |
| 935 | float invCoef = 0.01; // 1.0 / coef; |
| 936 | |
| 937 | int xFrom = toIntFloor(-_mapX * _scaleX * coef); |
| 938 | int zFrom = toIntFloor((_invScaleY - (_h - _mapY)) * _scaleY * coef); |
| 939 | int xTo = toIntFloor((_w - _mapX) * _scaleX * coef); |
| 940 | int zTo = toIntFloor((_invScaleY - (-_mapY)) * _scaleY * coef); |
| 941 | |
| 942 | float xBeg = _x + _mapX + xFrom * _invScaleX * invCoef; |
| 943 | float zBeg = _y + _mapY + (_invScaleY - zFrom * _invScaleY * invCoef); |
| 944 | float xFld = _invScaleX * invCoef; |
| 945 | float zFld = _invScaleY * invCoef; |
| 946 | |
| 947 | float zAct = zBeg; |
| 948 | for (int z = zFrom; z <= zTo; z++) |
| 949 | { |
| 950 | float xAct = xBeg; |
| 951 | for (int x = xFrom; x <= xTo; x++) |
| 952 | { |
| 953 | DrawInfo(xAct, zAct - zFld, xFld, zFld, x, z); |
| 954 | xAct += xFld; |
| 955 | } |
| 956 | zAct -= zFld; |
| 957 | } |
| 958 | } |
| 959 | |
| 960 | void CStaticMapMain::DrawInfo(float x, float y, float xStep, float yStep, int i, int j) |
| 961 | { |
nothing calls this directly
no test coverage detected