MCPcopy Create free account
hub / github.com/clementgallet/libTAS / findPointerChain

Method findPointerChain

src/program/ui/PointerScanModel.cpp:131–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void PointerScanModel::findPointerChain(uintptr_t addr, int ml, int max_offset)
132{
133 static uint64_t last_scan_frame = 1 << 30;
134 /* Don't locate pointers again if this is the same frame */
135 if (last_scan_frame != context->framecount) {
136 locatePointers();
137 last_scan_frame = context->framecount;
138 }
139
140 beginResetModel();
141
142 max_level = ml;
143 pointer_chains.clear();
144 int offsets[10];
145
146 // std::cout << "max offset " << max_offset << std::endl;
147
148 recursiveFind(addr, 0, offsets, max_offset);
149
150 /* Sort pointers so that we can intersect with saved pointers */
151 std::sort(pointer_chains.begin(), pointer_chains.end());
152
153 endResetModel();
154}
155
156void PointerScanModel::recursiveFind(uintptr_t addr, int level, int offsets[], int max_offset)
157{

Callers 1

slotSearchMethod · 0.80

Calls 3

clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected