shithub: cstory

Download patch

ref: 02295489d234c33fd68a0150b01fa726c393efc1
parent: a18be9c450ad1ed61b396c0026310284580bc0da
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Aug 5 15:42:18 EDT 2020

More background documentation

--- a/src/Back.cpp
+++ b/src/Back.cpp
@@ -77,6 +77,7 @@
 	}
 }
 
+/// Draw background background elements
 void PutBack(int fx, int fy)
 {
 	int x, y;
@@ -114,6 +115,7 @@
 
 		case BACKGROUND_TYPE_OUTSIDE_WITH_WIND:
 		case BACKGROUND_TYPE_OUTSIDE:
+			// Draw sky
 			rect.top = 0;
 			rect.bottom = 88;
 			rect.left = 0;
@@ -120,6 +122,7 @@
 			rect.right = 320;
 			PutBitmap4(&grcGame, 0, 0, &rect, SURFACE_ID_LEVEL_BACKGROUND);
 
+			// Draw first cloud layer
 			rect.top = 88;
 			rect.bottom = 123;
 			rect.left = gBack.fx / 2;
@@ -129,6 +132,7 @@
 			rect.left = 0;
 			PutBitmap4(&grcGame, 320 - ((gBack.fx / 2) % 320), 88, &rect, SURFACE_ID_LEVEL_BACKGROUND);
 
+			// Draw second cloud layer
 			rect.top = 123;
 			rect.bottom = 146;
 			rect.left = gBack.fx % 320;
@@ -138,6 +142,7 @@
 			rect.left = 0;
 			PutBitmap4(&grcGame, 320 - (gBack.fx % 320), 123, &rect, SURFACE_ID_LEVEL_BACKGROUND);
 
+			// Draw third cloud layer
 			rect.top = 146;
 			rect.bottom = 176;
 			rect.left = 2 * gBack.fx % 320;
@@ -147,6 +152,7 @@
 			rect.left = 0;
 			PutBitmap4(&grcGame, 320 - ((gBack.fx * 2) % 320), 146, &rect, SURFACE_ID_LEVEL_BACKGROUND);
 
+			// Draw fourth cloud layer
 			rect.top = 176;
 			rect.bottom = 240;
 			rect.left = 4 * gBack.fx % 320;
@@ -160,6 +166,7 @@
 	}
 }
 
+/// Draw background foreground elements - only the water background type makes use of this
 void PutFront(int fx, int fy)
 {
 	int xpos, ypos;