Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string getobj () //if previously unmatched, searches through object map for objects in top left/bottom left memory quarters, finally NO_MATCH is returned
- {
- objtop = 0;
- objbot = 0;
- int lastpixel = objval[63];
- for (int i = 0; i < 64; i++)
- {
- if (i < 32) { objtop *= 2; }
- else { objbot *= 2; }
- if ((objval[i] - lastpixel) >= 0)
- {
- if (i < 32) { objtop++; }
- else { objbot++; }
- }
- lastpixel = objval[i];
- }
- it = objmap.find(objtop);
- if (it != objmap.end()) { return it->second; }
- it = objmap.find(objbot);
- if (it != objmap.end()) { return it->second; }
- return "NO_MATCH";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement