1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/contrib/file/Magdir/adventure
2002-09-16 05:54:26 +00:00

64 lines
2.4 KiB
Plaintext

#------------------------------------------------------------------------------
# adventure: file(1) magic for Adventure game files
#
# from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
# Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998
# Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
#
# ALAN
# I assume there are other, lower versions, but these are the only ones I
# saw in the archive.
0 beshort 0x0206 ALAN game data
>2 byte <10 version 2.6%d
# Conflicts with too much other stuff!
# Infocom
# (Note: to avoid false matches Z-machine version 1 and 2 are not
# recognized since only the oldest Zork I and II used them. Similarly
# there are 4 Infocom games that use verion 4 that are not recognized.)
#0 byte 3 Infocom game data (Z-machine 3,
#>2 beshort <0x7fff Release %3d,
#>26 beshort >0 Size %d*2
#>18 string >\0 Serial %.6s)
#0 byte 5 Infocom game data (Z-machine 5,
#>2 beshort <0x7fff Release %3d,
#>26 beshort >0 Size %d*4
#>18 string >\0 Serial %.6s)
#0 byte 6 Infocom game data (Z-machine 6,
#>2 beshort <0x7fff Release %3d,
#>26 beshort >0 Size %d*8
#>18 string >\0 Serial %.6s)
#0 byte 8 Infocom game data (Z-machine 8,
#>2 beshort <0x7fff Release %3d,
#>26 beshort >0 Size %d*8
#>18 string >\0 Serial %.6s)
# TADS (Text Adventure Development System)
# All files are machine-independent (games compile to byte-code) and are tagged
# with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is
# on the way).
# Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
0 string TADS2\ bin TADS
>9 belong !0x0A0D1A00 game data, CORRUPTED
>9 belong 0x0A0D1A00
>>13 string >\0 %s game data
# Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
0 string TADS2\ rsc TADS
>9 belong !0x0A0D1A00 resource data, CORRUPTED
>9 belong 0x0A0D1A00
>>13 string >\0 %s resource data
# Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
# 2-byte length N, the N-char name of the game file *without* a NUL (darn!),
# "TADS2 save\n\r\032\0" and the interpreter version.
0 string TADS2\ save/g TADS
>12 belong !0x0A0D1A00 saved game data, CORRUPTED
>12 belong 0x0A0D1A00
>>(16.s+32) string >\0 %s saved game data
# Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
# version.
0 string TADS2\ save TADS
>10 belong !0x0A0D1A00 saved game data, CORRUPTED
>10 belong 0x0A0D1A00
>>14 string >\0 %s saved game data