summary refs log tree commit diff stats
path: root/Source/Panel.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Panel.h')
-rw-r--r--Source/Panel.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/Source/Panel.h b/Source/Panel.h new file mode 100644 index 0000000..fa3f750 --- /dev/null +++ b/Source/Panel.h
@@ -0,0 +1,85 @@
1#pragma once
2#include "json.hpp"
3#include "RandomizerCore.h"
4
5class Decoration
6{
7public:
8 enum Shape {
9 Stone = 100,
10 Star = 200,
11 Poly = 400,
12 Eraser = 500,
13 Triangle = 600,
14 };
15
16 Decoration() = default;
17 explicit Decoration(int shape);
18
19 int GetValue();
20
21//private:
22 int _shape;
23};
24
25class Intersection
26{
27public:
28 enum Flags {
29 IS_ENDPOINT = 0x1,
30 IS_STARTPOINT = 0x2,
31 IS_GAP = 0x10000,
32 HAS_DOT = 0x8,
33 DOT_IS_BLUE = 0x100,
34 DOT_IS_ORANGE = 0x200,
35 DOT_IS_INVISIBLE = 0x1000,
36 };
37
38 Intersection() = default;
39 explicit Intersection(float x, float y, int flags);
40
41 int GetValue();
42
43// private:
44 float _x, _y;
45 int _flags;
46};
47
48class Panel
49{
50public:
51 explicit Panel(int id);
52 void Write(int id);
53
54 void Random();
55
56 enum Style {
57 SYMMETRICAL = 0x2,
58 IS_2COLOR = 0x10,
59 HAS_DOTS = 0x4,
60 HAS_STARS = 0x40,
61 HAS_STONES = 0x100,
62 HAS_ERASERS = 0x1000,
63 HAS_SHAPERS = 0x2000,
64 };
65
66private:
67 void ReadIntersections(int id);
68 void WriteIntersections(int id);
69 void ReadDecorations(int id);
70 void WriteDecorations(int id);
71
72 // TODO: Reflection data
73 // TODO: Decoration colors
74
75
76 Memory _memory = Memory("witness64_d3d11.exe");
77
78 int _width, _height;
79
80 std::vector<std::vector<Decoration>> _decorations;
81 std::vector<std::vector<Intersection>> _intersections;
82 std::vector<Intersection> _endpoints;
83 std::vector<Intersection> _gaps;
84 int _style;
85}; \ No newline at end of file