Merge pull request #22 from Clownacy/master
Merge Clownacy/master into master
This commit is contained in:
commit
7578abafc5
18 changed files with 591 additions and 483 deletions
|
@ -12,7 +12,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Null
|
||||
// Null
|
||||
void ActNpc000(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {0x00, 0x00, 0x10, 0x10};
|
||||
|
@ -28,40 +28,40 @@ void ActNpc000(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Experience
|
||||
// Experience
|
||||
void ActNpc001(NPCHAR *npc)
|
||||
{
|
||||
//In wind
|
||||
// In wind
|
||||
if (gBack.type == 5 || gBack.type == 6)
|
||||
{
|
||||
if (npc->act_no == 0)
|
||||
{
|
||||
//Set state
|
||||
// Set state
|
||||
npc->act_no = 1;
|
||||
|
||||
//Set random speed
|
||||
// Set random speed
|
||||
npc->ym = Random(-0x80, 0x80);
|
||||
npc->xm = Random(0x7F, 0x100);
|
||||
}
|
||||
|
||||
//Blow to the left
|
||||
// Blow to the left
|
||||
npc->xm -= 8;
|
||||
|
||||
//Destroy when off-screen
|
||||
// Destroy when off-screen
|
||||
if (npc->x < 0xA000)
|
||||
npc->cond = 0;
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
//Limit speed
|
||||
// Limit speed
|
||||
if (npc->xm < -0x600)
|
||||
npc->xm = -0x600;
|
||||
#else
|
||||
//Limit speed (except pixel applied it to the X position)
|
||||
// Limit speed (except pixel applied it to the X position)
|
||||
if (npc->x < -0x600)
|
||||
npc->x = -0x600;
|
||||
#endif
|
||||
|
||||
//Bounce off walls
|
||||
// Bounce off walls
|
||||
if (npc->flag & 1)
|
||||
npc->xm = 0x100;
|
||||
if (npc->flag & 2)
|
||||
|
@ -69,43 +69,43 @@ void ActNpc001(NPCHAR *npc)
|
|||
if (npc->flag & 8)
|
||||
npc->ym = -0x40;
|
||||
}
|
||||
//When not in wind
|
||||
// When not in wind
|
||||
else
|
||||
{
|
||||
if (npc->act_no == 0)
|
||||
{
|
||||
//Set state
|
||||
// Set state
|
||||
npc->act_no = 1;
|
||||
npc->ani_no = Random(0, 4);
|
||||
|
||||
//Random speed
|
||||
// Random speed
|
||||
npc->xm = Random(-0x200, 0x200);
|
||||
npc->ym = Random(-0x400, 0);
|
||||
|
||||
//Random direction (reverse animation or not)
|
||||
// Random direction (reverse animation or not)
|
||||
if (Random(0, 1) != 0)
|
||||
npc->direct = 0;
|
||||
else
|
||||
npc->direct = 2;
|
||||
}
|
||||
|
||||
//Gravity
|
||||
// Gravity
|
||||
if (npc->flag & 0x100)
|
||||
npc->ym += 21;
|
||||
else
|
||||
npc->ym += 42;
|
||||
|
||||
//Bounce off walls
|
||||
// Bounce off walls
|
||||
if (npc->flag & 1 && npc->xm < 0)
|
||||
npc->xm *= -1;
|
||||
if (npc->flag & 4 && npc->xm > 0)
|
||||
npc->xm *= -1;
|
||||
|
||||
//Bounce off ceiling
|
||||
// Bounce off ceiling
|
||||
if (npc->flag & 2 && npc->ym < 0)
|
||||
npc->ym *= -1;
|
||||
|
||||
//Bounce off floor
|
||||
// Bounce off floor
|
||||
if (npc->flag & 8)
|
||||
{
|
||||
PlaySoundObject(45, 1);
|
||||
|
@ -113,7 +113,7 @@ void ActNpc001(NPCHAR *npc)
|
|||
npc->xm = 2 * npc->xm / 3;
|
||||
}
|
||||
|
||||
//Play bounce song (and try to clip out of floor if stuck)
|
||||
// Play bounce song (and try to clip out of floor if stuck)
|
||||
if (npc->flag & 0xD)
|
||||
{
|
||||
PlaySoundObject(45, 1);
|
||||
|
@ -125,7 +125,7 @@ void ActNpc001(NPCHAR *npc)
|
|||
npc->count2 = 0;
|
||||
}
|
||||
|
||||
//Limit speed
|
||||
// Limit speed
|
||||
if (npc->xm < -0x5FF)
|
||||
npc->xm = -0x5FF;
|
||||
if (npc->xm > 0x5FF)
|
||||
|
@ -136,11 +136,11 @@ void ActNpc001(NPCHAR *npc)
|
|||
npc->ym = 0x5FF;
|
||||
}
|
||||
|
||||
//Move
|
||||
// Move
|
||||
npc->y += npc->ym;
|
||||
npc->x += npc->xm;
|
||||
|
||||
//Get framerects
|
||||
// Get framerects
|
||||
RECT rect[6] = {
|
||||
{0x00, 0x10, 0x10, 0x20},
|
||||
{0x10, 0x10, 0x20, 0x20},
|
||||
|
@ -152,7 +152,7 @@ void ActNpc001(NPCHAR *npc)
|
|||
|
||||
RECT rcNo = {0, 0, 0, 0};
|
||||
|
||||
//Animate
|
||||
// Animate
|
||||
++npc->ani_wait;
|
||||
|
||||
if (npc->direct == 0)
|
||||
|
@ -176,7 +176,7 @@ void ActNpc001(NPCHAR *npc)
|
|||
|
||||
npc->rect = rect[npc->ani_no];
|
||||
|
||||
//Size
|
||||
// Size
|
||||
if (npc->act_no)
|
||||
{
|
||||
switch (npc->exp)
|
||||
|
@ -195,11 +195,11 @@ void ActNpc001(NPCHAR *npc)
|
|||
npc->act_no = 1;
|
||||
}
|
||||
|
||||
//Delete after 500 frames
|
||||
// Delete after 500 frames
|
||||
if (++npc->count1 > 500 && npc->ani_no == 5 && npc->ani_wait == 2)
|
||||
npc->cond = 0;
|
||||
|
||||
//Blink after 400 frames
|
||||
// Blink after 400 frames
|
||||
if (npc->count1 > 400)
|
||||
{
|
||||
if (npc->count1 / 2 % 2)
|
||||
|
@ -207,10 +207,10 @@ void ActNpc001(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Behemoth
|
||||
// Behemoth
|
||||
void ActNpc002(NPCHAR *npc)
|
||||
{
|
||||
//Rects
|
||||
// Rects
|
||||
RECT rcLeft[7] = {
|
||||
{32, 0, 64, 24},
|
||||
{0, 0, 32, 24},
|
||||
|
@ -231,7 +231,7 @@ void ActNpc002(NPCHAR *npc)
|
|||
{160, 24, 192, 48},
|
||||
};
|
||||
|
||||
//Turn when touching a wall
|
||||
// Turn when touching a wall
|
||||
if (npc->flag & 1)
|
||||
npc->direct = 2;
|
||||
else if (npc->flag & 4)
|
||||
|
@ -239,7 +239,7 @@ void ActNpc002(NPCHAR *npc)
|
|||
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0: //Walking
|
||||
case 0: // Walking
|
||||
if (npc->direct == 0)
|
||||
npc->xm = -0x100;
|
||||
else
|
||||
|
@ -261,7 +261,8 @@ void ActNpc002(NPCHAR *npc)
|
|||
npc->ani_no = 4;
|
||||
}
|
||||
break;
|
||||
case 1: //Shot
|
||||
|
||||
case 1: // Shot
|
||||
npc->xm = 7 * npc->xm / 8;
|
||||
|
||||
if (++npc->count1 > 40)
|
||||
|
@ -281,7 +282,8 @@ void ActNpc002(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case 2: //Charge
|
||||
|
||||
case 2: // Charge
|
||||
if (npc->direct == 0)
|
||||
npc->xm = -0x400;
|
||||
else
|
||||
|
@ -310,23 +312,23 @@ void ActNpc002(NPCHAR *npc)
|
|||
break;
|
||||
}
|
||||
|
||||
//Gravity
|
||||
// Gravity
|
||||
npc->ym += 0x40;
|
||||
if (npc->ym > 0x5FF)
|
||||
npc->ym = 0x5FF;
|
||||
|
||||
//Move
|
||||
// Move
|
||||
npc->x += npc->xm;
|
||||
npc->y += npc->ym;
|
||||
|
||||
//Set framerect
|
||||
// Set framerect
|
||||
if (npc->direct == 0)
|
||||
npc->rect = rcLeft[npc->ani_no];
|
||||
else
|
||||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Dead enemy (make sure damage shown doesn't teleport to a new loaded npc)
|
||||
// Dead enemy (make sure damage shown doesn't teleport to a new loaded npc)
|
||||
void ActNpc003(NPCHAR *npc)
|
||||
{
|
||||
if (++npc->count1 > 100)
|
||||
|
@ -336,7 +338,7 @@ void ActNpc003(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Smoke
|
||||
// Smoke
|
||||
void ActNpc004(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[8] = {
|
||||
|
@ -365,7 +367,7 @@ void ActNpc004(NPCHAR *npc)
|
|||
|
||||
if (npc->act_no == 0)
|
||||
{
|
||||
//Move in random direction at random speed
|
||||
// Move in random direction at random speed
|
||||
if (npc->direct == 0 || npc->direct == 1)
|
||||
{
|
||||
deg = Random(0, 0xFF);
|
||||
|
@ -373,33 +375,33 @@ void ActNpc004(NPCHAR *npc)
|
|||
npc->ym = GetSin(deg) * Random(0x200, 0x5FF) / 0x200;
|
||||
}
|
||||
|
||||
//Set state
|
||||
// Set state
|
||||
npc->ani_no = Random(0, 4);
|
||||
npc->ani_wait = Random(0, 3);
|
||||
npc->act_no = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Slight drag
|
||||
// Slight drag
|
||||
npc->xm = 20 * npc->xm / 21;
|
||||
npc->ym = 20 * npc->ym / 21;
|
||||
|
||||
//Move
|
||||
// Move
|
||||
npc->x += npc->xm;
|
||||
npc->y += npc->ym;
|
||||
}
|
||||
|
||||
//Animate
|
||||
// Animate
|
||||
if (++npc->ani_wait > 4)
|
||||
{
|
||||
npc->ani_wait = 0;
|
||||
npc->ani_no++;
|
||||
}
|
||||
|
||||
//Set framerect
|
||||
// Set framerect
|
||||
if (npc->ani_no > 7)
|
||||
{
|
||||
//Destroy if over
|
||||
// Destroy if over
|
||||
npc->cond = 0;
|
||||
}
|
||||
else
|
||||
|
@ -413,7 +415,7 @@ void ActNpc004(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Critter (Green, Egg Corridor)
|
||||
// Critter (Green, Egg Corridor)
|
||||
void ActNpc005(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -430,18 +432,18 @@ void ActNpc005(NPCHAR *npc)
|
|||
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0: //Init
|
||||
case 0: // Initialize
|
||||
npc->y += 0x600;
|
||||
npc->act_no = 1;
|
||||
// Fallthrough
|
||||
case 1: //Waiting
|
||||
//Look at player
|
||||
case 1: // Waiting
|
||||
// Look at player
|
||||
if (npc->x > gMC.x)
|
||||
npc->direct = 0;
|
||||
else
|
||||
npc->direct = 2;
|
||||
|
||||
//Open eyes near player
|
||||
// Open eyes near player
|
||||
if (npc->act_wait >= 8 && npc->x - 0xE000 < gMC.x && npc->x + 0xE000 > gMC.x && npc->y - 0xA000 < gMC.y && npc->y + 0xA000 > gMC.y)
|
||||
{
|
||||
npc->ani_no = 1;
|
||||
|
@ -454,7 +456,7 @@ void ActNpc005(NPCHAR *npc)
|
|||
npc->ani_no = 0;
|
||||
}
|
||||
|
||||
//Jump if attacked
|
||||
// Jump if attacked
|
||||
if (npc->shock)
|
||||
{
|
||||
npc->act_no = 2;
|
||||
|
@ -462,7 +464,7 @@ void ActNpc005(NPCHAR *npc)
|
|||
npc->act_wait = 0;
|
||||
}
|
||||
|
||||
//Jump if player is nearby
|
||||
// Jump if player is nearby
|
||||
if (npc->act_wait >= 8 && npc->x - 0x6000 < gMC.x && npc->x + 0x6000 > gMC.x && npc->y - 0xA000 < gMC.y && npc->y + 0x6000 > gMC.y)
|
||||
{
|
||||
npc->act_no = 2;
|
||||
|
@ -471,18 +473,18 @@ void ActNpc005(NPCHAR *npc)
|
|||
}
|
||||
break;
|
||||
|
||||
case 2: //Going to jump
|
||||
case 2: // Going to jump
|
||||
if (++npc->act_wait > 8)
|
||||
{
|
||||
//Set jump state
|
||||
// Set jump state
|
||||
npc->act_no = 3;
|
||||
npc->ani_no = 2;
|
||||
|
||||
//Jump
|
||||
// Jump
|
||||
npc->ym = -0x5FF;
|
||||
PlaySoundObject(30, 1);
|
||||
|
||||
//Jump in facing direction
|
||||
// Jump in facing direction
|
||||
if (npc->direct == 0)
|
||||
npc->xm = -0x100;
|
||||
else
|
||||
|
@ -490,8 +492,8 @@ void ActNpc005(NPCHAR *npc)
|
|||
}
|
||||
break;
|
||||
|
||||
case 3: //Jumping
|
||||
//Land
|
||||
case 3: // Jumping
|
||||
// Land
|
||||
if (npc->flag & 8)
|
||||
{
|
||||
npc->xm = 0;
|
||||
|
@ -503,23 +505,23 @@ void ActNpc005(NPCHAR *npc)
|
|||
break;
|
||||
}
|
||||
|
||||
//Gravity
|
||||
// Gravity
|
||||
npc->ym += 64;
|
||||
if (npc->ym > 0x5FF)
|
||||
npc->ym = 0x5FF;
|
||||
|
||||
//Move
|
||||
// Move
|
||||
npc->x += npc->xm;
|
||||
npc->y += npc->ym;
|
||||
|
||||
//Set framerect
|
||||
// Set framerect
|
||||
if (npc->direct == 0)
|
||||
npc->rect = rcLeft[npc->ani_no];
|
||||
else
|
||||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Beetle (Goes left and right, Egg Corridor)
|
||||
// Beetle (Goes left and right, Egg Corridor)
|
||||
void ActNpc006(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[5] = {
|
||||
|
@ -540,7 +542,7 @@ void ActNpc006(NPCHAR *npc)
|
|||
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0: //Init
|
||||
case 0: // Initialize
|
||||
npc->act_no = 1;
|
||||
|
||||
if (npc->direct == 0)
|
||||
|
@ -550,18 +552,18 @@ void ActNpc006(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 1:
|
||||
//Accelerate to the left
|
||||
// Accelerate to the left
|
||||
npc->xm -= 0x10;
|
||||
if (npc->xm < -0x400)
|
||||
npc->xm = -0x400;
|
||||
|
||||
//Move
|
||||
// Move
|
||||
if (npc->shock)
|
||||
npc->x += npc->xm / 2;
|
||||
else
|
||||
npc->x += npc->xm;
|
||||
|
||||
//Animate
|
||||
// Animate
|
||||
if (++npc->ani_wait > 1)
|
||||
{
|
||||
npc->ani_wait = 0;
|
||||
|
@ -571,7 +573,7 @@ void ActNpc006(NPCHAR *npc)
|
|||
if (npc->ani_no > 2)
|
||||
npc->ani_no = 1;
|
||||
|
||||
//Stop when hitting a wall
|
||||
// Stop when hitting a wall
|
||||
if (npc->flag & 1)
|
||||
{
|
||||
npc->act_no = 2;
|
||||
|
@ -583,7 +585,7 @@ void ActNpc006(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
//Wait 60 frames then move to the right
|
||||
// Wait 60 frames then move to the right
|
||||
if (++npc->act_wait > 60)
|
||||
{
|
||||
npc->act_no = 3;
|
||||
|
@ -593,18 +595,18 @@ void ActNpc006(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 3:
|
||||
//Accelerate to the right
|
||||
// Accelerate to the right
|
||||
npc->xm += 0x10;
|
||||
if (npc->xm > 0x400)
|
||||
npc->xm = 0x400;
|
||||
|
||||
//Move
|
||||
// Move
|
||||
if (npc->shock)
|
||||
npc->x += npc->xm / 2;
|
||||
else
|
||||
npc->x += npc->xm;
|
||||
|
||||
//Animate
|
||||
// Animate
|
||||
if (++npc->ani_wait > 1)
|
||||
{
|
||||
npc->ani_wait = 0;
|
||||
|
@ -614,7 +616,7 @@ void ActNpc006(NPCHAR *npc)
|
|||
if (npc->ani_no > 2)
|
||||
npc->ani_no = 1;
|
||||
|
||||
//Stop when hitting a wall
|
||||
// Stop when hitting a wall
|
||||
if (npc->flag & 4)
|
||||
{
|
||||
npc->act_no = 4;
|
||||
|
@ -626,7 +628,7 @@ void ActNpc006(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 4:
|
||||
//Wait 60 frames then move to the left
|
||||
// Wait 60 frames then move to the left
|
||||
if (++npc->act_wait > 60)
|
||||
{
|
||||
npc->act_no = 1;
|
||||
|
@ -636,14 +638,14 @@ void ActNpc006(NPCHAR *npc)
|
|||
break;
|
||||
}
|
||||
|
||||
//Set framerect
|
||||
// Set framerect
|
||||
if (npc->direct == 0)
|
||||
npc->rect = rcLeft[npc->ani_no];
|
||||
else
|
||||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Basil
|
||||
// Basil
|
||||
void ActNpc007(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -726,7 +728,7 @@ void ActNpc007(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Beetle (Follows you, Egg Corridor)
|
||||
// Beetle (Follows you, Egg Corridor)
|
||||
void ActNpc008(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -829,7 +831,7 @@ void ActNpc008(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog (drop-in)
|
||||
// Balrog (drop-in)
|
||||
void ActNpc009(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -904,7 +906,7 @@ void ActNpc009(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog (shooting) (super-secret version from prototype)
|
||||
// Balrog (shooting) (super-secret version from prototype)
|
||||
void ActNpc010(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1027,7 +1029,7 @@ void ActNpc010(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Proto-Balrog's projectile
|
||||
// Proto-Balrog's projectile
|
||||
void ActNpc011(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -1062,7 +1064,7 @@ void ActNpc011(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Balrog (cutscene)
|
||||
// Balrog (cutscene)
|
||||
void ActNpc012(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -1395,7 +1397,7 @@ void ActNpc012(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Forcefield
|
||||
// Forcefield
|
||||
void ActNpc013(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[4] = {
|
||||
|
@ -1417,7 +1419,7 @@ void ActNpc013(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Santa's Key
|
||||
// Santa's Key
|
||||
void ActNpc014(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[3] = {
|
||||
|
@ -1460,7 +1462,7 @@ void ActNpc014(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chest (closed)
|
||||
// Chest (closed)
|
||||
void ActNpc015(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1517,7 +1519,7 @@ void ActNpc015(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Save point
|
||||
// Save point
|
||||
void ActNpc016(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[8] = {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Computer
|
||||
// Computer
|
||||
void ActNpc020(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft = {288, 16, 320, 40};
|
||||
|
@ -37,7 +37,7 @@ void ActNpc020(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chest (open)
|
||||
// Chest (open)
|
||||
void ActNpc021(NPCHAR *npc)
|
||||
{
|
||||
if (npc->act_no == 0)
|
||||
|
@ -53,7 +53,7 @@ void ActNpc021(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Teleporter
|
||||
// Teleporter
|
||||
void ActNpc022(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -77,7 +77,7 @@ void ActNpc022(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Teleporter lights
|
||||
// Teleporter lights
|
||||
void ActNpc023(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[8] = {
|
||||
|
@ -103,7 +103,7 @@ void ActNpc023(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Power Critter
|
||||
// Power Critter
|
||||
void ActNpc024(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -192,7 +192,7 @@ void ActNpc024(NPCHAR *npc)
|
|||
npc->act_no = 4;
|
||||
npc->ani_no = 3;
|
||||
npc->act_wait = 0;
|
||||
npc->act_wait = 0; // lol duplicate line
|
||||
npc->act_wait = 0; // Pixel duplicated this line
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -408,7 +408,7 @@ void ActNpc025(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bat (Grasstown, flying)
|
||||
// Bat (Grasstown, flying)
|
||||
void ActNpc026(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -528,7 +528,7 @@ void ActNpc026(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Death trap
|
||||
// Death trap
|
||||
void ActNpc027(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[1] = {96, 64, 128, 88};
|
||||
|
@ -536,7 +536,7 @@ void ActNpc027(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Flying Critter (Grasstown)
|
||||
// Flying Critter (Grasstown)
|
||||
void ActNpc028(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -588,7 +588,7 @@ void ActNpc028(NPCHAR *npc)
|
|||
npc->act_wait = 0;
|
||||
}
|
||||
|
||||
if ( npc->act_wait >= 8 && npc->x - 0xC000 < gMC.x && npc->x + 0xC000 > gMC.x && npc->y - 0xC000 < gMC.y && npc->y + 0x6000 > gMC.y)
|
||||
if (npc->act_wait >= 8 && npc->x - 0xC000 < gMC.x && npc->x + 0xC000 > gMC.x && npc->y - 0xC000 < gMC.y && npc->y + 0x6000 > gMC.y)
|
||||
{
|
||||
npc->act_no = 2;
|
||||
npc->ani_no = 0;
|
||||
|
@ -625,7 +625,7 @@ void ActNpc028(NPCHAR *npc)
|
|||
npc->act_no = 4;
|
||||
npc->ani_no = 3;
|
||||
npc->act_wait = 0;
|
||||
npc->act_wait = 0; // lol duplicate line
|
||||
npc->act_wait = 0; // Pixel duplicated this line
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -717,7 +717,7 @@ void ActNpc028(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Cthulhu
|
||||
// Cthulhu
|
||||
void ActNpc029(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -752,7 +752,7 @@ void ActNpc029(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Gunsmith
|
||||
// Gunsmith
|
||||
void ActNpc030(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -810,7 +810,7 @@ void ActNpc030(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bat (Grasstown, hanging)
|
||||
// Bat (Grasstown, hanging)
|
||||
void ActNpc031(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[5] = {
|
||||
|
@ -945,7 +945,7 @@ void ActNpc031(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Life capsule
|
||||
// Life capsule
|
||||
void ActNpc032(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -959,13 +959,13 @@ void ActNpc032(NPCHAR *npc)
|
|||
++npc->ani_no;
|
||||
}
|
||||
|
||||
if ( npc->ani_no > 1 )
|
||||
if (npc->ani_no > 1)
|
||||
npc->ani_no = 0;
|
||||
|
||||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog bouncing projectile
|
||||
// Balrog bouncing projectile
|
||||
void ActNpc033(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 5)
|
||||
|
@ -1005,7 +1005,7 @@ void ActNpc033(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Bed
|
||||
// Bed
|
||||
void ActNpc034(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft = {192, 48, 224, 64};
|
||||
|
@ -1017,7 +1017,7 @@ void ActNpc034(NPCHAR *npc)
|
|||
npc->rect = rcRight;
|
||||
}
|
||||
|
||||
//Mannan
|
||||
// Mannan
|
||||
void ActNpc035(NPCHAR *npc)
|
||||
{
|
||||
if (npc->act_no < 3 && npc->life < 90)
|
||||
|
@ -1093,7 +1093,7 @@ void ActNpc035(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog (hover)
|
||||
// Balrog (hover)
|
||||
void ActNpc036(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1279,7 +1279,7 @@ void ActNpc036(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Signpost
|
||||
// Signpost
|
||||
void ActNpc037(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -1299,7 +1299,7 @@ void ActNpc037(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fireplace
|
||||
// Fireplace
|
||||
void ActNpc038(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[4] = {
|
||||
|
@ -1335,7 +1335,7 @@ void ActNpc038(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Save sign
|
||||
// Save sign
|
||||
void ActNpc039(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Santa
|
||||
// Santa
|
||||
void ActNpc040(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[7] = {
|
||||
|
@ -100,7 +100,7 @@ void ActNpc040(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Busted Door
|
||||
// Busted Door
|
||||
void ActNpc041(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {0, 80, 48, 112};
|
||||
|
@ -114,7 +114,7 @@ void ActNpc041(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Sue
|
||||
// Sue
|
||||
void ActNpc042(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[13] = {
|
||||
|
@ -403,7 +403,7 @@ void ActNpc042(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chalkboard
|
||||
// Chalkboard
|
||||
void ActNpc043(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft = {128, 80, 168, 112};
|
||||
|
@ -423,7 +423,7 @@ void ActNpc043(NPCHAR *npc)
|
|||
npc->rect = rcRight;
|
||||
}
|
||||
|
||||
//Polish
|
||||
// Polish
|
||||
void ActNpc044(NPCHAR *npc)
|
||||
{
|
||||
// Yeah, Pixel defined these backwards for some reason.
|
||||
|
@ -545,7 +545,7 @@ void ActNpc044(NPCHAR *npc)
|
|||
npc->xm += 0x100;
|
||||
}
|
||||
|
||||
if ( npc->flag & 4 )
|
||||
if (npc->flag & 4)
|
||||
npc->act_no = 9;
|
||||
|
||||
break;
|
||||
|
@ -605,7 +605,7 @@ void ActNpc044(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Baby
|
||||
// Baby
|
||||
void ActNpc045(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[3] = {
|
||||
|
@ -634,7 +634,7 @@ void ActNpc045(NPCHAR *npc)
|
|||
// Fallthrough
|
||||
case 1:
|
||||
case 2:
|
||||
if ( ++npc->ani_no > 2 )
|
||||
if (++npc->ani_no > 2)
|
||||
npc->ani_no = 1;
|
||||
|
||||
break;
|
||||
|
@ -674,7 +674,7 @@ void ActNpc045(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//H/V Trigger
|
||||
// H/V Trigger
|
||||
void ActNpc046(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {0, 0, 16, 16};
|
||||
|
@ -699,10 +699,10 @@ void ActNpc046(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Sandcroc
|
||||
// Sandcroc
|
||||
void ActNpc047(NPCHAR *npc)
|
||||
{
|
||||
switch ( npc->act_no )
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0:
|
||||
npc->ani_no = 0;
|
||||
|
@ -802,7 +802,7 @@ void ActNpc047(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Omega projectiles
|
||||
// Omega projectiles
|
||||
void ActNpc048(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 1 && npc->xm < 0)
|
||||
|
@ -865,7 +865,7 @@ void ActNpc048(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Skullhead
|
||||
// Skullhead
|
||||
void ActNpc049(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1011,7 +1011,7 @@ void ActNpc049(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Skeleton projectile
|
||||
// Skeleton projectile
|
||||
void ActNpc050(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1112,7 +1112,7 @@ void ActNpc050(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Crow & Skullhead
|
||||
// Crow & Skullhead
|
||||
void ActNpc051(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1261,7 +1261,7 @@ void ActNpc051(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bliue robot (sitting)
|
||||
// Blue robot (sitting)
|
||||
void ActNpc052(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {240, 96, 256, 112};
|
||||
|
@ -1269,7 +1269,7 @@ void ActNpc052(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Skullstep leg
|
||||
// Skullstep leg
|
||||
void ActNpc053(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -1339,7 +1339,7 @@ void ActNpc053(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Skullstep
|
||||
// Skullstep
|
||||
void ActNpc054(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1446,7 +1446,7 @@ void ActNpc054(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Kazuma
|
||||
// Kazuma
|
||||
void ActNpc055(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -1514,7 +1514,7 @@ void ActNpc055(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Beetle (Sand Zone)
|
||||
// Beetle (Sand Zone)
|
||||
void ActNpc056(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1630,7 +1630,7 @@ void ActNpc056(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Crow
|
||||
// Crow
|
||||
void ActNpc057(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1789,7 +1789,7 @@ void ActNpc057(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Basu (Egg Corridor)
|
||||
// Basu (Egg Corridor)
|
||||
void ActNpc058(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1942,7 +1942,7 @@ void ActNpc058(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Eye door
|
||||
// Eye door
|
||||
void ActNpc059(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Toroko
|
||||
// Toroko
|
||||
void ActNpc060(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[8] = {
|
||||
|
@ -161,7 +161,7 @@ void ActNpc060(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 11:
|
||||
if ( npc->act_wait++ && npc->flag & 8 )
|
||||
if (npc->act_wait++ && npc->flag & 8)
|
||||
{
|
||||
npc->act_no = 12;
|
||||
npc->ani_no = 7;
|
||||
|
@ -194,7 +194,7 @@ void ActNpc060(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//King
|
||||
// King
|
||||
void ActNpc061(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[11] = {
|
||||
|
@ -277,6 +277,7 @@ void ActNpc061(NPCHAR *npc)
|
|||
npc->act_no = 5;
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
npc->act_no = 9;
|
||||
npc->ani_no = 4;
|
||||
|
@ -420,7 +421,7 @@ void ActNpc061(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Kazuma at computer
|
||||
// Kazuma at computer
|
||||
void ActNpc062(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -488,7 +489,7 @@ void ActNpc062(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Toroko with stick
|
||||
// Toroko with stick
|
||||
void ActNpc063(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -625,7 +626,7 @@ void ActNpc063(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//First Cave Critter
|
||||
// First Cave Critter
|
||||
void ActNpc064(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -642,12 +643,12 @@ void ActNpc064(NPCHAR *npc)
|
|||
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0: //Init
|
||||
case 0: // Initialize
|
||||
npc->y += 0x600;
|
||||
npc->act_no = 1;
|
||||
// Fallthrough
|
||||
case 1: //Waiting
|
||||
//Look at player
|
||||
case 1: // Waiting
|
||||
// Look at player
|
||||
if (npc->x > gMC.x)
|
||||
npc->direct = 0;
|
||||
else
|
||||
|
@ -656,7 +657,7 @@ void ActNpc064(NPCHAR *npc)
|
|||
if (npc->tgt_x < 100)
|
||||
++npc->tgt_x;
|
||||
|
||||
//Open eyes near player
|
||||
// Open eyes near player
|
||||
if (npc->act_wait >= 8 && npc->x - 0xE000 < gMC.x && npc->x + 0xE000 > gMC.x && npc->y - 0xA000 < gMC.y && npc->y + 0xA000 > gMC.y)
|
||||
{
|
||||
npc->ani_no = 1;
|
||||
|
@ -669,7 +670,7 @@ void ActNpc064(NPCHAR *npc)
|
|||
npc->ani_no = 0;
|
||||
}
|
||||
|
||||
//Jump if attacked
|
||||
// Jump if attacked
|
||||
if (npc->shock)
|
||||
{
|
||||
npc->act_no = 2;
|
||||
|
@ -677,7 +678,7 @@ void ActNpc064(NPCHAR *npc)
|
|||
npc->act_wait = 0;
|
||||
}
|
||||
|
||||
//Jump if player is nearby
|
||||
// Jump if player is nearby
|
||||
if (npc->act_wait >= 8 && npc->tgt_x >= 100 && npc->x - 0x8000 < gMC.x && npc->x + 0x8000 > gMC.x && npc->y - 0xA000 < gMC.y && npc->y + 0x6000 > gMC.y)
|
||||
{
|
||||
npc->act_no = 2;
|
||||
|
@ -686,18 +687,18 @@ void ActNpc064(NPCHAR *npc)
|
|||
}
|
||||
break;
|
||||
|
||||
case 2: //Going to jump
|
||||
case 2: // Going to jump
|
||||
if (++npc->act_wait > 8)
|
||||
{
|
||||
//Set jump state
|
||||
// Set jump state
|
||||
npc->act_no = 3;
|
||||
npc->ani_no = 2;
|
||||
|
||||
//Jump
|
||||
// Jump
|
||||
npc->ym = -0x5FF;
|
||||
PlaySoundObject(30, 1);
|
||||
|
||||
//Jump in facing direction
|
||||
// Jump in facing direction
|
||||
if (npc->direct == 0)
|
||||
npc->xm = -0x100;
|
||||
else
|
||||
|
@ -705,8 +706,8 @@ void ActNpc064(NPCHAR *npc)
|
|||
}
|
||||
break;
|
||||
|
||||
case 3: //Jumping
|
||||
//Land
|
||||
case 3: // Jumping
|
||||
// Land
|
||||
if (npc->flag & 8)
|
||||
{
|
||||
npc->xm = 0;
|
||||
|
@ -718,23 +719,23 @@ void ActNpc064(NPCHAR *npc)
|
|||
break;
|
||||
}
|
||||
|
||||
//Gravity
|
||||
// Gravity
|
||||
npc->ym += 0x40;
|
||||
if (npc->ym > 0x5FF)
|
||||
npc->ym = 0x5FF;
|
||||
|
||||
//Move
|
||||
// Move
|
||||
npc->x += npc->xm;
|
||||
npc->y += npc->ym;
|
||||
|
||||
//Set framerect
|
||||
// Set framerect
|
||||
if (npc->direct == 0)
|
||||
npc->rect = rcLeft[npc->ani_no];
|
||||
else
|
||||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//First Cave Bat
|
||||
// First Cave Bat
|
||||
void ActNpc065(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -808,7 +809,7 @@ void ActNpc065(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Misery bubble
|
||||
// Misery bubble
|
||||
void ActNpc066(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[4] = {
|
||||
|
@ -889,7 +890,7 @@ void ActNpc066(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Misery (floating)
|
||||
// Misery (floating)
|
||||
void ActNpc067(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1071,7 +1072,7 @@ void ActNpc067(NPCHAR *npc)
|
|||
npc->rect.bottom = ++npc->ani_wait / 2 + npc->rect.bottom - 16;
|
||||
}
|
||||
|
||||
//Balrog (running)
|
||||
// Balrog (running)
|
||||
void ActNpc068(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1287,7 +1288,7 @@ void ActNpc068(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Pignon
|
||||
// Pignon
|
||||
void ActNpc069(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -1426,7 +1427,7 @@ void ActNpc069(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Sparkle
|
||||
// Sparkle
|
||||
void ActNpc070(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[4] = {
|
||||
|
@ -1448,7 +1449,7 @@ void ActNpc070(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chinfish
|
||||
// Chinfish
|
||||
void ActNpc071(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1506,7 +1507,7 @@ void ActNpc071(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Sprinkler
|
||||
// Sprinkler
|
||||
void ActNpc072(NPCHAR *npc)
|
||||
{
|
||||
if (npc->direct == 0)
|
||||
|
@ -1540,7 +1541,7 @@ void ActNpc072(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Water droplet
|
||||
// Water droplet
|
||||
void ActNpc073(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[5] = {
|
||||
|
@ -1701,7 +1702,7 @@ void ActNpc075(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Flowers
|
||||
// Flowers
|
||||
void ActNpc076(NPCHAR *npc)
|
||||
{
|
||||
npc->rect.left = 16 * npc->code_event;
|
||||
|
@ -1710,7 +1711,7 @@ void ActNpc076(NPCHAR *npc)
|
|||
npc->rect.bottom = 16;
|
||||
}
|
||||
|
||||
//Yamashita
|
||||
// Yamashita
|
||||
void ActNpc077(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1766,7 +1767,7 @@ void ActNpc078(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
// Mahin the sex god
|
||||
// Mahin
|
||||
void ActNpc079(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1810,7 +1811,7 @@ void ActNpc079(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 3:
|
||||
if (++npc->act_wait > 8 )
|
||||
if (++npc->act_wait > 8)
|
||||
{
|
||||
npc->act_no = 2;
|
||||
npc->ani_no = 0;
|
||||
|
@ -1820,7 +1821,7 @@ void ActNpc079(NPCHAR *npc)
|
|||
}
|
||||
|
||||
npc->ym += 0x40;
|
||||
if ( npc->ym > 0x5FF )
|
||||
if (npc->ym > 0x5FF)
|
||||
npc->ym = 0x5FF;
|
||||
|
||||
npc->y += npc->ym;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Gravekeeper
|
||||
// Gravekeeper
|
||||
void ActNpc080(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[7] = {
|
||||
|
@ -172,7 +172,7 @@ void ActNpc080(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Giant pignon
|
||||
// Giant pignon
|
||||
void ActNpc081(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -316,7 +316,7 @@ void ActNpc081(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Misery (standing)
|
||||
// Misery (standing)
|
||||
void ActNpc082(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -520,7 +520,7 @@ void ActNpc082(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Igor (cutscene)
|
||||
// Igor (cutscene)
|
||||
void ActNpc083(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[8] = {
|
||||
|
@ -619,7 +619,7 @@ void ActNpc083(NPCHAR *npc)
|
|||
}
|
||||
|
||||
npc->ym += 0x40;
|
||||
if ( npc->ym > 0x5FF )
|
||||
if (npc->ym > 0x5FF)
|
||||
npc->ym = 0x5FF;
|
||||
|
||||
npc->x += npc->xm;
|
||||
|
@ -631,7 +631,7 @@ void ActNpc083(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Basu projectile (Egg Corridor)
|
||||
// Basu projectile (Egg Corridor)
|
||||
void ActNpc084(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -1323,7 +1323,7 @@ void ActNpc092(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chaco
|
||||
// Chaco
|
||||
void ActNpc093(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[7] = {
|
||||
|
@ -1420,7 +1420,7 @@ void ActNpc093(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Kulala
|
||||
// Kulala
|
||||
void ActNpc094(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[5] = {
|
||||
|
@ -1569,7 +1569,7 @@ void ActNpc094(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Jelly
|
||||
// Jelly
|
||||
void ActNpc095(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -1702,7 +1702,7 @@ void ActNpc095(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fan (left)
|
||||
// Fan (left)
|
||||
void ActNpc096(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1714,7 +1714,7 @@ void ActNpc096(NPCHAR *npc)
|
|||
switch (npc->act_no)
|
||||
{
|
||||
case 0:
|
||||
if ( npc->direct == 2 )
|
||||
if (npc->direct == 2)
|
||||
npc->act_no = 2;
|
||||
else
|
||||
npc->ani_no = 1;
|
||||
|
@ -1752,7 +1752,7 @@ void ActNpc096(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fan (up)
|
||||
// Fan (up)
|
||||
void ActNpc097(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1799,7 +1799,7 @@ void ActNpc097(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fan (right)
|
||||
// Fan (right)
|
||||
void ActNpc098(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1849,7 +1849,7 @@ void ActNpc098(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fan (down)
|
||||
// Fan (down)
|
||||
void ActNpc099(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Grate
|
||||
// Grate
|
||||
void ActNpc100(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -34,7 +34,7 @@ void ActNpc100(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
//Malco computer screen
|
||||
// Malco computer screen
|
||||
void ActNpc101(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[3] = {
|
||||
|
@ -55,7 +55,7 @@ void ActNpc101(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Malco computer wave
|
||||
// Malco computer wave
|
||||
void ActNpc102(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[4] = {
|
||||
|
@ -83,7 +83,7 @@ void ActNpc102(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Mannan projectile
|
||||
// Mannan projectile
|
||||
void ActNpc103(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -135,7 +135,7 @@ void ActNpc103(NPCHAR *npc)
|
|||
PlaySoundObject(46, 1);
|
||||
}
|
||||
|
||||
//Frog
|
||||
// Frog
|
||||
void ActNpc104(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -299,7 +299,7 @@ void ActNpc104(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//'HEY!' speech bubble (low)
|
||||
// "HEY!" speech bubble (low)
|
||||
void ActNpc105(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -316,7 +316,7 @@ void ActNpc105(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//'HEY!' speech bubble (high)
|
||||
// "HEY!" speech bubble (high)
|
||||
void ActNpc106(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -328,7 +328,7 @@ void ActNpc106(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Malco
|
||||
// Malco
|
||||
void ActNpc107(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -494,7 +494,7 @@ void ActNpc107(NPCHAR *npc)
|
|||
npc->rect = rcPoweron[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balfrog projectile
|
||||
// Balfrog projectile
|
||||
void ActNpc108(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -530,7 +530,7 @@ void ActNpc108(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Malco (broken)
|
||||
// Malco (broken)
|
||||
void ActNpc109(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -603,7 +603,7 @@ void ActNpc109(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puchi
|
||||
// Puchi
|
||||
void ActNpc110(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -766,7 +766,7 @@ void ActNpc110(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Quote (teleport out)
|
||||
// Quote (teleport out)
|
||||
void ActNpc111(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -854,7 +854,7 @@ void ActNpc111(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Quote (teleport in)
|
||||
// Quote (teleport in)
|
||||
void ActNpc112(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -925,12 +925,12 @@ void ActNpc112(NPCHAR *npc)
|
|||
{
|
||||
npc->rect.bottom = npc->rect.top + npc->act_wait / 4;
|
||||
|
||||
if ( npc->act_wait / 2 % 2 )
|
||||
if (npc->act_wait / 2 % 2)
|
||||
++npc->rect.left;
|
||||
}
|
||||
}
|
||||
|
||||
//Professor Booster
|
||||
// Professor Booster
|
||||
void ActNpc113(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[7] = {
|
||||
|
@ -1061,7 +1061,7 @@ void ActNpc113(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Press
|
||||
// Press
|
||||
void ActNpc114(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1085,6 +1085,7 @@ void ActNpc114(NPCHAR *npc)
|
|||
npc->ani_no = 1;
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
if (++npc->ani_wait > 2)
|
||||
{
|
||||
|
@ -1135,7 +1136,7 @@ void ActNpc114(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ravil
|
||||
// Ravil
|
||||
void ActNpc115(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -1294,7 +1295,7 @@ void ActNpc115(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Red petals
|
||||
// Red petals
|
||||
void ActNpc116(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {272, 184, 320, 200};
|
||||
|
@ -1302,7 +1303,7 @@ void ActNpc116(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Curly
|
||||
// Curly
|
||||
void ActNpc117(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[10] = {
|
||||
|
@ -1507,7 +1508,7 @@ void ActNpc117(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Curly (boss)
|
||||
// Curly (boss)
|
||||
void ActNpc118(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[9] = {
|
||||
|
@ -1538,7 +1539,7 @@ void ActNpc118(NPCHAR *npc)
|
|||
|
||||
if (npc->direct == 0 && npc->x < gMC.x)
|
||||
bUpper = TRUE;
|
||||
if ( npc->direct == 2 && npc->x > gMC.x)
|
||||
if (npc->direct == 2 && npc->x > gMC.x)
|
||||
bUpper = TRUE;
|
||||
|
||||
switch (npc->act_no)
|
||||
|
@ -1708,7 +1709,7 @@ void ActNpc118(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Table and chair
|
||||
// Table and chair
|
||||
void ActNpc119(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {248, 184, 272, 200};
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Colon (1)
|
||||
// Colon (1)
|
||||
void ActNpc120(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -27,7 +27,7 @@ void ActNpc120(NPCHAR *npc)
|
|||
npc->rect = rect[1];
|
||||
}
|
||||
|
||||
//Colon (2)
|
||||
// Colon (2)
|
||||
void ActNpc121(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[3] = {
|
||||
|
@ -78,7 +78,7 @@ void ActNpc121(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Colon (attacking)
|
||||
// Colon (attacking)
|
||||
void ActNpc122(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[10] = {
|
||||
|
@ -255,7 +255,7 @@ void ActNpc122(NPCHAR *npc)
|
|||
if (npc->xm < -0x1FF)
|
||||
npc->xm = -0x1FF;
|
||||
|
||||
if (npc->ym > 0x5FF )
|
||||
if (npc->ym > 0x5FF)
|
||||
npc->ym = 0x5FF;
|
||||
|
||||
npc->y += npc->ym;
|
||||
|
@ -267,7 +267,7 @@ void ActNpc122(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Curly boss projectile
|
||||
// Curly boss projectile
|
||||
void ActNpc123(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[4] = {
|
||||
|
@ -292,14 +292,17 @@ void ActNpc123(NPCHAR *npc)
|
|||
npc->xm = -0x1000;
|
||||
npc->ym = Random(-0x80, 0x80);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->ym = -0x1000;
|
||||
npc->xm = Random(-0x80, 0x80);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->xm = 0x1000;
|
||||
npc->ym = Random(-0x80, 0x80);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->ym = 0x1000;
|
||||
npc->xm = Random(-0x80, 0x80);
|
||||
|
@ -315,14 +318,17 @@ void ActNpc123(NPCHAR *npc)
|
|||
if (npc->flag & 1)
|
||||
bBreak = TRUE;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (npc->flag & 2)
|
||||
bBreak = TRUE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (npc->flag & 4)
|
||||
bBreak = TRUE;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (npc->flag & 8)
|
||||
bBreak = TRUE;
|
||||
|
@ -345,7 +351,7 @@ void ActNpc123(NPCHAR *npc)
|
|||
npc->rect = rect[npc->direct];
|
||||
}
|
||||
|
||||
//Sunstone
|
||||
// Sunstone
|
||||
void ActNpc124(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -377,12 +383,15 @@ void ActNpc124(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->x -= 0x80;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->y -= 0x80;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->x += 0x80;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->y += 0x80;
|
||||
break;
|
||||
|
@ -397,7 +406,7 @@ void ActNpc124(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Hidden item
|
||||
// Hidden item
|
||||
void ActNpc125(NPCHAR *npc)
|
||||
{
|
||||
if (npc->life < 990)
|
||||
|
@ -424,7 +433,7 @@ void ActNpc125(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
//Puppy (running)
|
||||
// Puppy (running)
|
||||
void ActNpc126(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -556,7 +565,7 @@ void ActNpc126(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Machine gun trail (Level 2)
|
||||
// Machine gun trail (Level 2)
|
||||
void ActNpc127(NPCHAR *npc)
|
||||
{
|
||||
RECT rcV[3] = {
|
||||
|
@ -584,7 +593,7 @@ void ActNpc127(NPCHAR *npc)
|
|||
npc->rect = rcV[npc->ani_no];
|
||||
}
|
||||
|
||||
//Machine gun trail (Level 3)
|
||||
// Machine gun trail (Level 3)
|
||||
void ActNpc128(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[5] = {
|
||||
|
@ -643,19 +652,22 @@ void ActNpc128(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->rect = rcLeft[npc->ani_no];
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->rect = rcUp[npc->ani_no];
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->rect = rcRight[npc->ani_no];
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->rect = rcDown[npc->ani_no];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Fireball trail (Level 2 & 3)
|
||||
// Fireball trail (Level 2 & 3)
|
||||
void ActNpc129(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[18] = {
|
||||
|
@ -691,7 +703,7 @@ void ActNpc129(NPCHAR *npc)
|
|||
npc->rect = rect[3 * npc->direct + npc->ani_no];
|
||||
}
|
||||
|
||||
//Puppy (sitting, wagging tail)
|
||||
// Puppy (sitting, wagging tail)
|
||||
void ActNpc130(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -769,7 +781,7 @@ void ActNpc130(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puppy (sleeping)
|
||||
// Puppy (sleeping)
|
||||
void ActNpc131(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[1] = {144, 144, 160, 160};
|
||||
|
@ -787,7 +799,7 @@ void ActNpc131(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puppy (barking)
|
||||
// Puppy (barking)
|
||||
void ActNpc132(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[5] = {
|
||||
|
@ -932,7 +944,7 @@ void ActNpc132(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Jenka
|
||||
// Jenka
|
||||
void ActNpc133(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -978,7 +990,7 @@ void ActNpc133(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Armadillo
|
||||
// Armadillo
|
||||
void ActNpc134(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1067,7 +1079,7 @@ void ActNpc134(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Skeleton
|
||||
// Skeleton
|
||||
void ActNpc135(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1087,7 +1099,7 @@ void ActNpc135(NPCHAR *npc)
|
|||
if (gMC.x < npc->x - 0x2C000 || gMC.x > npc->x + 0x2C000 || gMC.y < npc->y - 0x14000 || gMC.y > npc->y + 0x8000)
|
||||
npc->act_no = 0;
|
||||
|
||||
switch ( npc->act_no )
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0:
|
||||
npc->act_no = 1;
|
||||
|
@ -1180,7 +1192,7 @@ void ActNpc135(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puppy (carried)
|
||||
// Puppy (carried)
|
||||
void ActNpc136(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -1243,7 +1255,7 @@ void ActNpc136(NPCHAR *npc)
|
|||
++npc->rect.top;
|
||||
}
|
||||
|
||||
//Large door (frame)
|
||||
// Large door (frame)
|
||||
void ActNpc137(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {96, 136, 128, 188};
|
||||
|
@ -1251,7 +1263,7 @@ void ActNpc137(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Large door (door)
|
||||
// Large door (door)
|
||||
void ActNpc138(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft = {96, 112, 112, 136};
|
||||
|
@ -1305,7 +1317,7 @@ void ActNpc138(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Doctor
|
||||
// Doctor
|
||||
void ActNpc139(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Toroko (frenzied)
|
||||
// Toroko (frenzied)
|
||||
void ActNpc140(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -553,7 +553,7 @@ void ActNpc143(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Toroko (teleporting in)
|
||||
// Toroko (teleporting in)
|
||||
void ActNpc144(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[5] = {
|
||||
|
@ -660,7 +660,7 @@ void ActNpc144(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//King's sword
|
||||
// King's sword
|
||||
void ActNpc145(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[1] = {96, 32, 112, 48};
|
||||
|
@ -700,7 +700,7 @@ void ActNpc145(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Lightning
|
||||
// Lightning
|
||||
void ActNpc146(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[5] = {
|
||||
|
@ -750,7 +750,7 @@ void ActNpc146(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Critter (purple)
|
||||
// Critter (purple)
|
||||
void ActNpc147(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -934,7 +934,7 @@ void ActNpc147(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Purple Critter's projectile
|
||||
// Purple Critter's projectile
|
||||
void ActNpc148(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -963,7 +963,7 @@ void ActNpc148(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Moving block (horizontal)
|
||||
// Moving block (horizontal)
|
||||
void ActNpc149(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -1087,7 +1087,7 @@ void ActNpc149(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Quote
|
||||
// Quote
|
||||
void ActNpc150(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -1271,7 +1271,7 @@ void ActNpc150(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Blue robot (standing)
|
||||
// Blue robot (standing)
|
||||
void ActNpc151(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -1318,7 +1318,7 @@ void ActNpc151(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Shutter stuck
|
||||
// Shutter stuck
|
||||
void ActNpc152(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {0, 0, 0, 0};
|
||||
|
@ -1384,7 +1384,7 @@ static const RECT grcKitR[21] = {
|
|||
{96, 72, 120, 96}
|
||||
};
|
||||
|
||||
//Gaudi
|
||||
// Gaudi
|
||||
void ActNpc153(NPCHAR *npc)
|
||||
{
|
||||
if (npc->x > gMC.x + (WINDOW_WIDTH * 0x200) || npc->x < gMC.x - (WINDOW_WIDTH * 0x200) || npc->y > gMC.y + (WINDOW_HEIGHT * 0x200) || npc->y < gMC.y - (WINDOW_HEIGHT * 0x200))
|
||||
|
@ -1420,7 +1420,7 @@ void ActNpc153(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if ( ++npc->act_wait > 20 )
|
||||
if (++npc->act_wait > 20)
|
||||
{
|
||||
npc->act_no = 1;
|
||||
npc->ani_no = 0;
|
||||
|
@ -1544,7 +1544,7 @@ void ActNpc153(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Gaudi (dead)
|
||||
// Gaudi (dead)
|
||||
void ActNpc154(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1607,7 +1607,7 @@ void ActNpc154(NPCHAR *npc)
|
|||
npc->rect = grcKitR[npc->ani_no];
|
||||
}
|
||||
|
||||
//Gaudi (flying)
|
||||
// Gaudi (flying)
|
||||
void ActNpc155(NPCHAR *npc)
|
||||
{
|
||||
if (npc->x > gMC.x + (WINDOW_WIDTH * 0x200) || npc->x < gMC.x - (WINDOW_WIDTH * 0x200) || npc->y > gMC.y + (WINDOW_HEIGHT * 0x200) || npc->y < gMC.y - (WINDOW_HEIGHT * 0x200))
|
||||
|
@ -1712,7 +1712,7 @@ void ActNpc155(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Gaudi projectile
|
||||
// Gaudi projectile
|
||||
void ActNpc156(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -1742,7 +1742,7 @@ void ActNpc156(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Moving block (vertical)
|
||||
// Moving block (vertical)
|
||||
void ActNpc157(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -1865,7 +1865,7 @@ void ActNpc157(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Fish Missile
|
||||
// Fish Missile
|
||||
void ActNpc158(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[8] = {
|
||||
|
@ -1889,12 +1889,15 @@ void ActNpc158(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->count1 = 0xA0;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->count1 = 0xE0;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->count1 = 0x20;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->count1 = 0x60;
|
||||
break;
|
||||
|
@ -1944,7 +1947,7 @@ void ActNpc158(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Monster X (defeated)
|
||||
// Monster X (defeated)
|
||||
void ActNpc159(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {144, 128, 192, 200};
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Puu Black
|
||||
// Puu Black
|
||||
void ActNpc160(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -137,18 +137,23 @@ void ActNpc160(NPCHAR *npc)
|
|||
case 1:
|
||||
npc->ani_no = 3;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->ani_no = 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->ani_no = 2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
npc->ani_no = 0;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
npc->ani_no = 3;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
npc->ani_no = 3;
|
||||
break;
|
||||
|
@ -174,7 +179,7 @@ void ActNpc160(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puu Black projectile
|
||||
// Puu Black projectile
|
||||
void ActNpc161(NPCHAR *npc)
|
||||
{
|
||||
npc->exp = 0;
|
||||
|
@ -227,7 +232,7 @@ void ActNpc161(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puu Black (dead)
|
||||
// Puu Black (dead)
|
||||
void ActNpc162(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -316,7 +321,7 @@ void ActNpc162(NPCHAR *npc)
|
|||
gSuperYpos = -0x7D000;
|
||||
}
|
||||
|
||||
//Dr Gero
|
||||
// Dr Gero
|
||||
void ActNpc163(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -362,7 +367,7 @@ void ActNpc163(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Nurse Hasumi
|
||||
// Nurse Hasumi
|
||||
void ActNpc164(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -408,7 +413,7 @@ void ActNpc164(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Curly (collapsed)
|
||||
// Curly (collapsed)
|
||||
void ActNpc165(NPCHAR *npc)
|
||||
{
|
||||
RECT rcRight[2] = {
|
||||
|
@ -439,7 +444,7 @@ void ActNpc165(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chaba
|
||||
// Chaba
|
||||
void ActNpc166(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -465,7 +470,7 @@ void ActNpc166(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if (++npc->act_wait > 8 )
|
||||
if (++npc->act_wait > 8)
|
||||
{
|
||||
npc->act_no = 1;
|
||||
npc->ani_no = 0;
|
||||
|
@ -477,7 +482,7 @@ void ActNpc166(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Professor Booster (falling)
|
||||
// Professor Booster (falling)
|
||||
void ActNpc167(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[3] = {
|
||||
|
@ -492,6 +497,7 @@ void ActNpc167(NPCHAR *npc)
|
|||
npc->act_no = 1;
|
||||
npc->ani_no = 1;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
npc->ani_no = 0;
|
||||
|
||||
|
@ -501,6 +507,7 @@ void ActNpc167(NPCHAR *npc)
|
|||
|
||||
npc->y += npc->ym;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
npc->act_no = 21;
|
||||
npc->act_wait = 0;
|
||||
|
@ -525,7 +532,7 @@ void ActNpc167(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Boulder
|
||||
// Boulder
|
||||
void ActNpc168(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {264, 56, 320, 96};
|
||||
|
@ -579,7 +586,7 @@ void ActNpc168(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Balrog (missile)
|
||||
// Balrog (missile)
|
||||
void ActNpc169(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -827,7 +834,7 @@ void ActNpc169(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog missile
|
||||
// Balrog missile
|
||||
void ActNpc170(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -917,7 +924,7 @@ void ActNpc170(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fire Whirrr
|
||||
// Fire Whirrr
|
||||
void ActNpc171(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -1004,7 +1011,7 @@ void ActNpc171(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fire Whirr projectile
|
||||
// Fire Whirr projectile
|
||||
void ActNpc172(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[3] = {
|
||||
|
@ -1046,7 +1053,7 @@ void ActNpc172(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Gaudi (armoured)
|
||||
// Gaudi (armoured)
|
||||
void ActNpc173(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1213,7 +1220,7 @@ void ActNpc173(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Armoured-Gaudi projectile
|
||||
// Armoured-Gaudi projectile
|
||||
void ActNpc174(NPCHAR *npc)
|
||||
{
|
||||
BOOL bHit;
|
||||
|
@ -1297,7 +1304,7 @@ void ActNpc174(NPCHAR *npc)
|
|||
npc->rect = rect_left[npc->ani_no];
|
||||
}
|
||||
|
||||
//Gaudi egg
|
||||
// Gaudi egg
|
||||
void ActNpc175(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -1345,7 +1352,7 @@ void ActNpc175(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//BuyoBuyo Base
|
||||
// BuyoBuyo Base
|
||||
void ActNpc176(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1442,7 +1449,7 @@ void ActNpc176(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//BuyoBuyo
|
||||
// BuyoBuyo
|
||||
void ActNpc177(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -1537,7 +1544,7 @@ void ActNpc177(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Core blade projectile
|
||||
// Core blade projectile
|
||||
void ActNpc178(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -1581,7 +1588,7 @@ void ActNpc178(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Core wisp projectile
|
||||
// Core wisp projectile
|
||||
void ActNpc179(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Curly AI
|
||||
// Curly AI
|
||||
void ActNpc180(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[11] = {
|
||||
|
@ -206,7 +206,7 @@ void ActNpc180(NPCHAR *npc)
|
|||
int xx = npc->x - npc->tgt_x;
|
||||
int yy = npc->y - npc->tgt_y;
|
||||
|
||||
if ( xx < 0 )
|
||||
if (xx < 0)
|
||||
xx *= -1;
|
||||
|
||||
if (npc->act_no == 100)
|
||||
|
@ -219,7 +219,7 @@ void ActNpc180(NPCHAR *npc)
|
|||
|
||||
if (npc->act_no == 210 || npc->act_no == 310)
|
||||
{
|
||||
if ( xx + 0x400 < yy )
|
||||
if (xx + 0x400 < yy)
|
||||
npc->ani_no = 6;
|
||||
else
|
||||
npc->ani_no = 1;
|
||||
|
@ -312,7 +312,7 @@ void ActNpc180(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Curly AI Machine Gun
|
||||
// Curly AI Machine Gun
|
||||
void ActNpc181(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -419,7 +419,7 @@ void ActNpc181(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Curly AI Polar Star
|
||||
// Curly AI Polar Star
|
||||
void ActNpc182(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -526,7 +526,7 @@ void ActNpc182(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Curly Air Tank Bubble
|
||||
// Curly Air Tank Bubble
|
||||
void ActNpc183(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -564,7 +564,7 @@ void ActNpc183(NPCHAR *npc)
|
|||
npc->rect.right = 0;
|
||||
}
|
||||
|
||||
//Shutter Big
|
||||
// Shutter Big
|
||||
void ActNpc184(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -594,12 +594,15 @@ void ActNpc184(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->x -= 0x80;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->y -= 0x80;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->x += 0x80;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->y += 0x80;
|
||||
break;
|
||||
|
@ -631,7 +634,7 @@ void ActNpc184(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Shutter Small
|
||||
// Shutter Small
|
||||
void ActNpc185(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {96, 64, 112, 96};
|
||||
|
@ -642,30 +645,35 @@ void ActNpc185(NPCHAR *npc)
|
|||
npc->act_no = 1;
|
||||
npc->y += 0x1000;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
npc->act_no = 11;
|
||||
npc->ani_no = 1;
|
||||
npc->act_wait = 0;
|
||||
npc->bits |= npc_ignoreSolid;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 11:
|
||||
switch (npc->direct)
|
||||
{
|
||||
case 0:
|
||||
npc->x -= 0x80;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->y -= 0x80;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->x += 0x80;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->y += 0x80;
|
||||
break;
|
||||
}
|
||||
++npc->act_wait;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
npc->y -= 0x3000;
|
||||
npc->act_no = 1;
|
||||
|
@ -675,7 +683,7 @@ void ActNpc185(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Lift block
|
||||
// Lift block
|
||||
void ActNpc186(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -689,27 +697,31 @@ void ActNpc186(NPCHAR *npc)
|
|||
{
|
||||
case 0:
|
||||
npc->act_no = 1;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 1:
|
||||
break;
|
||||
|
||||
case 10:
|
||||
npc->act_no = 11;
|
||||
npc->ani_no = 1;
|
||||
npc->act_wait = 0;
|
||||
npc->bits |= 8;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 11:
|
||||
switch (npc->direct)
|
||||
{
|
||||
case 0:
|
||||
npc->x -= 0x80;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->y -= 0x80;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->x += 0x80;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->y += 0x80;
|
||||
break;
|
||||
|
@ -730,7 +742,7 @@ void ActNpc186(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fuzz Core
|
||||
// Fuzz Core
|
||||
void ActNpc187(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -805,7 +817,7 @@ void ActNpc187(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Fuzz
|
||||
// Fuzz
|
||||
void ActNpc188(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -889,7 +901,7 @@ void ActNpc188(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Unused homing flame object (possibly related to the Core?)
|
||||
// Unused homing flame object (possibly related to the Core?)
|
||||
void ActNpc189(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -955,7 +967,7 @@ void ActNpc189(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Broken robot
|
||||
// Broken robot
|
||||
void ActNpc190(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -968,12 +980,14 @@ void ActNpc190(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->ani_no = 0;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
PlaySoundObject(72, 1);
|
||||
for (int i = 0; i < 8; i++)
|
||||
SetNpChar(4, npc->x, npc->y + (Random(-8, 8) << 9), Random(-8, -2) << 9, Random(-3, 3) << 9, 0, 0, 0x100);
|
||||
npc->cond = 0;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
if (++npc->ani_wait > 10)
|
||||
{
|
||||
|
@ -988,16 +1002,16 @@ void ActNpc190(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Water level
|
||||
// Water level
|
||||
void ActNpc191(NPCHAR *npc)
|
||||
{
|
||||
switch ( npc->act_no )
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0:
|
||||
npc->act_no = 10;
|
||||
npc->tgt_y = npc->y;
|
||||
npc->ym = 0x200;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 10:
|
||||
if (npc->y < npc->tgt_y)
|
||||
npc->ym += 4;
|
||||
|
@ -1011,10 +1025,11 @@ void ActNpc191(NPCHAR *npc)
|
|||
|
||||
npc->y += npc->ym;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
npc->act_no = 21;
|
||||
npc->act_wait = 0;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 21:
|
||||
if (npc->y < npc->tgt_y)
|
||||
npc->ym += 4;
|
||||
|
@ -1073,10 +1088,10 @@ void ActNpc191(NPCHAR *npc)
|
|||
npc->rect.bottom = 0;
|
||||
}
|
||||
|
||||
//Scooter
|
||||
// Scooter
|
||||
void ActNpc192(NPCHAR *npc)
|
||||
{
|
||||
switch ( npc->act_no )
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0:
|
||||
npc->act_no = 1;
|
||||
|
@ -1176,7 +1191,7 @@ void ActNpc192(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Scooter (broken)
|
||||
// Scooter (broken)
|
||||
void ActNpc193(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {256, 96, 320, 112};
|
||||
|
@ -1193,7 +1208,7 @@ void ActNpc193(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Blue robot (broken)
|
||||
// Blue robot (broken)
|
||||
void ActNpc194(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {192, 120, 224, 128};
|
||||
|
@ -1207,14 +1222,14 @@ void ActNpc194(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Grate
|
||||
// Grate
|
||||
void ActNpc195(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {112, 64, 128, 80};
|
||||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Ironhead motion wall
|
||||
// Ironhead motion wall
|
||||
void ActNpc196(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft = {112, 64, 144, 80};
|
||||
|
@ -1231,7 +1246,7 @@ void ActNpc196(NPCHAR *npc)
|
|||
npc->rect = rcRight;
|
||||
}
|
||||
|
||||
//Porcupine Fish
|
||||
// Porcupine Fish
|
||||
void ActNpc197(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -1301,7 +1316,7 @@ void ActNpc197(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ironhead projectile
|
||||
// Ironhead projectile
|
||||
void ActNpc198(NPCHAR *npc)
|
||||
{
|
||||
RECT rcRight[3] = {
|
||||
|
@ -1349,7 +1364,7 @@ void ActNpc198(NPCHAR *npc)
|
|||
PlaySoundObject(46, 1);
|
||||
}
|
||||
|
||||
//Water/wind particles
|
||||
// Water/wind particles
|
||||
void ActNpc199(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[5] = {
|
||||
|
@ -1371,12 +1386,15 @@ void ActNpc199(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->xm = -1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->ym = -1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->xm = 1;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->ym = 1;
|
||||
break;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Dragon Zombie
|
||||
// Dragon Zombie
|
||||
void ActNpc200(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -140,7 +140,7 @@ void ActNpc200(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Dragon Zombie (dead)
|
||||
// Dragon Zombie (dead)
|
||||
void ActNpc201(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[1] = {200, 0, 240, 40};
|
||||
|
@ -152,7 +152,7 @@ void ActNpc201(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Dragon Zombie projectile
|
||||
// Dragon Zombie projectile
|
||||
void ActNpc202(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -176,7 +176,7 @@ void ActNpc202(NPCHAR *npc)
|
|||
++npc->ani_no;
|
||||
}
|
||||
|
||||
if ( npc->ani_no > 2 )
|
||||
if (npc->ani_no > 2)
|
||||
npc->ani_no = 0;
|
||||
|
||||
npc->rect = rect_left[npc->ani_no];
|
||||
|
@ -188,7 +188,7 @@ void ActNpc202(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Critter (destroyed Egg Corridor)
|
||||
// Critter (destroyed Egg Corridor)
|
||||
void ActNpc203(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -289,7 +289,7 @@ void ActNpc203(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Falling spike (small)
|
||||
// Falling spike (small)
|
||||
void ActNpc204(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -345,7 +345,7 @@ void ActNpc204(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Falling spike (large)
|
||||
// Falling spike (large)
|
||||
void ActNpc205(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -428,7 +428,7 @@ void ActNpc205(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Counter Bomb
|
||||
// Counter Bomb
|
||||
void ActNpc206(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -538,7 +538,7 @@ void ActNpc206(NPCHAR *npc)
|
|||
npc->rect = rect_left[npc->ani_no];
|
||||
}
|
||||
|
||||
//Counter Bomb's countdown
|
||||
// Counter Bomb's countdown
|
||||
void ActNpc207(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[5] = {
|
||||
|
@ -580,7 +580,7 @@ void ActNpc207(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Basu (destroyed Egg Corridor)
|
||||
// Basu (destroyed Egg Corridor)
|
||||
void ActNpc208(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -732,7 +732,7 @@ void ActNpc208(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Basu projectile (destroyed Egg Corridor)
|
||||
// Basu projectile (destroyed Egg Corridor)
|
||||
void ActNpc209(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -769,7 +769,7 @@ void ActNpc209(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Beetle (destroyed Egg Corridor)
|
||||
// Beetle (destroyed Egg Corridor)
|
||||
void ActNpc210(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -872,7 +872,7 @@ void ActNpc210(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Spikes (small)
|
||||
// Spikes (small)
|
||||
void ActNpc211(NPCHAR *npc)
|
||||
{
|
||||
RECT rects[4] = {
|
||||
|
@ -885,7 +885,7 @@ void ActNpc211(NPCHAR *npc)
|
|||
npc->rect = rects[npc->code_event];
|
||||
}
|
||||
|
||||
//Sky Dragon
|
||||
// Sky Dragon
|
||||
void ActNpc212(NPCHAR *npc)
|
||||
{
|
||||
RECT rcRight[4] = {
|
||||
|
@ -996,7 +996,7 @@ void ActNpc212(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Night Spirit
|
||||
// Night Spirit
|
||||
void ActNpc213(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[10] = {
|
||||
|
@ -1155,14 +1155,14 @@ void ActNpc213(NPCHAR *npc)
|
|||
else
|
||||
npc->y += npc->ym;
|
||||
|
||||
if ( gMC.y > npc->tgt_y + 0x1E000 || gMC.y < npc->tgt_y - 0x1E000 )
|
||||
if (gMC.y > npc->tgt_y + 0x1E000 || gMC.y < npc->tgt_y - 0x1E000)
|
||||
npc->act_no = 40;
|
||||
}
|
||||
|
||||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Night Spirit projectile
|
||||
// Night Spirit projectile
|
||||
void ActNpc214(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[3] = {
|
||||
|
@ -1208,7 +1208,7 @@ void ActNpc214(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Sandcroc (Outer Wall)
|
||||
// Sandcroc (Outer Wall)
|
||||
void ActNpc215(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1313,7 +1313,7 @@ void ActNpc215(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Debug Cat
|
||||
// Debug Cat
|
||||
void ActNpc216(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {256, 192, 272, 216};
|
||||
|
@ -1321,7 +1321,7 @@ void ActNpc216(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Itoh
|
||||
// Itoh
|
||||
void ActNpc217(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[8] = {
|
||||
|
@ -1473,7 +1473,7 @@ void ActNpc218(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Smoke generator
|
||||
// Smoke generator
|
||||
void ActNpc219(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {0, 0, 0, 0};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Shovel Brigade
|
||||
// Shovel Brigade
|
||||
void ActNpc220(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -58,7 +58,7 @@ void ActNpc220(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Shovel Brigade (walking)
|
||||
// Shovel Brigade (walking)
|
||||
void ActNpc221(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -127,7 +127,7 @@ void ActNpc221(NPCHAR *npc)
|
|||
case 11:
|
||||
if (npc->direct == 0 && npc->flag & 1)
|
||||
npc->direct = 2;
|
||||
else if ( npc->direct == 2 && npc->flag & 4 )
|
||||
else if (npc->direct == 2 && npc->flag & 4)
|
||||
npc->direct = 0;
|
||||
|
||||
if (npc->direct == 0)
|
||||
|
@ -163,7 +163,7 @@ void ActNpc221(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Prison bars
|
||||
// Prison bars
|
||||
void ActNpc222(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {96, 168, 112, 200};
|
||||
|
@ -177,7 +177,7 @@ void ActNpc222(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Momorin
|
||||
// Momorin
|
||||
void ActNpc223(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -237,7 +237,7 @@ void ActNpc223(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chie
|
||||
// Chie
|
||||
void ActNpc224(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -268,7 +268,7 @@ void ActNpc224(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if (++npc->act_wait > 12 )
|
||||
if (++npc->act_wait > 12)
|
||||
{
|
||||
npc->act_no = 1;
|
||||
npc->ani_no = 0;
|
||||
|
@ -291,7 +291,7 @@ void ActNpc224(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Megane
|
||||
// Megane
|
||||
void ActNpc225(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -322,7 +322,7 @@ void ActNpc225(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if (++npc->act_wait > 12 )
|
||||
if (++npc->act_wait > 12)
|
||||
{
|
||||
npc->act_no = 1;
|
||||
npc->ani_no = 0;
|
||||
|
@ -337,7 +337,7 @@ void ActNpc225(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Kanpachi
|
||||
// Kanpachi
|
||||
void ActNpc226(NPCHAR *npc)
|
||||
{
|
||||
RECT rcRight[7] = {
|
||||
|
@ -413,14 +413,14 @@ void ActNpc226(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bucket
|
||||
// Bucket
|
||||
void ActNpc227(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {208, 32, 224, 48};
|
||||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Droll (guard)
|
||||
// Droll (guard)
|
||||
void ActNpc228(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -517,7 +517,7 @@ void ActNpc228(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Red Flowers (sprouts)
|
||||
// Red Flowers (sprouts)
|
||||
void ActNpc229(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -539,7 +539,7 @@ void ActNpc229(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
//Red Flowers (blooming)
|
||||
// Red Flowers (blooming)
|
||||
void ActNpc230(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -562,7 +562,7 @@ void ActNpc230(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
//Rocket
|
||||
// Rocket
|
||||
void ActNpc231(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -674,7 +674,7 @@ void ActNpc231(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Orangebell
|
||||
// Orangebell
|
||||
void ActNpc232(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -744,7 +744,7 @@ void ActNpc232(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Orangebell bat
|
||||
// Orangebell bat
|
||||
void ActNpc233(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -861,7 +861,7 @@ void ActNpc233(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Red Flowers (picked)
|
||||
// Red Flowers (picked)
|
||||
void ActNpc234(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -883,7 +883,7 @@ void ActNpc234(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
//Midorin
|
||||
// Midorin
|
||||
void ActNpc235(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -989,7 +989,7 @@ void ActNpc235(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Gunfish
|
||||
// Gunfish
|
||||
void ActNpc236(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -1123,7 +1123,7 @@ void ActNpc236(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Gunfish projectile
|
||||
// Gunfish projectile
|
||||
void ActNpc237(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -1264,7 +1264,7 @@ void ActNpc238(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Cage bars
|
||||
// Cage bars
|
||||
void ActNpc239(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft = {192, 48, 256, 80};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Mimiga (jailed)
|
||||
// Mimiga (jailed)
|
||||
void ActNpc240(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -117,7 +117,7 @@ void ActNpc240(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Critter (Last Cave)
|
||||
// Critter (Last Cave)
|
||||
void ActNpc241(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -150,7 +150,7 @@ void ActNpc241(NPCHAR *npc)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( npc->act_wait < 8 )
|
||||
if (npc->act_wait < 8)
|
||||
++npc->act_wait;
|
||||
|
||||
npc->ani_no = 0;
|
||||
|
@ -214,7 +214,7 @@ void ActNpc241(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bat (Last Cave)
|
||||
// Bat (Last Cave)
|
||||
void ActNpc242(NPCHAR *npc)
|
||||
{
|
||||
if (npc->x < 0 || npc->x > gMap.width * 0x10 * 0x200)
|
||||
|
@ -292,7 +292,7 @@ void ActNpc242(NPCHAR *npc)
|
|||
npc->rect = rect_right[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bat generator (Last Cave)
|
||||
// Bat generator (Last Cave)
|
||||
void ActNpc243(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -316,7 +316,7 @@ void ActNpc243(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Lava drop
|
||||
// Lava drop
|
||||
void ActNpc244(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -353,7 +353,7 @@ void ActNpc244(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Lava drop generator
|
||||
// Lava drop generator
|
||||
void ActNpc245(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -373,7 +373,7 @@ void ActNpc245(NPCHAR *npc)
|
|||
case 1:
|
||||
npc->ani_no = 0;
|
||||
|
||||
if ( npc->act_wait )
|
||||
if (npc->act_wait)
|
||||
{
|
||||
--npc->act_wait;
|
||||
return;
|
||||
|
@ -409,7 +409,7 @@ void ActNpc245(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Press (proximity)
|
||||
// Press (proximity)
|
||||
void ActNpc246(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -498,7 +498,7 @@ void ActNpc246(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Misery (boss)
|
||||
// Misery (boss)
|
||||
void ActNpc247(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -812,7 +812,7 @@ void ActNpc247(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Boss Misery (vanishing)
|
||||
// Boss Misery (vanishing)
|
||||
void ActNpc248(NPCHAR *npc)
|
||||
{
|
||||
if (npc->flag & 0xFF)
|
||||
|
@ -847,7 +847,7 @@ void ActNpc248(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Boss Misery energy shot
|
||||
// Boss Misery energy shot
|
||||
void ActNpc249(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -870,7 +870,7 @@ void ActNpc249(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Boss Misery lightning ball
|
||||
// Boss Misery lightning ball
|
||||
void ActNpc250(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -947,7 +947,7 @@ void ActNpc250(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Boss Misery lightning
|
||||
// Boss Misery lightning
|
||||
void ActNpc251(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -978,7 +978,7 @@ void ActNpc251(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Boss Misery bats
|
||||
// Boss Misery bats
|
||||
void ActNpc252(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -1010,7 +1010,7 @@ void ActNpc252(NPCHAR *npc)
|
|||
|
||||
deg = npc->count1;
|
||||
|
||||
if ( npc->act_wait < 192 )
|
||||
if (npc->act_wait < 192)
|
||||
++npc->act_wait;
|
||||
|
||||
npc->x = npc->pNpc->x + npc->act_wait * GetCos(deg) / 4;
|
||||
|
@ -1073,7 +1073,7 @@ void ActNpc252(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//EXP capsule
|
||||
// EXP capsule
|
||||
void ActNpc253(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1110,7 +1110,7 @@ void ActNpc253(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Helicopter
|
||||
// Helicopter
|
||||
void ActNpc254(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -1125,15 +1125,18 @@ void ActNpc254(NPCHAR *npc)
|
|||
SetNpChar(255, npc->x + 0x2400, npc->y - 0x7200, 0, 0, 0, npc, 0x100);
|
||||
SetNpChar(255, npc->x - 0x4000, npc->y - 0x6800, 0, 0, 2, npc, 0x100);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
npc->act_wait = 0;
|
||||
npc->count1 = 60;
|
||||
npc->act_no = 21;
|
||||
break;
|
||||
|
||||
case 30:
|
||||
npc->act_no = 21;
|
||||
SetNpChar(223, npc->x - 0x1600, npc->y - 0x1C00, 0, 0, 0, 0, 0x100);
|
||||
break;
|
||||
|
||||
case 40:
|
||||
npc->act_no = 21;
|
||||
SetNpChar(223, npc->x - 0x1200, npc->y - 0x1C00, 0, 0, 0, 0, 0x100);
|
||||
|
@ -1148,7 +1151,7 @@ void ActNpc254(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
//Helicopter blades
|
||||
// Helicopter blades
|
||||
void ActNpc255(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -1214,7 +1217,7 @@ void ActNpc255(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Doctor (facing away)
|
||||
// Doctor (facing away)
|
||||
void ActNpc256(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -1226,7 +1229,7 @@ void ActNpc256(NPCHAR *npc)
|
|||
{24, 160, 48, 192},
|
||||
};
|
||||
|
||||
switch ( npc->act_no )
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0:
|
||||
gSuperXpos = 0;
|
||||
|
@ -1305,7 +1308,7 @@ void ActNpc256(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Red crystal
|
||||
// Red crystal
|
||||
void ActNpc257(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1368,14 +1371,14 @@ void ActNpc257(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Mimiga (sleeping)
|
||||
// Mimiga (sleeping)
|
||||
void ActNpc258(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {48, 32, 64, 48};
|
||||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Curly (carried and unconcious)
|
||||
// Curly (carried and unconcious)
|
||||
void ActNpc259(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft = {224, 96, 240, 112};
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Shovel Brigade (caged)
|
||||
// Shovel Brigade (caged)
|
||||
void ActNpc260(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -75,7 +75,7 @@ void ActNpc260(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chie (caged)
|
||||
// Chie (caged)
|
||||
void ActNpc261(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -108,7 +108,7 @@ void ActNpc261(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if (++npc->act_wait > 12 )
|
||||
if (++npc->act_wait > 12)
|
||||
{
|
||||
npc->act_no = 1;
|
||||
npc->ani_no = 0;
|
||||
|
@ -128,7 +128,7 @@ void ActNpc261(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Chaco (caged)
|
||||
// Chaco (caged)
|
||||
void ActNpc262(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -181,7 +181,7 @@ void ActNpc262(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Doctor (boss)
|
||||
// Doctor (boss)
|
||||
void ActNpc263(NPCHAR *npc)
|
||||
{
|
||||
int deg;
|
||||
|
@ -354,7 +354,7 @@ void ActNpc263(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 102:
|
||||
if (++npc->act_wait > 40 )
|
||||
if (++npc->act_wait > 40)
|
||||
{
|
||||
npc->act_no = 103;
|
||||
npc->act_wait = 16;
|
||||
|
@ -465,7 +465,7 @@ void ActNpc263(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Doctor red wave (projectile)
|
||||
// Doctor red wave (projectile)
|
||||
void ActNpc264(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -513,7 +513,7 @@ void ActNpc264(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Doctor red ball projectile
|
||||
// Doctor red ball projectile
|
||||
void ActNpc265(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -534,7 +534,7 @@ void ActNpc265(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Doctor red ball projectile (bouncing)
|
||||
// Doctor red ball projectile (bouncing)
|
||||
void ActNpc266(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -567,7 +567,7 @@ void ActNpc266(NPCHAR *npc)
|
|||
VanishNpChar(npc);
|
||||
}
|
||||
|
||||
//Muscle Doctor
|
||||
// Muscle Doctor
|
||||
void ActNpc267(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[10] = {
|
||||
|
@ -724,18 +724,22 @@ void ActNpc267(NPCHAR *npc)
|
|||
case 8:
|
||||
npc->act_no = 20;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 7:
|
||||
npc->act_no = 100;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 6:
|
||||
npc->act_no = 30;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 9:
|
||||
npc->act_no = 40;
|
||||
break;
|
||||
|
||||
default:
|
||||
npc->act_no = 15;
|
||||
npc->act_wait = 0;
|
||||
|
@ -830,7 +834,7 @@ void ActNpc267(NPCHAR *npc)
|
|||
PlaySoundObject(39, 1);
|
||||
}
|
||||
|
||||
if ( npc->act_wait > 90 )
|
||||
if (npc->act_wait > 90)
|
||||
npc->act_no = 10;
|
||||
|
||||
break;
|
||||
|
@ -957,12 +961,12 @@ void ActNpc267(NPCHAR *npc)
|
|||
npc->tgt_x = gMC.x;
|
||||
npc->tgt_y = gMC.y - 0x4000;
|
||||
|
||||
if ( npc->tgt_y < 0x8000 )
|
||||
if (npc->tgt_y < 0x8000)
|
||||
npc->tgt_y = 0x8000;
|
||||
|
||||
if ( npc->tgt_x < 0x8000 )
|
||||
if (npc->tgt_x < 0x8000)
|
||||
npc->tgt_x = 0x8000;
|
||||
if ( npc->tgt_x > 0x48000 )
|
||||
if (npc->tgt_x > 0x48000)
|
||||
npc->tgt_x = 0x48000;
|
||||
}
|
||||
|
||||
|
@ -1128,7 +1132,7 @@ void ActNpc267(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Igor (enemy)
|
||||
// Igor (enemy)
|
||||
void ActNpc268(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1331,7 +1335,7 @@ void ActNpc268(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Red Bat (bouncing)
|
||||
// Red Bat (bouncing)
|
||||
void ActNpc269(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1394,7 +1398,7 @@ void ActNpc269(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Doctor's blood (or """"red energy"""")
|
||||
// Doctor's blood (or """"red energy"""")
|
||||
void ActNpc270(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -1563,7 +1567,7 @@ void ActNpc272(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Droll projectile
|
||||
// Droll projectile
|
||||
void ActNpc273(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1602,7 +1606,7 @@ void ActNpc273(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Droll
|
||||
// Droll
|
||||
void ActNpc274(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[6] = {
|
||||
|
@ -1731,7 +1735,7 @@ void ActNpc274(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puppy (plantation)
|
||||
// Puppy (plantation)
|
||||
void ActNpc275(NPCHAR *npc)
|
||||
{
|
||||
RECT rcRight[4] = {
|
||||
|
@ -1790,7 +1794,7 @@ void ActNpc275(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Red Demon
|
||||
// Red Demon
|
||||
void ActNpc276(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[9] = {
|
||||
|
@ -1994,7 +1998,7 @@ void ActNpc276(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Red Demon projectile
|
||||
// Red Demon projectile
|
||||
void ActNpc277(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -2033,7 +2037,7 @@ void ActNpc277(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Little family
|
||||
// Little family
|
||||
void ActNpc278(NPCHAR *npc)
|
||||
{
|
||||
RECT rcPapa[2] = {
|
||||
|
@ -2100,7 +2104,7 @@ void ActNpc278(NPCHAR *npc)
|
|||
case 11:
|
||||
if (npc->direct == 0 && (npc->flag & 1))
|
||||
npc->direct = 2;
|
||||
else if ( npc->direct == 2 && npc->flag & 4 )
|
||||
else if (npc->direct == 2 && npc->flag & 4)
|
||||
npc->direct = 0;
|
||||
|
||||
if (npc->direct == 0)
|
||||
|
@ -2147,7 +2151,7 @@ void ActNpc278(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Falling block (large)
|
||||
// Falling block (large)
|
||||
void ActNpc279(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -2165,6 +2169,7 @@ void ActNpc279(NPCHAR *npc)
|
|||
npc->bits |= 4;
|
||||
npc->ani_no = 0;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->act_no = 100;
|
||||
npc->bits |= 4;
|
||||
|
@ -2178,6 +2183,7 @@ void ActNpc279(NPCHAR *npc)
|
|||
npc->hit.top = 0x1000;
|
||||
npc->hit.bottom = 0x1000;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->ani_no = 0;
|
||||
npc->act_no = 10;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Sue (being teleported by Misery)
|
||||
// Sue (being teleported by Misery)
|
||||
void ActNpc280(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -83,7 +83,7 @@ void ActNpc280(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Doctor (red energy form)
|
||||
// Doctor (red energy form)
|
||||
void ActNpc281(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {0, 0, 0, 0};
|
||||
|
@ -125,7 +125,7 @@ void ActNpc281(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Mini Undead Core (active)
|
||||
// Mini Undead Core (active)
|
||||
void ActNpc282(NPCHAR *npc)
|
||||
{
|
||||
RECT tc[3] = {
|
||||
|
@ -199,7 +199,7 @@ void ActNpc282(NPCHAR *npc)
|
|||
npc->rect = tc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Misery (transformed)
|
||||
// Misery (transformed)
|
||||
void ActNpc283(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[11] = {
|
||||
|
@ -367,7 +367,7 @@ void ActNpc283(NPCHAR *npc)
|
|||
|
||||
if (npc->act_wait % 6 == 1)
|
||||
{
|
||||
if ( npc->count2 == 289 )
|
||||
if (npc->count2 == 289)
|
||||
{
|
||||
x = npc->x + (Random(-0x40, 0x40) * 0x200);
|
||||
y = npc->y + (Random(-0x20, 0x20) * 0x200);
|
||||
|
@ -456,12 +456,15 @@ void ActNpc283(NPCHAR *npc)
|
|||
case 0:
|
||||
direct = 0xD8;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
direct = 0xEC;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
direct = 0x14;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
direct = 0x28;
|
||||
break;
|
||||
|
@ -477,12 +480,15 @@ void ActNpc283(NPCHAR *npc)
|
|||
case 0:
|
||||
direct = 0x58;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
direct = 0x6C;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
direct = 0x94;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
direct = 0xA8;
|
||||
break;
|
||||
|
@ -505,12 +511,15 @@ void ActNpc283(NPCHAR *npc)
|
|||
case 0:
|
||||
direct = 0xD8;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
direct = 0xEC;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
direct = 0x14;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
direct = 0x28;
|
||||
break;
|
||||
|
@ -526,12 +535,15 @@ void ActNpc283(NPCHAR *npc)
|
|||
case 0:
|
||||
direct = 0x58;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
direct = 0x6C;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
direct = 0x94;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
direct = 0xA8;
|
||||
break;
|
||||
|
@ -600,7 +612,7 @@ void ActNpc283(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Sue (transformed)
|
||||
// Sue (transformed)
|
||||
void ActNpc284(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[13] = {
|
||||
|
@ -735,9 +747,11 @@ void ActNpc284(NPCHAR *npc)
|
|||
case 3:
|
||||
npc->act_no = 34;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
npc->act_no = 32;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->act_no = 32;
|
||||
break;
|
||||
|
@ -949,7 +963,7 @@ void ActNpc284(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Undead Core spiral projectile
|
||||
// Undead Core spiral projectile
|
||||
void ActNpc285(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {232, 104, 248, 120};
|
||||
|
@ -996,7 +1010,7 @@ void ActNpc285(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Undead Core spiral shot trail
|
||||
// Undead Core spiral shot trail
|
||||
void ActNpc286(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1017,7 +1031,7 @@ void ActNpc286(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Orange smoke
|
||||
// Orange smoke
|
||||
void ActNpc287(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[7] = {
|
||||
|
@ -1056,7 +1070,7 @@ void ActNpc287(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Undead Core exploding rock
|
||||
// Undead Core exploding rock
|
||||
void ActNpc288(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[5] = {
|
||||
|
@ -1145,7 +1159,7 @@ void ActNpc288(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Critter (orange, Misery)
|
||||
// Critter (orange, Misery)
|
||||
void ActNpc289(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1255,7 +1269,7 @@ void ActNpc289(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Bat (Misery)
|
||||
// Bat (Misery)
|
||||
void ActNpc290(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1341,7 +1355,7 @@ void ActNpc290(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Mini Undead Core (inactive)
|
||||
// Mini Undead Core (inactive)
|
||||
void ActNpc291(NPCHAR *npc)
|
||||
{
|
||||
RECT tc[2] = {
|
||||
|
@ -1366,7 +1380,7 @@ void ActNpc291(NPCHAR *npc)
|
|||
npc->rect = tc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Quake
|
||||
// Quake
|
||||
void ActNpc292(NPCHAR *npc)
|
||||
{
|
||||
(void)npc;
|
||||
|
@ -1374,7 +1388,7 @@ void ActNpc292(NPCHAR *npc)
|
|||
SetQuake(10);
|
||||
}
|
||||
|
||||
//Undead Core giant energy shot
|
||||
// Undead Core giant energy shot
|
||||
void ActNpc293(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[2] = {
|
||||
|
@ -1404,7 +1418,7 @@ void ActNpc293(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Quake + falling block generator
|
||||
// Quake + falling block generator
|
||||
void ActNpc294(NPCHAR *npc)
|
||||
{
|
||||
int x;
|
||||
|
@ -1466,7 +1480,7 @@ void ActNpc294(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Cloud
|
||||
// Cloud
|
||||
void ActNpc295(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -1488,36 +1502,43 @@ void ActNpc295(NPCHAR *npc)
|
|||
npc->view.back = 0xD000;
|
||||
npc->view.front = 0xD000;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->ym = -0x800;
|
||||
npc->view.back = 0x7000;
|
||||
npc->view.front = 0x7000;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->ym = -0x400;
|
||||
npc->view.back = 0x4000;
|
||||
npc->view.front = 0x4000;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->ym = -0x200;
|
||||
npc->view.back = 0x2800;
|
||||
npc->view.front = 0x2800;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
npc->xm = -0x400;
|
||||
npc->view.back = 0xD000;
|
||||
npc->view.front = 0xD000;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
npc->xm = -0x200;
|
||||
npc->view.back = 0x7000;
|
||||
npc->view.front = 0x7000;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
npc->xm = -0x100;
|
||||
npc->view.back = 0x4000;
|
||||
npc->view.front = 0x4000;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
npc->xm = -0x80;
|
||||
npc->view.back = 0x2800;
|
||||
|
@ -1540,7 +1561,7 @@ void ActNpc295(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Cloud generator
|
||||
// Cloud generator
|
||||
void ActNpc296(NPCHAR *npc)
|
||||
{
|
||||
int x;
|
||||
|
@ -1560,12 +1581,15 @@ void ActNpc296(NPCHAR *npc)
|
|||
case 0:
|
||||
pri = 0x180;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
pri = 0x80;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
pri = 0x40;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
pri = 0x00;
|
||||
break;
|
||||
|
@ -1582,12 +1606,15 @@ void ActNpc296(NPCHAR *npc)
|
|||
case 0:
|
||||
pri = 0x80;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
pri = 0x55;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
pri = 0x40;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
pri = 0x00;
|
||||
break;
|
||||
|
@ -1600,7 +1627,7 @@ void ActNpc296(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Sue in dragon's mouth
|
||||
// Sue in dragon's mouth
|
||||
void ActNpc297(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {112, 48, 0x80, 64};
|
||||
|
@ -1611,7 +1638,7 @@ void ActNpc297(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Doctor (opening)
|
||||
// Doctor (opening)
|
||||
void ActNpc298(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[8] = {
|
||||
|
@ -1676,7 +1703,7 @@ void ActNpc298(NPCHAR *npc)
|
|||
++npc->ani_no;
|
||||
}
|
||||
|
||||
if ( npc->ani_no > 5 )
|
||||
if (npc->ani_no > 5)
|
||||
npc->ani_no = 2;
|
||||
|
||||
npc->x += 0x100;
|
||||
|
@ -1718,7 +1745,7 @@ void ActNpc298(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog/Misery (opening)
|
||||
// Balrog/Misery (opening)
|
||||
void ActNpc299(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Demon crown (opening)
|
||||
// Demon crown (opening)
|
||||
void ActNpc300(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {192, 80, 208, 96};
|
||||
|
@ -33,7 +33,7 @@ void ActNpc300(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Fish missile (Misery)
|
||||
// Fish missile (Misery)
|
||||
void ActNpc301(NPCHAR *npc)
|
||||
{
|
||||
RECT rect[8] = {
|
||||
|
@ -100,7 +100,7 @@ void ActNpc301(NPCHAR *npc)
|
|||
npc->rect = rect[npc->ani_no];
|
||||
}
|
||||
|
||||
//Camera focus marker
|
||||
// Camera focus marker
|
||||
void ActNpc302(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -116,12 +116,15 @@ void ActNpc302(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->x -= 0x400;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->y -= 0x400;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->x += 0x400;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->y += 0x400;
|
||||
break;
|
||||
|
@ -169,7 +172,7 @@ void ActNpc302(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Curly's machine gun
|
||||
// Curly's machine gun
|
||||
void ActNpc303(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -185,7 +188,7 @@ void ActNpc303(NPCHAR *npc)
|
|||
if (npc->pNpc == NULL)
|
||||
return;
|
||||
|
||||
//Set position
|
||||
// Set position
|
||||
if (npc->pNpc->direct == 0)
|
||||
{
|
||||
npc->direct = 0;
|
||||
|
@ -199,19 +202,19 @@ void ActNpc303(NPCHAR *npc)
|
|||
|
||||
npc->y = npc->pNpc->y;
|
||||
|
||||
//Animation
|
||||
// Animation
|
||||
npc->ani_no = 0;
|
||||
if (npc->pNpc->ani_no == 3 || npc->pNpc->ani_no == 5)
|
||||
npc->y -= 0x200;
|
||||
|
||||
//Set framerect
|
||||
// Set framerect
|
||||
if (npc->direct == 0)
|
||||
npc->rect = rcLeft[npc->ani_no];
|
||||
else
|
||||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Gaudi in hospital
|
||||
// Gaudi in hospital
|
||||
void ActNpc304(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -226,17 +229,19 @@ void ActNpc304(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->act_no = 1;
|
||||
npc->y += 5120;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 1:
|
||||
npc->ani_no = 0;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
npc->ani_no = 1;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
npc->act_no = 21;
|
||||
npc->ani_no = 2;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 21:
|
||||
if (++npc->ani_wait > 10)
|
||||
{
|
||||
|
@ -247,6 +252,7 @@ void ActNpc304(NPCHAR *npc)
|
|||
if (npc->ani_no > 3)
|
||||
npc->ani_no = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -254,7 +260,7 @@ void ActNpc304(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Small puppy
|
||||
// Small puppy
|
||||
void ActNpc305(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -273,7 +279,7 @@ void ActNpc305(NPCHAR *npc)
|
|||
npc->act_no = 1;
|
||||
npc->y -= 0x2000;
|
||||
npc->ani_wait = Random(0, 6);
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
|
||||
case 1:
|
||||
if (++npc->ani_wait > 6)
|
||||
|
@ -293,7 +299,7 @@ void ActNpc305(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog (nurse)
|
||||
// Balrog (nurse)
|
||||
void ActNpc306(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -313,7 +319,7 @@ void ActNpc306(NPCHAR *npc)
|
|||
npc->ani_no = 0;
|
||||
npc->ani_wait = 0;
|
||||
npc->y += 0x800;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 1:
|
||||
if (Random(0, 120) == 10)
|
||||
{
|
||||
|
@ -322,6 +328,7 @@ void ActNpc306(NPCHAR *npc)
|
|||
npc->ani_no = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (++npc->act_wait > 8)
|
||||
{
|
||||
|
@ -337,7 +344,7 @@ void ActNpc306(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Caged Santa
|
||||
// Caged Santa
|
||||
void ActNpc307(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -358,7 +365,7 @@ void ActNpc307(NPCHAR *npc)
|
|||
npc->act_no = 1;
|
||||
npc->ani_no = 0;
|
||||
npc->ani_wait = 0;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 1:
|
||||
if (Random(0, 160) == 1)
|
||||
{
|
||||
|
@ -367,6 +374,7 @@ void ActNpc307(NPCHAR *npc)
|
|||
npc->ani_no = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (++npc->act_wait > 12)
|
||||
{
|
||||
|
@ -387,7 +395,7 @@ void ActNpc307(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Stumpy
|
||||
// Stumpy
|
||||
void ActNpc308(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -496,7 +504,7 @@ void ActNpc308(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bute
|
||||
// Bute
|
||||
void ActNpc309(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -602,7 +610,7 @@ void ActNpc309(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Bute (with sword)
|
||||
// Bute (with sword)
|
||||
void ActNpc310(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[5] = {
|
||||
|
@ -753,7 +761,7 @@ void ActNpc310(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Bute archer
|
||||
// Bute archer
|
||||
void ActNpc311(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[7] = {
|
||||
|
@ -900,7 +908,7 @@ void ActNpc311(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Bute arrow projectile
|
||||
// Bute arrow projectile
|
||||
void ActNpc312(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[5] = {
|
||||
|
@ -1017,7 +1025,7 @@ void ActNpc312(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Ma Pignon
|
||||
// Ma Pignon
|
||||
void ActNpc313(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[14] = {
|
||||
|
@ -1367,7 +1375,7 @@ void ActNpc313(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ma Pignon rock
|
||||
// Ma Pignon rock
|
||||
void ActNpc314(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -1438,7 +1446,7 @@ void ActNpc314(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ma Pignon clone
|
||||
// Ma Pignon clone
|
||||
void ActNpc315(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -1580,7 +1588,7 @@ void ActNpc315(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Bute (dead)
|
||||
// Bute (dead)
|
||||
void ActNpc316(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1659,7 +1667,7 @@ void ActNpc316(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Mesa
|
||||
// Mesa
|
||||
void ActNpc317(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[4] = {
|
||||
|
@ -1704,7 +1712,7 @@ void ActNpc317(NPCHAR *npc)
|
|||
if (npc->ani_no > 1)
|
||||
npc->ani_no = 0;
|
||||
|
||||
if (gMC.x > npc->x - 0x28000 && gMC.x < npc->x + 0x28000 && gMC.y > npc->y - 0x14000 && gMC.y < npc->y + 0x14000 && ++npc->count1 > 50 )
|
||||
if (gMC.x > npc->x - 0x28000 && gMC.x < npc->x + 0x28000 && gMC.y > npc->y - 0x14000 && gMC.y < npc->y + 0x14000 && ++npc->count1 > 50)
|
||||
{
|
||||
npc->act_no = 10;
|
||||
}
|
||||
|
@ -1754,7 +1762,7 @@ void ActNpc317(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Mesa (dead)
|
||||
// Mesa (dead)
|
||||
void ActNpc318(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -1830,7 +1838,7 @@ void ActNpc318(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Mesa block
|
||||
// Mesa block
|
||||
void ActNpc319(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Curly (carried, shooting)
|
||||
// Curly (carried, shooting)
|
||||
void ActNpc320(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -104,7 +104,7 @@ void ActNpc320(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Curly's Nemesis
|
||||
// Curly's Nemesis
|
||||
void ActNpc321(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[3] = {
|
||||
|
@ -177,7 +177,7 @@ void ActNpc321(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Deleet
|
||||
// Deleet
|
||||
void ActNpc322(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -222,18 +222,23 @@ void ActNpc322(NPCHAR *npc)
|
|||
case 0:
|
||||
SetNpChar(207, npc->x + 0x800, npc->y, 0, 0, 0, 0, 0x180);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
SetNpChar(207, npc->x + 0x800, npc->y, 0, 0, 1, 0, 0x180);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
SetNpChar(207, npc->x + 0x800, npc->y, 0, 0, 2, 0, 0x180);
|
||||
break;
|
||||
|
||||
case 150:
|
||||
SetNpChar(207, npc->x + 0x800, npc->y, 0, 0, 3, 0, 0x180);
|
||||
break;
|
||||
|
||||
case 200:
|
||||
SetNpChar(207, npc->x + 0x800, npc->y, 0, 0, 4, 0, 0x180);
|
||||
break;
|
||||
|
||||
case 250:
|
||||
npc->hit.back = 0x6000;
|
||||
npc->hit.front = 0x6000;
|
||||
|
@ -265,7 +270,7 @@ void ActNpc322(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Bute (spinning)
|
||||
// Bute (spinning)
|
||||
void ActNpc323(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -293,12 +298,15 @@ void ActNpc323(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->xm = -0x600;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->xm = 0x600;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->ym = -0x600;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->ym = 0x600;
|
||||
break;
|
||||
|
@ -322,14 +330,17 @@ void ActNpc323(NPCHAR *npc)
|
|||
if (npc->x <= gMC.x + 0x4000)
|
||||
npc->act_no = 10;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (npc->x >= gMC.x - 0x4000)
|
||||
npc->act_no = 10;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (npc->y <= gMC.y + 0x4000)
|
||||
npc->act_no = 10;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (npc->y >= gMC.y - 0x4000)
|
||||
npc->act_no = 10;
|
||||
|
@ -354,7 +365,7 @@ void ActNpc323(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Bute generator
|
||||
// Bute generator
|
||||
void ActNpc324(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -374,7 +385,7 @@ void ActNpc324(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Heavy Press lightning
|
||||
// Heavy Press lightning
|
||||
void ActNpc325(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[7] = {
|
||||
|
@ -436,7 +447,7 @@ void ActNpc325(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Sue/Itoh becoming humans
|
||||
// Sue/Itoh becoming humans
|
||||
void ActNpc326(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -446,7 +457,7 @@ void ActNpc326(NPCHAR *npc)
|
|||
npc->y -= 0x1000;
|
||||
npc->x += 0x2000;
|
||||
npc->ani_no = 0;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 1:
|
||||
if (++npc->act_wait > 80)
|
||||
{
|
||||
|
@ -540,7 +551,7 @@ void ActNpc326(NPCHAR *npc)
|
|||
npc->act_no = 41;
|
||||
npc->act_wait = 0;
|
||||
npc->ani_no = 0;
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 41:
|
||||
if (++npc->act_wait == 30)
|
||||
npc->ani_no = 1;
|
||||
|
@ -579,7 +590,7 @@ void ActNpc326(NPCHAR *npc)
|
|||
npc->rect = rcSu[npc->ani_no];
|
||||
}
|
||||
|
||||
//Sneeze
|
||||
// Sneeze
|
||||
void ActNpc327(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -624,14 +635,14 @@ void ActNpc327(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Thingy that turns Sue and Itoh into humans for 4 seconds
|
||||
// Thingy that turns Sue and Itoh into humans for 4 seconds
|
||||
void ActNpc328(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {96, 0, 128, 48};
|
||||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Laboratory fan
|
||||
// Laboratory fan
|
||||
void ActNpc329(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -645,7 +656,7 @@ void ActNpc329(NPCHAR *npc)
|
|||
npc->rect = rc[1];
|
||||
}
|
||||
|
||||
//Rolling
|
||||
// Rolling
|
||||
void ActNpc330(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -728,7 +739,7 @@ void ActNpc330(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos bone projectile
|
||||
// Ballos bone projectile
|
||||
void ActNpc331(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -787,7 +798,7 @@ void ActNpc331(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos shockwave
|
||||
// Ballos shockwave
|
||||
void ActNpc332(NPCHAR *npc)
|
||||
{
|
||||
int xm;
|
||||
|
@ -843,7 +854,7 @@ void ActNpc332(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos lightning
|
||||
// Ballos lightning
|
||||
void ActNpc333(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -879,7 +890,7 @@ void ActNpc333(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Sweat
|
||||
// Sweat
|
||||
void ActNpc334(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -926,7 +937,7 @@ void ActNpc334(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ikachan
|
||||
// Ikachan
|
||||
void ActNpc335(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -982,7 +993,7 @@ void ActNpc335(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ikachan generator
|
||||
// Ikachan generator
|
||||
void ActNpc336(NPCHAR *npc)
|
||||
{
|
||||
int y;
|
||||
|
@ -996,7 +1007,7 @@ void ActNpc336(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 10:
|
||||
if (++npc->act_wait % 4 == 1 )
|
||||
if (++npc->act_wait % 4 == 1)
|
||||
{
|
||||
y = npc->y + (Random(0, 13) * 0x200 * 0x10);
|
||||
SetNpChar(335, npc->x, y, 0, 0, 0, 0, 0);
|
||||
|
@ -1006,7 +1017,7 @@ void ActNpc336(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Numhachi
|
||||
// Numhachi
|
||||
void ActNpc337(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -1048,7 +1059,7 @@ void ActNpc337(NPCHAR *npc)
|
|||
npc->rect = rcLeft[npc->ani_no];
|
||||
}
|
||||
|
||||
//Green Devil
|
||||
// Green Devil
|
||||
void ActNpc338(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[2] = {
|
||||
|
@ -1115,7 +1126,7 @@ void ActNpc338(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Green Devil generator
|
||||
// Green Devil generator
|
||||
void ActNpc339(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "Sound.h"
|
||||
#include "Triangle.h"
|
||||
|
||||
//Ballos
|
||||
// Ballos
|
||||
void ActNpc340(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -78,6 +78,7 @@ void ActNpc340(NPCHAR *npc)
|
|||
case 3:
|
||||
npc->act_no = 200;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
npc->act_no = 300;
|
||||
break;
|
||||
|
@ -558,7 +559,7 @@ void ActNpc340(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos 1 head
|
||||
// Ballos 1 head
|
||||
void ActNpc341(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[3] = {
|
||||
|
@ -584,7 +585,7 @@ void ActNpc341(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos 3 eye
|
||||
// Ballos 3 eye
|
||||
void ActNpc342(NPCHAR *npc)
|
||||
{
|
||||
static int flash;
|
||||
|
@ -810,6 +811,7 @@ void ActNpc342(NPCHAR *npc)
|
|||
PlaySoundObject(26, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (npc->count1 == 268)
|
||||
{
|
||||
|
@ -818,6 +820,7 @@ void ActNpc342(NPCHAR *npc)
|
|||
PlaySoundObject(26, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (npc->count1 == 396)
|
||||
{
|
||||
|
@ -827,6 +830,7 @@ void ActNpc342(NPCHAR *npc)
|
|||
PlaySoundObject(26, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (npc->count1 == 12)
|
||||
{
|
||||
|
@ -855,7 +859,7 @@ void ActNpc342(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos 2 cutscene
|
||||
// Ballos 2 cutscene
|
||||
void ActNpc343(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {0, 0, 120, 120};
|
||||
|
@ -869,7 +873,7 @@ void ActNpc343(NPCHAR *npc)
|
|||
npc->y = npc->pNpc->y;
|
||||
}
|
||||
|
||||
//Ballos 2 eyes
|
||||
// Ballos 2 eyes
|
||||
void ActNpc344(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -894,7 +898,7 @@ void ActNpc344(NPCHAR *npc)
|
|||
npc->y = npc->pNpc->y - 0x4800;
|
||||
}
|
||||
|
||||
//Ballos skull projectile
|
||||
// Ballos skull projectile
|
||||
void ActNpc345(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -940,7 +944,7 @@ void ActNpc345(NPCHAR *npc)
|
|||
case 110:
|
||||
npc->ym += 0x40;
|
||||
|
||||
if ( npc->y > (gMap.length * 0x200 * 0x10) + (2 * 0x200 * 0x10))
|
||||
if (npc->y > (gMap.length * 0x200 * 0x10) + (2 * 0x200 * 0x10))
|
||||
{
|
||||
npc->cond = 0;
|
||||
return;
|
||||
|
@ -963,7 +967,7 @@ void ActNpc345(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos 4 orbiting platform
|
||||
// Ballos 4 orbiting platform
|
||||
void ActNpc346(NPCHAR *npc)
|
||||
{
|
||||
unsigned char deg;
|
||||
|
@ -1099,7 +1103,7 @@ void ActNpc346(NPCHAR *npc)
|
|||
npc->rect = rc;
|
||||
}
|
||||
|
||||
//Hoppy
|
||||
// Hoppy
|
||||
void ActNpc347(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
|
@ -1186,7 +1190,7 @@ void ActNpc347(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ballos 4 spikes
|
||||
// Ballos 4 spikes
|
||||
void ActNpc348(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[2] = {
|
||||
|
@ -1222,7 +1226,7 @@ void ActNpc348(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Statue
|
||||
// Statue
|
||||
void ActNpc349(NPCHAR *npc)
|
||||
{
|
||||
RECT rect = {0, 0, 16, 16};
|
||||
|
@ -1240,7 +1244,7 @@ void ActNpc349(NPCHAR *npc)
|
|||
npc->rect = rect;
|
||||
}
|
||||
|
||||
//Flying Bute archer
|
||||
// Flying Bute archer
|
||||
void ActNpc350(NPCHAR *npc)
|
||||
{
|
||||
RECT rcLeft[7] = {
|
||||
|
@ -1425,7 +1429,7 @@ void ActNpc350(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Statue (shootable)
|
||||
// Statue (shootable)
|
||||
void ActNpc351(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[9] = {
|
||||
|
@ -1478,19 +1482,19 @@ void ActNpc351(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Ending characters
|
||||
// Ending characters
|
||||
void ActNpc352(NPCHAR *npc)
|
||||
{
|
||||
switch (npc->act_no)
|
||||
{
|
||||
case 0:
|
||||
//Set state
|
||||
// Set state
|
||||
npc->act_no = 1;
|
||||
npc->ani_no = 0;
|
||||
npc->count1 = npc->direct / 100;
|
||||
npc->direct %= 100;
|
||||
|
||||
//Set surfaces / offset
|
||||
// Set surfaces / offset
|
||||
switch (npc->count1)
|
||||
{
|
||||
case 7:
|
||||
|
@ -1500,6 +1504,7 @@ void ActNpc352(NPCHAR *npc)
|
|||
case 13:
|
||||
npc->surf = SURFACE_ID_LEVEL_SPRITESET_1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1512,11 +1517,12 @@ void ActNpc352(NPCHAR *npc)
|
|||
case 12:
|
||||
npc->view.top = 0x2000;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//Balrog
|
||||
// Balrog
|
||||
if (npc->count1 == 9)
|
||||
{
|
||||
npc->view.back = 0x2800;
|
||||
|
@ -1524,10 +1530,10 @@ void ActNpc352(NPCHAR *npc)
|
|||
npc->x -= 0x200;
|
||||
}
|
||||
|
||||
//Spawn King's sword
|
||||
// Spawn King's sword
|
||||
if (!npc->count1)
|
||||
SetNpChar(145, 0, 0, 0, 0, 2, npc, 0x100);
|
||||
//Fallthrough
|
||||
// Fallthrough
|
||||
case 1:
|
||||
npc->ym += 0x40;
|
||||
if (npc->ym > 0x5FF)
|
||||
|
@ -1578,7 +1584,7 @@ void ActNpc352(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no + 2 * npc->count1];
|
||||
}
|
||||
|
||||
//Bute with sword (flying)
|
||||
// Bute with sword (flying)
|
||||
void ActNpc353(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -1608,12 +1614,15 @@ void ActNpc353(NPCHAR *npc)
|
|||
case 0:
|
||||
npc->xm = -0x600;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
npc->xm = 0x600;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
npc->ym = -0x600;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
npc->ym = 0x600;
|
||||
break;
|
||||
|
@ -1716,7 +1725,7 @@ void ActNpc353(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Invisible deathtrap wall
|
||||
// Invisible deathtrap wall
|
||||
void ActNpc354(NPCHAR *npc)
|
||||
{
|
||||
int i;
|
||||
|
@ -1763,7 +1772,7 @@ void ActNpc354(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Quote and Curly on Balrog's back
|
||||
// Quote and Curly on Balrog's back
|
||||
void ActNpc355(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[4] = {
|
||||
|
@ -1813,7 +1822,7 @@ void ActNpc355(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Balrog rescue
|
||||
// Balrog rescue
|
||||
void ActNpc356(NPCHAR *npc)
|
||||
{
|
||||
RECT rcRight[2] = {
|
||||
|
@ -1883,7 +1892,7 @@ void ActNpc356(NPCHAR *npc)
|
|||
npc->rect = rcRight[npc->ani_no];
|
||||
}
|
||||
|
||||
//Puppy ghost
|
||||
// Puppy ghost
|
||||
void ActNpc357(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {224, 136, 240, 152};
|
||||
|
@ -1917,7 +1926,7 @@ void ActNpc357(NPCHAR *npc)
|
|||
SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + 0x1000, 13, 1);
|
||||
}
|
||||
|
||||
//Misery (stood in the wind during the credits)
|
||||
// Misery (stood in the wind during the credits)
|
||||
void ActNpc358(NPCHAR *npc)
|
||||
{
|
||||
RECT rc[5] = {
|
||||
|
@ -1958,7 +1967,7 @@ void ActNpc358(NPCHAR *npc)
|
|||
npc->rect = rc[npc->ani_no];
|
||||
}
|
||||
|
||||
//Water droplet generator
|
||||
// Water droplet generator
|
||||
void ActNpc359(NPCHAR *npc)
|
||||
{
|
||||
int x;
|
||||
|
@ -1970,7 +1979,7 @@ void ActNpc359(NPCHAR *npc)
|
|||
}
|
||||
}
|
||||
|
||||
//Thank you
|
||||
// Thank you
|
||||
void ActNpc360(NPCHAR *npc)
|
||||
{
|
||||
RECT rc = {0, 176, 48, 184};
|
||||
|
|
Loading…
Add table
Reference in a new issue