-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathPokemonFRLG_MapDetector.h
More file actions
50 lines (40 loc) · 1.22 KB
/
PokemonFRLG_MapDetector.h
File metadata and controls
50 lines (40 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* Map Detector
*
* From: https://github.com/PokemonAutomation/
*
*/
#ifndef PokemonAutomation_PokemonFRLG_MapDetector_H
#define PokemonAutomation_PokemonFRLG_MapDetector_H
#include <chrono>
#include "CommonFramework/VideoPipeline/VideoOverlayScopes.h"
#include "Common/Cpp/Color.h"
#include "CommonFramework/ImageTools/ImageBoxes.h"
#include "CommonTools/VisualDetector.h"
#include "CommonTools/InferenceCallbacks/VisualInferenceCallback.h"
namespace PokemonAutomation{
class CancellableScope;
class VideoFeed;
namespace NintendoSwitch{
namespace PokemonFRLG{
// Detect the map screen for Kanto
class KantoMapDetector : public StaticScreenDetector{
public:
KantoMapDetector(Color color);
virtual void make_overlays(VideoOverlaySet& items) const override;
virtual bool detect(const ImageViewRGB32& screen) override;
private:
ImageFloatBox m_top_box;
ImageFloatBox m_left_box;
ImageFloatBox m_right_box;
ImageFloatBox m_land_box;
};
class KantoMapWatcher : public DetectorToFinder<KantoMapDetector>{
public:
KantoMapWatcher(Color color)
: DetectorToFinder("KantoMapWatcher", std::chrono::milliseconds(250), color)
{}
};
}
}
}
#endif