Gruppe22.Client.Mainmap._screen2map C# (CSharp) Method

_screen2map() public static method

Determine tile based on coordinates of point
public static _screen2map ( Backend screenC, bool tall = false ) : Backend.Coords
screenC Backend
tall bool
return Backend.Coords
        public static Backend.Coords _screen2map(Backend.Coords screenC, bool tall = false)
        {
            // TODO: This does not work perfectly yet. Check the formula!
            screenC.x -= 32;
            screenC.y -= 48;
            return new Backend.Coords((int)Math.Ceiling((float)screenC.x / 128 - (float)screenC.y / 96)
                                    , (int)Math.Ceiling((float)screenC.x / 128 + (float)screenC.y / 96));
        }

Same methods

Mainmap::_screen2map ( int x, int y, bool tall = false ) : Backend.Coords