-
Notifications
You must be signed in to change notification settings - Fork 5
/
ObjectTimer.h
74 lines (57 loc) · 1.68 KB
/
ObjectTimer.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#pragma once
#include "defines.h"
#include "IRenderable.h"
#define TIMER_IS_ALIVE (!!isAlivePtr? *isAlivePtr: false)
#define TIMER_IS_NOT_SPAWNED (!isAlivePtr)
#define TIMER_LABEL_ALIVE L"ALIVE"
namespace JungleTime{
class ObjectTimer : public JungleTime::IRenderableObject
{
public:
ObjectTimer(LPCWSTR innerName, int cooldown, int spawnAt, int objectMemoryPattern);
virtual ~ObjectTimer(void);
void Render(PDIRECT3DDEVICE9 pDevice, int frameNum, int curTimeSecs);
bool Init(PDIRECT3DDEVICE9 pDevice);
//DX resources managment
bool PrepareResources(PDIRECT3DDEVICE9 pDevice);
void OnLostDevice();
void OnResetDevice(PDIRECT3DDEVICE9 pDevice);
//Get pointers we can grab only in runtime, after some special in-game events
bool TryToInitNetobjectPointers();
//In-game pointers
int objectMemoryPattern;
bool *isAlivePtr;
//We need to know what was before, to save time in the right moment
bool isAliveBefore;
//Name for config and logging
LPCWSTR innerName;
int killedAt;
int cooldown;
int spawnAt;
/************************************************************************/
/* OVERLAY SETTINGS */
/************************************************************************/
//Label
LPCWSTR labelName;
bool showLabel;
RECT labelCoords;
//Timer
int redLine;
RECT timerCoords;
int timerFontSize;
int timerFontWeight;
LPCWSTR timerFontName;
DWORD timerFontColor;
DWORD timerFontRedlineColor;
DWORD timerFontAliveColor;
//Announce
bool showAnnounce;
RECT announceCoords;
int announceFontSize;
int announceFontWeight;
LPCWSTR announceFontName;
DWORD announceFontColor;
//Overlay fonts
LPD3DXFONT timerFont;
};
}