MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / parseCTFile

Method parseCTFile

Source/CheatEngineParser/CheatEngineParser.cpp:35–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35MemWatchTreeNode* CheatEngineParser::parseCTFile(QIODevice* CTFileIODevice,
36 const bool useDolphinPointer)
37{
38 m_xmlReader->setDevice(CTFileIODevice);
39
40 if (m_xmlReader->readNextStartElement())
41 {
42 if (m_xmlReader->name() == QString("CheatTable"))
43 {
44 MemWatchTreeNode* rootNode = new MemWatchTreeNode(nullptr);
45 parseCheatTable(rootNode, useDolphinPointer);
46 if (m_xmlReader->hasError())
47 {
48 m_errorMessages = m_xmlReader->errorString();
49 m_criticalErrorOccured = true;
50 return nullptr;
51 }
52 if (!m_errorMessages.isEmpty())
53 {
54 if (m_errorMessages.endsWith("\n\n"))
55 m_errorMessages.remove(m_errorMessages.length() - 2, 2);
56 }
57 return rootNode;
58 }
59 }
60
61 m_errorMessages = "The file provided is not a valid CT file";
62 m_criticalErrorOccured = true;
63 return nullptr;
64}
65
66MemWatchTreeNode* CheatEngineParser::parseCheatTable(MemWatchTreeNode* rootNode,
67 const bool useDolphinPointer)

Callers 1

importRootFromCTFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected