forked from Phobos-developers/YRpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GeneralStructures.h
53 lines (42 loc) · 1.05 KB
/
GeneralStructures.h
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
51
52
53
#pragma once
#include <ASMMacros.h>
#include <YRPPCore.h>
#include <YRMath.h>
#include <YRMathVector.h>
#include <BasicStructures.h>
#include <Facing.h>
//used for cell coordinates/vectors
using CellStruct = Vector2D<short>;
using Point2D = Vector2D<int>;
using CoordStruct = Vector3D<int>;
struct BasePlanningCell {
int Weight;
CellStruct Position;
};
// this crap is used in several Base planning routines
struct BasePlanningCellContainer {
BasePlanningCell * Items;
int Count;
int Capacity;
bool Sorted;
DWORD Unknown_10;
bool AddCapacity(int AdditionalCapacity)
{ JMP_THIS(0x510860); }
// for qsort
static int __cdecl Comparator(const void *, const void *)
{ JMP_STD(0x5108F0); }
};
// combines number and a string
struct NamedValue {
const char* Name;
int Value;
bool operator == (int value) const {
return this->Value == value;
}
bool operator == (const char* name) const {
return !_strcmpi(this->Name, name);
}
bool operator == (const NamedValue& other) const {
return this->Value == other.Value && *this == other.Name;
}
};