about summary refs log tree commit diff stats
path: root/Source/Randomizer.h
blob: c9603ac4e959e9fcc90363e106deec3c54686f85 (plain) (blame)
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
#pragma once
#include "RandomizerCore.h"

class Randomizer {
public:
	void Randomize();
	bool GameIsRandomized();

	void AdjustSpeed();

	void ClearOffsets() {_memory->ClearOffsets();}

private:

	int _lastRandomizedFrame = 1 << 30;
	void RandomizeTutorial();
	void RandomizeSymmetry();
	void RandomizeDesert();
	void RandomizeQuarry();
	void RandomizeTreehouse();
	void RandomizeKeep();
	void RandomizeShadows();
	void RandomizeTown();
	void RandomizeMonastery();
	void RandomizeBunker();
	void RandomizeJungle();
	void RandomizeSwamp();
	void RandomizeMountain();
	void RandomizeChallenge();
	void RandomizeAudioLogs();

	void Randomize(std::vector<int>& panels, int flags);
	void RandomizeRange(std::vector<int> &panels, int flags, size_t startIndex, size_t endIndex);
	void SwapPanels(int panel1, int panel2, int flags);
	void ReassignTargets(const std::vector<int>& panels, const std::vector<int>& order, std::vector<int> targets = {});
	void ReassignNames(const std::vector<int>& panels, const std::vector<int>& order);

	short ReadMetadata();
	void WriteMetadata(short metadata);
	int GetCurrentFrame();

	std::shared_ptr<Memory> _memory = std::make_shared<Memory>("witness64_d3d11.exe");

	friend class SwapTests_Shipwreck_Test;
};