about summary refs log tree commit diff stats
path: root/App
diff options
context:
space:
mode:
authorjbzdarkid <jbzdarkid@gmail.com>2018-11-18 14:34:34 -0800
committerjbzdarkid <jbzdarkid@gmail.com>2018-11-18 14:34:34 -0800
commitc10b73f30280e5dd758b77e2ef8e5a622ff3c876 (patch)
tree516924b39c353354d72a7020b1c3643a7f35f0b0 /App
parent145bfe30527ca604be7100f4515290152c8bc55b (diff)
downloadwitness-tutorializer-c10b73f30280e5dd758b77e2ef8e5a622ff3c876.tar.gz
witness-tutorializer-c10b73f30280e5dd758b77e2ef8e5a622ff3c876.tar.bz2
witness-tutorializer-c10b73f30280e5dd758b77e2ef8e5a622ff3c876.zip
Works, on old version
Diffstat (limited to 'App')
-rw-r--r--App/Main.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/App/Main.cpp b/App/Main.cpp index 7a8e7f3..7e802e9 100644 --- a/App/Main.cpp +++ b/App/Main.cpp
@@ -2,6 +2,7 @@
2#include <Richedit.h> 2#include <Richedit.h>
3 3
4#include <string> 4#include <string>
5#include <sstream>
5 6
6#include "Version.h" 7#include "Version.h"
7#include "Random.h" 8#include "Random.h"
@@ -18,7 +19,7 @@
18#define IDC_DUMP 0x408 19#define IDC_DUMP 0x408
19#define IDT_RANDOMIZED 0x409 20#define IDT_RANDOMIZED 0x409
20 21
21HWND hwndSeed, hwndRandomize; 22HWND hwndSeed, hwndRandomize, hwndDebug;
22// int panel = 0x18AF; 23// int panel = 0x18AF;
23int panel = 0x33D4; 24int panel = 0x33D4;
24std::shared_ptr<Panel> _panel; 25std::shared_ptr<Panel> _panel;
@@ -68,12 +69,21 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
68 */ 69 */
69 if (randomizer->GameIsRandomized()) break; 70 if (randomizer->GameIsRandomized()) break;
70 Random::SetSeed(seed); 71 Random::SetSeed(seed);
72
73
74 std::wstringstream debug;
75
71 std::wstring seedString = std::to_wstring(seed); 76 std::wstring seedString = std::to_wstring(seed);
72 SetWindowText(hwndRandomize, L"Randomizing..."); 77 SetWindowText(hwndRandomize, L"Randomizing...");
73 SetWindowText(hwndSeed, seedString.c_str()); 78 SetWindowText(hwndSeed, seedString.c_str());
74 RedrawWindow(hwnd, NULL, NULL, RDW_UPDATENOW); 79 RedrawWindow(hwnd, NULL, NULL, RDW_UPDATENOW);
75 80
76 randomizer->Randomize(); 81 randomizer->Randomize();
82 debug << Random::RandInt(0, 1000) << " ";
83 debug << Random::RandInt(0, 1000) << "\n";
84 debug << Random::RandInt(0, 1000) << " ";
85 debug << Random::RandInt(0, 1000);
86 SetWindowText(hwndDebug, debug.str().c_str());
77 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) { 87 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) {
78 randomizer->AdjustSpeed(); 88 randomizer->AdjustSpeed();
79 } 89 }
@@ -163,6 +173,10 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
163 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 173 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
164 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); 174 27, 50, 205, 16, hwnd, NULL, hInstance, NULL);
165 175
176 hwndDebug = CreateWindow(L"STATIC", L"",
177 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
178 200, 200, 100, 100, hwnd, NULL, hInstance, NULL);
179
166 /* 180 /*
167 CreateWindow(L"BUTTON", L"", 181 CreateWindow(L"BUTTON", L"",
168 WS_VISIBLE | WS_CHILD | BS_CHECKBOX, 182 WS_VISIBLE | WS_CHILD | BS_CHECKBOX,