Document caret stuff some more
This commit is contained in:
parent
8adf593403
commit
d41b3993f5
1 changed files with 72 additions and 49 deletions
|
@ -38,24 +38,24 @@ CARET gCrt[CARET_MAX];
|
||||||
|
|
||||||
// Sprite offsets
|
// Sprite offsets
|
||||||
CARET_TABLE gCaretTable[18] = {
|
CARET_TABLE gCaretTable[18] = {
|
||||||
{0, 0},
|
{0, 0}, // Null
|
||||||
{ 4 * 0x200, 4 * 0x200},
|
{ 4 * 0x200, 4 * 0x200}, // Bubble
|
||||||
{ 8 * 0x200, 8 * 0x200},
|
{ 8 * 0x200, 8 * 0x200}, // Projectile dissipation
|
||||||
{ 8 * 0x200, 8 * 0x200},
|
{ 8 * 0x200, 8 * 0x200}, // Shoot
|
||||||
{ 8 * 0x200, 8 * 0x200},
|
{ 8 * 0x200, 8 * 0x200}, // Snake after-image? This doesn't seem to be used.
|
||||||
{ 4 * 0x200, 4 * 0x200},
|
{ 4 * 0x200, 4 * 0x200}, // 'Zzz' - snoring
|
||||||
{ 8 * 0x200, 8 * 0x200},
|
{ 8 * 0x200, 8 * 0x200}, // Duplicate of the Snake after-image
|
||||||
{ 4 * 0x200, 4 * 0x200},
|
{ 4 * 0x200, 4 * 0x200}, // Exhaust (used by the Booster and hoverbike)
|
||||||
{ 8 * 0x200, 8 * 0x200},
|
{ 8 * 0x200, 8 * 0x200}, // Drowned Quote
|
||||||
{ 8 * 0x200, 8 * 0x200},
|
{ 8 * 0x200, 8 * 0x200}, // The '?' that appears when you press the down key
|
||||||
{28 * 0x200, 8 * 0x200},
|
{28 * 0x200, 8 * 0x200}, // 'Level Up!'
|
||||||
{ 4 * 0x200, 4 * 0x200},
|
{ 4 * 0x200, 4 * 0x200}, // Red hurt particles (used by bosses and invisible hidden pickups)
|
||||||
{16 * 0x200, 16 * 0x200},
|
{16 * 0x200, 16 * 0x200}, // Missile Launcher explosion flash
|
||||||
{ 4 * 0x200, 4 * 0x200},
|
{ 4 * 0x200, 4 * 0x200}, // Dust particles (used when Quote jumps into the ceiling)
|
||||||
{20 * 0x200, 20 * 0x200},
|
{20 * 0x200, 20 * 0x200}, // Broken (unknown and unused)
|
||||||
{ 4 * 0x200, 4 * 0x200},
|
{ 4 * 0x200, 4 * 0x200}, // Tiny version of the projectile dissipation effect
|
||||||
{20 * 0x200, 4 * 0x200},
|
{20 * 0x200, 4 * 0x200}, // 'Empty!'
|
||||||
{52 * 0x200, 4 * 0x200}
|
{52 * 0x200, 4 * 0x200} // 'PUSH JUMP KEY!' (unused)
|
||||||
};
|
};
|
||||||
|
|
||||||
void InitCaret(void)
|
void InitCaret(void)
|
||||||
|
@ -63,11 +63,13 @@ void InitCaret(void)
|
||||||
memset(gCrt, 0, sizeof(gCrt));
|
memset(gCrt, 0, sizeof(gCrt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Null
|
||||||
void ActCaret00(CARET *crt)
|
void ActCaret00(CARET *crt)
|
||||||
{
|
{
|
||||||
(void)crt;
|
(void)crt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bubble
|
||||||
void ActCaret01(CARET *crt)
|
void ActCaret01(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[4] = {
|
RECT rcLeft[4] = {
|
||||||
|
@ -114,6 +116,7 @@ void ActCaret01(CARET *crt)
|
||||||
crt->rect = rcRight[crt->ani_no];
|
crt->rect = rcRight[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Projectile dissipation
|
||||||
void ActCaret02(CARET *crt)
|
void ActCaret02(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect_left[4] = {
|
RECT rect_left[4] = {
|
||||||
|
@ -187,6 +190,7 @@ void ActCaret02(CARET *crt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Shoot
|
||||||
void ActCaret03(CARET *crt)
|
void ActCaret03(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect[4] = {
|
RECT rect[4] = {
|
||||||
|
@ -212,17 +216,19 @@ void ActCaret03(CARET *crt)
|
||||||
crt->rect = rect[crt->ani_no];
|
crt->rect = rect[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Snake after-image? This doesn't seem to be used.
|
||||||
void ActCaret04(CARET *crt)
|
void ActCaret04(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect[9] = {
|
RECT rect[9] = {
|
||||||
|
// Left
|
||||||
{64, 32, 80, 48},
|
{64, 32, 80, 48},
|
||||||
{80, 32, 96, 48},
|
{80, 32, 96, 48},
|
||||||
{96, 32, 112, 48},
|
{96, 32, 112, 48},
|
||||||
|
// Up
|
||||||
{64, 48, 80, 64},
|
{64, 48, 80, 64},
|
||||||
{80, 48, 96, 64},
|
{80, 48, 96, 64},
|
||||||
{96, 48, 112, 64},
|
{96, 48, 112, 64},
|
||||||
|
// Right
|
||||||
{64, 64, 80, 80},
|
{64, 64, 80, 80},
|
||||||
{80, 64, 96, 80},
|
{80, 64, 96, 80},
|
||||||
{96, 64, 112, 80},
|
{96, 64, 112, 80},
|
||||||
|
@ -244,6 +250,7 @@ void ActCaret04(CARET *crt)
|
||||||
crt->rect = rect[(crt->direct * 3) + crt->ani_no];
|
crt->rect = rect[(crt->direct * 3) + crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'Zzz' - snoring
|
||||||
void ActCaret05(CARET *crt)
|
void ActCaret05(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rect[7] = {
|
RECT rect[7] = {
|
||||||
|
@ -276,6 +283,9 @@ void ActCaret05(CARET *crt)
|
||||||
crt->rect = rect[crt->ani_no];
|
crt->rect = rect[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No ActCaret06...
|
||||||
|
|
||||||
|
// Exhaust (used by the Booster and hoverbike)
|
||||||
void ActCaret07(CARET *crt)
|
void ActCaret07(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[7] = {
|
RECT rcLeft[7] = {
|
||||||
|
@ -320,6 +330,7 @@ void ActCaret07(CARET *crt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Drowned Quote
|
||||||
void ActCaret08(CARET *crt)
|
void ActCaret08(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft = {16, 80, 32, 96};
|
RECT rcLeft = {16, 80, 32, 96};
|
||||||
|
@ -331,6 +342,7 @@ void ActCaret08(CARET *crt)
|
||||||
crt->rect = rcRight;
|
crt->rect = rcRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The '?' that appears when you press the down key
|
||||||
void ActCaret09(CARET *crt)
|
void ActCaret09(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft = {0, 80, 16, 96};
|
RECT rcLeft = {0, 80, 16, 96};
|
||||||
|
@ -348,6 +360,7 @@ void ActCaret09(CARET *crt)
|
||||||
crt->rect = rcRight;
|
crt->rect = rcRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'Level Up!'
|
||||||
void ActCaret10(CARET *crt)
|
void ActCaret10(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -385,6 +398,7 @@ void ActCaret10(CARET *crt)
|
||||||
crt->rect = rcRight[crt->ani_wait / 2 % 2];
|
crt->rect = rcRight[crt->ani_wait / 2 % 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Red hurt particles (used by bosses and invisible hidden pickups)
|
||||||
void ActCaret11(CARET *crt)
|
void ActCaret11(CARET *crt)
|
||||||
{
|
{
|
||||||
unsigned char deg;
|
unsigned char deg;
|
||||||
|
@ -426,6 +440,7 @@ void ActCaret11(CARET *crt)
|
||||||
crt->rect = rcRight[crt->ani_no];
|
crt->rect = rcRight[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Missile Launcher explosion flash
|
||||||
void ActCaret12(CARET *crt)
|
void ActCaret12(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -449,6 +464,7 @@ void ActCaret12(CARET *crt)
|
||||||
crt->rect = rcLeft[crt->ani_no];
|
crt->rect = rcLeft[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Particles used when Quote jumps into the ceiling
|
||||||
void ActCaret13(CARET *crt)
|
void ActCaret13(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -493,8 +509,12 @@ void ActCaret13(CARET *crt)
|
||||||
crt->x -= 4 * 0x200;
|
crt->x -= 4 * 0x200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Broken (unknown and unused)
|
||||||
void ActCaret14(CARET *crt)
|
void ActCaret14(CARET *crt)
|
||||||
{
|
{
|
||||||
|
// These rects are invalid.
|
||||||
|
// However, notably, there are 5 unused 40x40 sprites at the bottom of Caret.pbm.
|
||||||
|
// Perhaps those were originally at these coordinates.
|
||||||
RECT rect[5] = {
|
RECT rect[5] = {
|
||||||
{0, 96, 40, 136},
|
{0, 96, 40, 136},
|
||||||
{40, 96, 80, 136},
|
{40, 96, 80, 136},
|
||||||
|
@ -519,6 +539,7 @@ void ActCaret14(CARET *crt)
|
||||||
crt->rect = rect[crt->ani_no];
|
crt->rect = rect[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tiny version of the projectile dissipation effect
|
||||||
void ActCaret15(CARET *crt)
|
void ActCaret15(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[4] = {
|
RECT rcLeft[4] = {
|
||||||
|
@ -544,6 +565,7 @@ void ActCaret15(CARET *crt)
|
||||||
crt->rect = rcLeft[crt->ani_no];
|
crt->rect = rcLeft[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'Empty!'
|
||||||
void ActCaret16(CARET *crt)
|
void ActCaret16(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -560,6 +582,7 @@ void ActCaret16(CARET *crt)
|
||||||
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
crt->rect = rcLeft[crt->ani_wait / 2 % 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 'PUSH JUMP KEY!' (unused)
|
||||||
void ActCaret17(CARET *crt)
|
void ActCaret17(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[2] = {
|
||||||
|
@ -585,7 +608,7 @@ CARETFUNCTION gpCaretFuncTbl[18] =
|
||||||
ActCaret03,
|
ActCaret03,
|
||||||
ActCaret04,
|
ActCaret04,
|
||||||
ActCaret05,
|
ActCaret05,
|
||||||
ActCaret04,
|
ActCaret04, // Interestingly, this slot is a duplicate
|
||||||
ActCaret07,
|
ActCaret07,
|
||||||
ActCaret08,
|
ActCaret08,
|
||||||
ActCaret09,
|
ActCaret09,
|
||||||
|
|
Loading…
Add table
Reference in a new issue