Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 40

Thread: Reverse Engineering References

  1. #11
    Codesaurus Skarma's Avatar
    Join Date
    Apr 2009
    Location
    Columbus, OH
    Posts
    227

    Re: cheat_spawn_warthog

    Quote Originally Posted by Limited View Post
    Oh well, we didnt really use your code/work, Skyline worked it out himself. Although you did tell me it was possible on MSN at the time
    Well, shit on a stick. My bad. Back to hopelessness...

    Quote Originally Posted by FRain View Post
    Hey, Skarma, this is great stuff, but could you please put this into one thread and not 35,001,412 threads?
    too late =p
    Reply With Quote

  2. #12
    Chris chrisk123999's Avatar
    Join Date
    May 2009
    Location
    Florida, USA
    Posts
    646

    Re: Console Text Output Guide

    No, but I was just saying.
    Reply With Quote

  3. #13
    HA10 Limited's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    7,800

    Re: Halo Multiple Instances

    I looked into this for testing purposes, but I was looking at the CreateWindowExA API, thinking that around it, would be the check to see if process was already running, didnt realise Halo used the MutexA API.

    Nice work.

    The issue I had also, was I kept corrupting Halo's exe, is there a way to bypass the protection?
    Last edited by Limited; September 20th, 2009 at 02:38 PM.
    Reply With Quote

  4. #14
    Codesaurus Skarma's Avatar
    Join Date
    Apr 2009
    Location
    Columbus, OH
    Posts
    227

    GBXModel Rendering Info

    Address are for Halo PC 1.08. Just some rendering code for Halo. There are so many more functions for rendering, but gotta start somewhere.
    These structs are from the GBXModel tag in the Halo map files. They describe every model in that map and needed for rendering models. Reversed using MHS, Olly, and Guerilla(Bungie's tag editor).
    Code:
    #ifndef GBXMODEL_H
    #define GBXMODEL_H
    #include <windows.h>
    #include <d3d9.h>
    struct GBXModel;
    struct GBXModel_Markers;
    struct GBXModel_Markers_Instances;
    struct GBXModel_Nodes;
    struct GBXModel_Regions;
    struct GBXModel_Regions_Permutations;
    struct GBXModel_Geometries;
    struct GBXModel_Geometries_Parts;
    struct GBXModel_Geometries_Parts_Indices;
    struct GBXModel_Geometries_Parts_Vertices;
    struct GBXModel_Shaders;
    
    struct GBXModel{
      int Flags : 32;
      int NodeListChecksum;
      float SuperHighDetailCutoff;
      float HighDetailCutoff;
      float MediumDetailCutoff;
      float LowDetailCutoff;
      float SuperLowDetailCutoff;
      short SuperHighDetailNodeCount;
      short HighDetailNodeCount;
      short MediumDetailNodeCount;
      short LowDetailNodeCount;
      short SuperLowDetailNodeCount;
      char Unknown[10];
      float BaseMapUScale;
      float BaseMapVScale;
      char Unknown2[116];
      TagBlock Markers;
      TagBlock Nodes;
      TagBlock Regions;
      TagBlock Geometries;
      TagBlock Shaders;
    };
    struct GBXModel_Markers{
      char Name[32];
      short MagicIdentifier;
      char Unknown[18];
      TagBlock Instances;
    };
    struct GBXModel_Markers_Instances{
      unsigned char RegionIndex;
      unsigned char PermutationIndex;
      unsigned short NodeIndex;
      float Translation[3]; // xyz
      float Rotation[4]; // ijkw
    };
    struct GBXModel_Nodes{
      char Name[32];
      short NextSiblingNodeIndex;
      short FirstChildNodeIndex;
      short ParentNodeIndex;
      short Unknown;
      float DefaultTranslation[3]; // xyz
      float DefaultRotation[4]; // ijkw
      float NodeDistanceFromParent;
      char Unknown2[84];
    };
    struct GBXModel_Regions{
      char Name[64];
      TagBlock Permutations;
    };
    struct GBXModel_Regions_Permutations{
      char Name[32];
      int Flags;
      char Unknown[28];
      short SuperLow;
      short Low;
      short Medium;
      short High;
      short SuperHigh;
      char Unknown2[14];
    };
    struct GBXModel_Geometries{
      char Unknown[36];
      TagBlock Parts;
    };
    struct GBXModel_Geometries_Parts_Indices{
      unsigned short PrimitiveTypeIndex;
      unsigned short Unknown;
      unsigned int IndiceCount;
      int Unknown2;
      IDirect3DIndexBuffer9* pIndexData;
    };
    struct GBXModel_Geometries_Parts_Vertices{
      unsigned short StrideIndex;
      unsigned short Unknown;
      unsigned int VerticeCount;
      int Unknown2[2];
      IDirect3DVertexBuffer9* pStreamData;
    };
    struct GBXModel_Geometries_Parts{
      int Flags : 32;
      char PrevFilthyPartIndex;
      char NextFilthyPartIndex;
      short ShaderIndex;
      short CentroidPrimaryNode;
      short CentroidSecondaryNode;
      float CentroidPrimeryWeight;
      float CentroidSecondaryWeight;
      float Centroid[3]; // xyz
      char Unknown[36];
      GBXModel_Geometries_Parts_Indices IndiceInfo;
      GBXModel_Geometries_Parts_Vertices VerticeInfo;
      char Unknown2[28];
    };
    struct GBXModel_Shaders{
      TagReference Shader;
      unsigned char Permutation;
      char Unknown[15];
    };
    #endif /* GBXMODEL_H */
    Some needed globals for the following functions:
    Code:
    bool* g_bSoftware = (bool*)0x0069C690;
    unsigned short* g_pStrideTable = (unsigned short*)0x0065DE50;
    unsigned int* g_pPrimitiveTypeTable = (unsigned int*)0x0065E084;
    IDirect3DDevice9*** pHaloDevice = (IDirect3DDevice9***)0x0071D09C;
    IDirect3DDevice9* g_pDevice = (IDirect3DDevice9*)**pHaloDevice;
    struct _ModelInfo{
      char Unknown[48];
      GBXModel_Geometries_Parts_Indices* IndiceInfo;
      char Unknown2[4];
      unsigned int PrimitiveCount;
      char Unknown3[4];
      GBXModel_Geometries_Parts_Vertices* VerticeInfo;
    };
    _ModelInfo* ModelInfo = (_ModelInfo*)0x006E1750;
    A function that does some if statements and calls different render functions, I have only done one out of five or six here, so this function is not even near complete, because I have to reverse 6 other functions to finish this one ><
    Code:
    HRESULT Unknown(_ModelInfo* pModelInfo)
    {
      if(pModelInfo->IndiceInfo)
      {
        if(pModelInfo->VerticeInfo)
        {
          return RenderModel(pModelInfo->PrimitiveCount, pModelInfo->VerticeInfo, pModelInfo->IndiceInfo);
        }
        //...More code Here
      }
      //...More Code Here
    }
    A function that renders a model. It is missing a chunk of code because it was some advanced assembly that changed the vertex processing mode based on the stride count(?). Other than that, it is complete and untested lol. Also, it can't render more than 10,000 primitives at once, or at least it doesn't want you to, so it loops and renders in chunks if it is greater.
    Code:
    HRESULT RenderModel(unsigned int PrimitiveCount, GBXModel_Geometries_Parts_Vertices* VerticeInfo, GBXModel_Geometries_Parts_Indices* IndiceInfo)
    {
      unsigned short Stride;
      D3DPRIMITIVETYPE PrimitiveType;
      unsigned int PrimCount;
      unsigned int StartIndex = 0;
      while(PrimitiveCount > 0)
      {
        if(!IndiceInfo)
          break;
        if(!IndiceInfo->pIndexData)
          break;
        if(!VerticeInfo)
          break;
        if(!VerticeInfo->pStreamData)
          break;
     
        PrimCount = 10000;
        if(PrimitiveCount <= 10000)
          PrimCount = PrimitiveCount;
        Stride = *(unsigned short*)((unsigned long)g_pStrideTable + (VerticeInfo->StrideIndex * 2));
        PrimitiveType = *(D3DPRIMITIVETYPE*)((unsigned long)g_pPrimitiveTypeTable + (IndiceInfo->PrimitiveTypeIndex * 4));
        g_pDevice->SetSoftwareVertexProcessing(*g_bSoftware);
        g_pDevice->SetStreamSource(0, VerticeInfo->pStreamData, 0, Stride);
        g_pDevice->SetIndices(IndiceInfo->pIndexData);
        g_pDevice->DrawIndexedPrimitive(PrimitiveType, 0, 0,VerticeInfo->VerticeCount, StartIndex, PrimCount);
        PrimitiveCount -= PrimCount;
        if(IndiceInfo->PrimitiveTypeIndex){
          if(IndiceInfo->PrimitiveTypeIndex == 1){
            StartIndex += PrimCount;
          }
        }
        else{
          StartIndex += PrimCount + PrimCount * 2;
        }
      }
      return g_pDevice->SetSoftwareVertexProcessing(*g_bSoftware);
    }
    Reply With Quote

  5. #15
    Senior Member teh lag's Avatar
    Join Date
    Oct 2006
    Posts
    3,566

    Re: GBXModel Rendering Info

    Do you think you could maybe keep these to one thread?
    Reply With Quote

  6. #16
    HA10 Limited's Avatar
    Join Date
    Sep 2006
    Location
    England
    Posts
    7,800

    Re: Console Text Output Guide

    Ah yeah, thinks is the method Omega used for his version changer.
    Reply With Quote

  7. #17
    This place is just awful king_nothing_'s Avatar
    Join Date
    May 2007
    Posts
    848

    Re: Halo Multiple Instances

    I would be interested in such an app, as I have two copies of Halo and two monitors. I've tried to figure out a way to do it in the past but was never able to.
    Reply With Quote

  8. #18
    Conversation Terrorist Pyong Kawaguchi's Avatar
    Join Date
    May 2007
    Location
    East Usa
    Posts
    3,905

    Re: Halo Multiple Instances

    If It would be possible to dedicate another keyboard/mouse combo to the other window, that would be great aswell.
    Reply With Quote

  9. #19
    Member Aßyll's Avatar
    Join Date
    Aug 2008
    Location
    near an unsecured wifi point
    Posts
    89

    Re: Halo Multiple Instances

    Another option for running multiple instances of ANYTHING I've found is Sandboxie. I tested it with Halo a bit, and I got 2 instances to start up easily. The first one I ran started a LAN server just fine, the second didn't seem to want to work. I think there are a few more inherit issues with 2 instances of halo sharing resources - namely .map files, and maybe network shtuff.
    Reply With Quote

  10. #20
    Codesaurus Skarma's Avatar
    Join Date
    Apr 2009
    Location
    Columbus, OH
    Posts
    227

    Re: Halo Multiple Instances

    To fix the network problem, you just have to change the client ports through the command line parameters, like in my first post.
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •