More documentation
This commit is contained in:
parent
69eed6a966
commit
59aeae07f8
1 changed files with 23 additions and 15 deletions
|
@ -18,6 +18,13 @@
|
||||||
#include "Stage.h"
|
#include "Stage.h"
|
||||||
#include "TextScr.h"
|
#include "TextScr.h"
|
||||||
|
|
||||||
|
enum CREDIT_MODE
|
||||||
|
{
|
||||||
|
CREDIT_MODE_STOP,
|
||||||
|
CREDIT_MODE_SCROLL_READ,
|
||||||
|
CREDIT_MODE_SCROLL_WAIT
|
||||||
|
};
|
||||||
|
|
||||||
enum ILLUSTRATION_ACTION
|
enum ILLUSTRATION_ACTION
|
||||||
{
|
{
|
||||||
ILLUSTRATION_ACTION_IDLE,
|
ILLUSTRATION_ACTION_IDLE,
|
||||||
|
@ -31,7 +38,7 @@ struct CREDIT
|
||||||
char *pData;
|
char *pData;
|
||||||
int offset;
|
int offset;
|
||||||
int wait;
|
int wait;
|
||||||
int mode;
|
CREDIT_MODE mode;
|
||||||
int start_x;
|
int start_x;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,10 +75,10 @@ void ActionStripper(void)
|
||||||
for (s = 0; s < MAX_STRIP; ++s)
|
for (s = 0; s < MAX_STRIP; ++s)
|
||||||
{
|
{
|
||||||
// Move up
|
// Move up
|
||||||
if (Strip[s].flag & 0x80 && Credit.mode)
|
if (Strip[s].flag & 0x80 && Credit.mode != CREDIT_MODE_STOP)
|
||||||
Strip[s].y -= 0x100;
|
Strip[s].y -= 0x100;
|
||||||
// Get removed when off-screen
|
// Get removed when off-screen
|
||||||
if (Strip[s].y <= -0x2000)
|
if (Strip[s].y <= -16 * 0x200)
|
||||||
Strip[s].flag = 0;
|
Strip[s].flag = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +272,7 @@ BOOL StartCreditScript(void)
|
||||||
// Reset credits
|
// Reset credits
|
||||||
Credit.offset = 0;
|
Credit.offset = 0;
|
||||||
Credit.wait = 0;
|
Credit.wait = 0;
|
||||||
Credit.mode = 1;
|
Credit.mode = CREDIT_MODE_SCROLL_READ;
|
||||||
Illust.x = -160 * 0x200;
|
Illust.x = -160 * 0x200;
|
||||||
Illust.act_no = ILLUSTRATION_ACTION_IDLE;
|
Illust.act_no = ILLUSTRATION_ACTION_IDLE;
|
||||||
|
|
||||||
|
@ -327,11 +334,12 @@ static void ActionCredit_Read(void)
|
||||||
|
|
||||||
// Copy the text to the cast text
|
// Copy the text to the cast text
|
||||||
memcpy(text, &Credit.pData[Credit.offset], len);
|
memcpy(text, &Credit.pData[Credit.offset], len);
|
||||||
text[len] = 0;
|
text[len] = '\0';
|
||||||
|
|
||||||
// Get cast ID
|
// Get cast ID
|
||||||
Credit.offset = a;
|
Credit.offset = a;
|
||||||
len = GetScriptNumber(&Credit.pData[++Credit.offset]);
|
Credit.offset += 1;
|
||||||
|
len = GetScriptNumber(&Credit.pData[Credit.offset]);
|
||||||
|
|
||||||
// Create cast object
|
// Create cast object
|
||||||
SetStripper(Credit.start_x, (WINDOW_HEIGHT + 8) * 0x200, text, len);
|
SetStripper(Credit.start_x, (WINDOW_HEIGHT + 8) * 0x200, text, len);
|
||||||
|
@ -344,7 +352,7 @@ static void ActionCredit_Read(void)
|
||||||
Credit.offset += 1;
|
Credit.offset += 1;
|
||||||
Credit.wait = GetScriptNumber(&Credit.pData[Credit.offset]);
|
Credit.wait = GetScriptNumber(&Credit.pData[Credit.offset]);
|
||||||
Credit.offset += 4;
|
Credit.offset += 4;
|
||||||
Credit.mode = 2;
|
Credit.mode = CREDIT_MODE_SCROLL_WAIT;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '+': // Change casts x-position
|
case '+': // Change casts x-position
|
||||||
|
@ -354,7 +362,7 @@ static void ActionCredit_Read(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '/': // Stop credits
|
case '/': // Stop credits
|
||||||
Credit.mode = 0;
|
Credit.mode = CREDIT_MODE_STOP;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case '!': // Change music
|
case '!': // Change music
|
||||||
|
@ -456,13 +464,13 @@ void ActionCredit(void)
|
||||||
// Update script, or if waiting, decrement the wait value
|
// Update script, or if waiting, decrement the wait value
|
||||||
switch (Credit.mode)
|
switch (Credit.mode)
|
||||||
{
|
{
|
||||||
case 1:
|
case CREDIT_MODE_SCROLL_READ:
|
||||||
ActionCredit_Read();
|
ActionCredit_Read();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case CREDIT_MODE_SCROLL_WAIT:
|
||||||
if (--Credit.wait <= 0)
|
if (--Credit.wait <= 0)
|
||||||
Credit.mode = 1;
|
Credit.mode = CREDIT_MODE_SCROLL_READ;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -519,24 +527,24 @@ int Scene_DownIsland(HWND hWnd, int mode)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
// Move down
|
// Move down
|
||||||
sprite.y += 0x33;
|
sprite.y += 0x200 / 10;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (wait < 350)
|
if (wait < 350)
|
||||||
{
|
{
|
||||||
// Move down at normal speed
|
// Move down at normal speed
|
||||||
sprite.y += 0x33;
|
sprite.y += 0x200 / 10;
|
||||||
}
|
}
|
||||||
else if (wait < 500)
|
else if (wait < 500)
|
||||||
{
|
{
|
||||||
// Move down slower
|
// Move down slower
|
||||||
sprite.y += 0x19;
|
sprite.y += 0x200 / 20;
|
||||||
}
|
}
|
||||||
else if (wait < 600)
|
else if (wait < 600)
|
||||||
{
|
{
|
||||||
// Move down slow
|
// Move down slow
|
||||||
sprite.y += 0xC;
|
sprite.y += 0x200 / 40;
|
||||||
}
|
}
|
||||||
else if (wait == 750)
|
else if (wait == 750)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue