This document explains the aircraft model files in very simple words. It was generated with AI, so excuse the waffle.
The important rule is simple:
TBL root
-> detail levels
-> parts
Torque Shader Engine, through resource version 140.
NOTE: this spec was originally written with Google Gemini, and later refined by implementing it into TorqueViewer and correcting against reference file data. Further fixes were added using GPT-4.6.
Atlas files are binary files used for paged terrain storage. They contain one or more Tables of Contents (TOCs), each holding chunk-reference records
| #!/usr/bin/env python3 | |
| import os | |
| import math | |
| import json | |
| import argparse | |
| from pathlib import Path | |
| import numpy as np | |
| from PIL import Image, ImageDraw, ImageFont |
| /* | |
| Copyright 2026 James S Urquhart | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), | |
| to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| #!/usr/bin/env python3 | |
| # | |
| # DevonThink database decoder | |
| # | |
| # Stuck on a desert island with no internet, unable to load your meticulously categorized DevonThink database? | |
| # This could be come in handy! | |
| # | |
| # This code should probably be considered in the public domain since it is basically just vibe coded with a load of prompts, | |
| # though feel free to fork and vibe code your own enhancements! | |
| # Lovingly vibe coded 100% in ChatGPT. |
pbfix_mango)xcodebuild -downloadComponent MetalToolchain)Currently only dawn is known to work with this setup, so you need to build and install it somewhere. A script in lib can do this:
./build_dawn.sh getdeps ~/dawnbuild
./build_dawn.sh build ~/dawnbuild Release
| //#pragma GCC visibility push(hidden) | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <math.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> |
| (module | |
| ;; --- Import from host: print(offset: i32) -> void | |
| (import "env" "print" (func $print (param i32))) | |
| ;; --- Linear memory: fixed at 2 pages (128 KiB) --- | |
| (memory (export "memory") 2 2) | |
| ;; --- Data segment: static string --- | |
| (data (i32.const 16) "Hello World\00") |
| #include <stdio.h> | |
| #include <sys/wait.h> | |
| #include <sys/mman.h> | |
| #include <unistd.h> | |
| #include <semaphore.h> | |
| #include <string.h> | |
| #include <pthread.h> | |
| typedef struct { | |
| int value; |
| # HexFiend script to parse ThinkTanks .ter files | |
| section "Header" { | |
| # Read the version (int32) | |
| set version [int8 version] | |
| set gridShift 8 | |
| set lmShift 9 | |
| # If version > 3, parse additional fields | |
| if {$version > 3} { |