### Defining File Entry Structure - C++ Source: https://github.com/ianwoneill/runescape-classic-client/blob/master/docs/JagexArchive.md Describes the structure used for metadata of each individual file within the archive. It includes a 4-byte unsigned integer (`u4`) for the filename hash, a 3-byte unsigned integer (`u3`) for the decompressed length, and a 3-byte unsigned integer (`u3`) for the compressed length. The length values are the same if no compression was applied. ```C++ file_entry { u4 Hash; u3 DecompressedLen; u3 CompressedLen; } ``` -------------------------------- ### Calculating File Name Hash - Pseudocode Source: https://github.com/ianwoneill/runescape-classic-client/blob/master/docs/JagexArchive.md Provides the algorithm used to compute the hash value for a filename string. The input string is first converted to uppercase. The hash is then calculated iteratively by multiplying the current hash by 61 and adding the ASCII value of the current character minus 32. ```Pseudocode for(int i = 0; i < string.length(); i++) Hash = Hash*61 + (string.charAt(i) - 32) ``` -------------------------------- ### Defining Runescape Classic ob3 Model Structure (C-like) Source: https://github.com/ianwoneill/runescape-classic-client/blob/master/docs/ob3.md This snippet defines the byte layout for the 'Model' structure present in Runescape Classic .ob3 files. It includes fields for vertex counts, face counts, vertex coordinates (X, Y, Z), and face-specific data such as index counts, front/back texture or color information, diffuse lighting, and face indices. Note the union for FaceIndices indicating its type depends on VertexCount. ```C-like Model { u2 VertexCount; u2 FaceCount; s2 VerticesX[VertexCount]; s2 VerticesY[VertexCount]; s2 VerticesZ[VertexCount]; u1 FaceIndicesCount[FaceCount]; s2 FaceFrontTexture[FaceCount]; s2 FaceBackTexture[FaceCount]; u8 FaceDiffuseLight[FaceCount]; union { u1 FaceIndices[FaceCount][]; u2 FaceIndices[FaceCount][]; } } ``` -------------------------------- ### Defining Archive Structure - C++ Source: https://github.com/ianwoneill/runescape-classic-client/blob/master/docs/JagexArchive.md Describes the top-level structure of an archive file. It contains a 2-byte unsigned integer (`u2`) for the number of entries, immediately followed by an array of `file_entry` structures, one for each entry. ```C++ Archive { u2 NumEntries; file_entry Files[NumEntries]; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.