123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- #include "CBall.h"
- CBall cBall;
- uint16 CBall::s_iAirResistanceDistMult[201];
- //-------------------------------------------------------------------------------------------------
- //00156E3C
- void CBall::UpdateFrame() {
- }
- //-------------------------------------------------------------------------------------------------
- //00156F38
- void CBall::CheckEvents() {
- }
- //-------------------------------------------------------------------------------------------------
- //001575DC
- void CBall::ClampSpeed(int, int) {
- }
- //-------------------------------------------------------------------------------------------------
- //00157648
- void CBall::Stop() {
- LOGE("CBall::Stop%p",this);
- }
- //-------------------------------------------------------------------------------------------------
- //00157668
- void CBall::SetVel(int i1, int i2, int i3) {
- LOGE("%p%x%x%xCBall::SetVel",this,i1,i2,i3);
- }
- //-------------------------------------------------------------------------------------------------
- //00157678
- void CBall::SetVelRel(int i1, int i2, int i3) {
- LOGE("%p%x%x%xCBall::SetVel",this,i1,i2,i3);
- }
- //-------------------------------------------------------------------------------------------------
- //00157698
- void CBall::AdjustKickToPos(TPoint) {
- }
- //-------------------------------------------------------------------------------------------------
- //001577B4
- int CBall::SetBallMoveToPosSpin(TPoint3D *, int, int, TPoint3D, TPoint3D, int, int) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //0015799E
- CBall& CBall::operator=(CBall const & ball1) {
- return *this;
- }
- //-------------------------------------------------------------------------------------------------
- //00157A3C
- int CBall::SetBallMoveToPosLowSpin(TPoint3D *, int, int, TPoint3D, TPoint3D, int, int) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //00157C94
- int CBall::GetPassPowerX(int, int) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //00157D08
- int CBall::GetPassLength(int, int) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //00157DA4
- int CBall::SetBallMoveToPos(TPoint3D* pt1, TPoint3D pt2, TPoint3D pt3, int i4, int i5, int i6) {
- TPoint pt_0;
- pt_0.dx_0 = pt3.point_0.dx_0 - pt2.point_0.dx_0;
- pt_0.dy_4 = pt3.point_0.dy_4 - pt2.point_0.dy_4;
- // 157db8
- int Mag_r7 = XMATH_Mag(&pt_0);
- int tmp_r5;
- bool b_r7;
- // 157dca
- if (i5 >= 1) {
- // 157dce
- if (Mag_r7 != 0) {
- // 157dd0
- int tmp_r1 = i5;
- if (i5 <= 1)
- tmp_r1 = 1;
- tmp_r5 = Mag_r7 / tmp_r1;
- } else {
- // 157e12
- tmp_r5 = 30;
- }
- // 157e1e
- while (tmp_r5 < 512) {
- // 157e24
- if ((CBall::s_iAirResistanceDistMult[tmp_r5] * tmp_r5 / 2048) * i5 >= Mag_r7)
- break;
- tmp_r5++;
- }
- b_r7 = true;
- } else {
- // 157de2
- tmp_r5 = i4;
- int tmp_r1 = 1;
- int tmp_r6 = 1;
- // 157dea
- if (tmp_r5 > 1)
- tmp_r1 = tmp_r5;
- int tmp_r0 = (Mag_r7 / tmp_r1) << 11;
- uint tmp_r10 = CBall::s_iAirResistanceDistMult[tmp_r5];
- if (tmp_r10 > 1)
- tmp_r6 = tmp_r10;
- i5 = tmp_r0 / tmp_r6;
- b_r7 = false;
- // 157e10
- }
- // 157e40
- XMATH_Normalize(&pt_0, i5);
- *pt1 = pt_0;
- int r0_i=tmp_r5 * tmp_r5 * 98; //必须这样写 原来的写法除法不对
-
- pt1->dz_8 = ((r0_i>>1) + (pt3.dz_8 - pt2.dz_8)) / tmp_r5;
- // 157e62
- if (i6 != 0) {
- // 157e6a
- pt1->dz_8 = (pt1->dz_8 << 10) / (1024 + tGame.mTMath_6734.field_394 / 2);
- // 157e88
- }
- // 157e8c
- int Result = XMATH_Mag3D(pt1);
- if (b_r7)
- Result = tmp_r5;
- return Result;
- }
- //-------------------------------------------------------------------------------------------------
- //00157EAC
- int CBall::SetBallMoveToPosLow(TPoint3D *, TPoint3D, TPoint3D, int, int) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //00157FF4
- void CBall::AirResistanceInit() {
- }
- //-------------------------------------------------------------------------------------------------
- //0015806C
- void CBall::ProjectionPassLengthInit() {
- }
- //-------------------------------------------------------------------------------------------------
- //00158148
- void CBall::PlayNetSound() {
- }
- //-------------------------------------------------------------------------------------------------
- //0015818C
- void CBall::CornerFlagCollision(int, int) {
- }
- //-------------------------------------------------------------------------------------------------
- //00158228
- int CBall::PointBallTest(TPoint *, int) {
- return 0;
- }
- //-------------------------------------------------------------------------------------------------
- //00158254
- void CBall::DoBallGoalBounce() {
- }
- //-------------------------------------------------------------------------------------------------
- //00158638
- void CBall::Deflect() {
- LOGE("%pCBall::Deflect",this);
- }
- //-------------------------------------------------------------------------------------------------
- //001586DC
- bool CBall::CheckPostXYCol(TPoint3D) {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //001588E8
- bool CBall::CheckPostYZCol(TPoint3D) {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //0015897C
- bool CBall::DoBallPostCollisions() {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //001589CC
- bool CBall::BannerCollisionX(int) {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //00158A60
- bool CBall::BannerCollisionY(int) {
- return false;
- }
- //-------------------------------------------------------------------------------------------------
- //001592A0
- void CBall::CounterBallSpinZ(int) {
- }
- //-------------------------------------------------------------------------------------------------
- //001592F8
- void CBall::ApplySpin(TPoint3D *, TPoint3D *, int, int) {
- }
- //-------------------------------------------------------------------------------------------------
- //00159334
- void CBall::ApplyExactSpin(TPoint3D *, TPoint3D *, int, int) {
- }
- //-------------------------------------------------------------------------------------------------
- //00159370
- void CBall::ApplyGroundSpin(TPoint3D *, TPoint3D *) {
- }
- //-------------------------------------------------------------------------------------------------
- //00159404
- void CBall::CalcSpeed() {
- }
- //-------------------------------------------------------------------------------------------------
- //0015946C
- void CBall::CalcVars() {
- }
- //-------------------------------------------------------------------------------------------------
- //001595A4
- void CBall::CheckBallInGoal() {
- }
- //-------------------------------------------------------------------------------------------------
|