Skip to content

Commit

Permalink
noicon config
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Aug 10, 2020
1 parent f57ce4f commit 6bbabdb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include $(DEVKITPRO)/libnx/switch_rules
#---------------------------------------------------------------------------------
VERSION_MAJOR := 3
VERSION_MINOR := 6
VERSION_MICRO := 3
VERSION_MICRO := 4
NIGHTLY :=

APP_TITLE := EdiZon SE
Expand Down
10 changes: 6 additions & 4 deletions include/guis/gui_cheats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ class GuiCheats : public Gui
#define MAX_POINTER_DEPTH 12 // up to 4 seems OK with forward only search took 94s. 215s for big dump
#define MAX_POINTER_RANGE 0x2000
#define MAX_NUM_POINTER_OFFSET 30
#define HAVESAVE true
#define HAVESAVE m_havesave
bool m_havesave = true;
void iconloadcheck();
struct PointerSearch_state
{
u64 depth = 0; // depth and index[depth] is where the search is at, pointersearch2 will increment depth and call itself with nexttarget
Expand Down Expand Up @@ -209,7 +211,7 @@ class GuiCheats : public Gui
bool getinput(std::string headerText, std::string subHeaderText, std::string initialText, searchValue_t *searchValue);
bool addcodetofile(u64 index);
bool dumpcodetofile();
void reloadcheats();
void reloadcheats();
bool reloadcheatsfromfile(u8 *buildID, u64 titleID);
bool addstaticcodetofile(u64 index);
void PSsaveSTATE();
Expand Down Expand Up @@ -245,8 +247,8 @@ class GuiCheats : public Gui
searchMode_t searchMode, MemoryDump **displayDump);

void searchMemoryAddressesSecondary2(Debugger *debugger, searchValue_t searchValue1,
searchValue_t searchValue2, searchType_t searchType,
searchMode_t searchMode, MemoryDump **displayDump);
searchValue_t searchValue2, searchType_t searchType,
searchMode_t searchMode, MemoryDump **displayDump);

void searchMemoryValuesPrimary(Debugger *debugger, searchType_t searchType, searchMode_t searchMode,
searchRegion_t searchRegion, MemoryDump **displayDump, std::vector<MemoryInfo> memInfos);
Expand Down
14 changes: 12 additions & 2 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ GuiCheats::GuiCheats() : Gui()

_moveLonelyCheats(m_buildID, m_debugger->getRunningApplicationTID());
// reloadcheatsfromfile(m_buildID, m_debugger->getRunningApplicationTID());
dumpcodetofile();
dumpcodetofile();
iconloadcheck();

dmntchtGetCheatCount(&m_cheatCnt);

Expand Down Expand Up @@ -5126,6 +5127,15 @@ void GuiCheats::reloadcheats()
dmntchtGetCheats(m_cheats, m_cheatCnt, 0, &m_cheatCnt);
}
}
void GuiCheats::iconloadcheck()
{
std::stringstream filenoiconStr;
filenoiconStr << EDIZON_DIR "/noicon.txt";
if (access(filenoiconStr.str().c_str(), F_OK) == 0)
{
m_havesave = false;
}
}
bool GuiCheats::dumpcodetofile()
{
std::stringstream buildIDStr;
Expand Down Expand Up @@ -5170,7 +5180,7 @@ bool GuiCheats::dumpcodetofile()
T = (m_cheats[i].definition.opcodes[j] >> 20) & 0xF;
u8 X = (m_cheats[i].definition.opcodes[j] >> 8) & 0xF;
if (opcode == 0xC0)
{
{
opcode = opcode * 16 + X;
}
}
Expand Down

0 comments on commit 6bbabdb

Please sign in to comment.