More documentation

This commit is contained in:
Clownacy 2020-09-27 20:45:08 +01:00
parent 2ab0ff2455
commit 69eed6a966

View file

@ -18,6 +18,13 @@
#include "Stage.h" #include "Stage.h"
#include "TextScr.h" #include "TextScr.h"
enum ILLUSTRATION_ACTION
{
ILLUSTRATION_ACTION_IDLE,
ILLUSTRATION_ACTION_SLIDE_IN,
ILLUSTRATION_ACTION_SLIDE_OUT
};
struct CREDIT struct CREDIT
{ {
long size; long size;
@ -39,7 +46,7 @@ struct STRIP
struct ILLUSTRATION struct ILLUSTRATION
{ {
int act_no; ILLUSTRATION_ACTION act_no;
int x; int x;
}; };
@ -154,18 +161,18 @@ void ActionIllust(void)
{ {
switch (Illust.act_no) switch (Illust.act_no)
{ {
case 0: // Off-screen to the left case ILLUSTRATION_ACTION_IDLE: // Off-screen to the left
Illust.x = -160 * 0x200; Illust.x = -160 * 0x200;
break; break;
case 1: // Move in from the left case ILLUSTRATION_ACTION_SLIDE_IN: // Move in from the left
Illust.x += 40 * 0x200; Illust.x += 40 * 0x200;
if (Illust.x > 0) if (Illust.x > 0)
Illust.x = 0; Illust.x = 0;
break; break;
case 2: // Move out from the right case ILLUSTRATION_ACTION_SLIDE_OUT: // Move out from the right
Illust.x -= 0x5000; Illust.x -= 40 * 0x200;
if (Illust.x < -160 * 0x200) if (Illust.x < -160 * 0x200)
Illust.x = -160 * 0x200; Illust.x = -160 * 0x200;
break; break;
@ -260,7 +267,7 @@ BOOL StartCreditScript(void)
Credit.wait = 0; Credit.wait = 0;
Credit.mode = 1; Credit.mode = 1;
Illust.x = -160 * 0x200; Illust.x = -160 * 0x200;
Illust.act_no = 0; Illust.act_no = ILLUSTRATION_ACTION_IDLE;
// Modify cliprect // Modify cliprect
grcGame.left = WINDOW_WIDTH / 2; grcGame.left = WINDOW_WIDTH / 2;
@ -464,13 +471,13 @@ void ActionCredit(void)
void SetCreditIllust(int a) void SetCreditIllust(int a)
{ {
ReloadIllust(a); ReloadIllust(a);
Illust.act_no = 1; Illust.act_no = ILLUSTRATION_ACTION_SLIDE_IN;
} }
// Slide illustration off-screen // Slide illustration off-screen
void CutCreditIllust(void) void CutCreditIllust(void)
{ {
Illust.act_no = 2; Illust.act_no = ILLUSTRATION_ACTION_SLIDE_OUT;
} }
// Scene of the island falling // Scene of the island falling