Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

Commit 339ea9e

Browse files
GisteronIrateRedKite
authored andcommitted
Update utf.md
Clarified entry timestamp layout, with a working MSDN link explaining the actual internal bit layout. Corrected the name of the usual root node. Commented on the necessity of the entry timestamps, see LibreLancer wiki.
1 parent edf9ddb commit 339ea9e

File tree

1 file changed

+3
-2
lines changed
  • docs/file-structures/utf

1 file changed

+3
-2
lines changed

docs/file-structures/utf/utf.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ Each entry in tree block is 44 bytes.
6161
| accessTime | uint32 | File last access timestamp. |
6262
| modifyTime | uint32 | File last modification timestamp. |
6363

64-
- Tree root entry name should be "/", but other names are possible.
64+
- Tree root entry name should be "\\", but other names are possible.
6565
- For attributes see Win32 API dwFileAttributes. In short it should be either 0x80 for file or 0x10 for folder. It is not necessary, however, that all three bytes after the first here are zero, and, in fact, in some vanilla files, they are not.
6666
- When entry is a folder the childOffset points to first child byte offset, relative to treeOffset in header, and dataSize* are all zeroes.
6767
- When entry is a file the childOffset points to data block, relative to dataOffset in header, and dataSize* indicate file size.
68-
- Timestamps are DOS file timestamp, see: [https://blogs.msdn.microsoft.com/oldnewthing/20030905-02/?p=42653](https://blogs.msdn.microsoft.com/oldnewthing/20030905-02/?p=42653)
68+
- Timestamps are 16-bit DOS date followed by 16-bit DOS time, layed out as here: [https://learn.microsoft.com/en-us/cpp/c-runtime-library/32-bit-windows-time-date-formats](https://learn.microsoft.com/en-us/cpp/c-runtime-library/32-bit-windows-time-date-formats?view=msvc-170)
69+
- The game does not require that entries be at least 44 bytes apart in the file. In principle, one could save on the timestamps, so long as no entry linked to down the chain from root begins fewer than 44 bytes before EOF. The game does not check these timestamps for validity, nor makes any other use of them.

0 commit comments

Comments
 (0)