1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
bool C_PlayerShade::OnLoad()
{
C_Frameset CharJumpRight( "JUMPINGRIGHT" );
CharJumpRight.AddFrame(0, 188, 25, 48);
CharJumpRight.AddFrame(25, 187, 23, 51);
CharJumpRight.AddFrame(48, 189, 23, 55);
CharJumpRight.AddFrame(71, 187, 23, 57);
CharJumpRight.AddFrame(94, 190, 27, 53);
CharJumpRight.AddFrame(121, 191, 34, 50);
C_Frameset CharJumpLeft( "JUMPINGLEFT" );
CharJumpLeft.AddFrame(0, 245, 25, 48);
CharJumpLeft.AddFrame(25, 244, 23, 51);
CharJumpLeft.AddFrame(48, 246, 23, 55);
CharJumpLeft.AddFrame(71, 244, 23, 57);
CharJumpLeft.AddFrame(94, 247, 27, 53);
CharJumpLeft.AddFrame(121, 248, 34, 50);
C_Frameset CharFallRight( "FALLINGRIGHT" );
CharFallRight.AddFrame(155, 190, 32, 52);
CharFallRight.AddFrame(187, 189, 29, 54);
C_Frameset CharFallLeft( "FALLINGLEFT" );
CharFallLeft.AddFrame(155, 247, 32, 52);
CharFallLeft.AddFrame(187, 246, 29, 52);
C_Frameset CharSlideRight( "SLIDINGRIGHT" );
CharSlideRight.AddFrame(0, 301, 34, 44);
CharSlideRight.AddFrame(34, 301, 46, 44, 10);
CharSlideRight.AddFrame(80, 301, 53, 44, 20);
CharSlideRight.AddFrame(133, 301, 57, 44, 20);
CharSlideRight.AddFrame(190, 301, 38, 44, 10);
CharSlideRight.AddFrame(228, 301, 30, 44, 10);
CharSlideRight.AddFrame(258, 301, 41, 44, 10);
CharSlideRight.AddFrame(299, 301, 43, 44, 10);
C_Frameset CharSlideLeft( "SLIDINGLEFT" );
CharSlideLeft.AddFrame(0, 345, 34, 44);
CharSlideLeft.AddFrame(34, 345, 46, 44);
CharSlideLeft.AddFrame(80, 345, 53, 44);
CharSlideLeft.AddFrame(133, 345, 57, 44);
CharSlideLeft.AddFrame(190, 345, 38, 44);
CharSlideLeft.AddFrame(228, 345, 30, 44);
CharSlideLeft.AddFrame(258, 345, 41, 44);
CharSlideLeft.AddFrame(299, 345, 43, 44);
C_Frameset Transparent("TRANSPARENT");
Transparent.AddFrame(500,0,0,0);
Anim_Control.AddFrameset(CharJumpRight);
Anim_Control.AddFrameset(CharJumpLeft);
Anim_Control.AddFrameset(CharFallRight);
Anim_Control.AddFrameset(CharFallLeft);
Anim_Control.AddFrameset(CharSlideRight);
Anim_Control.AddFrameset(CharSlideLeft);
Anim_Control.AddFrameset(Transparent);
Anim_Control.SetAnimation("TRANSPARENT",150);
if(C_Entity::OnLoad("./gfx/megaman/shade.png") == false)
{
fprintf(stderr, "Failed to load shade.png: %s\n", SDL_GetError());
return false;
}
X = target->X;
Y = target->Y;
SpeedX = target->SpeedX;
SpeedY = target->SpeedY;
AccelY = target->AccelY;
return true;
}
|