Skip to content

Commit 8072b7b

Browse files
committed
Tutorial: say what the controls actually say
The lesson text was written in Cheat Engine's vocabulary -- "Value type to 4 Bytes", "Scan type", "Set Value type to Float", "Replace with NOP", "First Scan". Pointer Lab's combos are labelled Type and Mode, their values read i32 (int) / f32 (float) / f64 (double), the buttons are "First scan" and "Next scan", and the Access Watch action is "NOP". A reader following Step 2 with the real window open had to translate every line. The book quotes these steps verbatim, so they have to match the binary. Also names the Memory Viewer's Go button in Step 1, which the text assumed rather than mentioned.
1 parent 950f973 commit 8072b7b

1 file changed

Lines changed: 19 additions & 18 deletions

File tree

‎src/tutorial/main.cpp‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,14 @@ bool checkStep4(std::wstring& why) {
435435
return true;
436436
}
437437
if (!health && !ammo) {
438-
why = L"Neither is at 5000 yet. Health is a Float and ammo is a Double; a 4 Bytes scan "
439-
L"will not find either of them.";
438+
why = L"Neither is at 5000 yet. Health is an f32 (float) and ammo is an f64 (double); an "
439+
L"i32 (int) scan will not find either of them.";
440440
} else if (!health) {
441-
why = L"Ammo is there, health is not. Health is a Float -- change the value type before "
441+
why = L"Ammo is there, health is not. Health is an f32 (float) -- change the Type before "
442442
L"you scan for it.";
443443
} else {
444-
why = L"Health is there, ammo is not. Ammo is a Double, which is eight bytes rather than "
445-
L"four.";
444+
why = L"Health is there, ammo is not. Ammo is an f64 (double), which is eight bytes rather "
445+
L"than four.";
446446
}
447447
return false;
448448
}
@@ -623,8 +623,9 @@ const Step g_steps[]{
623623
L"Attach. The command bar should now name this process and its width.\r\n"
624624
L"2. This step's value lives at the address printed below. It is printed for you exactly "
625625
L"once: from Step 2 on, finding the address is the work.\r\n"
626-
L"3. Open the Memory Viewer panel, type that address into its address box, and change the "
627-
L"value to 1337. Adding it to the Address List and editing it there works just as well.\r\n"
626+
L"3. Open the Memory Viewer panel, type that address into its address box, press Go, and "
627+
L"change the value to 1337. Adding it to the Address List and editing it there works just as "
628+
L"well.\r\n"
628629
L"4. Press Next.\r\n"
629630
L"\r\n"
630631
L"The address is different every time this program starts, and it will be different again "
@@ -635,10 +636,10 @@ const Step g_steps[]{
635636
{L"Step 2 of 9 — Exact value scan", L"016913",
636637
L"The number below is real memory in this process. Find it.\r\n"
637638
L"\r\n"
638-
L"1. In the Scanner panel set Value type to 4 Bytes and Scan type to Exact value.\r\n"
639-
L"2. Type the number shown below and press First Scan. You will get many results: the "
639+
L"1. In the Scanner panel set Type to i32 (int) and Mode to Exact value.\r\n"
640+
L"2. Type the number shown below and press First scan. You will get many results: the "
640641
L"number is not unique, and at this point nothing distinguishes the right one.\r\n"
641-
L"3. Press Hit me to change it, type the new number, and press Next Scan.\r\n"
642+
L"3. Press Hit me to change it, type the new number, and press Next scan.\r\n"
642643
L"4. Repeat until one result is left. Double-click it to send it to the Address List, set "
643644
L"its value to 1000, and press Next.\r\n"
644645
L"\r\n"
@@ -652,10 +653,10 @@ const Step g_steps[]{
652653
L"This time the number is not shown. You have a health bar and nothing else, which is the "
653654
L"normal case: a game draws a bar, not an integer.\r\n"
654655
L"\r\n"
655-
L"1. Scan type: Unknown initial value. Value type: 4 Bytes. Press First Scan. Every "
656+
L"1. Mode: Unknown initial value. Type: i32 (int). Press First scan. Every "
656657
L"four-byte value in the process is now a candidate.\r\n"
657-
L"2. Press Hit me. Set Scan type to Decreased value and press Next Scan.\r\n"
658-
L"3. Press Heal. Set Scan type to Increased value and press Next Scan.\r\n"
658+
L"2. Press Hit me. Set Mode to Decreased value and press Next scan.\r\n"
659+
L"3. Press Heal. Set Mode to Increased value and press Next scan.\r\n"
659660
L"4. Alternate until few results remain, then set the survivor to 5000 and press Next.\r\n"
660661
L"\r\n"
661662
L"Increased and Decreased compare against the previous scan rather than against a number you "
@@ -665,13 +666,13 @@ const Step g_steps[]{
665666
L"Hit me", L"Heal", &doStep3Hit, &doStep3Heal, &checkStep3, &stateStep3},
666667

667668
{L"Step 4 of 9 — Float and double", L"127493",
668-
L"Health here is a float and ammo is a double. Neither is stored the way you would guess: a "
669-
L"4 Bytes scan for 100 will not find a float holding 100.0, because those bytes are "
669+
L"Health here is a float and ammo is a double. Neither is stored the way you would guess: an "
670+
L"i32 (int) scan for 100 will not find a float holding 100.0, because those bytes are "
670671
L"00 00 C8 42 rather than 64 00 00 00.\r\n"
671672
L"\r\n"
672-
L"1. Set Value type to Float and find health exactly as you found Step 2's value, typing the "
673+
L"1. Set Type to f32 (float) and find health exactly as you found Step 2's value, typing the "
673674
L"displayed number including its decimals.\r\n"
674-
L"2. Set Value type to Double and find ammo. A double is eight bytes, and a float scan will "
675+
L"2. Set Type to f64 (double) and find ammo. A double is eight bytes, and a float scan will "
675676
L"not find it.\r\n"
676677
L"3. Set both to 5000 or more and press Next.\r\n"
677678
L"\r\n"
@@ -691,7 +692,7 @@ const Step g_steps[]{
691692
L"address\". The Access Watch panel opens.\r\n"
692693
L"3. Press Hit me. One instruction appears, with a hit count and the registers it held when "
693694
L"it ran.\r\n"
694-
L"4. Select it and press \"Replace with NOP\". The patch is padded to the next instruction "
695+
L"4. Select it and press \"NOP\". The patch is padded to the next instruction "
695696
L"boundary, so it replaces whole instructions rather than the first half of one.\r\n"
696697
L"5. Press Next.\r\n"
697698
L"\r\n"

0 commit comments

Comments
 (0)