shithub: cstory

Download patch

ref: 602315fa39f97c819f1fa0722faa87a91c8dcc70
parent: bc5a9b2d9f039eeb72655428864a05f40f723864
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sun Sep 15 14:46:52 EDT 2019

Deobfuscate a value without affecting ASM

Doing 'fx / 32 / 0x200' produces different assembly.

--- a/src/Back.cpp
+++ b/src/Back.cpp
@@ -179,7 +179,7 @@
 	switch (gBack.type)
 	{
 		case 3:
-			x_1 = fx / 0x4000;
+			x_1 = fx / (32 * 0x200);
 			x_2 = x_1 + (((WINDOW_WIDTH + (32 - 1)) / 32) + 1);
 			y_1 = 0;
 			y_2 = y_1 + 32;