w5685993 发表于 2020-2-28 12:20

R6骨架绘制

本帖最后由 w5685993 于 2020-2-28 12:28 编辑

有人问我R6绘制骨架,发一下吧。

void TransformsCalculation(__int64 pBones, __m128* ResultPosition, __m128* BoneInfo)
{
      __m128 v5; // xmm2
      __m128 v6; // xmm3
      __m128 v7; // xmm0
      __m128 v8; // xmm4
      __m128 v9; // xmm1

      __m128 v10 = { 0.500f, 0.500f, 0.500f, 0.500f };
      __m128 v11 = { 2.000f, 2.000f, 2.000f, 0.000f };

      __m128 v12 = RPM<__m128>(pBones);
      __m128 v13 = RPM<__m128>(pBones + 0x10);

      v5 = v13;

      v6 = _mm_mul_ps(*(__m128*)BoneInfo, v5);
      v6.m128_f32 = v6.m128_f32
                + (float)(_mm_cvtss_f32(_mm_shuffle_ps(v6, v6, 0x55)) + _mm_cvtss_f32(_mm_shuffle_ps(v6, v6, 0xAA)));
      v7 = _mm_shuffle_ps(v13, v5, 0xFF);
      v8 = _mm_sub_ps(
                _mm_mul_ps(_mm_shuffle_ps(v5, v5, 0xD2), *(__m128*)BoneInfo),
                _mm_mul_ps(_mm_shuffle_ps(*(__m128*)BoneInfo, *(__m128*)BoneInfo, 0xD2), v5));
      v9 = _mm_shuffle_ps(v12, v12, 0x93);
      v9.m128_f32 = 0.0;
      *(__m128*)ResultPosition = _mm_add_ps(
                _mm_shuffle_ps(v9, v9, 0x39),
                _mm_mul_ps(
                        _mm_add_ps(
                              _mm_add_ps(
                                        _mm_mul_ps(_mm_shuffle_ps(v8, v8, 0xD2), v7),
                                        _mm_mul_ps(_mm_shuffle_ps(v6, v6, 0), v5)),
                              _mm_mul_ps(
                                        _mm_sub_ps(_mm_mul_ps(v7, v7), (__m128)v10),
                                        *(__m128*)BoneInfo)),
                                        (__m128)v11));
}

__m128 GetEntityBone(DWORD_PTR Entity, __int64 BoneID)
{
      __m128 Output;

      __int64 pBonesChain1 = RPM<__int64>(Entity + 0x908);
      __int64 pBonesChain2 = RPM<__int64>(pBonesChain1);
      __int64 pBones = RPM<__int64>(pBonesChain2 + 0x270);
      __int64 pBonesData = RPM<__int64>(pBones + 0x58);

      __m128 BoneInfo = RPM<__m128>((0x20 * BoneID) + pBonesData);

      TransformsCalculation(pBones, &Output, &BoneInfo);

      return Output;
}

int AshBones[] = {
                0x33,//high_neck
                0x32,//low_neck
                0x07,//r_shoulder
                0x60,//l_shoulder
                0x08,//r_elbow
                0x61,//l_elbow
                0x09,//r_hand
                0x62,//l_hand
                0x05,//high_stomach
                0x04,//low_stomach
                0x02,//pelvis
                0xC0,//r_knee
                0xCA,//l_knee
                0xC1,//r_foot
                0xCB//l_foot
      };

int BoneId = { //
        {//head high_neck low_neck r_shoulder l_shoulder r_elbow l_elbow r_hand l_hand high_stomach low_stomach pelvis r_knee l_knee r_foot l_foot
                {0x38,0x34,0x33,0x07,0x58,0x08,0x59,0x09,0x54,0x05,0x04,0x02,0xAC,0xB6,0xAD,0xB7},//RECRUIT
                {0x38,0x34,0x33,0x07,0x41,0x08,0x42,0x09,0x43,0x05,0x04,0x02,0x9B,0xA6,0x9C,0xA7},//SMOKE
                {0x38,0x34,0x33,0x07,0x37,0x08,0x38,0x09,0x39,0x05,0x04,0x02,0x87,0x93,0x88,0x94},//MUTE
                {0x38,0x34,0x33,0x07,0x56,0x08,0x57,0x09,0x58,0x05,0x04,0x02,0xA9,0xB4,0xAA,0xB5},//SLEDGE
                {0x38,0x34,0x33,0x07,0x38,0x08,0x39,0x09,0x3A,0x05,0x04,0x02,0x89,0x94,0x8A,0x95},//THATCHER
        },

        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x39,0x35,0x34,0x07,0x59,0x08,0x5A,0x09,0x5B,0x05,0x04,0x02,0xB7,0xC1,0xB8,0xC2},//CASTLE
                {0x37,0x33,0x32,0x07,0x60,0x08,0x61,0x09,0x62,0x05,0x04,0x02,0xC0,0xCA,0xC1,0xCB},//ASH
                {0x39,0x35,0x34,0x07,0x60,0x08,0x61,0x09,0x62,0x05,0x04,0x02,0xBE,0xC8,0xBF,0xC9},//PULSE
                {0x38,0x34,0x33,0x07,0x5F,0x08,0x60,0x09,0x61,0x05,0x04,0x02,0xB7,0xC0,0xB8,0xC1},//THERMITE
        },

        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x3A,0x36,0x35,0x07,0x5D,0x08,0x5E,0x09,0x5F,0x05,0x04,0x02,0xB8,0xC3,0xB9,0xC4},//DOC
                {0x3A,0x36,0x35,0x07,0x5D,0x08,0x5E,0x09,0x5F,0x05,0x04,0x02,0xB8,0xC3,0xB9,0xC4},//ROOK
                {0x3C,0x38,0x37,0x07,0x5F,0x08,0x60,0x09,0x61,0x05,0x04,0x02,0xBE,0xC9,0xBF,0xCA},//TWITCH
                {0x3C,0x38,0x37,0x07,0x66,0x08,0x67,0x09,0x68,0x05,0x04,0x02,0xCA,0xD5,0xCB,0xD6},//MONTAGNE
        },

        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x37,0x33,0x32,0x07,0x53,0x08,0x54,0x09,0x55,0x05,0x04,0x02,0xA3,0xAB,0xA4,0xAC},//GLAZ
                {0x38,0x34,0x33,0x07,0x54,0x08,0x55,0x09,0x56,0x05,0x04,0x02,0xAA,0xB1,0xAB,0xB2},//FUZE
                {0x38,0x34,0x33,0x07,0x54,0x08,0x55,0x09,0x56,0x05,0x04,0x02,0xA9,0xB1,0xAA,0xB2},//KAPKAN
                {0x38,0x34,0x33,0x07,0x54,0x08,0x55,0x09,0x56,0x05,0x04,0x02,0xA9,0xB1,0xAA,0xB2},//TACHANKA
        },

        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x3A,0x36,0x35,0x07,0x5D,0x08,0x5E,0x09,0x5F,0x05,0x04,0x02,0xBB,0xC4,0xBC,0xC5},//BLITZ
                {0x39,0x35,0x34,0x07,0x5B,0x08,0x5C,0x09,0x5D,0x05,0x04,0x02,0xB3,0xBC,0xB4,0xBD},//IQ
                {0x38,0x34,0x33,0x07,0x5F,0x08,0x60,0x09,0x61,0x05,0x04,0x02,0xB5,0xBF,0xB6,0xC0},//JAGER
                {0x38,0x34,0x33,0x07,0x5F,0x08,0x60,0x09,0x61,0x05,0x04,0x02,0xB5,0xBF,0xB6,0xC0},//BANDIT
        },

        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x37,0x33,0x32,0x07,0x5E,0x08,0x5F,0x09,0x60,0x05,0x04,0x02,0xB5,0xBE,0xB6,0xBF},//BUCK
                {0x38,0x35,0x34,0x07,0x60,0x08,0x61,0x09,0x62,0x05,0x04,0x02,0xB8,0xC2,0xB9,0xC3},//FROST
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },

        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x96,0x8F,0x97},//BLACKBEARD
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x96,0x8F,0x97},//VALKYRIE
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },

        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x37,0x33,0x32,0x07,0x5E,0x08,0x5F,0x09,0x60,0x05,0x04,0x02,0xB4,0xBD,0xB5,0xBE},//CAPITAO
                {0x36,0x32,0x31,0x07,0x55,0x08,0x56,0x09,0x57,0x05,0x04,0x02,0x91,0x99,0x92,0x9A},//CAVEIRA
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x37,0x33,0x32,0x07,0x53,0x08,0x54,0x09,0x55,0x05,0x04,0x02,0x90,0x9A,0x91,0x9B},//HIBANA
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x97,0x8F,0x98},//ECHO
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x38,0x34,0x33,0x07,0x5B,0x08,0x5C,0x09,0x5D,0x05,0x04,0x02,0xB1,0xBB,0xB2,0xBC},//JACKAL
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x96,0x8F,0x97},//MIRA
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x37,0x33,0x32,0x07,0x5E,0x08,0x5F,0x09,0x60,0x05,0x04,0x02,0xAC,0xB6,0xAD,0xB7},//YING
                {0x36,0x32,0x31,0x07,0x5D,0x08,0x5E,0x09,0x5F,0x05,0x04,0x02,0xA2,0xAA,0xA3,0xAB},//LESION
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x36,0x32,0x31,0x07,0x56,0x08,0x57,0x09,0x58,0x05,0x04,0x02,0x92,0x9A,0x93,0x9B},//ELA
                {0x36,0x32,0x31,0x07,0x57,0x08,0x58,0x09,0x59,0x05,0x04,0x02,0xA1,0xAC,0xA2,0xAD},//ZOFIA
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x39,0x35,0x34,0x07,0x62,0x08,0x63,0x09,0x64,0x05,0x04,0x02,0xBC,0xC7,0xBD,0xC8},//DOKKAEBI
                {0x37,0x33,0x32,0x07,0x5E,0x08,0x5F,0x09,0x60,0x05,0x04,0x02,0xAB,0xB6,0xAC,0xB7},//VIGIL
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x39,0x35,0x34,0x07,0x5C,0x08,0x5D,0x09,0x5E,0x05,0x04,0x02,0xB6,0xC1,0xB7,0xC2},//LION
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8F,0x98,0x90,0x99},//FINKA
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x3A,0x36,0x35,0x07,0x5A,0x08,0x5B,0x09,0x5C,0x05,0x04,0x02,0xB7,0xC1,0xB8,0xC2},//MAESTRO
                {0x38,0x34,0x33,0x07,0x5C,0x08,0x5D,0x09,0x5E,0x05,0x04,0x02,0xB2,0xB9,0xB3,0xBA},//ALIBI
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x3A,0x36,0x35,0x07,0x5A,0x08,0x5B,0x09,0x5C,0x05,0x04,0x02,0xB6,0xC2,0xB7,0xC3},//MAVERICK
                {0x36,0x32,0x31,0x07,0x56,0x08,0x57,0x09,0x58,0x05,0x04,0x02,0xAF,0xB8,0xB0,0xB9},//CLASH
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x97,0X8F,0x98},//NOMAD
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x97,0X8F,0x98},//KAID
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x96,0x8F,0x97},//MOZZIE
                {0x36,0x32,0x31,0x07,0x58,0x08,0x59,0x09,0x5A,0x05,0x04,0x02,0x99,0xA2,0x9A,0xA3},//GRIDLOCK
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x38,0x34,0x33,0x07,0x41,0x08,0x42,0x09,0x43,0x05,0x04,0x02,0x80,0x88,0x81,0x89},//NOKK
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x39,0x35,0x34,0x07,0x5F,0x08,0x60,0x09,0x61,0x05,0x04,0x02,0xC0,0xCB,0xC1,0xCC},//WARDEN
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x97,0x8F,0x98},//GOYO
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x36,0x32,0x31,0x07,0x57,0x08,0x58,0x09,0x59,0x05,0x04,0x02,0x9E,0xA7,0x9F,0xA8},//AMARU
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        },
        {
                {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},//empty
                {0x36,0x32,0x31,0x07,0x58,0x08,0x59,0x09,0x60,0x05,0x04,0x02,0x97,0xA0,0x98,0xA1},//KALI
                {0x36,0x32,0x31,0x07,0x52,0x08,0x53,0x09,0x54,0x05,0x04,0x02,0x8E,0x97,0x8F,0x98},//WAMAI
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
                {0x00,0x00,0x00,0x07,0x00,0x08,0x00,0x09,0x00,0x05,0x04,0x02,0x00,0x00,0x00,0x00},//empty
        }

};

yxdyxd163 发表于 2020-2-28 13:13

这是什么呀,,好像很厉害

zw7889 发表于 2020-2-28 13:32

这啥啊,彩六啊

N3618 发表于 2020-2-28 14:13

给我看蒙了

其实我很专一 发表于 2020-5-18 08:57

有没有和平作者群呀,绘制厉害的

zxc6634 发表于 2020-5-31 11:53

有E版本吗
页: [1]
查看完整版本: R6骨架绘制