[Release] Minimap lookup

Experienced Elementalist
Joined
Nov 29, 2006
Messages
246
Reaction score
2
First of all. If you people don't think this topic isn't good enough for the releases section please move it.


After some disassembling and decompiling i managed to revive a big part (if not the whole part) of the minimap::ondraw function.

When you want to show the minimap you call: minimap::create. But, this will fail because minimap::ondraw is buggy. The code im posting is a generated code i managed to output. Its far from clean C++ code and the bug is still in it. But, it might help people fixing the minimap bug.

Here it is:
Code:
int __thiscall ZMiniMap__OnDraw(int this,int a2)
{
  int result; // [EMAIL="eax@1"]eax@1[/EMAIL]
  int v3; // [EMAIL="edi@1"]edi@1[/EMAIL]
  signed int v4; // [EMAIL="ebx@2"]ebx@2[/EMAIL]
  int v5; // [EMAIL="esi@2"]esi@2[/EMAIL]
  int v6; // [EMAIL="ebp@3"]ebp@3[/EMAIL]
  int v7; // [EMAIL="ebx@4"]ebx@4[/EMAIL]
  int v8; // [EMAIL="ebx@13"]ebx@13[/EMAIL]
  int v9; // [EMAIL="edi@14"]edi@14[/EMAIL]
  int v10; // [EMAIL="esi@15"]esi@15[/EMAIL]
  char *v11; // [EMAIL="edx@18"]edx@18[/EMAIL]
  int *v12; // [EMAIL="ecx@18"]ecx@18[/EMAIL]
  int v13; // [EMAIL="ebp@18"]ebp@18[/EMAIL]
  int v14; // [EMAIL="ecx@25"]ecx@25[/EMAIL]
  int j; // [EMAIL="eax@26"]eax@26[/EMAIL]
  int i; // [EMAIL="eax@29"]eax@29[/EMAIL]
  int v17; // [EMAIL="eax@2"]eax@2[/EMAIL]
  int v18; // [EMAIL="edx@2"]edx@2[/EMAIL]
  int v19; // [EMAIL="eax@2"]eax@2[/EMAIL]
  int v20; // [EMAIL="ecx@2"]ecx@2[/EMAIL]
  int v21; // [EMAIL="edx@2"]edx@2[/EMAIL]
  int v22; // [EMAIL="eax@2"]eax@2[/EMAIL]
  int v23; // [EMAIL="ecx@2"]ecx@2[/EMAIL]
  int v24; // [EMAIL="ebx@2"]ebx@2[/EMAIL]
  int v25; // [EMAIL="eax@2"]eax@2[/EMAIL]
  int v26; // [EMAIL="eax@2"]eax@2[/EMAIL]
  signed int *v27; // [EMAIL="eax@2"]eax@2[/EMAIL]
  int v28; // [EMAIL="edx@6"]edx@6[/EMAIL]
  int v29; // [EMAIL="ecx@6"]ecx@6[/EMAIL]
  int v33; // [EMAIL="ebp@11"]ebp@11[/EMAIL]
  signed int v34; // [EMAIL="eax@11"]eax@11[/EMAIL]
  int v36; // [EMAIL="edx@11"]edx@11[/EMAIL]
  int v37; // [EMAIL="ebp@11"]ebp@11[/EMAIL]
  int v38; // [EMAIL="eax@11"]eax@11[/EMAIL]
  int v39; // [EMAIL="edx@11"]edx@11[/EMAIL]
  int v40; // [EMAIL="ebx@11"]ebx@11[/EMAIL]
  int v41; // [EMAIL="eax@11"]eax@11[/EMAIL]
  int v42; // [EMAIL="eax@13"]eax@13[/EMAIL]
  int v43; // [EMAIL="ecx@13"]ecx@13[/EMAIL]
  int v45; // [EMAIL="eax@17"]eax@17[/EMAIL]
  int v46; // [EMAIL="ecx@17"]ecx@17[/EMAIL]
  int v47; // [EMAIL="edx@17"]edx@17[/EMAIL]
  signed int v48; // [EMAIL="eax@17"]eax@17[/EMAIL]
  int v49; // [EMAIL="esi@23"]esi@23[/EMAIL]
  int v50; // [EMAIL="ebp@23"]ebp@23[/EMAIL]
  int v51; // [EMAIL="eax@23"]eax@23[/EMAIL]
  int v52; // [EMAIL="eax@33"]eax@33[/EMAIL]
  int v53; // [EMAIL="ecx@33"]ecx@33[/EMAIL]
  int v54; // [sp+2F8h] [bp-58h]@2
  int v55; // [sp+2FCh] [bp-54h]@2
  int v56; // [sp+30Ch] [bp-44h]@2
  int v57; // [sp+310h] [bp-40h]@2
  int v58; // [sp+320h] [bp-30h]@2
  int v59; // [sp+300h] [bp-50h]@2
  int v60; // [sp+304h] [bp-4Ch]@2
  int v61; // [sp+308h] [bp-48h]@2
  int v62; // [sp+314h] [bp-3Ch]@2
  signed int v63; // [sp+318h] [bp-38h]@2
  int v64; // [sp+31Ch] [bp-34h]@2
  int v65; // [sp+324h] [bp-2Ch]@2
  int v66; // [sp+328h] [bp-28h]@2
  signed int v67; // [sp+32Ch] [bp-24h]@2
  signed int v68; // [sp+330h] [bp-20h]@2
  int v69; // [sp+334h] [bp-1Ch]@2
  int v70; // [sp+338h] [bp-18h]@2
  int v71; // [sp+33Ch] [bp-14h]@2
  int v72; // [sp+340h] [bp-10h]@2
  signed int v73; // [sp+344h] [bp-Ch]@2
  int v74; // [sp+2F0h] [bp-60h]@2
  int v75; // [sp+2ECh] [bp-64h]@2
  int v76; // [sp+2E8h] [bp-68h]@2
  int v77; // [sp+2E4h] [bp-6Ch]@2
  int v78; // [sp+2DCh] [bp-74h]@2
  int v79; // [sp+2D8h] [bp-78h]@2
  int v80; // [sp+2D4h] [bp-7Ch]@2
  int v81; // [sp+2D0h] [bp-80h]@2
  int v82; // [sp+2C8h] [bp-88h]@2
  int v83; // [sp+2C4h] [bp-8Ch]@2
  int v84; // [sp+2C0h] [bp-90h]@2
  int v85; // [sp+2BCh] [bp-94h]@2
  signed int v86; // [sp+2F4h] [bp-5Ch]@2
  signed int v87; // [sp+2E0h] [bp-70h]@2
  signed int v88; // [sp+2CCh] [bp-84h]@2
  signed int v89; // [sp+2B8h] [bp-98h]@2
  int v90; // [sp+1F0h] [bp-160h]@2
  signed int v91; // [sp+268h] [bp-E8h]@2
  signed int v92; // [sp+26Ch] [bp-E4h]@2
  int v93; // [sp+270h] [bp-E0h]@2
  signed int v94; // [sp+274h] [bp-DCh]@2
  int v95; // [sp+278h] [bp-D8h]@2
  signed int v96; // [sp+27Ch] [bp-D4h]@2
  signed int v97; // [sp+280h] [bp-D0h]@2
  int v98; // [sp+284h] [bp-CCh]@2
  int v99; // [sp+288h] [bp-C8h]@2
  int v100; // [sp+28Ch] [bp-C4h]@2
  signed int v101; // [sp+290h] [bp-C0h]@2
  signed int v102; // [sp+294h] [bp-BCh]@2
  int v103; // [sp+298h] [bp-B8h]@2
  int v104; // [sp+29Ch] [bp-B4h]@2
  signed int v105; // [sp+2A0h] [bp-B0h]@2
  signed int v106; // [sp+2A4h] [bp-ACh]@2
  signed int v107; // [sp+2A8h] [bp-A8h]@2
  int v108; // [sp+2ACh] [bp-A4h]@2
  signed int v109; // [sp+2B0h] [bp-A0h]@2
  signed int v110; // [sp+2B4h] [bp-9Ch]@2
  signed int v111; // [sp+1D4h] [bp-17Ch]@2
  int v112; // [sp+254h] [bp-FCh]@6
  int v113; // [sp+250h] [bp-100h]@6
  int v114; // [sp+24Ch] [bp-104h]@6
  int v115; // [sp+248h] [bp-108h]@6
  int v116; // [sp+240h] [bp-110h]@6
  int v117; // [sp+23Ch] [bp-114h]@6
  int v118; // [sp+238h] [bp-118h]@6
  int v119; // [sp+234h] [bp-11Ch]@6
  int v120; // [sp+22Ch] [bp-124h]@6
  int v121; // [sp+228h] [bp-128h]@6
  int v122; // [sp+224h] [bp-12Ch]@6
  int v123; // [sp+220h] [bp-130h]@6
  signed int v124; // [sp+258h] [bp-F8h]@6
  signed int v125; // [sp+244h] [bp-10Ch]@6
  signed int v126; // [sp+230h] [bp-120h]@6
  signed int v127; // [sp+21Ch] [bp-134h]@6
  int v128; // [sp+1E8h] [bp-168h]@6
  int v129; // [sp+1ECh] [bp-164h]@6
  int v130; // [sp+1E4h] [bp-16Ch]@6
  int v131; // [sp+1F4h] [bp-15Ch]@11
  signed int v132; // [sp+1F8h] [bp-158h]@11
  int v133; // [sp+1FCh] [bp-154h]@11
  signed int v134; // [sp+25Ch] [bp-F4h]@11
  signed int v135; // [sp+1D8h] [bp-178h]@11
  int v136; // [sp+260h] [bp-F0h]@11
  int v137; // [sp+1DCh] [bp-174h]@11
  int v138; // [sp+264h] [bp-ECh]@11
  int v139; // [sp+1E0h] [bp-170h]@11
  int v140; // [sp+210h] [bp-140h]@11
  int v141; // [sp+204h] [bp-14Ch]@11
  int v142; // [sp+214h] [bp-13Ch]@11
  int v143; // [sp+208h] [bp-148h]@11
  signed int v144; // [sp+218h] [bp-138h]@11
  signed int v145; // [sp+20Ch] [bp-144h]@11
  char v146; // [sp+348h] [bp-8h]@18
  char v147; // [sp+34Ch] [bp-4h]@22
  int v148; // [sp+200h] [bp-150h]@23
  v3 = this;
  result = *(_DWORD *)(this + 28);
  if ( result )
  {
    v17 = RealSpace2__RGetDevice();
    v5 = v17;
    (*(int (__stdcall **)(int,signed int,_DWORD))(*(_DWORD *)v17 + 228))(v17, 137, 0);
    v18 = *(_DWORD *)(v3 + 8);
    v19 = *(_DWORD *)(v3 + 16);
    v54 = *(_DWORD *)(v3 + 4);
    v20 = v18;
    v55 = v18;
    v21 = v19;
    v56 = v19;
    v22 = *(_DWORD *)(v3 + 20);
    v57 = v20;
    v23 = *(_DWORD *)(v3 + 4);
    v58 = v21;
    v59 = 0;
    v60 = 0;
    v61 = 0;
    v62 = 0;
    v63 = 1065353216;
    v64 = 0;
    v65 = v22;
    v66 = 0;
    v67 = 1065353216;
    v68 = 1065353216;
    v69 = v23;
    v70 = v22;
    v71 = 0;
    v72 = 0;
    v73 = 1065353216;
    RealSpace2__RSetWBuffer(0);
    (*(int (__stdcall **)(int,_DWORD,signed int,signed int))(*(_DWORD *)v5 + 276))(v5, 0, 5, 2);
    (*(int (__stdcall **)(int,_DWORD,signed int,signed int))(*(_DWORD *)v5 + 276))(v5, 0, 6, 2);
    (*(int (__stdcall **)(int,signed int,_DWORD))(*(_DWORD *)v5 + 228))(v5, 27, 0);
    (*(int (__stdcall **)(int,_DWORD,signed int,signed int))(*(_DWORD *)v5 + 268))(v5, 0, 2, 2);
    (*(int (__stdcall **)(int,_DWORD,signed int,signed int))(*(_DWORD *)v5 + 268))(v5, 0, 1, 2);
    (*(int (__stdcall **)(_DWORD,_DWORD,signed int,_DWORD))(*(_DWORD *)v5 + 268))(v5, 0, 5, 2);
    (*(int (__stdcall **)(_DWORD,_DWORD,signed int,_DWORD))(*(_DWORD *)v5 + 268))(v5, 0, 4, 2);
    (*(int (__stdcall **)(int,signed int))(*(_DWORD *)v5 + 356))(v5, 258);
    v24 = *(_DWORD *)v5;
    v25 = RealSpace2__RBaseTexture__GetTexture();
    (*(int (__stdcall **)(int,_DWORD,int))(v24 + 260))(v5, 0, v25);
    v74 = 0;
    v75 = 0;
    v76 = 0;
    v77 = 0;
    v78 = 0;
    v79 = 0;
    v80 = 0;
    v81 = 0;
    v82 = 0;
    v83 = 0;
    v84 = 0;
    v85 = 0;
    v86 = 1065353216;
    v87 = 1065353216;
    v88 = 1065353216;
    v89 = 1065353216;
    (*(int (__stdcall **)(int,signed int,signed int *))(*(_DWORD *)v5 + 176))(v5, 256, &v89);
    RealSpace2__RUpdateCamera();
    (*(int (__stdcall **)(int,signed int,signed int,int *,signed int))(*(_DWORD *)v5 + 332))(v5, 6, 2, &v54, 20);
    (*(int (__stdcall **)(int,signed int,signed int))(*(_DWORD *)v5 + 228))(v5, 27, 1);
    (*(int (__stdcall **)(int,signed int,signed int))(*(_DWORD *)v5 + 228))(v5, 19, 5);
    (*(int (__stdcall **)(_DWORD,signed int,signed int))(*(_DWORD *)v5 + 228))(v5, 20, 6);
    (*(int (__stdcall **)(int,_DWORD,signed int,signed int))(*(_DWORD *)v5 + 268))(v5, 0, 2, 2);
    (*(int (__stdcall **)(int,_DWORD,signed int,signed int))(*(_DWORD *)v5 + 268))(v5, 0, 3, 3);
    (*(int (__stdcall **)(_DWORD,_DWORD,signed int,_DWORD))(*(_DWORD *)v5 + 268))(v5, 0, 5, 2);
    (*(int (__stdcall **)(_DWORD,_DWORD,signed int,_DWORD))(*(_DWORD *)v5 + 268))(v5, 0, 4, 2);
    (*(int (__stdcall **)(int,signed int,signed int,signed int))(*(_DWORD *)v5 + 268))(v5, 1, 1, 1);
    (*(int (__stdcall **)(_DWORD,signed int,_DWORD,signed int))(*(_DWORD *)v5 + 268))(v5, 1, 4, 1);
    ZGetGame();
    v26 = ZApplication__GetInstance();
    v90 = *(_DWORD *)(*(_DWORD *)(ZWorldManager__GetWorld(*(_DWORD *)(v26 + 688)) + 404) + 88) + 44;
    v91 = -1027080192;
    v92 = -1018691584;
    v93 = 0;
    v94 = 1065353216;
    v95 = 0;
    v96 = 1120403456;
    v97 = -1018691584;
    v98 = 0;
    v99 = 0;
    v100 = 0;
    v101 = 1120403456;
    v102 = 1128792064;
    v103 = 0;
    v104 = 0;
    v105 = 1065353216;
    v106 = -1027080192;
    v107 = 1128792064;
    v108 = 0;
    v109 = 1065353216;
    v110 = 1065353216;
    v27 = *(signed int **)(ZGetCharacterManager() + 8);
    v4 = *v27;
    v111 = *v27;
    if ( v4 != *(_DWORD *)(ZGetCharacterManager() + 8) )
    {
      do
      {
        v6 = *(_DWORD *)(v4 + 20);
        if ( !(unsigned __int8)(*(int (__thiscall **)(_DWORD))(*(_DWORD *)v6 + 60))(*(_DWORD *)(v4 + 20)) )
        {
          v7 = -2410;
          ZApplication__GetGame();
          if ( (unsigned __int8)MMatchStageSetting__IsTeamPlay() )
            v7 = (-((*(int (__thiscall **)(int))(*(_DWORD *)v6 + 72))(v6) != 2) & 0xFF81007F) - 32640;
          v112 = 0;
          v113 = 0;
          v114 = 0;
          v115 = 0;
          v116 = 0;
          v117 = 0;
          v118 = 0;
          v119 = 0;
          v120 = 0;
          v121 = 0;
          v122 = 0;
          v123 = 0;
          v124 = 1065353216;
          v125 = 1065353216;
          v126 = 1065353216;
          v127 = 1065353216;
          v28 = *(_DWORD *)(v6 + 72);
          v29 = *(_DWORD *)(v6 + 80);
          v128 = *(_DWORD *)(v6 + 76);
          _EAX = v90;
          v129 = v29;
          __asm
          {
            fld     [esp+18Ch+var_164]
            fsub    dword ptr [eax+8]
          }
          v130 = v28;
          __asm
          {
            fld     dword ptr [eax+14h]
            fsub    dword ptr [eax+8]
            fdivp   st(1), st
            fstp    [esp+18Ch+var_164]
            fld     ds:__real@00000000
            fcomp   [esp+18Ch+var_164]
            fnstsw  ax
          }
          if ( BYTE1(_EAX) & 0x41 )
          {
            __asm
            {
              fld     ds:__real@3f800000
              fcomp   [esp+18Ch+var_164]
              fnstsw  ax
              jp      short loc_40D215
              fld     ds:__real@3f800000
            }
          }
          else
          {
            __asm { fld     ds:__real@00000000 }
          }
          __asm { fmul    ds:__real@43c80000 }
          v33 = v6 + 84;
          v131 = *(_DWORD *)v33;
          v34 = *(_DWORD *)(v33 + 4);
          __asm { fstp    [esp+18Ch+var_164] }
          v132 = v34;
          v133 = 0;
          D3DXVec3Normalize(&v131, &v131);
          __asm
          {
            fld     [esp+18Ch+var_154]
            fmul    ds:__real@00000000
            fld     [esp+18Ch+var_158]
            fsubr   st, st(1)
            fstp    [esp+18Ch+var_F4]
            fld     [esp+18Ch+var_15C]
          }
          v135 = v134;
          __asm
          {
            fsub    st, st(1)
            fstp    [esp+190h+var_F0]
          }
          v137 = v136;
          __asm
          {
            fstp    st
            fld     [esp+190h+var_158]
            fmul    ds:__real@00000000
            fld     [esp+194h+var_15C]
            fmul    ds:__real@00000000
            fsubp   st(1), st
            fstp    [esp+194h+var_EC]
          }
          v139 = v138;
          D3DXVec3Normalize(&v135, &v135);
          __asm
          {
            fld     [esp+18Ch+var_170]
            fmul    [esp+18Ch+var_158]
            fld     [esp+18Ch+var_174]
            fmul    [esp+18Ch+var_154]
            fsubp   st(1), st
            fstp    [esp+18Ch+var_140]
            fld     [esp+18Ch+var_178]
          }
          v141 = v140;
          __asm
          {
            fmul    [esp+18Ch+var_154]
            fld     [esp+18Ch+var_170]
          }
          v127 = v135;
          __asm { fmul    [esp+18Ch+var_15C] }
          v120 = v137;
          __asm { fsubp   st(1), st }
          v117 = v139;
          __asm
          {
            fstp    [esp+18Ch+var_13C]
            fld     [esp+18Ch+var_174]
          }
          v143 = v142;
          __asm
          {
            fmul    [esp+18Ch+var_15C]
            fld     [esp+18Ch+var_158]
          }
          v123 = v131;
          __asm { fmul    [esp+18Ch+var_178] }
          v126 = v132;
          __asm { fsubp   st(1), st }
          v116 = v133;
          __asm { fstp    [esp+18Ch+var_138] }
          v145 = v144;
          v122 = v140;
          v119 = v142;
          v114 = v130;
          v125 = v144;
          v36 = *(_DWORD *)v5;
          v113 = v128;
          v112 = 0;
          (*(int (__stdcall **)(int,signed int,signed int *))(v36 + 176))(v5, 256, &v127);
          (*(int (__stdcall **)(_DWORD,signed int,signed int))(*(_DWORD *)v5 + 228))(v5, 60, -16777216);
          (*(int (__stdcall **)(int,_DWORD,signed int,signed int))(*(_DWORD *)v5 + 268))(v5, 0, 1, 4);
          v37 = *(_DWORD *)v5;
          v38 = RealSpace2__RBaseTexture__GetTexture();
          (*(int (__stdcall **)(int,_DWORD,int))(v37 + 260))(v5, 0, v38);
          (*(int (__stdcall **)(int,signed int,signed int,signed int *,signed int))(*(_DWORD *)v5 + 332))(
            v5,
            6,
            2,
            &v91,
            20);
          v113 = v128;
          v114 = v130;
          v39 = *(_DWORD *)v5;
          v112 = v129;
          (*(int (__stdcall **)(int,signed int,signed int *))(v39 + 176))(v5, 256, &v127);
          (*(int (__stdcall **)(int,signed int,int))(*(_DWORD *)v5 + 228))(v5, 60, v7);
          (*(int (__stdcall **)(int,signed int,signed int,signed int *,signed int))(*(_DWORD *)v5 + 332))(
            v5,
            6,
            2,
            &v91,
            20);
          (*(int (__stdcall **)(_DWORD,_DWORD,signed int,_DWORD))(*(_DWORD *)v5 + 268))(v5, 0, 1, 2);
          v40 = *(_DWORD *)v5;
          v41 = RealSpace2__RBaseTexture__GetTexture();
          (*(int (__stdcall **)(int,_DWORD,int))(v40 + 260))(v5, 0, v41);
          (*(int (__stdcall **)(_DWORD,_DWORD,_DWORD,_DWORD,_DWORD))(*(_DWORD *)v5 + 332))(v5, 6, 2, &v91, 20);
        }
        std___Tree_std___Tmap_traits_MUID_ZMyItemNode___std__less_MUID__std__allocator_std__pair_MUID_const__ZMyItemNode______0_____const_iterator___Inc();
        v4 = v111;
      }
      while ( v111 != *(_DWORD *)(ZGetCharacterManager() + 8) );
    }
    v8 = **(_DWORD **)(ZGetCharacterManager() + 8);
    v42 = ZGetCharacterManager();
    v43 = *(_DWORD *)(v42 + 8);
    result = v42 + 4;
    if ( v8 != v43 )
    {
      v9 = a2;
      do
      {
        v10 = *(_DWORD *)(v8 + 20);
        if ( *(_BYTE *)(v10 + 28) )
        {
          if ( !(unsigned __int8)(*(int (__thiscall **)(_DWORD))(*(_DWORD *)v10 + 60))(*(_DWORD *)(v8 + 20)) )
          {
            v135 = *(_DWORD *)(v10 + 72);
            v137 = *(_DWORD *)(v10 + 76);
            v139 = *(_DWORD *)(v10 + 80);
            v130 = *(_DWORD *)(v10 + 84);
            v128 = *(_DWORD *)(v10 + 88);
            v129 = 0;
            D3DXVec3Normalize(&v130, &v130);
            __asm
            {
              fld     [esp+18Ch+var_16C]
              fmul    ds:__real@c3160000
              fld     [esp+18Ch+var_168]
              fmul    ds:__real@c3160000
              fxch    st(1)
              fadd    [esp+194h+var_178]
            }
            v139 = 0;
            __asm
            {
              fstp    [esp+194h+var_178]
              fld     [esp+194h+var_174]
              fadd    st, st(1)
              fstp    [esp+194h+var_174]
              fstp    st
            }
            v45 = RealSpace2__RGetTransformCoord(&v140, &v135);
            v46 = *(_DWORD *)v45;
            v47 = *(_DWORD *)(v45 + 4);
            v48 = *(_DWORD *)(v45 + 8);
            v141 = v46;
            v143 = v47;
            v145 = v48;
            v111 = -6883585;
            if ( (unsigned __int8)ZCharacter__IsAdminName() )
            {
              v13 = MFontManager__Get("FONTa12_O1Org");
              v90 = -12549889;
              v12 = &v90;
              v11 = &v146;
            }
            else
            {
              v13 = MFontManager__Get("FONTa12_O1Blr");
              ZApplication__GetGame();
              if ( (unsigned __int8)MMatchStageSetting__IsTeamPlay() )
              {
                if ( (*(int (__thiscall **)(int))(*(_DWORD *)v10 + 72))(v10) == 2 )
                  v13 = MFontManager__Get("FONTa12_O1Red");
              }
              v12 = &v111;
              v11 = &v147;
            }
            MDrawContext__SetColor(v11, v12);
            MDrawContext__SetBitmap(0);
            MDrawContext__SetFont(v13);
            v49 = v10 + 1114;
            v148 = (*(int (__stdcall **)(int,signed int))(**(_DWORD **)(v9 + 24) + 16))(v49, -1) / 2;
            __asm
            {
              fild    [esp+18Ch+var_150]
              fsubr   [esp+18Ch+var_14C]
              fld     [esp+18Ch+var_148]
            }
            v50 = ftol2();
            v148 = *(_DWORD *)v9;
            v51 = ftol2();
            (*(int (__thiscall **)(int,int,int,int))(v148 + 64))(v9, v50, v51, v49);
          }
        }
        if ( !*(_BYTE *)(v8 + 25) )
        {
          v14 = *(_DWORD *)(v8 + 8);
          if ( *(_BYTE *)(v14 + 25) )
          {
            for ( i = *(_DWORD *)(v8 + 4); !*(_BYTE *)(i + 25); i = *(_DWORD *)(i + 4) )
            {
              if ( v8 != *(_DWORD *)(i + 8) )
                break;
              v8 = i;
            }
            v8 = i;
          }
          else
          {
            for ( j = *(_DWORD *)v14; !*(_BYTE *)(j + 25); j = *(_DWORD *)j )
              v14 = j;
            v8 = v14;
          }
        }
        v52 = ZGetCharacterManager();
        v53 = *(_DWORD *)(v52 + 8);
        result = v52 + 4;
      }
      while ( v8 != v53 );
    }
  }
  return result;
}

I will try to get the origional names of the variables.

ps. HINT, you can use detours to replace the origional function with your function. And this code can use some cleaning, if im right some variables defined are useless.
 
Wow!

When exactly can you see the minimap, besides during replays?

With some simple hooking you can call the minimap whenever you want. But, for as far i know its bugged. And because of that i posted the source code of the minimap.

By the way your talking you make me think that the minimap already works but i failed at calling tho ^^
 
No, this is just a tiny little of the output I managed to produce using IDA Pro and a "reverse gunz" plugin im writing.

The use of this is to fix the minimap. I thought (not sure anymore :P) the minimap was bugged so i posted the source code of the function. Now someone can use this source to fix the bug in the minimap so we can implent it in a simple detours.
 
I don't think the minimap is broken, it works just fine in replays and always has as far as I know.

An interesting implementation (probably pretty hard though) would be to implement the minimap to be always shown and down in the lower-left or something like that, so it basically acts as a radar. Might be too cheap though, lol.
 
i think the minimap is a pretty kool idea.. and survival mode.. hummm sounds a bit boring to me
 
The reasoning behind the dead end functions and half assed schematics of game types is that they were never finished or intended to be finished. Survival mode won't be working any time soon. No would the mini map be a good idea to implement, even though it is complete.
 
The reasoning behind the dead end functions and half assed schematics of game types is that they were never finished or intended to be finished. Survival mode won't be working any time soon. No would the mini map be a good idea to implement, even though it is complete.

Well, im not so sure. I decompiled all the gametypes back to source and the only difficult thing about survival mode is that its working with a so called "mapcatalogue" and that 1/2 parts are missing. These missing parts can be added easily but making the mapcatalogue bug free is a little harder.
 
Minimap is in replays if you hit M enough times.

Will you be releasing any more of your reversed code? It's interesting to see GunZ in something other than ASM.
 
Back