├── .gitignore
├── README.md
├── ZeldaHWLSaveEditor.sln
├── ZeldaHWLSaveEditor.v12.suo
├── ZeldaHWLSaveEditor.vcxproj
├── ZeldaHWLSaveEditor.vcxproj.filters
├── ZeldaHWLSaveEditor.vcxproj.user
├── ZeldaHWLSaveEditorGUI.vcxproj
├── ZeldaHWLSaveEditorGUI.vcxproj.filters
├── ZeldaHWLSaveEditorGUI.vcxproj.user
├── settings.cfg
└── source
├── CMakeLists.txt
├── console
├── CMakeLists.txt
├── ZeldaHWLSaveEditorConsole.rc
├── main.cpp
└── resource.h
├── core
├── CMakeLists.txt
├── HWLAdventureModeItems.cpp
├── HWLAdventureModeItems.h
├── HWLAdventureModeMaps.cpp
├── HWLAdventureModeMaps.h
├── HWLConfig.cpp
├── HWLConfig.h
├── HWLException.cpp
├── HWLException.h
├── HWLFairy.cpp
├── HWLFairy.h
├── HWLFairyFood.cpp
├── HWLFairyFood.h
├── HWLGeneral.cpp
├── HWLGeneral.h
├── HWLHttp.cpp
├── HWLHttp.h
├── HWLMaterial.cpp
├── HWLMaterial.h
├── HWLPlayer.cpp
├── HWLPlayer.h
├── HWLSaveEditor.cpp
├── HWLSaveEditor.h
├── HWLSaveEditorCore.cpp
├── HWLSaveEditorCore.h
├── HWLWeapon.cpp
├── HWLWeapon.h
└── res
│ └── ZeldaHWLSaveEditorGUI.ico
├── gui
├── ZeldaAboutDlg.cpp
├── ZeldaAboutDlg.h
├── ZeldaCheckForUpdatesDlg.cpp
├── ZeldaCheckForUpdatesDlg.h
├── ZeldaConfigWeaponCopyDlg.cpp
├── ZeldaConfigWeaponCopyDlg.h
├── ZeldaEditAdventureModeItem.cpp
├── ZeldaEditAdventureModeItem.h
├── ZeldaEditAdventureModeMaps.cpp
├── ZeldaEditAdventureModeMaps.h
├── ZeldaEditCharaOverviewDlg.cpp
├── ZeldaEditCharaOverviewDlg.h
├── ZeldaEditCharaStatsDlg.cpp
├── ZeldaEditCharaStatsDlg.h
├── ZeldaEditCharaWeaponsDlg.cpp
├── ZeldaEditCharaWeaponsDlg.h
├── ZeldaEditFairyDlg.cpp
├── ZeldaEditFairyDlg.h
├── ZeldaEditFairyFoods.cpp
├── ZeldaEditFairyFoods.h
├── ZeldaEditGeneralDlg.cpp
├── ZeldaEditGeneralDlg.h
├── ZeldaEditMaterials.cpp
├── ZeldaEditMaterials.h
├── ZeldaHWLSaveEditorGUI.cpp
├── ZeldaHWLSaveEditorGUI.h
├── ZeldaHWLSaveEditorGUI.rc
├── res
│ └── ZeldaHWLSaveEditorGUI.rc2
├── resource.h
├── stdafx.cpp
├── stdafx.h
└── targetver.h
└── libs
├── CMakeLists.txt
└── HTTP_Client
├── API
├── HTTPClient.c
├── HTTPClient.h
├── HTTPClientAuth.c
├── HTTPClientAuth.h
├── HTTPClientCommon.h
├── HTTPClientString.c
├── HTTPClientString.h
├── HTTPClientWrapper.c
└── HTTPClientWrapper.h
├── CHTTP_Client.cpp
├── CHTTP_Client.h
├── CMakeLists.txt
└── License.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | *.aps
2 | *.aps
3 | *.aps
4 | *.aps
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://jenkins.nedron92.de/job/HWL_githubCompileAuto/)
2 |
3 | # HWL-SaveEditor (3DS)
4 | This is an Save-Editor for the game Hyrule Warriors Legends (Nintendo 3DS)
5 |
6 | It's written in C++ and with MS Visual Studio 2013. You need that compiler for compiling the gui. (MFC application).
7 | But there are also CMakeLists-files to compile the console-version under linux with cmake.
8 |
9 | The main-files are located at source/core (all main functions are located here).
10 |
11 | ## How to Build under Linux
12 | There are some prerequisites before you can compile it.
13 | Make sure, that you have `cmake`, `make`, `gcc` and `g++`.
14 | You need CMake >=2.8, GCC/G++ >= 5.0
15 |
16 | After that check compiling under linux is very easily.
17 | In terminal/console change to the source-directory and then run these commands:
18 | `mkdir output && cd output`
19 | `cmake ..`
20 | `make`
21 |
22 | The binary executable is within the `output`-dir under `bin`.
23 |
24 |
25 | ## Prerequisites
26 | You should have a Version of SaveDataFiler (or able to use .cia files on your 3DS), JK's Save Manager (.cia) or able to run homebrew to get your savefile of the game.
27 | Possible Homebrew for exporting a savefile: svdt, 3DS Save Manager and/or JK3DSTool (as a .3dsx file), search for it with your favourite search-engine ;)
28 | If you not able to run homebrew yet, then visit http://smealum.github.io/3ds/ for more information.
29 |
30 | ## How to use it?
31 | First, download the latest stable release!
32 | Once you have your savefile (normally called "zmha.bin"), copy to your PC, made a backup of that savefile before you edit anything, run the editor, open the savefile and change what you want, save the file, copy it back to your 3DS SD-Card and import it back with the programm, you used before to get the savefile.
33 |
34 |
35 | ## How to change the configfile (settings.cfg - since Version 3.1+)
36 | Open this file with your favourite text-editor like Wordpad or Notepad++.
37 | There some parameters you can change to change the behaviour of the editor itself:
38 | * `autoUpdateCheck` - a boolean (true/false) param. If its set to 'true', the editor check at every start if there is an new stable version and let you know if there is one. Default: false
39 | * `autoTrim` - a boolean (true/false) param. If its set to 'true', the editor will trim the current opened savefile if its too long (to avoid some errors). Default: true
40 | * `DlcSafetyCheck` - a boolean (true/false) param. If its set to 'true', the editor checks all things if there are compatible with your installed DLCs that were found. It will cut things, that you can't or should'nt edit without a specific DLC.
41 | Default: true (and only deactivate it, if the DLC-identification don't work correctly with your savefile, be careful).
42 | * `createBackupFileOnOpening` - a boolean (true/false) param. If its set to 'true', the editor create an automatically a backup-file of your opened savefile (if it's could successfully opened). Default: true
43 | * `openLastSaveFileOnStart` - a boolean (true/false) param. If its set to 'true', the editor will opened your last opened saveFile on the next start (you can define it yourself, see next).
44 | * `LastSaveFile` - a string (text) param. This parameter contain the path (normally the fullpath) to the last opened savefile.
45 | Something like: `C:\Users\da da\Desktop\zmha.bin`. Also relative paths will work. This parameter will be ignored if `openLastSaveFileOnStart` is deactivated (set to 'false'). Default: zmha.bin
46 | * `useHTTPProxy` - a boolean (true/false) param. If its set to 'true', the editor will use the specified proxy-settings. BUT only real HTTP-PROXIES are supported, no Socks-proxy. Default: false
47 | * `ProxyHost` - a string (text) param. This parameter contain the IP adress of your used proxy-server. Default: 127.0.0.1
48 | * `ProxyPort` - a string (text) param. This parameter contain the Port of your used proxy-server. Default: 8080
49 |
50 | If you have problems after editing your configfile, simply delete it. The editor will recognize it and will create a new default configfile on start.
51 |
52 | ## Nightly-Builds
53 | If you don't want to wait for a new stable-release, then you can check the nightly-build-server.
54 | It will build automatically windows- and linux-builds every night (about 3 o'clock CET) after there was a new commit to
55 | this repository.
56 | But use them on your own risk, the nightly-builds can be unstable and with more failures/bugs as a new release.
57 | You can download them on https://nightly.nedron92.de/hwl_save-editor/
58 |
59 |
60 | ## Questions?
61 | Ask me wherever you want, but basically at http://gbatemp.net/ (my name there is also nedron92).
62 | You can also ask your question within the main-thread:
63 | http://gbatemp.net/threads/release-hyrule-warriors-legends-save-editor-ntr-plugin.411349/
64 |
65 | ## Failures, Bugs etc.
66 | If you find any kind of failures, bugs and other then post it in the main-thread, which I named above.
67 | If you are a programmer, correct the mistake and send me a request here at github.
68 |
69 | ## Credits
70 | main-src (core/console/gui): nedron92, 2016
71 | lib/HTTP-Client: Eitan Michaelson, Bob Wirka, 2014 (many thanks for that lightweight C-Lib)
72 |
73 | Have fun^^
74 |
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditor.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.21005.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeldaHWLSaveEditorConsole", "ZeldaHWLSaveEditor.vcxproj", "{B3A66ECD-1D60-4BCD-B5EF-ECD2C5BEE3D5}"
7 | EndProject
8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeldaHWLSaveEditorGUI", "ZeldaHWLSaveEditorGUI.vcxproj", "{A33FA152-0BFA-4F0D-888E-0744DC1C2565}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Win32 = Debug|Win32
13 | Release|Win32 = Release|Win32
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {B3A66ECD-1D60-4BCD-B5EF-ECD2C5BEE3D5}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {B3A66ECD-1D60-4BCD-B5EF-ECD2C5BEE3D5}.Debug|Win32.Build.0 = Debug|Win32
18 | {B3A66ECD-1D60-4BCD-B5EF-ECD2C5BEE3D5}.Release|Win32.ActiveCfg = Release|Win32
19 | {B3A66ECD-1D60-4BCD-B5EF-ECD2C5BEE3D5}.Release|Win32.Build.0 = Release|Win32
20 | {A33FA152-0BFA-4F0D-888E-0744DC1C2565}.Debug|Win32.ActiveCfg = Debug|Win32
21 | {A33FA152-0BFA-4F0D-888E-0744DC1C2565}.Debug|Win32.Build.0 = Debug|Win32
22 | {A33FA152-0BFA-4F0D-888E-0744DC1C2565}.Release|Win32.ActiveCfg = Release|Win32
23 | {A33FA152-0BFA-4F0D-888E-0744DC1C2565}.Release|Win32.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditor.v12.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nedron92/HWL-SaveEditor/4259e42b4ee6d643859fc218e436c20c337cb358/ZeldaHWLSaveEditor.v12.suo
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditor.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {B3A66ECD-1D60-4BCD-B5EF-ECD2C5BEE3D5}
15 | ZeldaHWLSaveEditor
16 | ZeldaHWLSaveEditorConsole
17 |
18 |
19 |
20 | Application
21 | true
22 | v120
23 | MultiByte
24 |
25 |
26 | Application
27 | false
28 | v120
29 | true
30 | MultiByte
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | HWLSaveEditor
44 | tmp\$(ProjectName)\$(Configuration)\
45 | true
46 |
47 |
48 | HWLSaveEditor
49 | tmp\$(ProjectName)\$(Configuration)\
50 | false
51 |
52 |
53 |
54 | Level3
55 | Disabled
56 | true
57 | _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
58 | MultiThreadedDebug
59 |
60 |
61 | true
62 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
63 | bin\$(Configuration)\$(Platform)\$(TargetName).pdb
64 | ws2_32.lib;%(AdditionalDependencies)
65 |
66 |
67 |
68 |
69 |
70 |
71 | rd /s /q "$(IntDir)" && rd /s /q "$(TargetDir)"
72 |
73 |
74 |
75 |
76 | Level3
77 | MaxSpeed
78 | true
79 | true
80 | true
81 | _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
82 |
83 |
84 | true
85 | true
86 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
87 | bin\$(Configuration)\$(Platform)\$(TargetName).pdb
88 | ws2_32.lib;%(AdditionalDependencies)
89 |
90 |
91 |
92 |
93 |
94 |
95 | rd /s /q "$(IntDir)" && rd /s /q "$(TargetDir)"
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditor.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {4dd23ed0-efdd-42c9-93dc-b478c2ddc5e7}
18 |
19 |
20 | {3da354c8-7e7a-47ad-a82d-0038acdbdf71}
21 |
22 |
23 | {eb5f0e1b-3e61-4a0b-8c4c-3596d5512d50}
24 |
25 |
26 | {c177ccac-d237-417b-bd1f-8339ceefa334}
27 |
28 |
29 | {17370d15-9518-4ba8-bcf0-4151278fb40c}
30 |
31 |
32 | {2909c556-1735-4fb9-9d0b-69be32a63931}
33 |
34 |
35 | {48a57311-9998-4a10-97fc-3f107474c35a}
36 |
37 |
38 | {49a61997-1061-4f15-9ec6-3303f70a811d}
39 |
40 |
41 | {b2a4aaa8-2cef-4c02-9754-571ac0bfe680}
42 |
43 |
44 | {5266e919-a483-441b-a6f6-e927470129cc}
45 |
46 |
47 |
48 |
49 | Quelldateien\core
50 |
51 |
52 | Quelldateien\core
53 |
54 |
55 | Quelldateien\core
56 |
57 |
58 | Quelldateien\core
59 |
60 |
61 | Quelldateien\core
62 |
63 |
64 | Quelldateien\core
65 |
66 |
67 | Quelldateien\core
68 |
69 |
70 | Quelldateien\core
71 |
72 |
73 | Quelldateien\core
74 |
75 |
76 | Quelldateien\core
77 |
78 |
79 | Quelldateien\console
80 |
81 |
82 | Quelldateien\libs\HTTP_Client\API
83 |
84 |
85 | Quelldateien\libs\HTTP_Client\API
86 |
87 |
88 | Quelldateien\libs\HTTP_Client\API
89 |
90 |
91 | Quelldateien\libs\HTTP_Client\API
92 |
93 |
94 | Quelldateien\libs\HTTP_Client
95 |
96 |
97 | Quelldateien\core
98 |
99 |
100 | Quelldateien\core
101 |
102 |
103 | Quelldateien\core
104 |
105 |
106 |
107 |
108 | Headerdateien\core
109 |
110 |
111 | Headerdateien\core
112 |
113 |
114 | Headerdateien\core
115 |
116 |
117 | Headerdateien\core
118 |
119 |
120 | Headerdateien\core
121 |
122 |
123 | Headerdateien\core
124 |
125 |
126 | Headerdateien\core
127 |
128 |
129 | Headerdateien\core
130 |
131 |
132 | Headerdateien\core
133 |
134 |
135 | Headerdateien\core
136 |
137 |
138 | Headerdateien\console
139 |
140 |
141 | Headerdateien\libs\HTTP_Client\API
142 |
143 |
144 | Headerdateien\libs\HTTP_Client\API
145 |
146 |
147 | Headerdateien\libs\HTTP_Client\API
148 |
149 |
150 | Headerdateien\libs\HTTP_Client\API
151 |
152 |
153 | Headerdateien\libs\HTTP_Client\API
154 |
155 |
156 | Headerdateien\libs\HTTP_Client
157 |
158 |
159 | Headerdateien\core
160 |
161 |
162 | Headerdateien\core
163 |
164 |
165 | Headerdateien\core
166 |
167 |
168 |
169 |
170 | Ressourcendateien
171 |
172 |
173 |
174 |
175 | Ressourcendateien
176 |
177 |
178 |
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditor.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WindowsLocalDebugger
5 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
6 | $(ProjectDir)
7 |
8 |
9 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
10 | WindowsLocalDebugger
11 |
12 |
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditorGUI.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {A33FA152-0BFA-4F0D-888E-0744DC1C2565}
15 | ZeldaHWLSaveEditorGUI
16 |
17 |
18 |
19 | Application
20 | true
21 | v120
22 | Unicode
23 | Static
24 |
25 |
26 | Application
27 | false
28 | v120
29 | true
30 | Unicode
31 | Static
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | HWLSaveEditorGUI
45 | tmp\$(ProjectName)\$(Configuration)\
46 | false
47 |
48 |
49 | HWLSaveEditorGUI
50 | tmp\$(ProjectName)\$(Configuration)\
51 | true
52 |
53 |
54 |
55 | Level3
56 | Disabled
57 | true
58 | NotUsing
59 | WIN32;_WINDOWS;DEBUG;_CRT_SECURE_NO_WARNINGS;__MFC__;%(PreprocessorDefinitions)
60 |
61 |
62 | true
63 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
64 | bin\$(Configuration)\$(Platform)\$(TargetName).pdb
65 | ws2_32.lib;%(AdditionalDependencies)
66 |
67 |
68 | rd /s /q "$(IntDir)" && rd /s /q "$(TargetDir)"
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | Level3
77 | MaxSpeed
78 | true
79 | true
80 | true
81 | WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;__MFC__;%(PreprocessorDefinitions)
82 | MultiThreaded
83 | NotUsing
84 |
85 |
86 | true
87 | true
88 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
89 | bin\$(Configuration)\$(Platform)\$(TargetName).pdb
90 | ws2_32.lib;%(AdditionalDependencies)
91 |
92 |
93 | rd /s /q "$(IntDir)" && rd /s /q "$(TargetDir)"
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditorGUI.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {c88cf407-5c15-4107-9883-4ba3227921d7}
18 |
19 |
20 | {0e74be7a-19ee-470f-8196-d263c9562eb8}
21 |
22 |
23 | {00a3f4b5-a320-4e92-8804-012c1baa7fa5}
24 |
25 |
26 | {e5db2d5e-aaae-4856-9e0d-f22a4a5274a2}
27 |
28 |
29 | {be2a0fb2-50b3-46b7-8035-9ebcc78519a2}
30 |
31 |
32 | {6ea3465a-c258-44f3-9237-1f1b1aa03a8b}
33 |
34 |
35 | {a5143f7c-85a8-45e5-98e6-22083550474c}
36 |
37 |
38 | {9cca8664-7f7a-4e8f-8651-bf10e18cfe1a}
39 |
40 |
41 | {abe18c5b-2161-4bac-861a-b5b4e3a65841}
42 |
43 |
44 | {da3d180e-6b0e-4eeb-94dd-7c2fd7774190}
45 |
46 |
47 |
48 |
49 | Headerdateien\core
50 |
51 |
52 | Headerdateien\core
53 |
54 |
55 | Headerdateien\core
56 |
57 |
58 | Headerdateien\core
59 |
60 |
61 | Headerdateien\core
62 |
63 |
64 | Headerdateien\core
65 |
66 |
67 | Headerdateien\core
68 |
69 |
70 | Headerdateien\core
71 |
72 |
73 | Headerdateien\core
74 |
75 |
76 | Headerdateien\core
77 |
78 |
79 | Headerdateien\gui
80 |
81 |
82 | Headerdateien\gui
83 |
84 |
85 | Headerdateien\gui
86 |
87 |
88 | Headerdateien\gui
89 |
90 |
91 | Headerdateien\gui
92 |
93 |
94 | Headerdateien\gui
95 |
96 |
97 | Headerdateien\gui
98 |
99 |
100 | Headerdateien\gui
101 |
102 |
103 | Headerdateien\gui
104 |
105 |
106 | Headerdateien\gui
107 |
108 |
109 | Headerdateien\gui
110 |
111 |
112 | Headerdateien\libs\HTTP_Client\API
113 |
114 |
115 | Headerdateien\libs\HTTP_Client\API
116 |
117 |
118 | Headerdateien\libs\HTTP_Client\API
119 |
120 |
121 | Headerdateien\libs\HTTP_Client\API
122 |
123 |
124 | Headerdateien\libs\HTTP_Client\API
125 |
126 |
127 | Headerdateien\libs\HTTP_Client
128 |
129 |
130 | Headerdateien\core
131 |
132 |
133 | Headerdateien\gui
134 |
135 |
136 | Headerdateien\core
137 |
138 |
139 | Headerdateien\gui
140 |
141 |
142 | Headerdateien\gui
143 |
144 |
145 | Headerdateien\gui
146 |
147 |
148 | Headerdateien\core
149 |
150 |
151 |
152 |
153 | Quelldateien\core
154 |
155 |
156 | Quelldateien\core
157 |
158 |
159 | Quelldateien\core
160 |
161 |
162 | Quelldateien\core
163 |
164 |
165 | Quelldateien\core
166 |
167 |
168 | Quelldateien\core
169 |
170 |
171 | Quelldateien\core
172 |
173 |
174 | Quelldateien\core
175 |
176 |
177 | Quelldateien\core
178 |
179 |
180 | Quelldateien\core
181 |
182 |
183 | Quelldateien\gui
184 |
185 |
186 | Quelldateien\gui
187 |
188 |
189 | Quelldateien\gui
190 |
191 |
192 | Quelldateien\gui
193 |
194 |
195 | Quelldateien\gui
196 |
197 |
198 | Quelldateien\gui
199 |
200 |
201 | Quelldateien\gui
202 |
203 |
204 | Quelldateien\gui
205 |
206 |
207 | Quelldateien\gui
208 |
209 |
210 | Quelldateien\libs\HTTP_Client\API
211 |
212 |
213 | Quelldateien\libs\HTTP_Client\API
214 |
215 |
216 | Quelldateien\libs\HTTP_Client\API
217 |
218 |
219 | Quelldateien\libs\HTTP_Client\API
220 |
221 |
222 | Quelldateien\libs\HTTP_Client
223 |
224 |
225 | Quelldateien\core
226 |
227 |
228 | Quelldateien\gui
229 |
230 |
231 | Quelldateien\core
232 |
233 |
234 | Quelldateien\gui
235 |
236 |
237 | Quelldateien\gui
238 |
239 |
240 | Quelldateien\gui
241 |
242 |
243 | Quelldateien\core
244 |
245 |
246 |
247 |
248 | Ressourcendateien
249 |
250 |
251 |
252 |
253 | Ressourcendateien
254 |
255 |
256 |
--------------------------------------------------------------------------------
/ZeldaHWLSaveEditorGUI.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
5 | WindowsLocalDebugger
6 |
7 |
8 | bin\$(Configuration)\$(Platform)\$(TargetName)$(TargetExt)
9 | WindowsLocalDebugger
10 |
11 |
12 | false
13 |
14 |
--------------------------------------------------------------------------------
/settings.cfg:
--------------------------------------------------------------------------------
1 | [General]
2 | autoUpdateCheck=false
3 | autoTrim=true
4 | DlcSafetyCheck=true
5 | createBackupFileOnOpening=true
6 | openLastSaveFileOnStart=false
7 | LastSaveFile=zmha.bin
8 | useHTTPProxy=false
9 |
10 | [HTTP]
11 | ProxyHost=127.0.0.1
12 | ProxyPort=8080
13 |
--------------------------------------------------------------------------------
/source/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #name the project
2 | project(HWLSaveEditor)
3 |
4 | #set needed ENV-variables to the right DIRs
5 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
6 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
7 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
8 |
9 | #compile with c++14, cause we need it
10 | #and include sub-dirs
11 | ADD_DEFINITIONS(-std=c++14)
12 | add_subdirectory(libs)
13 | add_subdirectory(core)
14 | add_subdirectory(console)
15 |
16 | #check if own URL will be used, default OFF
17 | option(USE_OWN_URLS "Use your own URLs for some HTTP-Requests" OFF)
18 |
19 | if(USE_OWN_URLS)
20 | #add messager.....
21 | MESSAGE(STATUS "Your using USE_OWN_URLS")
22 | SET(VERSION_CHECK_NIGHTLY_HTTP_URL '\"http://nightly.nedron92.de/hwl_save-editor/builds/version_nightly.txt\"' CACHE STRING "Own Version-Nighly-Check-URL")
23 | SET(NIGHTLY_URL '\"https://nightly.nedron92.de/hwl_save-editor/\"' CACHE STRING "Own Nightly-Server-URL")
24 |
25 | add_definitions( -DVERSION_CHECK_NIGHTLY_HTTP_URL=${VERSION_CHECK_NIGHTLY_HTTP_URL} )
26 | add_definitions( -DNIGHTLY_URL=${NIGHTLY_URL} )
27 |
28 | endif()
29 |
--------------------------------------------------------------------------------
/source/console/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #create an executable-file of main.cpp
2 | add_executable(HWLSaveEditor main.cpp)
3 |
4 | #link the created static-lib to the executable-file
5 | target_link_libraries(HWLSaveEditor -lpthread)
6 | target_link_libraries(HWLSaveEditor core)
7 |
--------------------------------------------------------------------------------
/source/console/ZeldaHWLSaveEditorConsole.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nedron92/HWL-SaveEditor/4259e42b4ee6d643859fc218e436c20c337cb358/source/console/ZeldaHWLSaveEditorConsole.rc
--------------------------------------------------------------------------------
/source/console/resource.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nedron92/HWL-SaveEditor/4259e42b4ee6d643859fc218e436c20c337cb358/source/console/resource.h
--------------------------------------------------------------------------------
/source/core/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | #add all .cpp files of the core folder to the Variable "HWLSaveSrc"
2 | file(GLOB HWLSaveSrc
3 | "*.cpp"
4 | )
5 |
6 | #create a static library from core-sources
7 | add_library(core STATIC ${HWLSaveSrc})
8 | target_link_libraries(core http_client)
9 |
--------------------------------------------------------------------------------
/source/core/HWLAdventureModeItems.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * @author: nedron92, 2016
3 | */
4 | //needed for including in a MFC-App
5 | #ifdef __MFC__
6 | #include "../gui/stdafx.h"
7 | #endif // __MFC__
8 |
9 | //include the correct header-file
10 | #include "HWLAdventureModeItems.h"
11 |
12 | //use the project-namespace
13 | using namespace HWLSaveEdit;
14 |
15 | /* @var vs_amItems vector for holding all names of AdventureMode-Items */
16 | const vector HWLAdventureModeItems::vs_amItems =
17 | {
18 | "Compass", //Adventure-Map Items Begin
19 | "Bombs",
20 | "Candle",
21 | "Ladder",
22 | "Power Bracelet",
23 | "Water Bombs",
24 | "Digging Mitts",
25 | "Ice Arrow",
26 | "Raft",
27 | "Hookshot",
28 | "Recorder",
29 | "Goddess's Harp", //Adventure-Map Items End
30 |
31 | "Compass", //GreatSea-Map Items Begin
32 | "Hookshot",
33 | "Wind Waker",
34 | "Cannon",
35 | "Boomerang",
36 | "Hero's Bow",
37 | "Grappling Hook",
38 | "Hyoi Pears",
39 | "Deku Leaf",
40 | "Sea Chart",
41 | "Power Bracelet",
42 | "Hammer", //GreatSea-Map Items End
43 |
44 | "Compass", //MasterQuest-Map Items Begin
45 | "Bombs",
46 | "Candle",
47 | "Ladder",
48 | "Power Bracelet",
49 | "Water Bombs",
50 | "Digging Mitts",
51 | "Ice Arrow",
52 | "Raft",
53 | "Hookshot",
54 | "Recorder",
55 | "Goddess's Harp", //MasterQuest-Map Items End
56 |
57 | "Compass", //Twilight-Map Items Begin
58 | "Bombs",
59 | "Water Bombs",
60 | "Digging Mitts",
61 | "Lantern",
62 | "Jar",
63 | "Fishing Rod",
64 | "Clawshot",
65 | "Spinner",
66 | "Ooccoo",
67 | "Tears of Light",
68 | "Tears of Twilight", //Twilight-Map Items End
69 |
70 | "Compass", //Termina-Map Items Begin
71 | "Bombs",
72 | "Ice Arrow",
73 | "Song of Time",
74 | "Song of Time (Inv.)",
75 | "Deku Stick",
76 | "Deku Mask",
77 | "Goron Mask",
78 | "Zora Mask",
79 | "Mask of Truth",
80 | "Majora's Mask",
81 | "Giants", //Termina-Map Items End
82 |
83 | //only 1st DLC: Master Wind Waker DLC
84 | "Compass", //MasterWindWaker-Map Items Begin
85 | "Hookshot",
86 | "Wind Waker",
87 | "Cannon",
88 | "Boomerang",
89 | "Hero's Bow",
90 | "Grappling Hook",
91 | "Hyoi Pears",
92 | "Deku Leaf",
93 | "Sea Chart",
94 | "Power Bracelet",
95 | "Hammer", //MasterWindWaker-Map Items End
96 |
97 | //only 2nd DLC: Link's Awakening DLC
98 | "Compass", //KoholintIsland-Map Items Begin
99 | "Full Moon Cello",
100 | "Conch Horn",
101 | "Sea Lily Bell",
102 | "Surf Harp",
103 | "Wind Marimba",
104 | "Coral Triangle",
105 | "Organ of Evening Calm",
106 | "Thunder Drum",
107 | "Grandpa Ulrira",
108 | "Power Bracelet",
109 | "Magic Powder", //KoholintIsland-Map Items End
110 |
111 | //only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
112 | "Compass", //GrandTravels-Map Items Begin
113 | "Whirlwind",
114 | "Fishing Rod",
115 | "Cannon",
116 | "Railway Track",
117 | "Cyclone Slate",
118 | "S.S. Linebeck",
119 | "Iron Ship",
120 | "Golden Ship",
121 | "Spirit Train",
122 | "Steel Train",
123 | "Golden Train", //GrandTravels-Map Items End
124 |
125 | //only 4th DLC: A Link Between Worlds DLC
126 | "Bomb", //Lorule-Map Items Begin
127 | "Wall Painting",
128 | "Power Glove",
129 | "Fire Rod",
130 | "Tornado-Rod",
131 | "Ice-Rod",
132 | "Sand-Rod",
133 | "Baby Maimai",
134 | "Hammer",
135 | "Boomerang",
136 | "Bow",
137 | "Hookshot", //Lorule-Map Items End
138 |
139 | };
140 |
141 | /* @var amItemValueMax maximal-value of an AdventureMode-Item */
142 | const int HWLAdventureModeItems::amItemValueMax = 5;
143 |
144 |
145 |
146 | /**
147 | * Only the initialization of the normal-constructor
148 | */
149 | HWLAdventureModeItems::HWLAdventureModeItems(int i_id, int i_offset, int i_map_id)
150 | {
151 | //set or calculate all needed members
152 | this->i_id = i_id;
153 | this->s_name = this->vs_amItems[this->i_id];
154 | this->i_offset = i_offset;
155 | this->i_map_id = i_map_id;
156 | this->i_value = this->calc_value();
157 | }
158 |
159 |
160 | /**
161 | * Only the initialization of the normal-destructor
162 | */
163 | HWLAdventureModeItems::~HWLAdventureModeItems()
164 | {
165 | }
166 |
167 |
168 |
169 | /**
170 | * This method calculates the current AM-Item value
171 | *
172 | * @return int the current material-value
173 | *
174 | */
175 | int HWLAdventureModeItems::calc_value()
176 | {
177 | //declare/define needed variables
178 | string s_amItem_value;
179 | int i_amItem_offset = this->i_offset;
180 |
181 | //get hex-value from the file-content holder and convert it to int
182 | s_amItem_value = this->getHexStringFromFileContent(i_amItem_offset, this->amItemOffsetLength);
183 | int i_amItem_value = this->HexStringToInt(s_amItem_value);
184 |
185 | //return the current int-value
186 | return i_amItem_value;
187 | }
188 |
189 |
190 |
191 | /**
192 | * This method set the current AM-Item value
193 | * to the file-content holder
194 | *
195 | */
196 | void HWLAdventureModeItems::save_value()
197 | {
198 | //declare/define needed variables
199 | int i_value_tmp = this->i_value;
200 | string s_amItem_value;
201 | int i_amItem_offset = this->i_offset;
202 |
203 | //convert the current integer-value to hex and add needed zeros, if we
204 | //don't have the complete length (calculate with offset-length multiplied by 2)
205 | s_amItem_value = this->intToHexString(i_value_tmp, false);
206 | this->addZeroToHexString(s_amItem_value, this->amItemOffsetLength * 2);
207 |
208 | //set converted hex-value to the file-content holder
209 | this->setHexStringToFileContent(s_amItem_value, i_amItem_offset);
210 | }
211 |
212 |
213 |
214 | /**
215 | * Setter for the AM-Item value
216 | *
217 | * @var int i_value AM-Item value to set
218 | *
219 | */
220 | void HWLAdventureModeItems::set_value(int i_value)
221 | {
222 | //check if AM-Item value smaller then 0, then set it directly to 0
223 | //also check for the maximal-value
224 | if (i_value < 0)
225 | i_value = 0;
226 | else if (i_value > this->amItemValueMax)
227 | i_value = this->amItemValueMax;
228 |
229 | this->i_value = i_value;
230 |
231 | }
232 |
233 |
234 |
235 | /**
236 | * Getter for the AM-Item-name
237 | *
238 | * @return string the name of the AM-Item
239 | *
240 | */
241 | string HWLAdventureModeItems::get_name()
242 | {
243 | return this->s_name;
244 | }
245 |
246 | /**
247 | * Getter for the AM-Item-ID
248 | *
249 | * @return int the ID of the AM-Item
250 | *
251 | */
252 | int HWLAdventureModeItems::get_id()
253 | {
254 | return this->i_id;
255 | }
256 |
257 | /**
258 | * Getter for the AM-Item-offset
259 | *
260 | * @return int the offset of the AM-Item
261 | *
262 | */
263 | int HWLAdventureModeItems::get_offset()
264 | {
265 | return this->i_offset;
266 | }
267 |
268 | /**
269 | * Getter for the AM-Item-type
270 | *
271 | * @return int the type of the AM-Item
272 | *
273 | */
274 | int HWLAdventureModeItems::get_map_id()
275 | {
276 | return this->i_map_id;
277 | }
278 |
279 | /**
280 | * Getter for the AM-Item-value
281 | *
282 | * @return int the value of the AM-Item
283 | *
284 | */
285 | int HWLAdventureModeItems::get_value()
286 | {
287 | return this->i_value;
288 | }
289 |
290 |
291 |
292 | /**
293 | * This method returns an formatted string, which contain all needed member-values
294 | *
295 | * @return string formatted output with all needed member-values
296 | *
297 | */
298 | string HWLAdventureModeItems::get_AMItemForOutput()
299 | {
300 | string s_output = "Name: " + this->s_name + "\n"
301 | //+ " ID: " + to_string(this->i_id) + "\n"
302 | //+ " Map-ID: " + to_string(this->i_map_id) + "\n"
303 | + " Value: " + to_string(this->i_value) + "\n";
304 | //+ " Offset: " + to_string(this->i_offset) + "\n";
305 |
306 | return s_output;
307 | }
308 |
309 |
310 |
311 | /**
312 | * This method is a wrapper for all known save-methods of the class
313 | *
314 | */
315 | void HWLAdventureModeItems::save_AMItem()
316 | {
317 | this->save_value();
318 | }
319 |
--------------------------------------------------------------------------------
/source/core/HWLAdventureModeItems.h:
--------------------------------------------------------------------------------
1 | /*
2 | * @author: nedron92, 2016
3 | */
4 | #pragma once
5 |
6 | //include the parent-class
7 | #include "HWLSaveEditorCore.h"
8 |
9 | //add the class to the project-namespace
10 | namespace HWLSaveEdit
11 | {
12 | class HWLAdventureModeItems : public HWLSaveEditorCore
13 | {
14 | private:
15 | /* @var s_name name of the AM-Item */
16 | string s_name;
17 |
18 | /* @var i_offset id of the AM-Item */
19 | int i_id;
20 |
21 | /* @var i_offset offset of the AM-Item */
22 | int i_offset;
23 |
24 | /* @var i_map_id map-id of the AM-Item */
25 | int i_map_id;
26 |
27 | /* @var i_value value of the AM-Item */
28 | int i_value;
29 |
30 | //needed private members/constans
31 | static const vector vs_amItems;
32 |
33 | //methods for calculation and saving the AM-Item-Value
34 | int calc_value();
35 | void save_value();
36 |
37 |
38 |
39 | public:
40 | //needed public members/constans
41 | static const int amItemValueMax;
42 |
43 | //constructor and destructor
44 | HWLAdventureModeItems(int i_id, int i_offset, int i_map_id);
45 | ~HWLAdventureModeItems();
46 |
47 | //method(s) for setting
48 | void set_value(int i_value);
49 |
50 | //methods for getting the members
51 | string get_name();
52 | int get_id();
53 | int get_offset();
54 | int get_map_id();
55 | int get_value();
56 |
57 | //method to get a formatted output (for console)
58 | string get_AMItemForOutput();
59 |
60 | //saving method
61 | void save_AMItem();
62 |
63 | };
64 |
65 | }
--------------------------------------------------------------------------------
/source/core/HWLAdventureModeMaps.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * @author: nedron92, 2016
3 | */
4 | //needed for including in a MFC-App
5 | #ifdef __MFC__
6 | #include "../gui/stdafx.h"
7 | #endif // __MFC__
8 |
9 | //include the correct header-file
10 | #include "HWLAdventureModeMaps.h"
11 |
12 | //use the project-namespace
13 | using namespace HWLSaveEdit;
14 |
15 |
16 | //private constants
17 | /* @var amItemOffsetBegin vector for holding the offsets-begin for AdventureMode items */
18 | const vector HWLAdventureModeMaps::amItemOffsetBegin =
19 | {
20 | 0x2EFA, //Start of Adventure-Map Items
21 | 0xEB73, //Start of GreatSea-Map Items (WindWaker and so on)
22 | 0x7A52, //Start of MasterQuest-Map Items
23 | 0xA00A, //Start of Twilight-Map Items (Lantern and so on)
24 | 0xC5BE, //Start of Termina-Map Items (Song of Time and so on)
25 | 0x11120, //Start of MasterWindWaker-Map Items (Cannon and so on), only 1st DLC: Master Wind Waker DLC
26 | 0x136D5, //Start of KoholintIsland-Map Items (Full Moon Cello and so on), only 2nd DLC: Link's Awakening DLC
27 | 0x15C8D, //Start of GrandTravels-Map Items (Railway Track and so on), only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
28 | 0x18241, //Start of Lorule-Map Items (Wall Painting and so on), only 4th DLC: A Link Between Worlds DLC
29 |
30 | };
31 |
32 | /* @var amItemOffsetBeginSpecial vector for holding the offsets-begin for AdventureMode items */
33 | const vector HWLAdventureModeMaps::amItemOffsetBeginSpecial =
34 | {
35 | 0xEB56, //Compass of GreatSea-Map
36 | 0xEB5F, //Hookshot of GreatSea-Map
37 |
38 | 0x9FFE, //Compass of Twilight-Map (+1 = Bombs)
39 | 0xA003, //Waterbombs of Twilight-Map (+1 = Digging Mitts)
40 |
41 | 0xC5AA, //Compass of Termina-Map (+1 = Bombs)
42 | 0xC5B1, //Ice Arrow of Termina-Map
43 |
44 | //only 1st DLC: Master Wind Waker DLC
45 | 0x11102, //Compass of MasterWindWaker-Map
46 | 0x1110B, //Hookshot of MasterWindWaker-Map
47 | 0x1111F, //WindWaker of MasterWindWaker-Map
48 |
49 | //only 2nd DLC: Link's Awakening DLC
50 | 0x136AE, //Compass of KoholintIsland-Map
51 |
52 | //only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
53 | 0x15C5A, //Compass of GrandTravels-Map
54 | 0x15C8C, //Whirlwind of GrandTravels-Map
55 | 0x15C68, //Fishing Rod of GrandTravels-Map
56 | 0x15C78, //Cannon of GrandTravels-Map
57 |
58 | //only 4th DLC: A Link Between Worlds DLC
59 | 0x18207, //Bomb of Lorule-Map
60 | };
61 |
62 | /* @var si_disabledMapCounter Counter which holds the current value of disabled AM-Maps */
63 | int HWLAdventureModeMaps::si_disabledMapCounter = 0;
64 |
65 |
66 | //public constants
67 |
68 | /* @var vs_map_names vector, which hold all current names of all known AM-Maps */
69 | const vector HWLAdventureModeMaps::vs_map_names =
70 | {
71 | "Adventure-Map",
72 | "GreatSea-Map",
73 | "MasterQuest-Map",
74 | "Twilight-Map",
75 | "Termina-Map",
76 | "MasterWindWaker-Map", //only 1st DLC: Master Wind Waker DLC
77 | "KoholintIsland-Map", //only 2nd DLC: Link's Awakening DLC
78 | "GrandTravels-Map", //only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
79 | "Lorule-Map", //only 4th DLC: A Link Between Worlds DLC
80 | };
81 |
82 | /* @var amItemPerMapMax maximal-value of AdventureMode-Items per AM-Map */
83 | const int HWLAdventureModeMaps::amm_MaxItemsPerMap = 12;
84 |
85 |
86 |
87 | /**
88 | * Only the initialization of the normal-constructor
89 | */
90 | HWLAdventureModeMaps::HWLAdventureModeMaps(int i_id)
91 | {
92 | //Reset static values if new saveFile is opened
93 | if (this->b_isNewSaveFile)
94 | this->si_disabledMapCounter = 0;
95 |
96 | //set or calculate all needed members
97 | this->i_id = i_id;
98 | this->s_name = this->vs_map_names[this->i_id];
99 | this->b_isDisabled = false;
100 | this->vsp_hwlami_items = this->calc_amiItems();
101 | }
102 |
103 |
104 | /**
105 | * Only the initialization of the normal-destructor
106 | */
107 | HWLAdventureModeMaps::~HWLAdventureModeMaps()
108 | {
109 | }
110 |
111 |
112 |
113 | /**
114 | * This method calculate the AdventureMode-Item-Objects
115 | *
116 | */
117 | vector> HWLAdventureModeMaps::calc_amiItems()
118 | {
119 | //decalre/define needed variables
120 | int i_offset;
121 | vector> vsp_hwlami_items_tmp;
122 |
123 | //Iterate over the current correct Items of the map
124 | for (int i = (this->i_id * this->amm_MaxItemsPerMap); i < (this->i_id * this->amm_MaxItemsPerMap) + this->amm_MaxItemsPerMap; i++)
125 | {
126 |
127 | //switch of iterate-variable i, cause we have to check some special AdventureMode Items, they are called
128 | //"shared-items" like Compass,...that we found on nearly every AdventureMode-Map. They have special-offsets then
129 | //Else: Get the normal offset of the Item
130 | switch (i)
131 | {
132 | //BEGIN SPECIAL ITEMS-OFFSETS
133 | case 12: //Compass, Great-Sea Map
134 | i_offset = this->amItemOffsetBeginSpecial[0];
135 | break;
136 |
137 | case 13: //Hookshot, Great-Sea Map
138 | i_offset = this->amItemOffsetBeginSpecial[1];
139 | break;
140 |
141 | case 36: //Compass, Twilight Map
142 | i_offset = this->amItemOffsetBeginSpecial[2];
143 | break;
144 |
145 | case 38: //Water Bombs, Twilight Map
146 | i_offset = this->amItemOffsetBeginSpecial[3];
147 | break;
148 |
149 | case 48: //Compass, Termina Map
150 | i_offset = this->amItemOffsetBeginSpecial[4];
151 | break;
152 |
153 | case 50: //Ice Arrow, Termina Map
154 | i_offset = this->amItemOffsetBeginSpecial[5];
155 | break;
156 |
157 | case 60: //Compass, MasterWindWaker Map, only 1st DLC: Master Wind Waker DLC
158 | i_offset = this->amItemOffsetBeginSpecial[6];
159 | break;
160 |
161 | case 61: //Hookshot, MasterWindWaker Map, only 1st DLC: Master Wind Waker DLC
162 | i_offset = this->amItemOffsetBeginSpecial[7];
163 | break;
164 |
165 | case 62: //Wind Waker, MasterWindWaker Map, only 1st DLC: Master Wind Waker DLC
166 | i_offset = this->amItemOffsetBeginSpecial[8];
167 | break;
168 |
169 | case 72: //Compass, KoholintIsland Map, only 2nd DLC: Link's Awakening DLC
170 | i_offset = this->amItemOffsetBeginSpecial[9];
171 | break;
172 |
173 | case 84: //Compass, GrandTravels Map, only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
174 | i_offset = this->amItemOffsetBeginSpecial[10];
175 | break;
176 |
177 | case 85: //Whirlwind, GrandTravels Map, only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
178 | i_offset = this->amItemOffsetBeginSpecial[11];
179 | break;
180 |
181 | case 86: //Fishing Rod, GrandTravels Map, only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
182 | i_offset = this->amItemOffsetBeginSpecial[12];
183 | break;
184 |
185 | case 87: //Cannon, GrandTravels Map, only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
186 | i_offset = this->amItemOffsetBeginSpecial[13];
187 | break;
188 |
189 | case 96: //Bombs, Lorule Map, only 4th DLC: A Link Between Worlds DLC
190 | i_offset = this->amItemOffsetBeginSpecial[14];
191 | break;
192 |
193 | //END SPECIAL ITEMS-OFFSETS
194 |
195 | //BEGIN NORMAL ITEMS-OFFSETS
196 | case 0: //Compass, Adventure-Map
197 | case 14: //Wind Waker, Great-Sea Map
198 | case 24: //Compass, MasterQuest-Map
199 | case 40: //Lantern, Twilight Map
200 | case 51: //Song of Time, Termina Map
201 | case 63: //Cannon, MasterWindWaker Map, only 1st DLC: Master Wind Waker DLC
202 | case 73: //Full Moon Cello, KoholintIsland Map, only 2nd DLC: Link's Awakening DLC
203 | case 88: //Railway Track, GrandTravels Map, only 3rd DLC: Phantom Hourglass & Spirit Tracks DLC
204 | case 97: //Wall Painting, Lorule Map, only 4th DLC: A Link Between Worlds DLC
205 | i_offset = this->amItemOffsetBegin[this->i_id];
206 | break;
207 |
208 | default: //normal, calculate the next offset
209 | i_offset = i_offset + this->amItemOffsetLength;
210 | break;
211 | //END NORMAL ITEMS-OFFSETS
212 | }
213 |
214 | //create new AdventureMode-item object, based on offset and type (also name)
215 | shared_ptr hwlami_tmp = make_shared(i, i_offset, this->i_id);
216 |
217 | //bind object to the map of them
218 | vsp_hwlami_items_tmp.push_back(hwlami_tmp);
219 |
220 | //calculate the next offset
221 | //i_offset = i_offset + this->amItemOffsetLength;
222 | }
223 |
224 | return vsp_hwlami_items_tmp;
225 |
226 |
227 | }
228 |
229 |
230 |
231 | /**
232 | * Setter for the AM-Map Disabled-State (and increment/decrement Counter-Member)
233 | *
234 | * @var bool b_isDisabled Disabled-State to set
235 | *
236 | */
237 | void HWLAdventureModeMaps::set_isDisabled(bool b_isDisabled)
238 | {
239 | if (b_isDisabled)
240 | this->si_disabledMapCounter++;
241 | else if (this->si_disabledMapCounter > 0)
242 | this->si_disabledMapCounter--;
243 |
244 | this->b_isDisabled = b_isDisabled;
245 | }
246 |
247 | /**
248 | * Setter for the AM-Map Item, explicit by a given item-id and
249 | * a correct object
250 | *
251 | * @var int i_item_id given Item-ID to set (=vector-index) (0-11)
252 | * @var shared_ptr sp_hwlami_item shared-pointer (object) to set on given item-id / slot
253 | *
254 | */
255 | void HWLAdventureModeMaps::set_amItem(int i_item_id, shared_ptr sp_hwlami_item)
256 | {
257 | if (i_item_id < this->amm_MaxItemsPerMap)
258 | this->vsp_hwlami_items[i_item_id] = sp_hwlami_item;
259 | }
260 |
261 | /**
262 | * Setter for the AM-Map Item-Vector itself (all items)
263 | *
264 | * @var vector> vsp_hwlami_item vector, which holds al items of that map
265 | *
266 | */
267 | void HWLAdventureModeMaps::set_all_amItems(vector> vsp_hwlami_item)
268 | {
269 | this->vsp_hwlami_items = vsp_hwlami_item;
270 | }
271 |
272 |
273 |
274 | /**
275 | * Getter for the AM-Map-ID
276 | *
277 | * @return int the ID of the AM-Map
278 | *
279 | */
280 | int HWLAdventureModeMaps::get_id()
281 | {
282 | return this->i_id;
283 | }
284 |
285 | /**
286 | * Getter for the AM-Map-Name
287 | *
288 | * @return string the Name of the AM-Map
289 | *
290 | */
291 | string HWLAdventureModeMaps::get_name()
292 | {
293 | return this->s_name;
294 | }
295 |
296 | /**
297 | * Getter for the AM-Map Disabled-State
298 | *
299 | * @return bool the Disabled-State of the AM-Map
300 | *
301 | */
302 | bool HWLAdventureModeMaps::get_isDisabled()
303 | {
304 | return this->b_isDisabled;
305 | }
306 |
307 | /**
308 | * Getter for the AM-Map Item, explicit by a given item-id
309 | *
310 | * @var int i_item_id given Item-ID to get (=vector-index) (0-11)
311 | *
312 | * @return shared_ptr shared-pointer (object) to get on given item-id / slot
313 | *
314 | */
315 | shared_ptr HWLAdventureModeMaps::get_amItem(int i_item_id)
316 | {
317 | return this->vsp_hwlami_items[i_item_id];
318 | }
319 |
320 | /**
321 | * Getter for the all AM-Map Items
322 | *
323 | * @return vector> vector of all AM-items of that map
324 | *
325 | */
326 | vector> HWLAdventureModeMaps::get_all_amItems()
327 | {
328 | return this->vsp_hwlami_items;
329 | }
330 |
331 | /**
332 | * Getter for the disbaledMapCounter
333 | *
334 | * @return int the disabled-MapCounter
335 | *
336 | */
337 | int HWLAdventureModeMaps::get_disabledMapCounter()
338 | {
339 | return si_disabledMapCounter;
340 | }
341 |
342 |
343 |
344 | /**
345 | * This method returns an formatted string, which contain all Output
346 | * of the AM-items of the current map
347 | *
348 | * @return string formatted output with all needed information
349 | *
350 | */
351 | string HWLAdventureModeMaps::get_AllAMItemsForOutput()
352 | {
353 | string s_output = "\n ";
354 |
355 | for (int i = 0; i < this->amm_MaxItemsPerMap; i++)
356 | {
357 | s_output = s_output + this->vsp_hwlami_items[i]->get_AMItemForOutput() + "\n ";
358 | }
359 |
360 | return s_output;
361 | }
362 |
363 | /**
364 | * This method returns an formatted string, which contain all needed member-values
365 | *
366 | * @var bool b_with_item_output TRUE: show output of items, FALSE: not
367 | *
368 | * @return string formatted output with all needed member-values
369 | *
370 | */
371 | string HWLAdventureModeMaps::get_AMMapForOutput(bool b_with_item_output)
372 | {
373 | string s_output = "";
374 |
375 | if (b_with_item_output)
376 | {
377 | s_output = s_output + "Map-ID: " + to_string(this->i_id) + " | Name: " + this->s_name + "\n"
378 | + "Items: \n" + this->get_AllAMItemsForOutput() + "\n";
379 | }
380 | else
381 | {
382 | s_output = s_output + "Map-ID: " + to_string(this->i_id) + " | Name: " + this->s_name + "\n";
383 | }
384 |
385 | return s_output;
386 | }
--------------------------------------------------------------------------------
/source/core/HWLAdventureModeMaps.h:
--------------------------------------------------------------------------------
1 | /*
2 | * @author: nedron92, 2016
3 | */
4 | #pragma once
5 |
6 | //include the parent-class
7 | #include "HWLSaveEditorCore.h"
8 | #include "HWLAdventureModeItems.h"
9 |
10 | //add the class to the project-namespace
11 | namespace HWLSaveEdit
12 | {
13 | class HWLAdventureModeMaps : public HWLSaveEditorCore
14 | {
15 | private:
16 | /* @var i_id ID of the AM-Map */
17 | int i_id;
18 |
19 | /* @var s_name name of the AM-Map */
20 | string s_name;
21 |
22 | /* @var b_isDisabled state, if map is complety disabled (not editable) */
23 | bool b_isDisabled;
24 |
25 | /* @var vsp_ami_items vector to hold the current items (of current map) as coressponding object */
26 | vector> vsp_hwlami_items;
27 |
28 | //needed private static members/constans
29 | static const vector amItemOffsetBegin;
30 | static const vector amItemOffsetBeginSpecial;
31 | static int si_disabledMapCounter;
32 |
33 | //methods for calculation of the AM-Map-Items
34 | vector> calc_amiItems();
35 |
36 | public:
37 | //needed public members/constans
38 | static const vector vs_map_names;
39 | static const int amm_MaxItemsPerMap;
40 |
41 | //constructor and destructor
42 | HWLAdventureModeMaps(int i_id);
43 | ~HWLAdventureModeMaps();
44 |
45 | //method(s) for setting
46 | void set_isDisabled(bool b_isDisabled);
47 | void set_amItem(int i_item_id, shared_ptr sp_hwlami_item);
48 | void set_all_amItems(vector> vsp_hwlami_item);
49 |
50 | //methods for getting the members
51 | int get_id();
52 | string get_name();
53 | bool get_isDisabled();
54 | shared_ptr get_amItem(int i_item_id);
55 | vector> get_all_amItems();
56 | static int get_disabledMapCounter();
57 |
58 | //method to get a formatted output (for console)
59 | string get_AllAMItemsForOutput();
60 | string get_AMMapForOutput(bool b_with_item_output=true);
61 | };
62 |
63 | }
--------------------------------------------------------------------------------
/source/core/HWLConfig.h:
--------------------------------------------------------------------------------
1 | /*
2 | * @author: nedron92, 2016
3 | */
4 | #pragma once
5 | #include //needed for compiling with gcc
6 | #include
7 | #include