shithub: cstory

Download patch

ref: 43c0b670abfcd539e426a9bbef9220530fabe1b5
parent: 46ca9b4d4ab07c6a40c6e4da192196e414b47a3d
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Apr 25 20:07:45 EDT 2020

Figured out the mystery values in RestoreSurfaces

They're ASCII characters.

--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -766,7 +766,7 @@
 	{
 		++surfaces_regenerated;
 		frontbuffer->Restore();
-		out(0x66);
+		out('f');	// 'f' for 'frontbuffer'
 	}
 
 	if (backbuffer->IsLost() == DDERR_SURFACELOST)
@@ -773,7 +773,7 @@
 	{
 		++surfaces_regenerated;
 		backbuffer->Restore();
-		out(0x62);
+		out('b');	// 'b' for 'backbuffer'
 	}
 
 	for (s = 0; s < SURFACE_ID_MAX; ++s)
@@ -784,7 +784,7 @@
 			{
 				++surfaces_regenerated;
 				surf[s]->Restore();
-				out(0x30 + s);
+				out('0' + s);	// The number of the surface lost
 
 				if (!surface_metadata[s].bSystem)
 				{