unindent MarathonData
parent
85a4d3c990
commit
0a4e32c794
170
MarathonData.md
170
MarathonData.md
|
@ -1,17 +1,17 @@
|
||||||
# LICENSING ###################################################################
|
# LICENSING ###################################################################
|
||||||
|
|
||||||
To the extent possible under law, I, Alison Sanderson, have waived all
|
To the extent possible under law, I, Alison Sanderson, have waived all
|
||||||
copyright and related or neighboring rights to this Document as described
|
copyright and related or neighboring rights to this Document as described by
|
||||||
by the Creative Commons Zero license linked below.
|
the Creative Commons Zero license linked below.
|
||||||
|
|
||||||
<http://creativecommons.org/publicdomain/zero/1.0/>
|
<http://creativecommons.org/publicdomain/zero/1.0/>
|
||||||
|
|
||||||
All of the information in this Document is original research. Marathon and
|
All of the information in this Document is original research. Marathon and
|
||||||
Forge are owned by Bungie, Inc. QuickDraw, QuickTime and Macintosh are owned
|
Forge are owned by Bungie, Inc. QuickDraw, QuickTime and Macintosh are owned by
|
||||||
by Apple. Aleph One (also referred to as A1 in this Document) is owned by
|
Apple. Aleph One (also referred to as A1 in this Document) is owned by Bungie,
|
||||||
Bungie, Inc. et al. Igni Ferroque, Ferro, and Atque are owned by Gregory
|
Inc. et al. Igni Ferroque, Ferro, and Atque are owned by Gregory Smith
|
||||||
Smith (treellama.) Maraiah is owned by Project Golan. Any other copyrights
|
(treellama.) Maraiah is owned by Project Golan. Any other copyrights belong to
|
||||||
belong to their respective owners.
|
their respective owners.
|
||||||
|
|
||||||
# CONTENTS ####################################################################
|
# CONTENTS ####################################################################
|
||||||
|
|
||||||
|
@ -31,32 +31,32 @@
|
||||||
|
|
||||||
# TERMINAL CODE ###############################################################
|
# TERMINAL CODE ###############################################################
|
||||||
|
|
||||||
The terminal definition format is extremely straightforward.
|
The terminal definition format is extremely straightforward. Terminal commands
|
||||||
Terminal commands begin lines and are in the format:
|
begin lines and are in the format:
|
||||||
|
|
||||||
```
|
```
|
||||||
#COMMAND_NAME parameters
|
#COMMAND_NAME parameters
|
||||||
```
|
```
|
||||||
|
|
||||||
In Forge and Maraiah, commands need not be uppercase.
|
In Forge and Maraiah, commands need not be uppercase. Atque does require all
|
||||||
Atque does require all commands to be uppercase.
|
commands to be uppercase.
|
||||||
|
|
||||||
Comments also begin lines (they can't be after the beginning of one) and
|
Comments also begin lines (they can't be after the beginning of one) and will
|
||||||
will disable any text proceeding them. They are formed like:
|
disable any text proceeding them. They are formed like:
|
||||||
|
|
||||||
```
|
```
|
||||||
; comment content here
|
; comment content here
|
||||||
```
|
```
|
||||||
|
|
||||||
Terminals are numbered, and this is used in the map to determine which
|
Terminals are numbered, and this is used in the map to determine which terminal
|
||||||
terminal to display when a computer is used.
|
to display when a computer is used.
|
||||||
|
|
||||||
## Blocks ##
|
## Blocks ##
|
||||||
|
|
||||||
### Terminal Blocks ###
|
### Terminal Blocks ###
|
||||||
|
|
||||||
The number for the terminal being currently defined is set with
|
The number for the terminal being currently defined is set with the `#TERMINAL`
|
||||||
the `#TERMINAL` and `#ENDTERMINAL` commands. These are formed as:
|
and `#ENDTERMINAL` commands. These are formed as:
|
||||||
|
|
||||||
```
|
```
|
||||||
#TERMINAL number
|
#TERMINAL number
|
||||||
|
@ -75,8 +75,8 @@
|
||||||
|
|
||||||
### Sections ###
|
### Sections ###
|
||||||
|
|
||||||
There are four possible sections in a terminal, which are between
|
There are four possible sections in a terminal, which are between the
|
||||||
the `#TERMINAL` and `#ENDTERMINAL` blocks:
|
`#TERMINAL` and `#ENDTERMINAL` blocks:
|
||||||
|
|
||||||
```
|
```
|
||||||
#UNFINISHED
|
#UNFINISHED
|
||||||
|
@ -85,8 +85,8 @@
|
||||||
#SUCCESS
|
#SUCCESS
|
||||||
```
|
```
|
||||||
|
|
||||||
These all mark the start of where the terminal will display, depending on
|
These all mark the start of where the terminal will display, depending on the
|
||||||
the current status of your mission.
|
current status of your mission.
|
||||||
|
|
||||||
| Name | Will display when |
|
| Name | Will display when |
|
||||||
| ---- | ----------------- |
|
| ---- | ----------------- |
|
||||||
|
@ -101,18 +101,17 @@
|
||||||
#END
|
#END
|
||||||
```
|
```
|
||||||
|
|
||||||
Between sections may be any amount of regular commands.
|
Between sections may be any amount of regular commands. There are two kinds of
|
||||||
There are two kinds of these normal commands: Text commands, and interactive
|
these normal commands: Text commands, and interactive commands.
|
||||||
commands.
|
|
||||||
|
|
||||||
## Text Commands ##
|
## Text Commands ##
|
||||||
|
|
||||||
All text commands may have (but do not require) text following them,
|
All text commands may have (but do not require) text following them, which may
|
||||||
which may be formatted.
|
be formatted.
|
||||||
|
|
||||||
Line breaks will break in-game, but unbroken lines will automatically wrap.
|
Line breaks will break in-game, but unbroken lines will automatically wrap. It
|
||||||
It is generally best to just put all of your text onto one line, even if
|
is generally best to just put all of your text onto one line, even if this
|
||||||
this destroys your sanity. Use a text editor with line wrapping for this.
|
destroys your sanity. Use a text editor with line wrapping for this.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -170,10 +169,10 @@
|
||||||
* Display 45 characters per line, and display up to 22 lines on one page.
|
* Display 45 characters per line, and display up to 22 lines on one page.
|
||||||
* Display text aligned to the left on the right side of the screen.
|
* Display text aligned to the left on the right side of the screen.
|
||||||
|
|
||||||
If alignment is specified as RIGHT, text is aligned to the right
|
If alignment is specified as RIGHT, text is aligned to the right on the left of
|
||||||
on the left of the screen. If alignment is specified as CENTER, no text may
|
the screen. If alignment is specified as CENTER, no text may be displayed, only
|
||||||
be displayed, only an image. If no alignment is specified, it will default
|
an image. If no alignment is specified, it will default to an image on the left
|
||||||
to an image on the left and text on the right.
|
and text on the right.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -193,8 +192,8 @@
|
||||||
|
|
||||||
`#LOGON` and `#LOGOFF` are generally used first and last in a terminal.
|
`#LOGON` and `#LOGOFF` are generally used first and last in a terminal.
|
||||||
|
|
||||||
These two display a PICT in the middle of the screen and text below the
|
These two display a PICT in the middle of the screen and text below the image
|
||||||
image if you supply it. They both do things to the screen borders.
|
if you supply it. They both do things to the screen borders.
|
||||||
|
|
||||||
They will:
|
They will:
|
||||||
* Automatically continue, an input will interrupt it.
|
* Automatically continue, an input will interrupt it.
|
||||||
|
@ -240,13 +239,12 @@
|
||||||
|
|
||||||
`#CHECKPOINT` may only be used in M1, unless you're using Aleph One 1.1+.
|
`#CHECKPOINT` may only be used in M1, unless you're using Aleph One 1.1+.
|
||||||
|
|
||||||
This shows a map centered on the specified goal point, with the goal
|
This shows a map centered on the specified goal point, with the goal circled,
|
||||||
circled, on the left of the screen.
|
on the left of the screen.
|
||||||
|
|
||||||
The map will only show polygons connected to the polygon the goal is in,
|
The map will only show polygons connected to the polygon the goal is in, so if
|
||||||
so if you have a separated area where the goal point is, it will only
|
you have a separated area where the goal point is, it will only display that.
|
||||||
display that. It will also not display secret areas and any polygons
|
It will also not display secret areas and any polygons proceding them.
|
||||||
proceding them.
|
|
||||||
|
|
||||||
It will:
|
It will:
|
||||||
* Wait for input before proceeding.
|
* Wait for input before proceeding.
|
||||||
|
@ -266,13 +264,13 @@
|
||||||
#BRIEFING level_number
|
#BRIEFING level_number
|
||||||
```
|
```
|
||||||
|
|
||||||
BRIEFING may only be used in Marathon 1. It is identical to INFORMATION,
|
BRIEFING may only be used in Marathon 1. It is identical to INFORMATION, but
|
||||||
but after you're done reading, it will teleport you to the specified level.
|
after you're done reading, it will teleport you to the specified level.
|
||||||
|
|
||||||
## Interactive Commands ##
|
## Interactive Commands ##
|
||||||
|
|
||||||
Interactive commands are all actions carried out by the game that
|
Interactive commands are all actions carried out by the game that do not all
|
||||||
do not all effect the active terminal.
|
effect the active terminal.
|
||||||
|
|
||||||
### Interactive Command Overview ###
|
### Interactive Command Overview ###
|
||||||
|
|
||||||
|
@ -292,8 +290,8 @@
|
||||||
#INTERLEVEL TELEPORT level_number
|
#INTERLEVEL TELEPORT level_number
|
||||||
```
|
```
|
||||||
|
|
||||||
`#INTERLEVEL TELEPORT` exits the terminal and teleports you to the
|
`#INTERLEVEL TELEPORT` exits the terminal and teleports you to the specified
|
||||||
specified level. If the level number is "256", this ends the game.
|
level. If the level number is "256", this ends the game.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -307,8 +305,8 @@
|
||||||
#INTRALEVEL TELEPORT polygon_tag
|
#INTRALEVEL TELEPORT polygon_tag
|
||||||
```
|
```
|
||||||
|
|
||||||
`#INTRALEVEL TELEPORT` exits the terminal and teleports you to the centroid
|
`#INTRALEVEL TELEPORT` exits the terminal and teleports you to the centroid of
|
||||||
of the specified polygon within the map.
|
the specified polygon within the map.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -336,8 +334,7 @@
|
||||||
#SOUND sound_number
|
#SOUND sound_number
|
||||||
```
|
```
|
||||||
|
|
||||||
`#SOUND` plays the specified sound from the Sounds file or from the
|
`#SOUND` plays the specified sound from the Sounds file or from the Scenario.
|
||||||
Scenario/Map file.
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -379,7 +376,7 @@
|
||||||
| `LITE` | Array of Lights |
|
| `LITE` | Array of Lights |
|
||||||
| `NOTE` | Not analyzed (annotations) |
|
| `NOTE` | Not analyzed (annotations) |
|
||||||
| `OBJS` | Array of Objects |
|
| `OBJS` | Array of Objects |
|
||||||
| `p'th` | No test data (' is $8C) (guardpaths) |
|
| `påth` | No test data (å is $8C) (guardpaths) |
|
||||||
| `Minf` | Static Map Info |
|
| `Minf` | Static Map Info |
|
||||||
| `plac` | Not analyzed (item placement) |
|
| `plac` | Not analyzed (item placement) |
|
||||||
| `door` | No test data (extra door data) |
|
| `door` | No test data (extra door data) |
|
||||||
|
@ -396,10 +393,10 @@
|
||||||
|
|
||||||
Map files can be identified by the Minf chunk.
|
Map files can be identified by the Minf chunk.
|
||||||
|
|
||||||
Map files will always have either a PNTS or EPNT chunk, depending on what
|
Map files will always have either a PNTS or EPNT chunk, depending on what the
|
||||||
the map (and editor) use. PNTS are plain and have no more information than
|
map (and editor) use. PNTS are plain and have no more information than the
|
||||||
the actual position, while EPNT has flags and some extra stuff to help the
|
actual position, while EPNT has flags and some extra stuff to help the engine
|
||||||
engine load quicker (not that it needs it.)
|
load quicker (not that it needs it.)
|
||||||
|
|
||||||
### Marathon 1 Scenarios (`.scen`) ###
|
### Marathon 1 Scenarios (`.scen`) ###
|
||||||
|
|
||||||
|
@ -471,10 +468,9 @@
|
||||||
|
|
||||||
### Wad Header ###
|
### Wad Header ###
|
||||||
|
|
||||||
The Wad header is always at the very beginning of the file, except when
|
The Wad header is always at the very beginning of the file, except when it's a
|
||||||
it's a MacBin file or an AppleSingle file, in which case it's at the start
|
MacBin file or an AppleSingle file, in which case it's at the start of the
|
||||||
of the resource fork. You'll have to account for that yourself. An example
|
resource fork. You'll have to account for that yourself.
|
||||||
of a proper header loader that handles both is attached.
|
|
||||||
|
|
||||||
The Wad Header is 128 bytes.
|
The Wad Header is 128 bytes.
|
||||||
|
|
||||||
|
@ -495,9 +491,9 @@
|
||||||
| u16 | Size of chunks | ChunkSize |
|
| u16 | Size of chunks | ChunkSize |
|
||||||
| u16 | Size of directory entries | EntrySize |
|
| u16 | Size of directory entries | EntrySize |
|
||||||
|
|
||||||
ChunkSize and EntrySize may be zero, in which case it will default to
|
ChunkSize and EntrySize may be zero, in which case it will default to 16 and 10
|
||||||
16 and 10 respectively. They exist for forward compatibility with Wad
|
respectively. They exist for forward compatibility with Wad patching, although
|
||||||
patching, although are actually pointless and serve no practical purpose.
|
are actually pointless and serve no practical purpose.
|
||||||
|
|
||||||
If WadVer is greater than or equal to VerOver:
|
If WadVer is greater than or equal to VerOver:
|
||||||
|
|
||||||
|
@ -507,9 +503,9 @@
|
||||||
|
|
||||||
### Directory Entry ###
|
### Directory Entry ###
|
||||||
|
|
||||||
Following this structure is AppData bytes (N), supposed to be used by
|
Following this structure is AppData bytes (N), supposed to be used by editor
|
||||||
editor applications for storing arbitrary extra data, and will be ignored by
|
applications for storing arbitrary extra data, and will be ignored by the
|
||||||
the engine.
|
engine.
|
||||||
|
|
||||||
Directory Entry is 8 bytes if WadVer is VerBase, or EntrySize+AppData bytes.
|
Directory Entry is 8 bytes if WadVer is VerBase, or EntrySize+AppData bytes.
|
||||||
|
|
||||||
|
@ -527,9 +523,9 @@
|
||||||
|
|
||||||
### Chunk ###
|
### Chunk ###
|
||||||
|
|
||||||
Most Wad entries are made up of tagged data formats, the engine assumes
|
Most Wad entries are made up of tagged data formats, the engine assumes this
|
||||||
this for every entry and so every entry has at least one chunk.
|
for every entry and so every entry has at least one chunk. These are similar to
|
||||||
These are similar to IFF or PNG chunks.
|
IFF or PNG chunks.
|
||||||
|
|
||||||
Chunk is 12 bytes if WadVer is VerBase, or ChunkSize bytes.
|
Chunk is 12 bytes if WadVer is VerBase, or ChunkSize bytes.
|
||||||
|
|
||||||
|
@ -729,9 +725,9 @@
|
||||||
| u8[66] | Level name | Name |
|
| u8[66] | Level name | Name |
|
||||||
| u32 | Entry point flags | EntryFlags |
|
| u32 | Entry point flags | EntryFlags |
|
||||||
|
|
||||||
The level name was intended to be 65 bytes, but one padding byte was left
|
The level name was intended to be 65 bytes, but one padding byte was left over,
|
||||||
over, so the real length is 66 bytes. It is unknown why the entry point
|
so the real length is 66 bytes. It is unknown why the entry point flags are
|
||||||
flags are stored in a 32-bit integer when they can fit in 8 bits.
|
stored in a 32-bit integer when they can fit in 8 bits.
|
||||||
|
|
||||||
## Terminal ##
|
## Terminal ##
|
||||||
|
|
||||||
|
@ -789,10 +785,10 @@
|
||||||
|
|
||||||
### Picture Resource ###
|
### Picture Resource ###
|
||||||
|
|
||||||
Pictures are formed with a header and then a variable number of operations.
|
Pictures are formed with a header and then a variable number of operations. In
|
||||||
In other words, a small state machine is used to form an image through
|
other words, a small state machine is used to form an image through effects and
|
||||||
effects and various fill instructions. QuickDraw is horrifying. This is the
|
various fill instructions. QuickDraw is horrifying. This is the native image
|
||||||
native image format. It's a fucking metafile.
|
format. It's a fucking metafile.
|
||||||
|
|
||||||
* Picture Header
|
* Picture Header
|
||||||
* Picture Opcodes
|
* Picture Opcodes
|
||||||
|
@ -924,19 +920,19 @@
|
||||||
|
|
||||||
# ENUMERATIONS ################################################################
|
# ENUMERATIONS ################################################################
|
||||||
|
|
||||||
Here is a list of names and descriptions for enumerations used throughout
|
Here is a list of names and descriptions for enumerations used throughout this
|
||||||
this document. The names may not match those used in the original engine
|
document. The names may not match those used in the original engine and are
|
||||||
and are re-named for clarity of purpose.
|
re-named for clarity of purpose.
|
||||||
|
|
||||||
### Picture Opcode ###
|
### Picture Opcode ###
|
||||||
|
|
||||||
Operations used in QuickDraw images. Aleph One ignores most of these, so
|
Operations used in QuickDraw images. Aleph One ignores most of these, so it's
|
||||||
it's only necessary to document what's ignored and how to process CopyBits.
|
only necessary to document what's ignored and how to process CopyBits. (If
|
||||||
(If you're interested in the QuickDraw format, Apple has legacy documents
|
you're interested in the QuickDraw format, Apple has legacy documents still
|
||||||
still available on the Internet.)
|
available on the Internet.)
|
||||||
|
|
||||||
Opcodes `$0100` through `$7FFF` are skipped by seeking forward by
|
Opcodes `$0100` through `$7FFF` are skipped by seeking forward by the most
|
||||||
the most significant byte's value times two.
|
significant byte's value times two.
|
||||||
|
|
||||||
Opcodes `$8000` through `$8100` are reserved and therefore ignored.
|
Opcodes `$8000` through `$8100` are reserved and therefore ignored.
|
||||||
|
|
||||||
|
@ -1068,8 +1064,8 @@
|
||||||
| 4 | First texture for ceiling panel, second for floor | Split |
|
| 4 | First texture for ceiling panel, second for floor | Split |
|
||||||
|
|
||||||
"Panel" here refers to a pertrusion inbetween two polygons. These would be
|
"Panel" here refers to a pertrusion inbetween two polygons. These would be
|
||||||
mapped to upper/lower textures in Doom for instance. Even the source code
|
mapped to upper/lower textures in Doom for instance. Even the source code for
|
||||||
for Marathon 2 itself acknowledges how redundant this enumeration is.
|
Marathon 2 itself acknowledges how redundant this enumeration is.
|
||||||
|
|
||||||
### Saved Object Group ###
|
### Saved Object Group ###
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue