forked from tetl/Frozlunky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_hud.h
43 lines (29 loc) · 807 Bytes
/
custom_hud.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
#pragma once
#include "patches.h"
#include "derandom.h"
#include <string>
//!TODO (offtopic) check if death offset null and invalidate daily if that can't be found
class CustomHudPatch : public Patch {
private:
std::shared_ptr<DerandomizePatch> dp;
Address allocated;
Address vars_space;
Address executable_space;
Address gfx_RenderGraphic;
Address CreateGraphicFromText;
Address jump_patch_addr;
BYTE* jump_patch_orig;
size_t allocated_size;
bool is_valid;
std::wstring current_text;
private:
virtual bool _perform() override;
virtual bool _undo() override;
public:
CustomHudPatch(std::shared_ptr<DerandomizePatch> spel, std::wstring text=std::wstring());
~CustomHudPatch();
virtual bool valid() override {
return is_valid;
}
void set_text(const std::wstring& text);
};