about summary refs log tree commit diff stats
path: root/Source/Randomizer2.cpp
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2019-11-16 21:15:59 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2019-11-16 21:15:59 -0800
commitfd2fa2211dc09c9030601fde1afd2f7823b22ed8 (patch)
treedfd3d3195315b69e5ccb397f7aedde115fb7e6e6 /Source/Randomizer2.cpp
parentee426c3bde4b4c7fb1ea38a953d849e8893d8311 (diff)
downloadwitness-tutorializer-fd2fa2211dc09c9030601fde1afd2f7823b22ed8.tar.gz
witness-tutorializer-fd2fa2211dc09c9030601fde1afd2f7823b22ed8.tar.bz2
witness-tutorializer-fd2fa2211dc09c9030601fde1afd2f7823b22ed8.zip
Cleanup tabs -> spaces, actually free memory
Diffstat (limited to 'Source/Randomizer2.cpp')
-rw-r--r--Source/Randomizer2.cpp41
1 files changed, 5 insertions, 36 deletions
diff --git a/Source/Randomizer2.cpp b/Source/Randomizer2.cpp index 81b6874..d9c00c0 100644 --- a/Source/Randomizer2.cpp +++ b/Source/Randomizer2.cpp
@@ -233,40 +233,6 @@ void Randomizer2::RandomizeKeep() {
233 233
234 // *** Hedges 3 ** 234 // *** Hedges 3 **
235 { 235 {
236 std::vector<int> audioMarkers = {
237 0x000034a9,
238 0x000034b1,
239 0x000034be,
240 0x000034c4,
241 0x000034cb,
242 0x000034cc,
243 0x000034cd,
244 0x000034ce,
245 0x000034df,
246 0x000034e0,
247 0x000034e1,
248 0x000034e2,
249 0x000034f3,
250 0x000131cb,
251 0x00017e34,
252 0x00017e6f,
253 0x00017e76,
254 0x00017e77,
255 0x00017e7a,
256 0x00017e7e,
257 0x00017e8b,
258 0x00017e8d,
259 0x00017eb5,
260 0x000394a4,
261 0x0003b54e,
262 };
263 std::vector<int> good;
264 for (int marker : audioMarkers) {
265 // std::vector<char> assetName = _memory->ReadArray<char>(marker, 0xD8, 100);
266 std::vector<char> name = {'m', 'a', 'z', 'e', '_', 'p', 'e', 'b', 'b', 'l', 'e', '\0'};
267 _memory->WriteNewArray(marker, 0xD8, name);
268 }
269
270 Puzzle p; 236 Puzzle p;
271 p.NewGrid(4, 4); 237 p.NewGrid(4, 4);
272 238
@@ -283,6 +249,9 @@ void Randomizer2::RandomizeKeep() {
283 p.grid[0][8].start = true; 249 p.grid[0][8].start = true;
284 p.grid[8][2].end = Cell::Dir::RIGHT; 250 p.grid[8][2].end = Cell::Dir::RIGHT;
285 251
252 std::vector<int> pebbleMarkers = {0x034a9, 0x034b1, 0x034be, 0x034c4};
253
254
286 std::vector<Pos> cutEdges = Randomizer2Core::CutEdgesToBeUnique(p); 255 std::vector<Pos> cutEdges = Randomizer2Core::CutEdgesToBeUnique(p);
287 assert(cutEdges.size() == 7); 256 assert(cutEdges.size() == 7);
288 for (Pos pos : cutEdges) { 257 for (Pos pos : cutEdges) {
@@ -352,9 +321,9 @@ void Randomizer2::SetGate(int panel, int X, int Y) {
352 } 321 }
353 322
354 SetPos(panel, x, y, 19.2f); 323 SetPos(panel, x, y, 19.2f);
355 _memory->WritePanelData<float>(panel, ORIENTATION, {0.0f, 0.0f, z, w}); 324 _memory->WriteEntityData<float>(panel, ORIENTATION, {0.0f, 0.0f, z, w});
356} 325}
357 326
358void Randomizer2::SetPos(int panel, float x, float y, float z) { 327void Randomizer2::SetPos(int panel, float x, float y, float z) {
359 _memory->WritePanelData<float>(panel, POSITION, {x, y, z}); 328 _memory->WriteEntityData<float>(panel, POSITION, {x, y, z});
360} \ No newline at end of file 329} \ No newline at end of file