-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathData.h
More file actions
114 lines (74 loc) · 3.28 KB
/
Data.h
File metadata and controls
114 lines (74 loc) · 3.28 KB
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
#ifndef DATA_H
#define DATA_H
class rRundata;
typedef rRundata * LPRRDATA;
enum FULLSCREENTYPE{BESTFIT=0, BESTPIXELPERFECTFIT=1, ONETOONE=2, MATCHWIDTH=3, MATCHHEIGHT=4, MANUAL=5, RESIZEWITHBORDER=6};
// --------------------------------
// EDITION OF OBJECT DATA STRUCTURE
// --------------------------------
// These values let you store data in your extension that will be saved in the MFA
// You should use these with properties
typedef struct tagEDATA_V1
{
extHeader eHeader;
short swidth;
short sheight;
} EDITDATA;
typedef EDITDATA * LPEDATA;
// --------------------------------
// RUNNING OBJECT DATA STRUCTURE
// --------------------------------
// If you want to store anything between actions/conditions/expressions
// you should store it here
typedef struct tagRDATA
{
#include "MagicRDATA.h"
//store all this crap globally instead
/*
bool fullscreen_initialized; //we don't initialize it right away, so we need to remember if we haven't done it yet
bool fullscreen; //remember what mode we're in
bool apply_fs_settings_to_window; //whether or not we should make the window sized the same as our fullscreen game rectangle would be
bool listen_for_maximize; //whether we should update the size automatically when the screen gets maximized
//NOTE: these values only apply to manual mode
int gamerectx; //x position of the game rectangle when in fullscreen
int gamerecty; //y position of game rectangle
int gamerectwidth; //width of the game rectangle when in fullscreen
int gamerectheight; //height of the game rectangle
int default_gamerectx; //obtained at the start and then never changed
int default_gamerecty;
int default_gamerectwidth;
int default_gamerectheight;
FULLSCREENTYPE fstype; //governs how we decide to size the game rectangle
float gamescale; //1.0 by default, this is multiplied to the size obtained from the fstype calculation
*/
} RUNDATA;
typedef RUNDATA * LPRDATA;
typedef struct _GLOBALDATA
{
bool fullscreen_initialized; //we don't initialize it right away, so we need to remember if we haven't done it yet
bool fullscreen; //remember what mode we're in
bool apply_fs_settings_to_window; //whether or not we should make the window sized the same as our fullscreen game rectangle would be
bool listen_for_maximize; //whether we should update the size automatically when the screen gets maximized
bool listen_for_monitor_switch; //Check if window switched monitors
//NOTE: these values only apply to manual mode
int gamerectx; //x position of the game rectangle when in fullscreen
int gamerecty; //y position of game rectangle
int gamerectwidth; //width of the game rectangle when in fullscreen
int gamerectheight; //height of the game rectangle
int default_gamerectx; //obtained at the start and then never changed
int default_gamerecty;
int default_gamerectwidth;
int default_gamerectheight;
HMONITOR previous_monitor;
int AppWidth;
int AppHeight;
int PlayX;
int PlayY;
int Highest;
int OffsetX;
int OffsetY;
FULLSCREENTYPE fstype; //governs how we decide to size the game rectangle
float gamescale; //1.0 by default, this is multiplied to the size obtained from the fstype calculation
} GLOBALDATA;
extern GLOBALDATA GlobalData;
#endif