24 lines
533 B
C++
24 lines
533 B
C++
#pragma once
|
|
#include "types.hpp"
|
|
#include "search.hpp"
|
|
|
|
struct ElementMachine {
|
|
TrackScene state = TRACK_STRAIGHT;
|
|
TrackScene last_state = TRACK_STRAIGHT;
|
|
|
|
uint8 lock_cnt = 0;
|
|
uint8 confirm_cnt = 0;
|
|
uint8 exit_cnt = 0;
|
|
uint16 in_state_frames= 0;
|
|
|
|
float normal_width = 0.0f;
|
|
int calib_cnt = 0;
|
|
float entry_deviation= 0.0f;
|
|
};
|
|
|
|
extern ElementMachine g_elm;
|
|
|
|
void element_init();
|
|
void element_recognize(SearchResult& sr, TrackInfo& info);
|
|
bool element_is_cross();
|