-
Notifications
You must be signed in to change notification settings - Fork 1
/
StateIntro.h
57 lines (54 loc) · 2 KB
/
StateIntro.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
54
55
56
57
#pragma once
#include "4dm.h"
namespace fdm
{
class StateIntro : public State
{
public:
inline static StateIntro* instanceObj = reinterpret_cast<StateIntro*>((base + 0x279140));
glm::mat4 projection2D; // 0x8
glm::mat4 projection3D; // 0x48
inline static const int fileCount = 6;
inline static const char* fileNames[fileCount] = { "logo.png", "moon.png", "sun.png", "crosshair.png", "targetBlock.png", "forg.png" }; // rip "ock.png"
struct
{
unsigned char* data;
int width;
int height;
int channels;
} imageData[fileCount];
std::atomic_int filesLoaded; // 0x118
float displayProgress; // 0x11C
FontRenderer font; // 0x120
Shader* hypercubeShader; // 0x1C0
MeshRenderer hypercubeRenderer; // 0x1C8
uint32_t mvID; // 0x1E8
float rotation; // 0x1EC
QuadRenderer qr; // 0x1F0
Shader* qs; // 0x218
void updateProjection(int width, int height)
{
return reinterpret_cast<void (__thiscall*)(StateIntro* self, int width, int height)>(getFuncAddr((int)Func::StateIntro::updateProjection))(this, width, height);
}
void loadFiles()
{
return reinterpret_cast<void (__thiscall*)(StateIntro* self)>(getFuncAddr((int)Func::StateIntro::loadFiles))(this);
}
void init(StateManager& s) override
{
return reinterpret_cast<void (__thiscall*)(StateIntro* self, StateManager& s)>(getFuncAddr((int)Func::StateIntro::init))(this, s);
}
void update(StateManager& s, double dt) override
{
return reinterpret_cast<void (__thiscall*)(StateIntro* self, StateManager& s, double dt)>(getFuncAddr((int)Func::StateIntro::update))(this, s, dt);
}
void render(StateManager& s) override
{
return reinterpret_cast<void (__thiscall*)(StateIntro* self, StateManager& s)>(getFuncAddr((int)Func::StateIntro::render))(this, s);
}
void windowResize(StateManager& s, int width, int height) override
{
return reinterpret_cast<void (__thiscall*)(StateIntro* self, StateManager& s, int width, int height)>(getFuncAddr((int)Func::StateIntro::windowResize))(this, s, width, height);
}
};
}