ref: 69eed6a9662a4e41d2bdc6674a218b1d39a123f1
parent: 2ab0ff2455a2f25dd4c8d49195fd1d1362692f4a
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sun Sep 27 16:45:08 EDT 2020
More documentation
--- a/src/Ending.cpp
+++ b/src/Ending.cpp
@@ -18,6 +18,13 @@
#include "Stage.h"
#include "TextScr.h"
+enum ILLUSTRATION_ACTION
+{
+ ILLUSTRATION_ACTION_IDLE,
+ ILLUSTRATION_ACTION_SLIDE_IN,
+ ILLUSTRATION_ACTION_SLIDE_OUT
+};
+
struct CREDIT
{
long size;
@@ -39,7 +46,7 @@
struct ILLUSTRATION
{
- int act_no;
+ ILLUSTRATION_ACTION act_no;
int x;
};
@@ -154,18 +161,18 @@
{
switch (Illust.act_no)
{
- case 0: // Off-screen to the left
+ case ILLUSTRATION_ACTION_IDLE: // Off-screen to the left
Illust.x = -160 * 0x200;
break;
- case 1: // Move in from the left
+ case ILLUSTRATION_ACTION_SLIDE_IN: // Move in from the left
Illust.x += 40 * 0x200;
if (Illust.x > 0)
Illust.x = 0;
break;
- case 2: // Move out from the right
- Illust.x -= 0x5000;
+ case ILLUSTRATION_ACTION_SLIDE_OUT: // Move out from the right
+ Illust.x -= 40 * 0x200;
if (Illust.x < -160 * 0x200)
Illust.x = -160 * 0x200;
break;
@@ -260,7 +267,7 @@
Credit.wait = 0;
Credit.mode = 1;
Illust.x = -160 * 0x200;
- Illust.act_no = 0;
+ Illust.act_no = ILLUSTRATION_ACTION_IDLE;
// Modify cliprect
grcGame.left = WINDOW_WIDTH / 2;
@@ -464,13 +471,13 @@
void SetCreditIllust(int a)
{
ReloadIllust(a);
- Illust.act_no = 1;
+ Illust.act_no = ILLUSTRATION_ACTION_SLIDE_IN;
}
// Slide illustration off-screen
void CutCreditIllust(void)
{
- Illust.act_no = 2;
+ Illust.act_no = ILLUSTRATION_ACTION_SLIDE_OUT;
}
// Scene of the island falling