Skip to content

Commit 753fa40

Browse files
kichithewolfGin890
authored andcommitted
za map icons for hyperspace
1 parent 65b5e93 commit 753fa40

File tree

3 files changed

+109
-0
lines changed

3 files changed

+109
-0
lines changed

SerialPrograms/Source/PokemonLZA/Inference/Map/PokemonLZA_MapIconDetector.cpp

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,83 @@ const MapIconMatcher& MapIcon_BattleZone(){
161161
return ret;
162162
}
163163

164+
const MapIconMatcher& MapIcon_HyperspaceBattleZone(){
165+
static MapIconMatcher ret(
166+
"PokemonLZA/MapIcons/HyperspaceBattleZone.png",
167+
"HyperspaceBattleZone",
168+
Color(0xff000000),
169+
Color(0xffFB257D),
170+
100,
171+
100.0,
172+
{
173+
{0xff000000, 0xffFB257D},
174+
}
175+
);
176+
return ret;
177+
}
178+
179+
const MapIconMatcher& MapIcon_HyperspaceWildZone(){
180+
static MapIconMatcher ret(
181+
"PokemonLZA/MapIcons/HyperspaceWildZone.png",
182+
"HyperspaceWildZone",
183+
Color(0xff000000),
184+
Color(0xffAED635),
185+
100,
186+
100.0,
187+
{
188+
{0xff000000, 0xffAED635},
189+
}
190+
);
191+
return ret;
192+
}
193+
194+
/*
195+
const MapIconMatcher& MapIcon_HyperspaceEntryQuest(){
196+
static MapIconMatcher ret(
197+
"PokemonLZA/MapIcons/HyperspaceEntryQuest.png",
198+
"HyperspaceEntryWild",
199+
Color(0xff000000),
200+
Color(0xffFFFFDD),
201+
100,
202+
100.0,
203+
{
204+
{0xff000000, 0xffFFFFDD},
205+
}
206+
);
207+
return ret;
208+
}
209+
*/
210+
211+
const MapIconMatcher& MapIcon_HyperspaceEntryWild(){
212+
static MapIconMatcher ret(
213+
"PokemonLZA/MapIcons/HyperspaceEntryWild.png",
214+
"HyperspaceEntryWild",
215+
Color(0xff000000),
216+
Color(0xffAED635),
217+
100,
218+
100.0,
219+
{
220+
{0xff000000, 0xffAED635},
221+
}
222+
);
223+
return ret;
224+
}
225+
226+
const MapIconMatcher& MapIcon_HyperspaceEntryBattle(){
227+
static MapIconMatcher ret(
228+
"PokemonLZA/MapIcons/HyperspaceEntryBattle.png",
229+
"HyperspaceEntryWild",
230+
Color(0xff000000),
231+
Color(0xffFB257D),
232+
100,
233+
100.0,
234+
{
235+
{0xff000000, 0xffFB257D},
236+
}
237+
);
238+
return ret;
239+
}
240+
164241
const MapIconMatcher& get_map_icon_matcher(MapIconType icon){
165242
switch (icon){
166243
case MapIconType::PokemonCenter:
@@ -177,6 +254,14 @@ const MapIconMatcher& get_map_icon_matcher(MapIconType icon){
177254
return MapIcon_WildZoneFlyable();
178255
case MapIconType::BattleZone:
179256
return MapIcon_BattleZone();
257+
case MapIconType::HyperspaceBattleZone:
258+
return MapIcon_HyperspaceBattleZone();
259+
case MapIconType::HyperspaceWildZone:
260+
return MapIcon_HyperspaceWildZone();
261+
case MapIconType::HyperspaceEntryWild:
262+
return MapIcon_HyperspaceEntryWild();
263+
case MapIconType::HyperspaceEntryBattle:
264+
return MapIcon_HyperspaceEntryBattle();
180265
default:
181266
throw InternalProgramError(
182267
nullptr, PA_CURRENT_FUNCTION,
@@ -207,6 +292,14 @@ const char* map_icon_type_to_string(MapIconType type){
207292
return "WildZoneFlyable";
208293
case MapIconType::BattleZone:
209294
return "BattleZone";
295+
case MapIconType::HyperspaceBattleZone:
296+
return "HyperspaceBattleZone";
297+
case MapIconType::HyperspaceWildZone:
298+
return "HyperspaceWildZone";
299+
case MapIconType::HyperspaceEntryWild:
300+
return "HyperspaceEntryWild";
301+
case MapIconType::HyperspaceEntryBattle:
302+
return "HyperspaceEntryBattle";
210303
default:
211304
throw InternalProgramError(
212305
nullptr, PA_CURRENT_FUNCTION,
@@ -226,6 +319,10 @@ MapIconType string_to_map_icon_type(const std::string& str){
226319
if (str == "WildZone") return MapIconType::WildZone;
227320
if (str == "WildZoneFlyable") return MapIconType::WildZoneFlyable;
228321
if (str == "BattleZone") return MapIconType::BattleZone;
322+
if (str == "HyperspaceBattleZone") return MapIconType::HyperspaceBattleZone;
323+
if (str == "HyperspaceWildZone") return MapIconType::HyperspaceWildZone;
324+
if (str == "HyperspaceEntryWild") return MapIconType::HyperspaceEntryWild;
325+
if (str == "HyperspaceEntryBattle") return MapIconType::HyperspaceEntryBattle;
229326
throw InternalProgramError(
230327
nullptr, PA_CURRENT_FUNCTION,
231328
"Unknown MapIconType string: " + str

SerialPrograms/Source/PokemonLZA/Inference/Map/PokemonLZA_MapIconDetector.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ enum class MapIconType{
3131
WildZone,
3232
WildZoneFlyable,
3333
BattleZone,
34+
HyperspaceBattleZone,
35+
HyperspaceWildZone,
36+
HyperspaceEntryWild,
37+
HyperspaceEntryBattle,
3438
};
3539

3640
const char* map_icon_type_to_string(MapIconType type);

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_BasicNavigation.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,18 @@ bool open_map(ConsoleHandle& console, ProControllerContext& context, bool zoom_t
111111
MapIconDetector pokecenter_icon(COLOR_RED, MapIconType::PokemonCenter, icon_region, &console.overlay());
112112
MapIconDetector flyable_building_icon(COLOR_BLACK, MapIconType::BuildingFlyable, icon_region, &console.overlay());
113113
MapIconDetector flayble_cafe_icon(COLOR_ORANGE, MapIconType::CafeFlyable, icon_region, &console.overlay());
114+
MapIconDetector flyable_hyperspace_battle_zone_icon(COLOR_ORANGE, MapIconType::HyperspaceBattleZone, icon_region, &console.overlay());
115+
MapIconDetector flyable_hyperspace_wild_zone_icon(COLOR_ORANGE, MapIconType::HyperspaceWildZone, icon_region, &console.overlay());
116+
MapIconDetector flyable_hyperspace_entry_wild_icon(COLOR_ORANGE, MapIconType::HyperspaceEntryWild, icon_region, &console.overlay());
117+
MapIconDetector flyable_hyperspace_entry_battle_icon(COLOR_ORANGE, MapIconType::HyperspaceEntryBattle, icon_region, &console.overlay());
114118
MapWatcher map_detector(COLOR_RED, &console.overlay());
115119
map_detector.attach_map_icon_detector(pokecenter_icon);
116120
map_detector.attach_map_icon_detector(flyable_building_icon);
117121
map_detector.attach_map_icon_detector(flayble_cafe_icon);
122+
map_detector.attach_map_icon_detector(flyable_hyperspace_battle_zone_icon);
123+
map_detector.attach_map_icon_detector(flyable_hyperspace_wild_zone_icon);
124+
map_detector.attach_map_icon_detector(flyable_hyperspace_entry_wild_icon);
125+
map_detector.attach_map_icon_detector(flyable_hyperspace_entry_battle_icon);
118126

119127
do{
120128
map_detector.reset_state();

0 commit comments

Comments
 (0)