EvilEngine/HIP (File Format): Difference between revisions

Content added Content deleted
(Add new info, reorganize things, improve wording)
(minor reorganization/rewording)
Line 49: Line 49:
===Assets===
===Assets===
Assets are the most important part of HIP archives; they're like the files in ZIP archives. Assets hold all of the raw data for textures, models, sounds, and even objects within a level. Assets also have a name, as well as a unique ID (which is generated from the name using a [[Data Types#AssetID|hash algorithm]]). The ID is used by the game to find/identify assets. Assets also have a type ID that tells the game how to interpret the asset's raw data. The asset's data is stored at a specified offset in the [[#DPAK|DPAK]] block. HIP archives do not use any compression for asset data.
Assets are the most important part of HIP archives; they're like the files in ZIP archives. Assets hold all of the raw data for textures, models, sounds, and even objects within a level. Assets also have a name, as well as a unique ID (which is generated from the name using a [[Data Types#AssetID|hash algorithm]]). The ID is used by the game to find/identify assets. Assets also have a type ID that tells the game how to interpret the asset's raw data. The asset's data is stored at a specified offset in the [[#DPAK|DPAK]] block. HIP archives do not use any compression for asset data.

Each asset entry is represented by an [[#AHDR|AHDR]] block in HIP archives.

====Types====
A list of all known asset types can be found here: [[Asset#List of asset types|List of asset types]]


===Layers===
===Layers===
Layers are used by HIP archives to group assets of specific types together. For example, <code>TEXTURE</code> layers contain all of the [[RWTX]] assets in a HIP archive and <code>MODEL</code> layers contain all of the [[MODL]] assets. Assets in the same layer have their raw data stored next to each other in the [[#DPAK|DPAK]] block. This is mainly used to optimize the memory layout of assets in-game, as well as enforce the order in which assets are loaded (e.g. <code>TEXTURE</code> layers must be stored before <code>MODEL</code> in order for textures to be applied to models properly).
Layers are used by HIP archives to group assets of specific types together. Layers have a type ID that specifies what "category" of asset types they contain. For example, <code>TEXTURE</code> layers contain all of the [[RWTX]] assets in a HIP archive, <code>MODEL</code> layers contain all of the [[MODL]] assets, and <code>DEFAULT</code> layers contain many different types of assets (most <code>.HIP</code> files have all their assets in the <code>DEFAULT</code> layer).

Assets in the same layer have their raw data stored next to each other in the [[#DPAK|DPAK]] block. This is mainly done to optimize the memory layout of assets in-game, as well as enforce the order in which assets are loaded (e.g. <code>TEXTURE</code> layers must be stored before <code>MODEL</code> in order for textures to be applied to models properly).

Each layer entry is represented by an [[#LHDR|LHDR]] block in HIP archives.


====Types====
The following table lists all known layer types and their corresponding type IDs in each game. An empty cell means the layer type is not present in the game.
The following table lists all known layer types and their corresponding type IDs in each game. An empty cell means the layer type is not present in the game.