-
Notifications
You must be signed in to change notification settings - Fork 0
/
TRXCHEATWIN.h
154 lines (125 loc) · 6.07 KB
/
TRXCHEATWIN.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// TRXCHEATWIN.h : main header file for the TR3CHEATWIN application
//
#pragma once
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
//
/////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////
#include "resource.h" // main symbols
#include <afx.h>
#include "afxdlgs.h"
#include "TR10SaveGame.h"
#include "TR15SaveGame.h"
#include "TR2SaveGame.h"
#include "TR3SaveGame.h"
#include "TR4SaveGame.h"
#include "TR4NGSaveGame.h"
#include "TR5SaveGame.h"
#include "AutomaticVersionHeader.h"
//
/////////////////////////////////////////////////////////////////////////////
// CTRXCHEATWINApp:
// See TR3CHEATWIN.cpp for the implementation of this class
//
/////////////////////////////////////////////////////////////////////////////
class CTRXCHEATWINApp : public CWinApp
{
public:
CTRXCHEATWINApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTRXCHEATWINApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CTRXCHEATWINApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
//
protected :
char ModuleFileName [ MAX_PATH ];
char InitFileName [ MAX_PATH ];
public :
WORD OSVersion [ 4 ];
// Ex 0x00060001 for Windows 7
DWORD OSHVersion;
// Release Details
DWORD OSLVersion;
//
public :
static char *FindFileName ( char *pText );
static const char *FindFileName ( const char *pText );
static char *FindFileType( char *pText );
static const char *FindFileType( const char *pText );
// Remove filename including trailing \ or /
static char *RemoveFilename ( char *pText );
static char *SkipSpaces ( char *pText );
static void RemoveEnclosingQuotes ( char *pText, size_t iLength );
static char *CopyBetweenQuotes ( char *pTarget, size_t iLength, char *pSource );
void ReadIndicators();
void WriteIndicators();
// Strictly Lower
bool OSVersionLowerThan ( WORD major, WORD minor );
// Greater Or Equal
bool OSVersionGreaterThan ( WORD major, WORD minor );
void GetModule ();
bool SearchInitFile ( const char *pInitFileName, size_t iInitFileName );
BOOL WriteProfileIniFile ( const char *section, const char *keyName, const char *pValue );
BOOL ReadProfileIniFile ( const char *section, const char *keyName, char *pValue, size_t iValue, const char *pDefault );
UINT GetProfileInt ( const char *section, const char *keyName, int defaultValue );
UINT GetProfileInt ( const char *section, const char *keyName, int novalue, int defaultValue );
ULONG GetProfileLong ( const char *section, const char *keyName, int defaultValue );
double GetProfileDouble ( const char *section, const char *keyName, double defaultValue );
CString GetProfileString( const char *section, const char *keyName, const char *pDefaultValue = "" );
BOOL WriteProfileLong ( const char *section, const char *keyName, long value, bool bHexa = false );
BOOL WriteProfileInt ( const char *section, const char *keyName, int value, bool bHexa = false );
BOOL WriteProfileDouble ( const char *section, const char *keyName, double value );
BOOL WriteProfileString ( const char *section, const char *keyName, const char *pValue );
void ReStartProgram(CWnd *pWnd);
static BOOL AcceptedPattern ( const char *pName );
static char *RemoveFileType ( char *pText );
static const char *__strstri ( const char *pString, const char *pSearched );
static int __strnicmp ( const char *pString, const char *pBegining );
static BOOL EndsWithI ( const char *pText, const char *pEnd );
static void ResetCustomLabels ();
afx_msg void OnHelp();
};
//
#define PROFILE_SETTING "Settings"
#define PROFILE_MENU "Menu"
#define PROFILE_REMASTERED "Remastered"
#define PROFILE_STANDARD "Standard"
#define PROFILE_LAST_OPENED "Last Opened"
#define PROFILE_TRX_LAST_OPENED "TRX Last Opened"
#define PROFILE_UNCHECKED "Unchecked"
#define PROFILE_SEARCH_EXT "Search Extended"
#define PROFILE_SEARCH_POS_EXT "Search Position Extended"
#define PROFILE_MIN_NG_SIZE "Min NG Size"
#define PROFILE_MAX_NG_SIZE "Max NG Size"
#define PROFILE_DARKTHEME "DarkTheme"
#define PROFILE_THEME_RESTART "Restart on Change Theme"
#define PROFILE_SQUARECORNERS "Square Corners"
#define PROFILE_SQUAREFORCE "Square Force"
#define PROFILE_RECURSE_WRITE "TRX Recurse Write"
#define PROFILE_EXTEND_VERTICAL "Extend Vertical"
#define PROFILE_TRR_BACKUP "TRR Backup"
#define PROFILE_TR_BACKUP "TR Backup"
#define PROFILE_EXT_SEA_POS "Extra Search Position v1.0"
#define PROFILE_USE_TR4_RANGE "Use TR4 Position Range"
#define PROFILE_USE_TR5_RANGE "Use TR5 Position Range"
#define PROFILE_TR123_INDEX "TR123 Index Maximum"
#define PROFILE_TR4_INDEX "TR4 Index Maximum"
#define PROFILE_TR4NG_INDEX "TR4 NG Index Maximum"
#define PROFILE_TR5_INDEX "TR5 Index Maximum"
#define PROFILE_TRR_INDEX "TRR Index Maximum"
#define PROFILE_TRACE_TRNG_SAVE "Trace TRNG Savegame"
#define PROFILE_ALTER_TRNG_POS "Alter TRNG Position"
#define PROFILE_ALTER_TRNG_IND "Alter TRNG Indice"
#define PROFILE_ALTER_TRNG_AGUNS "Alter TRNG Ammos and Guns"
/////////////////////////////////////////////////////////////////////////////