Skip to content

Commit

Permalink
Added fully support of all AdventureMode Map-Items
Browse files Browse the repository at this point in the history
Added support for changing all AdventureMode-Map Items (also Twilight
and Termina Map)
Change Version
  • Loading branch information
nedron92 committed Apr 4, 2016
1 parent dfc6bbd commit c637be2
Show file tree
Hide file tree
Showing 16 changed files with 183 additions and 19 deletions.
Binary file modified ZeldaHWLSaveEditor.v12.suo
Binary file not shown.
Binary file modified source/console/ZeldaHWLSaveEditorConsole.rc
Binary file not shown.
14 changes: 11 additions & 3 deletions source/console/main.cpp
Expand Up @@ -31,7 +31,7 @@ int main()

while (1)
{
cout << "Hyrule Warriors Legends - SaveEditor, V1.1" << endl;
cout << "Hyrule Warriors Legends - SaveEditor, V1.2" << endl;
cout << "__________________________________________" << endl << endl;

cout << "Menue: " << endl;
Expand Down Expand Up @@ -64,7 +64,7 @@ int main()
}
catch (HWLSaveEdit::HWLException &e)
{
cout << "Hyrule Warriors Legends - SaveEditor, V1.1" << endl;
cout << "Hyrule Warriors Legends - SaveEditor, V1.2" << endl;
cout << "__________________________________________" << endl << endl;
save = nullptr;
cout << e.what() << endl;
Expand Down Expand Up @@ -838,6 +838,8 @@ void get_amItem_menu()
cout << "2 - Maximize Adventure-Map Items" << endl;
cout << "3 - Maximize GreatSea-Map Items" << endl;
cout << "4 - Maximize MasterQuest-Map Items" << endl;
cout << "5 - Maximize Twilight-Map Items" << endl;
cout << "6 - Maximize Termina-Map Items" << endl;
cout << "0 - back" << endl;
cout << "Your choose: ";
cin >> c_choose;
Expand Down Expand Up @@ -892,13 +894,19 @@ void change_amItem_values(int i_choose)
case 2:
case 3:
case 4:
case 5:
case 6:
{
if (i_choose == 2)
cout << "Maximize Value of all Adventure-Map Items" << endl;
else if (i_choose == 3)
cout << "Maximize Value of all GreatSea-Map Items" << endl;
else
else if (i_choose == 4)
cout << "Maximize Value of all MasterQuest-Map Items" << endl;
else if (i_choose == 5)
cout << "Maximize Value of all Twilight-Map Items" << endl;
else
cout << "Maximize Value of all Termina-Map Items" << endl;

for (int i = 0; i < HWLSaveEdit::HWLAdventureModeItems::amItemPerMapMax; i++)
{
Expand Down
8 changes: 8 additions & 0 deletions source/core/HWLAdventureModeItems.cpp
Expand Up @@ -91,6 +91,14 @@ string HWLAdventureModeItems::get_type(bool b_get_string)
return "MasterQuest-Map Item ";
break;

case 3:
return "Twilight-Map Item ";
break;

case 4:
return "Termina-Map Item ";
break;

default:
return to_string(i_type);
}
Expand Down
71 changes: 55 additions & 16 deletions source/core/HWLSaveEditor.cpp
Expand Up @@ -337,14 +337,24 @@ const vector<int> HWLSaveEditor::amItemOffsetBegin =
{
0x2EFA, //Start of Adventure-Map Items
0xEB73, //Start of GreatSea-Map Items (WindWaker and so on)
0x7A52, //Start of MasterQuest-Map Items
0x7A52, //Start of MasterQuest-Map Items
0xA00A, //Start of Twilight-Map Items (Lantern and so on)
0xC5BE //Start of Termina-Map Items (Song of Time and so on)

};

/* @var amItemOffsetBegin vector for holding the offsets-begin for AdventureMode items */
const vector<int> HWLSaveEditor::amItemOffsetBeginSpecial =
{
0xEB56, //Compass of GreatSea-Map
0xEB5F //Hookshot of GreatSea-Map
0xEB5F, //Hookshot of GreatSea-Map

0x9FFE, //Compass of Twilight-Map (+1 = Bombs)
0xA003, //Waterbombs of Twilight-Map (+1 = Digging Mitts)

0xC5AA, //Compass of Termina-Map (+1 = Bombs)
0xC5B1, //Ice Arrow of Termina-Map

};


Expand Down Expand Up @@ -391,32 +401,30 @@ const vector<string> HWLSaveEditor::vs_amItems =
"Goddess's Harp", //MasterQuest-Map Items End

"Compass", //Twilight-Map Items Begin
"Lantern",
"Bombs",
"Water Bombs",
"Digging Mitts",
"Lantern",
"Jar",
"Fishing Rod",
"Clawshot",
"Spinner",
"Water Bombs",
"Digging Mitts",
"Ooccoo",
"Tears of Light",
"Tears of Twilight", //Twilight-Map Items End

"Compass", //Termina-Map Items Begin
"Bombs",
"Ice Arrow",
"Song of Time",
"Song of Time (Inv.)",
"Deku Stick",
"Deku Mask",
"Goron Mask",
"Zora Mask",
"Mask of Truth",
"Majora's Mask",
"Deku Stick",
"Bombs",
"Ice Arrow",
"Song of Time",
"Inverted Song of Time",
"Giants" //Termina-Map Items End


};

HWLSaveEditor::HWLSaveEditor(string s_filepathname)
Expand Down Expand Up @@ -571,17 +579,48 @@ void HWLSaveEditor::calc_amItems()
if (i_type == this->amItemOffsetBegin.size())
break;

if (i == 12)
switch (i)
{
case 12:
i_offset = this->amItemOffsetBeginSpecial[0];
else
break;

case 36:
i_offset = this->amItemOffsetBeginSpecial[2];
break;

case 48:
i_offset = this->amItemOffsetBeginSpecial[4];
break;

default:
i_offset = this->amItemOffsetBegin[i_type];
break;
}

}

if (i == 13)
switch (i)
{
case 13:
i_offset = this->amItemOffsetBeginSpecial[1];
else if (i == 14)
break;

case 14:
case 40:
case 51:
i_offset = this->amItemOffsetBegin[i_type];
break;

case 38:
i_offset = this->amItemOffsetBeginSpecial[3];
break;

case 50:
i_offset = this->amItemOffsetBeginSpecial[5];
break;

}

shared_ptr<HWLAdventureModeItems> hwlami_tmp = make_shared<HWLAdventureModeItems>(vs_amItems[i], i_offset, i_type);
this->m_amItem[i] = hwlami_tmp;
Expand Down
27 changes: 27 additions & 0 deletions source/gui/ZeldaEditAdventureModeItem.cpp
Expand Up @@ -131,6 +131,8 @@ BEGIN_MESSAGE_MAP(CZeldaEditAdventureModeItem, CDialogEx)
ON_COMMAND(ID_MENU_EDIT_AM_GSMAP, &CZeldaEditAdventureModeItem::OnMenuEditAmGsmap)
ON_COMMAND(ID_MENU_EDIT_AM_MQMAP, &CZeldaEditAdventureModeItem::OnMenuEditAmMqmap)
ON_BN_CLICKED(IDC_AMITEM_MAX_VALUE_MAP, &CZeldaEditAdventureModeItem::OnBnClickedAmitemMaxValueMap)
ON_COMMAND(ID_MENU_EDIT_AM_TLMAP, &CZeldaEditAdventureModeItem::OnMenuEditAmTlmap)
ON_COMMAND(ID_MENU_EDIT_AM_TMMAP, &CZeldaEditAdventureModeItem::OnMenuEditAmTmmap)
END_MESSAGE_MAP()


Expand Down Expand Up @@ -273,6 +275,30 @@ void CZeldaEditAdventureModeItem::OnMenuEditAmMqmap()

}

void CZeldaEditAdventureModeItem::OnMenuEditAmTlmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
if (this->i_type != 3)
{
CZeldaEditAdventureModeItem dlg(NULL, 3);
EndDialog(this->IDD);
dlg.DoModal();
}

}

void CZeldaEditAdventureModeItem::OnMenuEditAmTmmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
if (this->i_type != 4)
{
CZeldaEditAdventureModeItem dlg(NULL, 4);
EndDialog(this->IDD);
dlg.DoModal();
}
}



void CZeldaEditAdventureModeItem::calc_amItems()
{
Expand Down Expand Up @@ -346,3 +372,4 @@ void CZeldaEditAdventureModeItem::OnBnClickedAmitemMaxValueMap()
}

}

2 changes: 2 additions & 0 deletions source/gui/ZeldaEditAdventureModeItem.h
Expand Up @@ -50,4 +50,6 @@ class CZeldaEditAdventureModeItem : public CDialogEx
afx_msg void OnMenuEditAmGsmap();
afx_msg void OnMenuEditAmMqmap();
afx_msg void OnBnClickedAmitemMaxValueMap();
afx_msg void OnMenuEditAmTlmap();
afx_msg void OnMenuEditAmTmmap();
};
18 changes: 18 additions & 0 deletions source/gui/ZeldaEditCharaStatsDlg.cpp
Expand Up @@ -125,6 +125,8 @@ BEGIN_MESSAGE_MAP(CZeldaEditCharaStatsDlg, CDialogEx)
ON_BN_CLICKED(IDC_CHARA_MAX_EXP_ALL, &CZeldaEditCharaStatsDlg::OnBnClickedCharaMaxExpAll)
ON_BN_CLICKED(IDC_CHARA_MAX_ATK_ALL, &CZeldaEditCharaStatsDlg::OnBnClickedCharaMaxAtkAll)
ON_BN_CLICKED(IDC_CHARA_UNLOCK_ALL, &CZeldaEditCharaStatsDlg::OnBnClickedCharaUnlockAll)
ON_COMMAND(ID_MENU_EDIT_AM_TLMAP, &CZeldaEditCharaStatsDlg::OnMenuEditAmTlmap)
ON_COMMAND(ID_MENU_EDIT_AM_TMMAP, &CZeldaEditCharaStatsDlg::OnMenuEditAmTmmap)
END_MESSAGE_MAP()


Expand Down Expand Up @@ -417,6 +419,22 @@ void CZeldaEditCharaStatsDlg::OnMenuEditAmMqmap()
dlg.DoModal();
}

void CZeldaEditCharaStatsDlg::OnMenuEditAmTlmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 3);
EndDialog(this->IDD);
dlg.DoModal();
}

void CZeldaEditCharaStatsDlg::OnMenuEditAmTmmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 4);
EndDialog(this->IDD);
dlg.DoModal();
}


void CZeldaEditCharaStatsDlg::OnBnClickedCharaMaxExpAll()
{
Expand Down
2 changes: 2 additions & 0 deletions source/gui/ZeldaEditCharaStatsDlg.h
Expand Up @@ -47,5 +47,7 @@ class CZeldaEditCharaStatsDlg : public CDialogEx
afx_msg void OnBnClickedCharaMaxExpAll();
afx_msg void OnBnClickedCharaMaxAtkAll();
afx_msg void OnBnClickedCharaUnlockAll();
afx_msg void OnMenuEditAmTlmap();
afx_msg void OnMenuEditAmTmmap();
};

18 changes: 18 additions & 0 deletions source/gui/ZeldaEditFairyFoods.cpp
Expand Up @@ -118,6 +118,8 @@ BEGIN_MESSAGE_MAP(CZeldaEditFairyFoods, CDialogEx)
ON_BN_CLICKED(IDC_FAIRYFOOD_MAX_VALUE_PAGE, &CZeldaEditFairyFoods::OnBnClickedFairyfoodMaxValuePage)
ON_BN_CLICKED(IDC_FAIRYFOOD_MAX_VALUE_ALL, &CZeldaEditFairyFoods::OnBnClickedFairyfoodMaxValueAll)
ON_BN_CLICKED(IDC_FAIRYFOOD_MAX_VALUE_GRATITUDE, &CZeldaEditFairyFoods::OnBnClickedFairyfoodMaxValueGratitude)
ON_COMMAND(ID_MENU_EDIT_AM_TLMAP, &CZeldaEditFairyFoods::OnMenuEditAmTlmap)
ON_COMMAND(ID_MENU_EDIT_AM_TMMAP, &CZeldaEditFairyFoods::OnMenuEditAmTmmap)
END_MESSAGE_MAP()


Expand Down Expand Up @@ -341,6 +343,22 @@ void CZeldaEditFairyFoods::OnMenuEditAmMqmap()
dlg.DoModal();
}

void CZeldaEditFairyFoods::OnMenuEditAmTlmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 3);
EndDialog(this->IDD);
dlg.DoModal();
}

void CZeldaEditFairyFoods::OnMenuEditAmTmmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 4);
EndDialog(this->IDD);
dlg.DoModal();
}


void CZeldaEditFairyFoods::OnBnClickedFairyfoodMaxValuePage()
{
Expand Down
2 changes: 2 additions & 0 deletions source/gui/ZeldaEditFairyFoods.h
Expand Up @@ -51,4 +51,6 @@ class CZeldaEditFairyFoods : public CDialogEx
afx_msg void OnBnClickedFairyfoodMaxValuePage();
afx_msg void OnBnClickedFairyfoodMaxValueAll();
afx_msg void OnBnClickedFairyfoodMaxValueGratitude();
afx_msg void OnMenuEditAmTlmap();
afx_msg void OnMenuEditAmTmmap();
};
18 changes: 18 additions & 0 deletions source/gui/ZeldaEditGeneralDlg.cpp
Expand Up @@ -72,6 +72,8 @@ BEGIN_MESSAGE_MAP(CZeldaEditGeneralDlg, CDialogEx)
ON_COMMAND(ID_MENU_EDIT_AM_MQMAP, &CZeldaEditGeneralDlg::OnMenuEditAmMqmap)
ON_COMMAND(ID_MENU_EDIT_GENERAL, &CZeldaEditGeneralDlg::OnMenuEditGeneral)
ON_BN_CLICKED(IDC_RUBY_MAX, &CZeldaEditGeneralDlg::OnBnClickedRubyMax)
ON_COMMAND(ID_MENU_EDIT_AM_TLMAP, &CZeldaEditGeneralDlg::OnMenuEditAmTlmap)
ON_COMMAND(ID_MENU_EDIT_AM_TMMAP, &CZeldaEditGeneralDlg::OnMenuEditAmTmmap)
END_MESSAGE_MAP()


Expand Down Expand Up @@ -317,6 +319,22 @@ void CZeldaEditGeneralDlg::OnMenuEditAmMqmap()
dlg.DoModal();
}

void CZeldaEditGeneralDlg::OnMenuEditAmTlmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 3);
EndDialog(this->IDD);
dlg.DoModal();
}

void CZeldaEditGeneralDlg::OnMenuEditAmTmmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 4);
EndDialog(this->IDD);
dlg.DoModal();
}


void CZeldaEditGeneralDlg::OnMenuEditGeneral()
{
Expand Down
2 changes: 2 additions & 0 deletions source/gui/ZeldaEditGeneralDlg.h
Expand Up @@ -41,4 +41,6 @@ class CZeldaEditGeneralDlg : public CDialogEx
afx_msg void OnMenuEditAmMqmap();
afx_msg void OnMenuEditGeneral();
afx_msg void OnBnClickedRubyMax();
afx_msg void OnMenuEditAmTlmap();
afx_msg void OnMenuEditAmTmmap();
};
18 changes: 18 additions & 0 deletions source/gui/ZeldaEditMaterials.cpp
Expand Up @@ -151,6 +151,8 @@ BEGIN_MESSAGE_MAP(CZeldaEditMaterials, CDialogEx)
ON_COMMAND(ID_MENU_EDIT_AM_GSMAP, &CZeldaEditMaterials::OnMenuEditAmGsmap)
ON_COMMAND(ID_MENU_EDIT_AM_MQMAP, &CZeldaEditMaterials::OnMenuEditAmMqmap)
ON_BN_CLICKED(IDC_MATERIAL_MAX_VALUE_ALL, &CZeldaEditMaterials::OnBnClickedMaterialMaxValueAll)
ON_COMMAND(ID_MENU_EDIT_AM_TLMAP, &CZeldaEditMaterials::OnMenuEditAmTlmap)
ON_COMMAND(ID_MENU_EDIT_AM_TMMAP, &CZeldaEditMaterials::OnMenuEditAmTmmap)
END_MESSAGE_MAP()


Expand Down Expand Up @@ -424,6 +426,21 @@ void CZeldaEditMaterials::OnMenuEditAmMqmap()
dlg.DoModal();
}

void CZeldaEditMaterials::OnMenuEditAmTlmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 3);
EndDialog(this->IDD);
dlg.DoModal();
}

void CZeldaEditMaterials::OnMenuEditAmTmmap()
{
// TODO: Fügen Sie hier Ihren Befehlsbehandlungscode ein.
CZeldaEditAdventureModeItem dlg(NULL, 4);
EndDialog(this->IDD);
dlg.DoModal();
}

void CZeldaEditMaterials::OnBnClickedMaterialMaxValueAll()
{
Expand Down Expand Up @@ -463,3 +480,4 @@ void CZeldaEditMaterials::OnBnClickedMaterialMaxValueAll()
}

}

2 changes: 2 additions & 0 deletions source/gui/ZeldaEditMaterials.h
Expand Up @@ -51,4 +51,6 @@ class CZeldaEditMaterials : public CDialogEx
afx_msg void OnMenuEditAmGsmap();
afx_msg void OnMenuEditAmMqmap();
afx_msg void OnBnClickedMaterialMaxValueAll();
afx_msg void OnMenuEditAmTlmap();
afx_msg void OnMenuEditAmTmmap();
};
Binary file modified source/gui/ZeldaHWLSaveEditorGUI.rc
Binary file not shown.

0 comments on commit c637be2

Please sign in to comment.