97 {
98 size_t pos=cellCode.find("-");
99 std::string TILE=cellCode.substr(0,pos);
100 std::string TILEX=TILE.substr(0,TILE.size()/2);
101 std::string TILEY=TILE.substr(TILE.size()/2);
102 std::string QUAD;
103 char QUAD1,QUAD2;
104 std::istringstream stilex(TILEX);
105 std::istringstream stiley(TILEY);
106 int llx,lly;
107 stilex >> llx;
108 stiley >> lly;
109 llx*=getBaseSize();
110 lly*=getBaseSize();
111 switch((19-m_level)%3){
112 case(0):
113 assert(pos==std::string::npos);
114 break;
115 case(2):
116 assert(pos+1!=std::string::npos);
117 QUAD=cellCode.substr(pos+1);
118 QUAD2=QUAD.substr(1,1).c_str()[0];
119 switch(QUAD2){
120 case('A'):
121 break;
122 case('C'):
123 lly+=getBaseSize()/4;
124 break;
125 case('D'):
126 lly+=getBaseSize()/4;
127 case('B'):
128 llx+=getBaseSize()/4;
129 break;
130 }
131 case(1):
132 if(!QUAD.size()){
133 assert(pos+1!=std::string::npos);
134 QUAD=cellCode.substr(pos+1);
135 }
136 QUAD1=QUAD.substr(0,1).c_str()[0];
137 switch(QUAD1){
138 case('A'):
139 break;
140 case('C'):
141 lly+=getBaseSize()/2;
142 break;
143 case('D'):
144 lly+=getBaseSize()/2;
145 case('B'):
146 llx+=getBaseSize()/2;
147 break;
148 }
149 break;
150 }
151 ulx=llx;
152 uly=static_cast<int>(lly+getSize());
153 lrx=static_cast<int>(llx+getSize());
154 lry=lly;
155}