Add additional toc helpers

This commit is contained in:
Jarrod Doyle 2024-08-23 12:07:03 +01:00
parent 6ad11c4af5
commit 1979d85f58
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 10 additions and 0 deletions

View File

@ -45,4 +45,14 @@ fn get_toc_entry(TableOfContents toc, str entry_name) {
fn get_offset(TableOfContents toc, str entry_name) {
TOCEntry entry = get_toc_entry(toc, entry_name);
return entry.offset;
};
fn get_size(TableOfContents toc, str entry_name) {
TOCEntry entry = get_toc_entry(toc, entry_name);
return entry.size;
};
fn get_end(TableOfContents toc, str entry_name) {
TOCEntry entry = get_toc_entry(toc, entry_name);
return entry.offset + entry.size + 24;
};