Halomods Community Portal: [APP] Entity - Halomods Community Portal

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

H2X
[APP] Entity

#41 User is offline   Saxon 

  • Newbie
  • Pip
  • Group: Members
  • Joined: 19-February 13

Posted 24 February 2013 - 07:06 AM

Hello novice/beginner C++ and C# programmer here I mostly program in C++ though, I downloaded the Microsoft Visual Studio IDE Compiler and Linker for the C# programing language and opened your Entity program solution source, and I noticed you have the using declaration for namspaces and objects like:


    using HaloMap.Map;
    using HaloMap.Meta;
    using HaloMap.RawData;



yet I do not see any include directives for any header files or library .lib and .dll files where these namespaces, classes/structures and objects are declared and defined in, did you not include them in the source for a reason? just wondering



thanks in advance

This post has been edited by Saxon: 24 February 2013 - 06:11 PM


#42 User is offline   XZodia 

  • Code Monkey
  • Group: Moderators
  • Joined: 05-May 11
  • LocationScotland


Users Awards

Posted 25 February 2013 - 12:52 PM

C# doesn't use #include, the libraries are referenced in the project settings. And the projects for those libraries are part of the source code.

#43 User is offline   Saxon 

  • Newbie
  • Pip
  • Group: Members
  • Joined: 19-February 13

Posted 25 February 2013 - 08:07 PM

View PostXZodia, on 25 February 2013 - 12:52 PM, said:

C# doesn't use #include, the libraries are referenced in the project settings.

oh I did not know this I did not know C# did not use the #include preprocessor directive to include files

View PostXZodia, on 25 February 2013 - 12:52 PM, said:

and the projects for those libraries are part of the source code.

okay, so the .dll dynamic library files I want to include are like:

HaloMap.dll and Globals.dll, where do I need to save these for the projects and the solution as a whole to include them when I compile/build the Entity solution source in C#?


I am just going to be using the Entity source and many other sources as a basis for studying not to rip any work, I am strongly against ripping work

This post has been edited by Saxon: 26 February 2013 - 02:19 AM


#44 User is offline   XZodia 

  • Code Monkey
  • Group: Moderators
  • Joined: 05-May 11
  • LocationScotland


Users Awards

Posted 25 February 2013 - 11:01 PM

The source code for HaloMap and Globals are part of the solution.

#45 User is offline   Saxon 

  • Newbie
  • Pip
  • Group: Members
  • Joined: 19-February 13

Posted 26 February 2013 - 06:45 AM

View PostXZodia, on 25 February 2013 - 11:01 PM, said:

The source code for HaloMap and Globals are part of the solution.




oh okay I think I found the namespace HaloMap.Map in the FileNameInfo.cs source code file right here:

namespace HaloMap.Map
{
    using System.IO; //
    using System.Windows.Forms;

    /// <summary>
    /// The file names info.
    /// </summary>
    /// <remarks></remarks>
    public class FileNamesInfo
    {
        #region Constants and Fields

        /// <summary>
        /// The file name strings offset.
        /// </summary>
        public int FileNameStringsOffset;

        /// <summary>
        /// The file name strings size.
        /// </summary>
        public int FileNameStringsSize;

        /// <summary>
        /// The length.
        /// </summary>
        public int[] Length;

        /// <summary>
        /// The name.
        /// </summary>
        public string[] Name;

        /// <summary>
        /// The offset.
        /// </summary>
        public int[] Offset;

        #endregion

        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="FileNamesInfo"/> class.
        /// </summary>
        /// <param name="BR">The BR.</param>
        /// <param name="map">The map.</param>
        /// <remarks></remarks>
        public FileNamesInfo(ref BinaryReader BR, Map map)
        {
            switch (map.HaloVersion)
            {
                case HaloVersionEnum.Halo2:
                    Halo2FileNamesInfo(ref BR, map);
                    break;
                case HaloVersionEnum.HaloCE:
                case HaloVersionEnum.Halo1:
                    HaloCEFileNamesInfo(ref BR, map);
                    break;
            }
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// The halo 2 file names info.
        /// </summary>
        /// <param name="BR">The br.</param>
        /// <param name="map">The map.</param>
        /// <remarks></remarks>
        public void Halo2FileNamesInfo(ref BinaryReader BR, Map map)
        {
            Name = new string[map.IndexHeader.metaCount];
            Length = new int[map.MapHeader.fileCount];
            Offset = new int[map.MapHeader.fileCount];

            // 	Reads In Offsets Of	Meta Names
            BR.BaseStream.Position = map.MapHeader.offsetTofileIndex;
            for (int x = 0; x < map.MapHeader.fileCount; x++)
            {
                Offset[x] = BR.ReadInt32();
            }

            for (int x = 0; x < map.IndexHeader.metaCount; x++)
            {
                if (x < map.MapHeader.fileCount)
                {
                    bool brokenMap = false;

                    // figures out length of string
                    int len;
                    if (x != map.MapHeader.fileCount - 1)
                    {
                        len = Offset[x + 1] - Offset[x];

                        // For broken maps..
                        if (len <= 0)
                        {
                            brokenMap = true;
                            len = 1000;
                            for (int temp = 0; temp < map.MapHeader.fileCount; temp++)
                            {
                                if ((Offset[temp] > Offset[x]) && (len > (Offset[temp] - Offset[x])))
                                {
                                    len = Offset[temp] - Offset[x];
                                }
                            }
                        }
                    }
                    else
                    {
                        len = map.MapHeader.fileNamesSize - Offset[x];
                    }

                    Length[x] = len - 1;

                    ///	Reads in string
                    BR.BaseStream.Position = map.MapHeader.offsetTofileNames + Offset[x];
                    Name[x] = new string(BR.ReadChars(len - 1));

                    // more for broken maps..
                    if (brokenMap)
                    {
                        MessageBox.Show("This map has broken Strings. An attempt will be made to fix it.");
                    }

                    int z;
                    for (z = 0; z < len - 1; z++)
                    {
                        if (Name[x][z] == 0)
                        {
                            break;
                        }
                    }

                    if (z < Length[x])
                    {
                        Length[x] = z;
                        Name[x] = Name[x].Remove(z);
                    }
                }
                else
                {
                    int tempint = x - map.MapHeader.fileCount;
                    Name[x] = "Unknown Meta (" + tempint + ")";
                }
            }
        }

        /// <summary>
        /// The halo ce file names info.
        /// </summary>
        /// <param name="BR">The br.</param>
        /// <param name="map">The map.</param>
        /// <remarks></remarks>
        public void HaloCEFileNamesInfo(ref BinaryReader BR, Map map)
        {
            Name = new string[map.IndexHeader.metaCount];
            Length = new int[map.IndexHeader.metaCount];
            Offset = new int[map.IndexHeader.metaCount];

            // 	Reads In Offsets Of	Meta Names
            BR.BaseStream.Position = map.MapHeader.offsetTofileIndex;
            for (int x = 0; x < map.IndexHeader.metaCount; x++)
            {
                Offset[x] = map.MetaInfo.stringoffset[x];
            }

            if (map.HaloVersion == HaloVersionEnum.Halo1)
            {
                FileNameStringsOffset = map.MapHeader.indexOffset + 36 + (map.IndexHeader.metaCount * 32);
                FileNameStringsSize = map.IndexHeader.ModelRawDataOffset - FileNameStringsOffset;
            }
            else
            {
                FileNameStringsOffset = map.MapHeader.indexOffset + 40 + (map.IndexHeader.metaCount * 32);
                FileNameStringsSize = map.MetaInfo.Offset[0] - FileNameStringsOffset;
            }

            for (int x = 0; x < map.IndexHeader.metaCount; x++)
            {
                // figures out length of string
                int len;
                if (x != map.IndexHeader.metaCount - 1)
                {
                    len = Offset[x + 1] - Offset[x];
                }
                else
                {
                    len = FileNameStringsOffset + FileNameStringsSize - Offset[x];
                }

                Length[x] = len - 1;

                ///	Reads in string
                BR.BaseStream.Position = Offset[x];
                Name[x] = new string(BR.ReadChars(len - 1));
            }
        }

        #endregion
    }
}



I just am not used to seeing namespaces with membership operators in them and I did not know C# does not use the #include preprocessor directive to include files, does the C# preprocessor automatically include content within files to source code in other files automatically?


also is that even a membership operator in the namespace or some other C# concept that I am unfamiliar with because I am more familiar with and programming mostly in C++?

sorry for the double post I jsut did not see it proper to fit what I am about to say in my previous post, I think I see the problem now, I think I need to either download or update Microsoft DirectX and/or download Microsoft DirectX and/or Microsoft DirectX programing libraries

This post has been edited by Saxon: 26 February 2013 - 06:42 AM


#46 User is offline   XZodia 

  • Code Monkey
  • Group: Moderators
  • Joined: 05-May 11
  • LocationScotland


Users Awards

Posted 26 February 2013 - 04:52 PM

I doon't know what a membership operator is, but you don't need to worry about including any files anywhere.
C# has no header files and files don't need to be referenced, only the namespaces need to be referenced.
Yes, you will need the directx sdk.

#47 User is offline   Saxon 

  • Newbie
  • Pip
  • Group: Members
  • Joined: 19-February 13

Posted 26 February 2013 - 07:39 PM

View PostXZodia, on 26 February 2013 - 04:52 PM, said:

I doon't know what a membership operator is, but you don't need to worry about including any files anywhere.
C# has no header files and files don't need to be referenced, only the namespaces need to be referenced.
Yes, you will need the directx sdk.

oh okay, thank you for your help, what programming languages do you typically program in just wondering?

This post has been edited by Saxon: 26 February 2013 - 07:40 PM


#48 User is offline   XZodia 

  • Code Monkey
  • Group: Moderators
  • Joined: 05-May 11
  • LocationScotland


Users Awards

Posted 27 February 2013 - 12:43 AM

C# primarily but also C++, Objective C and Java

#49 User is offline   Saxon 

  • Newbie
  • Pip
  • Group: Members
  • Joined: 19-February 13

Posted 27 February 2013 - 01:58 AM

View PostXZodia, on 27 February 2013 - 12:43 AM, said:

C# primarily but also C++, Objective C and Java

ah okay, you know you can make some iPhone programs/applications in Java if you were to jailbreak your iPhone that is a little off topic but just saying maybe you knew that, but thank you for your help and information anyway :D/>

This post has been edited by Saxon: 27 February 2013 - 01:58 AM


#50 User is offline   Winger 

  • Grunt Breeder/Hunter Worm Breeder
  • PipPipPip
  • Group: Members
  • Joined: 19-July 11

Posted 19 April 2013 - 09:56 AM

Hello, everyone. I'm trying to extract A.I from one SP map and add it into a different SP map (not multiplayer map). I recursively extracted the floodcombat_elite
from floodzone.map. Now, I'm trying to build it into a different SP map (01b_spacestation.map for example). I have everything setup ok. But, when I build the map
and it asks for ".info" (floodcombat_elite.info) I keep getting an error. Here's the picture: http://postimg.org/image/xpe08uh9p/

How exactly am I supposed to do this? I tried to build it into "Folders" into the map through Entity 2.1.1.9. When I try to build it into "Tags" or "Info" I get
a different error. Thanks. And sorry if I'm starting a double topic-my other post is pretty much left unanswered, except for nullen (he's answered).

#51 User is offline   roxasguy 

  • Newbie
  • Pip
  • Group: Members
  • Joined: 10-September 13
  • LocationMontrose, CA

Posted 10 September 2013 - 01:58 AM

View PostTroyMac1ure, on 10 May 2011 - 07:35 AM, said:

Halo 2 Editing Program

Entity was started long ago and developed to work on H1/CE/H2, but since I have taken over updating (v2.0+) I have focused on H2x only, so sections of it may not work with other version of Halo.

FEATURES:
  • Tag Editor
  • Tag extraction / injection
  • Bitmap extraction / injection
  • Visual BSP Editor
  • Multiple viewers: Model, Collision (Partial editor), Lightmap, Portal
  • Mainmenu editor
  • Open Source

It has numerous other features that aren't listed here. It lists RTH, but this hasn't been touched since I started on it. One more thing on the to-do list.

DOWNLOAD:
Entity 2.1.12 (May 9, 2011 release)
http://www.remnantmo...ty%202.1.12.rar

Entity 2.1.12 Source (May 9, 2011 release)
http://www.remnantmo...12%20Source.rar



I keep getting the 404 Error when I click to download Entity. Could you perhaps give us a different link? I don't know why it's not letting me download it from Remnantmods. Thanks!

#52 User is offline   TroyMac1ure 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 10-May 11
  • LocationBritish Columbia, Canada

Posted 14 May 2014 - 01:28 AM

View Postroxasguy, on 10 September 2013 - 01:58 AM, said:

I keep getting the 404 Error when I click to download Entity. Could you perhaps give us a different link? I don't know why it's not letting me download it from Remnantmods. Thanks!


I know this post is old, but for future users, the HTTP link to the FTP folders no longer works over at RemnantMods. I will try to post the latest version to another source. If you can find a relatively new version they all have auto-update features built in that work (I think as far back as 2.1.7). Latest version as of this post it 2.1.20

EDIT:
Entity 2.1.20
Entity 2.1.20 Source

This post has been edited by TroyMac1ure: 14 May 2014 - 03:23 AM


#53 User is offline   kornman00 

  • SourceGuy 2.0
  • Group: Administrators
  • Joined: 15-November 01


Users Awards

Posted 14 May 2014 - 11:57 AM

Have you thought about putting the project source up on the likes of GitHub or Bitbucket? Both support downloads as well, unlike Google Code which recently dropped binary downloads support

#54 User is offline   TroyMac1ure 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 10-May 11
  • LocationBritish Columbia, Canada

Posted 19 August 2014 - 10:45 PM

The source is up on GitHub (although not always the newest, I'm new to this stuff and keep forgetting).
https://github.com/troymac1ure/Entity

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic