summary refs log tree commit diff stats
path: root/App
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2019-11-07 10:15:29 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2019-11-07 10:15:29 -0800
commit616fb965878997e4225afa651c5a4206a504fb61 (patch)
tree5405b0611d0b1b455778b9161f23e7304962c034 /App
parent5085af8b5163f14d37284b5ee0e8fb2c4aaef7cb (diff)
downloadwitness-tutorializer-616fb965878997e4225afa651c5a4206a504fb61.tar.gz
witness-tutorializer-616fb965878997e4225afa651c5a4206a504fb61.tar.bz2
witness-tutorializer-616fb965878997e4225afa651c5a4206a504fb61.zip
Design for new version -- will still have to do conversions.
Diffstat (limited to 'App')
-rw-r--r--App/Main.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/App/Main.cpp b/App/Main.cpp index 78726ed..6946168 100644 --- a/App/Main.cpp +++ b/App/Main.cpp
@@ -20,6 +20,19 @@
20#define DISABLE_SNIPES 0x407 20#define DISABLE_SNIPES 0x407
21#define SPEED_UP_AUTOSCROLLERS 0x408 21#define SPEED_UP_AUTOSCROLLERS 0x408
22 22
23/* ------- Temp ------- */
24#define TMP1 0x501
25#define TMP2 0x502
26#define TMP3 0x503
27#define TMP4 0x504
28
29#include "Panel.h"
30int panel = 0x33D4;
31std::shared_ptr<Panel> g_panel;
32/* ------- Temp ------- */
33
34
35
23// Globals 36// Globals
24HWND g_hwnd; 37HWND g_hwnd;
25HWND g_seed; 38HWND g_seed;
@@ -120,6 +133,18 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
120 case SPEED_UP_AUTOSCROLLERS: 133 case SPEED_UP_AUTOSCROLLERS:
121 CheckDlgButton(hwnd, SPEED_UP_AUTOSCROLLERS, !IsDlgButtonChecked(hwnd, SPEED_UP_AUTOSCROLLERS)); 134 CheckDlgButton(hwnd, SPEED_UP_AUTOSCROLLERS, !IsDlgButtonChecked(hwnd, SPEED_UP_AUTOSCROLLERS));
122 break; 135 break;
136 case TMP1:
137 g_panel = std::make_shared<Panel>(g_witnessProc, panel);
138 break;
139 case TMP2:
140 if(g_panel) g_panel->Write(panel);
141 break;
142 case TMP3:
143 if(g_panel) g_panel->Random();
144 break;
145 case TMP4:
146 if(g_panel) g_panel->Serialize();
147 break;
123 } 148 }
124 } 149 }
125 return DefWindowProc(hwnd, message, wParam, lParam); 150 return DefWindowProc(hwnd, message, wParam, lParam);
@@ -186,7 +211,11 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
186 CreateLabel(30, 320, 240, L"Disable Swamp and Shadows snipes"); 211 CreateLabel(30, 320, 240, L"Disable Swamp and Shadows snipes");
187 CreateCheckbox(10, 340, SPEED_UP_AUTOSCROLLERS); 212 CreateCheckbox(10, 340, SPEED_UP_AUTOSCROLLERS);
188 CreateLabel(30, 340, 205, L"Speed up various autoscrollers"); 213 CreateLabel(30, 340, 205, L"Speed up various autoscrollers");
189 EnableWindow(g_randomizerStatus, FALSE); 214
215 CreateButton(200, 100, 100, L"Read", TMP1);
216 CreateButton(200, 130, 100, L"Write", TMP2);
217 CreateButton(200, 160, 100, L"Random", TMP3);
218 CreateButton(200, 190, 100, L"Dump", TMP4);
190 219
191 g_witnessProc->StartHeartbeat(g_hwnd); 220 g_witnessProc->StartHeartbeat(g_hwnd);
192 221