Document probable font format

This commit is contained in:
2018-12-31 00:57:19 +00:00
parent 5e6422b8a4
commit 8050412abe
3 changed files with 48 additions and 10 deletions

View File

@@ -95,3 +95,7 @@ And we learn they can be "on"....
0. CHARACTER
1. VEHICLE
2. CANISTER
I'm starting to see some parallels with [this](https://github.com/shlainn/game-file-formats/wiki/)
in the data formats, and the timeline (1997) seems about right. Worth keeping an
eye on!

35
doc/formats/fonts.md Normal file
View File

@@ -0,0 +1,35 @@
# Fonts
## *.fnt
These are simple ASCII files. Here's an extract from `basfnt12.fnt`:
```
basfnt12.spr
r 65 90 0 25 A-Z
r 97 122 26 51 a-z
r 48 57 52 61 0-9
v 63 62 ?
# ...
done
```
The first line references a `.spr` file to read from. Then we have a list of
records that must specify mappings of ASCII -> glyphs.
First guess at the format:
* `r | v` is `range` vs. `value`
* Next we have the starting ASCII code
* For `r`, we now have the finishing ASCII code
* Next we have the starting position in the `.spr` file
* For `r`, we now have the finishing position in the `.spr` file
* Finally, just a comment?
Assuming that's all true, `basfont12.fnt` has 86 entries. It looks like a normal
[`.obj`](obj.md) file with... 86 entries. Good enough for me!
There's also a `cboxfont` file, which seems to be junk. `cboxfont.spr` and
`cboxfont.fmt` exist anyway. But who knows what else it might have in it.

View File

@@ -12,7 +12,6 @@ remake.
* Hits for "AmigaOS bitmap font"... probably a false positive
* Lots of 8-byte reads when loading stuff in the mission editor
* Some ~4K reads, havent found one corresponding to a known format yet
* foo
* [`Assign/`](obj.md#assign)
* `*.asn` # Unknown, seems to be related to .obj files
* `Cursor/`
@@ -62,10 +61,10 @@ remake.
* `EquipmentMenuData` # gzip-compressed, presumably to do with (initial?) squad configuration
* `Filters/`
* `wh40k.flt` # Audio filter(s?)
* `Fonts/`
* `cboxfont` # unknown
* `*.fnt` # ASCII text. Map keycodes to sprites?
* `*.spr` # sprites, presumably
* [✓] [`Fonts/`](fonts.md)
* `cboxfont` # ???
* `*.fnt`
* `*.spr`
* `Idx/`
* `WarHammer.idx` # unknown, 1.8M
* [`Maps/`](maps.md)
@@ -79,8 +78,8 @@ remake.
* [`MultiMaps/`](maps.md#multimaps)
* `*.MAP`
* `*.TXT`
* [`Obj/`](obj.md)
* `*.obj` # must be visual data of some sort, one per placeable map object?
* [✓] [`Obj/`](obj.md)
* `*.obj`
* [✓] `Pic/`
* `*.pcx` # Standard .pcx format
* `RandomMaps/`
@@ -90,14 +89,14 @@ remake.
* `*.sav` # savedata, gzip-compressed, custom format
* `*.txt` # Seems to be a copy of one of Maps/*.txt
* [✓] [`Sets/`](sets.md)
* `Data.chk` # checksums? Mentions all the .set files
* `*.set` # plain text, related to maps. Editor has a concept of map sets, which these must be
* `Data.chk`
* `*.set`
* [✓] `SMK/`
* `*.smk` # Videos: RAD Game Tools Smacker Multimedia version 2
* `Sounds/`
* `wh40k.ds` # 0xffffffff then a list of .wav file names. Some sort of index?
* [✓] `Wav/`
* `*.wav` # Normal WAV files
* `*.wav`
Phew.