2020-03-18 01:45:36 +01:00
|
|
|
|
|
|
|
struct _anchors {
|
2020-03-26 01:12:32 +01:00
|
|
|
char current_anchor_name[100];
|
2020-03-18 01:45:36 +01:00
|
|
|
collection anchor_name;
|
|
|
|
collection anchor_position;
|
|
|
|
void add();
|
2020-03-26 01:12:32 +01:00
|
|
|
int get_pos_by_name();
|
|
|
|
void clear();
|
2020-03-18 01:45:36 +01:00
|
|
|
} anchors;
|
|
|
|
|
|
|
|
void _anchors::add(dword _name, _pos)
|
|
|
|
{
|
|
|
|
anchor_name.add(_name);
|
|
|
|
anchor_position.add(itoa(_pos));
|
|
|
|
}
|
|
|
|
|
2020-03-26 01:12:32 +01:00
|
|
|
int _anchors::get_pos_by_name(dword _get_name)
|
2020-03-18 01:45:36 +01:00
|
|
|
{
|
|
|
|
dword pos_name = anchor_name.get_pos_by_name(_get_name);
|
2020-03-26 01:12:32 +01:00
|
|
|
if (ESBYTE[_get_name]==NULL) return 0;
|
|
|
|
if (pos_name==-1) {
|
|
|
|
return -1;
|
|
|
|
} else {
|
|
|
|
return atoi(anchor_position.get(pos_name));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void _anchors::clear()
|
|
|
|
{
|
|
|
|
anchor_name.drop();
|
|
|
|
anchor_position.drop();
|
2020-03-18 01:45:36 +01:00
|
|
|
}
|
|
|
|
|