黃易群俠傳M脫機外掛應用程式黃易神行
2664
4

《H1Z1 屍流感》h1z1會自動更新偏移值的 透視外掛原碼分享

千年眼 發表於 2015-3-3 14:18:53 | 只看該作者 回帖獎勵 |倒序瀏覽 |
  1. void DrawP(LPDIRECT3DDEVICE9 Device, int baseX, int baseY, int baseW, int baseH, D3DCOLOR Cor)
  2. {
  3.         D3DRECT BarRect = { baseX, baseY, baseX + baseW, baseY + baseH };
  4.         Device->Clear(1, &BarRect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, Cor, 0, 0);
  5. }

  6. void DrawCornerBox(LPDIRECT3DDEVICE9 Device, int x, int y, int w, int h, int borderPx, DWORD borderColor)
  7. {
  8.         DrawP(Device, x - (w / 2), (y - h + borderPx), w / 3, borderPx, borderColor); //BOTtom
  9.         DrawP(Device, x - (w / 2) + w - w / 3, (y - h + borderPx), w / 3, borderPx, borderColor); //bottom
  10.         DrawP(Device, x - (w / 2), (y - h + borderPx), borderPx, w / 3, borderColor); //left
  11.         DrawP(Device, x - (w / 2), (y - h + borderPx) + h - w / 3, borderPx, w / 3, borderColor); //left
  12.         DrawP(Device, x - (w / 2), y, w / 3, borderPx, borderColor); //top
  13.         DrawP(Device, x - (w / 2) + w - w / 3, y, w / 3, borderPx, borderColor); //top
  14.         DrawP(Device, (x + w - borderPx) - (w / 2), (y - h + borderPx), borderPx, w / 3, borderColor);//right
  15.         DrawP(Device, (x + w - borderPx) - (w / 2), (y - h + borderPx) + h - w / 3, borderPx, w / 3, borderColor);//right
  16. }

  17. struct ModelInfo_t
  18. {
  19.         D3DXVECTOR3 Position2D;
  20.         D3DXVECTOR3 Position3D;
  21.         float RealDistance;
  22. };
  23. std::vectorModelInfo;

  24. void Worldtoscreen(LPDIRECT3DDEVICE9 Device)
  25. {
  26.         ModelInfo_t* pModel = new ModelInfo_t;

  27.         D3DXMATRIX projMatrix;
  28.         D3DXVECTOR4 position, input;
  29.         Device->GetViewport(&Viewport);
  30.         Device->GetVertexShaderConstantF(195, projMatrix, 4);

  31.         input.y = 1; //height

  32.         D3DXMatrixTranspose(&projMatrix, &projMatrix);
  33.         D3DXVec4Transform(&position, &input, &projMatrix);
  34.         
  35.         position.x = input.x * projMatrix._11 + input.y * projMatrix._21 + input.z * projMatrix._31 + projMatrix._41;
  36.         position.y = input.x * projMatrix._12 + input.y * projMatrix._22 + input.z * projMatrix._32 + projMatrix._42;
  37.         position.z = input.x * projMatrix._13 + input.y * projMatrix._23 + input.z * projMatrix._33 + projMatrix._43;
  38.         position.w = input.x * projMatrix._14 + input.y * projMatrix._24 + input.z * projMatrix._34 + projMatrix._44;
  39.         
  40.         if (projMatrix._44 > -0.1f)
  41.         {
  42.                 pModel->Position2D.x = ((position.x / position.w) * (Viewport.Width / 2.0f)) + Viewport.X + (Viewport.Width / 2.0f);
  43.                 pModel->Position2D.y = Viewport.Y + (Viewport.Height / 2.0f) + ((position.y / position.w) * (Viewport.Height / 2.0f));

  44.                 pModel->RealDistance = position.w;
  45.         }

  46.         ModelInfo.push_back(pModel);
  47.         //delete[] pModel;
  48. }

  49. //dip part:
  50. if(Stride == 20 && mVector4fCount == 213)
  51. {
  52.         Worldtoscreen(Device);
  53. }

  54. //es part:
  55. if (ModelInfo.size() != NULL)
  56. {
  57.         for (int i = 0; i < ModelInfo.size(); i += 1)
  58.         {
  59.                 char dst[MAX_PATH];
  60.                 sprintf_s(dst, "|%.1f|", ModelInfo[i]->RealDistance);
  61.                 DrawText(Device, (int)ModelInfo[i]->Position2D.x-20, (int)ModelInfo[i]->Position2D.y, D3DCOLOR_ARGB(255, 255, 255, 255), dst);
  62.                 DrawCornerBox(Device, (int)ModelInfo[i]->Position2D.x, (int)ModelInfo[i]->Position2D.y + 20, 20, 30, 1, D3DCOLOR_ARGB(255, 255, 255, 0));
  63.         }
  64.         ModelInfo.clear();
  65. }
複製代碼
收藏收藏 分享分享 讚 幹 分享分享 FB分享
回覆

使用道具 舉報


Cupidxitr99 當前離線
UID
2208329
熱心
22 值
嘉獎
0 次
違規
0 次
在線時間
8 小時
經驗
-3 點
積分
27
精華
0
最後登錄
2015-3-16
閱讀權限
20
註冊時間
2015-3-1
論壇幣
-13 幣
聯合幣
33 枚
幸運鑽
0 顆
招待卷
0 點
查看詳細資料
Rank: 2Rank: 2
Cupidxitr99 2015-3-4 23:02:48
所以這是要放在哪個文件檔裡? 發這樣的文倒不如不用發 到底在教什麼鬼 確定有人會?
回覆

使用道具 舉報

CKIIQUSA 當前離線
UID
2211985
熱心
12 值
嘉獎
0 次
違規
0 次
在線時間
5 小時
經驗
2 點
積分
19
精華
0
最後登錄
2015-9-6
閱讀權限
10
註冊時間
2015-3-8
論壇幣
-13 幣
聯合幣
18 枚
幸運鑽
0 顆
招待卷
0 點
查看詳細資料
Rank: 1
CKIIQUSA 2015-3-8 17:44:39
原碼放了 偏移位置自己找好嗎-.-                           
回覆

使用道具 舉報

babyxkaws99 該用戶已被刪除
babyxkaws99 2015-3-8 20:19:58
提示: 作者被禁止或刪除 內容自動屏蔽
回覆

使用道具 舉報

freedom96123 當前離線
UID
2212177
熱心
8 值
嘉獎
0 次
違規
0 次
在線時間
1 小時
經驗
6 點
積分
15
精華
0
最後登錄
2015-3-17
閱讀權限
10
註冊時間
2015-3-8
論壇幣
-9 幣
聯合幣
12 枚
幸運鑽
0 顆
招待卷
0 點
查看詳細資料
Rank: 1
5
freedom96123 2015-3-8 23:28:03
謝謝大大分享謝謝大大分享謝謝大大分享謝謝大大分享謝謝大大分享謝謝大大分享
回覆

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

手機版 | Archiver | 外掛聯合國

GMT+8, 2024-5-10 01:52 , Processed in 0.065840 second(s), 19 queries , Memcache On.

版權說明:
  本站不會製作、經銷、代理外掛程式。僅免費提供外掛程式下載前之掃毒及掃木馬等安全檢測驗證,協助會員遠離盜號危險程式。本站所有資料均來自網際網路收集整理,說明文字暨下載連結轉載自原程 式開發站。站上出現之公司名稱、遊戲名稱、程式等,商標及著作權,均歸各公司及程式原創所有,本站程式所有權歸外掛聯合國所有。本程式所有權歸外掛聯合國所有.......

回頂部
第二步?
第三步?