Browse Source

save files for refresh

Alison Watson 9 months ago
parent
commit
69063cc41a
3 changed files with 247 additions and 239 deletions
  1. 1
    0
      .gitattributes
  2. 225
    239
      MarathonData.md
  3. 21
    0
      rustfmt.toml

+ 1
- 0
.gitattributes View File

@@ -0,0 +1 @@
1
+* text=auto eol=lf

+ 225
- 239
MarathonData.md View File

@@ -362,10 +362,8 @@ Example:
362 362
 
363 363
 ## Wad ##
364 364
 
365
-Wad files are used as a container for many different data formats. The
366
-following sub-sections all use the Wad format.
367
-
368
-### Marathon 2 Scenarios (`.sceA`) ###
365
+Wad files are used for scenario data, images, and physics files. Here is a
366
+listing of all chunks used within them:
369 367
 
370 368
 | Name   | Description                                                        |
371 369
 | ----   | -----------                                                        |
@@ -390,6 +388,13 @@ following sub-sections all use the Wad format.
390 388
 | `ShPa` | Not analyzed (shapes)                                              |
391 389
 | `MMLS` | Not analyzed (MML scripts)                                         |
392 390
 | `LUAS` | Not analyzed (Lua scripts)                                         |
391
+| `FXpx` | Effect definitions                                                 |
392
+| `MNpx` | Monster definitions                                                |
393
+| `PRpx` | Player definitions                                                 |
394
+| `PXpx` | Physics definitions                                                |
395
+| `WPpx` | Weapon definitions                                                 |
396
+| `PICT` | Picture Resource                                                   |
397
+| `clut` | Unused(?)                                                          |
393 398
 
394 399
 Map files can be identified by the Minf chunk.
395 400
 
@@ -398,56 +403,13 @@ map (and editor) use. PNTS are plain and have no more information than the
398 403
 actual position, while EPNT has flags and some extra stuff to help the engine
399 404
 load quicker (not that it needs it.)
400 405
 
401
-### Marathon 1 Scenarios (`.scen`) ###
402
-
403
-Not analyzed
404
-
405
-### Images (`.imgA`, `.imgs`) ###
406
-
407
-| Name   | Description                                                        |
408
-| ----   | -----------                                                        |
409
-| `PICT` | Picture Resource                                                   |
410
-| `clut` | Unused(?)                                                          |
411
-
412 406
 Images can be identified by the PICT chunk.
413 407
 
414
-### Marathon 2 Physics (`.phyA`) ###
415
-
416
-| Name   | Description                                                        |
417
-| ----   | -----------                                                        |
418
-| `FXpx` | Effect definitions                                                 |
419
-| `MNpx` | Monster definitions                                                |
420
-| `PRpx` | Player definitions                                                 |
421
-| `PXpx` | Physics definitions                                                |
422
-| `WPpx` | Weapon definitions                                                 |
423
-
424
-## Marathon 1 Physics (`.phys`) ##
425
-
426
-Not analyzed
427
-
428 408
 ## Marathon 2 Shapes (`.shpA`) ##
429 409
 
430
-Not analyzed
431
-
432
-## Marathon 1 Shapes (`.shps`) ##
433
-
434
-Not analyzed
435
-
436
-## Marathon 2 Sounds (`.sndA`) ##
437
-
438
-Not analyzed
439
-
440
-## Marathon 1 Sounds (`.sndz`) ##
441
-
442
-Not analyzed
443
-
444
-## Save Game (`.sgaA`) ##
445
-
446
-Not analyzed
447
-
448
-## Film (`.filA`) ##
449
-
450
-Not analyzed
410
+The Shapes file is used for storing animation and sprite data. It uses a fixed
411
+format for everything, with sprites sorted into collections along with frames
412
+and sequences.
451 413
 
452 414
 
453 415
 # STRUCTURES ##################################################################
@@ -898,7 +860,6 @@ Header Op is 24 bytes.
898 860
 | u16     | X start                                           | Left          |
899 861
 | u16     | Y end                                             | Bottom        |
900 862
 | u16     | X end                                             | Right         |
901
-| 4 bytes | Unused                                            |               |
902 863
 
903 864
 ### QuickTime Image ###
904 865
 
@@ -918,6 +879,31 @@ if matte:
918 879
 * image data follows
919 880
 * some other bullshit
920 881
 
882
+## Shapes ##
883
+
884
+### Collection Header ###
885
+
886
+32 bytes
887
+
888
+| Type     | Description                                      | Name          |
889
+| ----     | -----------                                      | ----          |
890
+| u16      | Status (TODO: unknown purpose)                   | Status        |
891
+| u16      | Flags (TODO: unknown purpose)                    | Flags         |
892
+| u32      | Offset for lo-res collection                     | OffsetLo      |
893
+| u32      | Length for lo-res collection                     | LengthLo      |
894
+| u32      | Offset for hi-res collection                     | OffsetHi      |
895
+| u32      | Length for hi-res collection                     | LengthHi      |
896
+
897
+### Collection Definition ###
898
+
899
+544 bytes (no, I'm not kidding)
900
+
901
+| Type     | Description                                      | Name          |
902
+| ----     | -----------                                      | ----          |
903
+| u16      | Version, not checked by engine (current is 3)    | Version       |
904
+| u16      | Collection Type                                  | Type          |
905
+| 2 bytes  | Unused                                           |               |
906
+
921 907
 # ENUMERATIONS ################################################################
922 908
 
923 909
 Here is a list of names and descriptions for enumerations used throughout this
@@ -998,46 +984,46 @@ exit upon reading them.
998 984
 
999 985
 | Value | Description                                         | Name          |
1000 986
 | ----- | -----------                                         | ----          |
1001
-| 1     | Color mapped bit                                    | Pal1          |
1002
-| 2     | Color mapped dibit                                  | Pal2          |
1003
-| 4     | Color mapped nibble                                 | Pal4          |
1004
-| 8     | Color mapped byte                                   | Pal8          |
1005
-| 16    | X1RGB5                                              | X1RGB5        |
1006
-| 32    | RGB8 (if NoPad) or XRGB8                            | RGB8          |
987
+| `1`   | Color mapped bit                                    | Pal1          |
988
+| `2`   | Color mapped dibit                                  | Pal2          |
989
+| `4`   | Color mapped nibble                                 | Pal4          |
990
+| `8`   | Color mapped byte                                   | Pal8          |
991
+| `16`  | X1RGB5                                              | X1RGB5        |
992
+| `32`  | RGB8 (if NoPad) or XRGB8                            | RGB8          |
1007 993
 
1008 994
 ### Pack Type ###
1009 995
 
1010 996
 | Value | Description                                         | Name          |
1011 997
 | ----- | -----------                                         | ----          |
1012
-| 0     | Always pack                                         | Default       |
1013
-| 1     | Never pack                                          | None          |
1014
-| 2     | Never pack, no padding channel in 32bpp mode        | NoPad         |
1015
-| 3     | Only pack in 16bpp mode                             | RLE16         |
1016
-| 4     | Only pack in 32bpp mode, no padding channel         | RLE32         |
998
+| `0`   | Always pack                                         | Default       |
999
+| `1`   | Never pack                                          | None          |
1000
+| `2`   | Never pack, no padding channel in 32bpp mode        | NoPad         |
1001
+| `3`   | Only pack in 16bpp mode                             | RLE16         |
1002
+| `4`   | Only pack in 32bpp mode, no padding channel         | RLE32         |
1017 1003
 
1018 1004
 ### Polygon Type ###
1019 1005
 
1020 1006
 | Value | Description                           | Permutation | Name          |
1021 1007
 | ----- | -----------                           | ----------- | ----          |
1022
-| 0     | Normal, no effects                    | None        | Normal        |
1023
-| 1     | Items may not pass                    | None        | ImpassItem    |
1024
-| 2     | Monsters may not pass                 | None        | ImpassMons    |
1025
-| 3     | Hill (for King of the Hill)           | None        | Hill          |
1026
-| 4     | Base (for Capture The Flag et al)     | Team        | Base          |
1027
-| 5     | Platform                              | Plat index  | Platform      |
1028
-| 6     | Triggers light on                     | Light index | TrigLightOn   |
1029
-| 7     | Triggers platform on                  | Plat index  | TrigPlatOn    |
1030
-| 8     | Triggers light off                    | Poly index  | TrigLightOff  |
1031
-| 9     | Triggers platform off                 | Poly index  | TrigPlatOff   |
1032
-| 10    | Teleports to polygon centroid         | Poly index  | Teleporter    |
1033
-| 11    | Zone border                           | None        | ZoneBorder    |
1034
-| 12    | Goal point                            | None        | Goal          |
1035
-| 13    | Triggers near-by visible monsters     | None        | TrigMonsVis   |
1036
-| 14    | Triggers near-by invisible monsters   | None        | TrigMonsInv   |
1037
-| 15    | Same as TrigMonsInv                   | None        | TrigMonsDual  |
1038
-| 16    | Triggers near-by invisible items      | None        | TrigItems     |
1039
-| 17    | Must be entered for Exploration       | None        | MustExplore   |
1040
-| 18    | Teleports to next level if success    | None        | AutoExit      |
1008
+| `0`   | Normal, no effects                    | None        | Normal        |
1009
+| `1`   | Items may not pass                    | None        | ImpassItem    |
1010
+| `2`   | Monsters may not pass                 | None        | ImpassMons    |
1011
+| `3`   | Hill (for King of the Hill)           | None        | Hill          |
1012
+| `4`   | Base (for Capture The Flag et al)     | Team        | Base          |
1013
+| `5`   | Platform                              | Plat index  | Platform      |
1014
+| `6`   | Triggers light on                     | Light index | TrigLightOn   |
1015
+| `7`   | Triggers platform on                  | Plat index  | TrigPlatOn    |
1016
+| `8`   | Triggers light off                    | Poly index  | TrigLightOff  |
1017
+| `9`   | Triggers platform off                 | Poly index  | TrigPlatOff   |
1018
+| `10`  | Teleports to polygon centroid         | Poly index  | Teleporter    |
1019
+| `11`  | Zone border                           | None        | ZoneBorder    |
1020
+| `12`  | Goal point                            | None        | Goal          |
1021
+| `13`  | Triggers near-by visible monsters     | None        | TrigMonsVis   |
1022
+| `14`  | Triggers near-by invisible monsters   | None        | TrigMonsInv   |
1023
+| `15`  | Same as TrigMonsInv                   | None        | TrigMonsDual  |
1024
+| `16`  | Triggers near-by invisible items      | None        | TrigItems     |
1025
+| `17`  | Must be entered for Exploration       | None        | MustExplore   |
1026
+| `18`  | Teleports to next level if success    | None        | AutoExit      |
1041 1027
 
1042 1028
 ### Control Panel Type ###
1043 1029
 
@@ -1046,25 +1032,25 @@ permutation each one uses.
1046 1032
 
1047 1033
 | Value | Description                           | Permutation | Name          |
1048 1034
 | ----- | -----------                           | ----------- | ----          |
1049
-| 0     | Oxygen refuel                         | None        | Oxygen        |
1050
-| 1     | Health charger                        | None        | Shield        |
1051
-| 2     | Health charger (2x)                   | None        | Shield2x      |
1052
-| 3     | Health charger (3x)                   | None        | Shield3x      |
1053
-| 4     | Light switch                          | Light index | Light         |
1054
-| 5     | Platform switch                       | Plat index  | Platform      |
1055
-| 6     | Tag switch                            | Tag or -1   | Tag           |
1056
-| 7     | Save station                          | None        | PatternBuf    |
1057
-| 8     | Computer terminal                     | None        | Terminal      |
1035
+| `0`   | Oxygen refuel                         | None        | Oxygen        |
1036
+| `1`   | Health charger                        | None        | Shield        |
1037
+| `2`   | Health charger (2x)                   | None        | Shield2x      |
1038
+| `3`   | Health charger (3x)                   | None        | Shield3x      |
1039
+| `4`   | Light switch                          | Light index | Light         |
1040
+| `5`   | Platform switch                       | Plat index  | Platform      |
1041
+| `6`   | Tag switch                            | Tag or -1   | Tag           |
1042
+| `7`   | Save station                          | None        | PatternBuf    |
1043
+| `8`   | Computer terminal                     | None        | Terminal      |
1058 1044
 
1059 1045
 ### Side Type ###
1060 1046
 
1061 1047
 | Value | Description                                         | Name          |
1062 1048
 | ----- | -----------                                         | ----          |
1063
-| 0     | First texture is mapped over the whole side         | Full          |
1064
-| 1     | First texture is mapped on the ceiling panel        | High          |
1065
-| 2     | First texture is mapped on the floor panel          | Low           |
1066
-| 3     | Composite texture (Not implemented)                 | Composite     |
1067
-| 4     | First texture for ceiling panel, second for floor   | Split         |
1049
+| `0`   | First texture is mapped over the whole side         | Full          |
1050
+| `1`   | First texture is mapped on the ceiling panel        | High          |
1051
+| `2`   | First texture is mapped on the floor panel          | Low           |
1052
+| `3`   | Composite texture (Not implemented)                 | Composite     |
1053
+| `4`   | First texture for ceiling panel, second for floor   | Split         |
1068 1054
 
1069 1055
 "Panel" here refers to a pertrusion inbetween two polygons. These would be
1070 1056
 mapped to upper/lower textures in Doom for instance. Even the source code for
@@ -1074,47 +1060,47 @@ Marathon 2 itself acknowledges how redundant this enumeration is.
1074 1060
 
1075 1061
 | Value | Description                                         | Name          |
1076 1062
 | ----- | -----------                                         | ----          |
1077
-| 0     | Monster                                             |               |
1078
-| 1     | Object                                              |               |
1079
-| 2     | Item                                                |               |
1080
-| 3     | Player                                              |               |
1081
-| 4     | Goal                                                |               |
1082
-| 5     | Sound source (facing is sound volume)               |               |
1063
+| `0`   | Monster                                             |               |
1064
+| `1`   | Object                                              |               |
1065
+| `2`   | Item                                                |               |
1066
+| `3`   | Player                                              |               |
1067
+| `4`   | Goal                                                |               |
1068
+| `5`   | Sound source (facing is sound volume)               |               |
1083 1069
 
1084 1070
 ### Transfer Mode ###
1085 1071
 
1086 1072
 | Value | Description                                         | Name          |
1087 1073
 | ----- | -----------                                         | ----          |
1088
-| 0     | Normal                                              |               |
1089
-| 1     | Fade to black                                       |               |
1090
-| 2     | Invisibility                                        |               |
1091
-| 3     | Invisibility (subtle)                               |               |
1092
-| 4     | Pulsate (polygons only)                             |               |
1093
-| 5     | Wobble (polygons only)                              |               |
1094
-| 6     | Wobble (fast, polygons only)                        |               |
1095
-| 7     | Static                                              |               |
1096
-| 8     | 50% static                                          |               |
1097
-| 9     | Sky                                                 |               |
1098
-| 10    | Smear                                               |               |
1099
-| 11    | Static (fade out)                                   |               |
1100
-| 12    | Static (pulsating)                                  |               |
1101
-| 13    | Fold-in                                             |               |
1102
-| 14    | Fold-out                                            |               |
1103
-| 15    | Horizontal slide                                    |               |
1104
-| 16    | Horizontal slide (fast)                             |               |
1105
-| 17    | Vertical slide                                      |               |
1106
-| 18    | Vertical slide (fast)                               |               |
1107
-| 19    | Wander                                              |               |
1108
-| 20    | Wander (fast)                                       |               |
1109
-| 21    | Big sky                                             |               |
1074
+| `0`   | Normal                                              |               |
1075
+| `1`   | Fade to black                                       |               |
1076
+| `2`   | Invisibility                                        |               |
1077
+| `3`   | Invisibility (subtle)                               |               |
1078
+| `4`   | Pulsate (polygons only)                             |               |
1079
+| `5`   | Wobble (polygons only)                              |               |
1080
+| `6`   | Wobble (fast, polygons only)                        |               |
1081
+| `7`   | Static                                              |               |
1082
+| `8`   | 50% static                                          |               |
1083
+| `9`   | Sky                                                 |               |
1084
+| `10`  | Smear                                               |               |
1085
+| `11`  | Static (fade out)                                   |               |
1086
+| `12`  | Static (pulsating)                                  |               |
1087
+| `13`  | Fold-in                                             |               |
1088
+| `14`  | Fold-out                                            |               |
1089
+| `15`  | Horizontal slide                                    |               |
1090
+| `16`  | Horizontal slide (fast)                             |               |
1091
+| `17`  | Vertical slide                                      |               |
1092
+| `18`  | Vertical slide (fast)                               |               |
1093
+| `19`  | Wander                                              |               |
1094
+| `20`  | Wander (fast)                                       |               |
1095
+| `21`  | Big sky                                             |               |
1110 1096
 
1111 1097
 ### Light Type ###
1112 1098
 
1113 1099
 | Value | Description                                         | Name          |
1114 1100
 | ----- | -----------                                         | ----          |
1115
-| 0     | Normal light                                        |               |
1116
-| 1     | Strobe light                                        |               |
1117
-| 2     | Media light                                         |               |
1101
+| `0`   | Normal light                                        |               |
1102
+| `1`   | Strobe light                                        |               |
1103
+| `2`   | Media light                                         |               |
1118 1104
 
1119 1105
 ### Wad Version ###
1120 1106
 
@@ -1122,10 +1108,10 @@ Used to determine how the engine loads the Wad file.
1122 1108
 
1123 1109
 | Value | Description                                         | Name          |
1124 1110
 | ----- | -----------                                         | ----          |
1125
-| 0     | Marathon 1 data (no directory entry)                | VerBase       |
1126
-| 1     | Marathon 1 data (has directory entry)               | VerDir        |
1127
-| 2     | Marathon 2 data (supports overlays)                 | VerOver       |
1128
-| 4     | Marathon Infinity data                              | VerMI         |
1111
+| `0`   | Marathon 1 data (no directory entry)                | VerBase       |
1112
+| `1`   | Marathon 1 data (has directory entry)               | VerDir        |
1113
+| `2`   | Marathon 2 data (supports overlays)                 | VerOver       |
1114
+| `4`   | Marathon Infinity data                              | VerMI         |
1129 1115
 
1130 1116
 ### Data Version ###
1131 1117
 
@@ -1133,30 +1119,30 @@ Used to determine how the engine loads map data.
1133 1119
 
1134 1120
 | Value | Description                                         | Name          |
1135 1121
 | ----- | -----------                                         | ----          |
1136
-| 0     | Marathon 1 data                                     | DataM1        |
1137
-| 1     | Marathon 2 data                                     | DataM2        |
1122
+| `0`   | Marathon 1 data                                     | DataM1        |
1123
+| `1`   | Marathon 2 data                                     | DataM2        |
1138 1124
 
1139 1125
 ### Terminal Group Type ###
1140 1126
 
1141 1127
 | Value | Description                           | Permutation | Name          |
1142 1128
 | ----- | -----------                           | ----------- | ----          |
1143
-| 0     | Logon                                 | None        | Logon         |
1144
-| 1     | Unfinished (conditions incomplete)    | None        | Unfinished    |
1145
-| 2     | Success (success condition)           | None        | Success       |
1146
-| 3     | Failure (failure condition)           | None        | Failure       |
1147
-| 4     | Information (no image attached)       | None        | Info          |
1148
-| 5     | End terminal                          | None        | End           |
1149
-| 6     | Changes level                         | Level id    | TeleInter     |
1150
-| 7     | Teleports to polygon                  | Polygon id  | TeleIntra     |
1151
-| 8     | Shows goal point                      | Goal id     | Checkpoint    |
1152
-| 9     | Plays a sound                         | Sound id    | Sound         |
1153
-| 10    | Movie (not implemented)               | Movie id    | Movie         |
1154
-| 11    | Music (not implemented)               | Track id    | Track         |
1155
-| 12    | Show image                            | Pict id     | Pict          |
1156
-| 13    | Logoff                                | None        | Logoff        |
1157
-| 14    | Camera (not implemented)              | Object id   | Camera        |
1158
-| 15    | Static (TV static effect)             | 1/30 secs   | Static        |
1159
-| 16    | Activate tag                          | Tag number  | Tag           |
1129
+| `0`   | Logon                                 | None        | Logon         |
1130
+| `1`   | Unfinished (conditions incomplete)    | None        | Unfinished    |
1131
+| `2`   | Success (success condition)           | None        | Success       |
1132
+| `3`   | Failure (failure condition)           | None        | Failure       |
1133
+| `4`   | Information (no image attached)       | None        | Info          |
1134
+| `5`   | End terminal                          | None        | End           |
1135
+| `6`   | Changes level                         | Level id    | TeleInter     |
1136
+| `7`   | Teleports to polygon                  | Polygon id  | TeleIntra     |
1137
+| `8`   | Shows goal point                      | Goal id     | Checkpoint    |
1138
+| `9`   | Plays a sound                         | Sound id    | Sound         |
1139
+| `10`  | Movie (not implemented)               | Movie id    | Movie         |
1140
+| `11`  | Music (not implemented)               | Track id    | Track         |
1141
+| `12`  | Show image                            | Pict id     | Pict          |
1142
+| `13`  | Logoff                                | None        | Logoff        |
1143
+| `14`  | Camera (not implemented)              | Object id   | Camera        |
1144
+| `15`  | Static (TV static effect)             | 1/30 secs   | Static        |
1145
+| `16`  | Activate tag                          | Tag number  | Tag           |
1160 1146
 
1161 1147
 ### Terminal Color ###
1162 1148
 
@@ -1164,135 +1150,135 @@ These are the default colors. These can be overridden with mods.
1164 1150
 
1165 1151
 | Value | Description                                         | Name          |
1166 1152
 | ----- | -----------                                         | ----          |
1167
-| 0     | Light Green                                         | Color0        |
1168
-| 1     | White                                               | Color1        |
1169
-| 2     | Red                                                 | Color2        |
1170
-| 3     | Dark Green                                          | Color3        |
1171
-| 4     | Light Blue                                          | Color4        |
1172
-| 5     | Yellow                                              | Color5        |
1173
-| 6     | Dark Red                                            | Color6        |
1174
-| 7     | Dark Blue                                           | Color7        |
1175
-| 8     | No color                                            | Color8        |
1176
-| 9     | No color                                            | Color9        |
1153
+| `0`   | Light Green                                         | Color0        |
1154
+| `1`   | White                                               | Color1        |
1155
+| `2`   | Red                                                 | Color2        |
1156
+| `3`   | Dark Green                                          | Color3        |
1157
+| `4`   | Light Blue                                          | Color4        |
1158
+| `5`   | Yellow                                              | Color5        |
1159
+| `6`   | Dark Red                                            | Color6        |
1160
+| `7`   | Dark Blue                                           | Color7        |
1161
+| `8`   | No color                                            | Color8        |
1162
+| `9`   | No color                                            | Color9        |
1177 1163
 
1178 1164
 # FLAGS #######################################################################
1179 1165
 
1180 1166
 ### Endpoint Flags ###
1181 1167
 
1182
-| Value   | Description                                       | Name          |
1183
-| -----   | -----------                                       | ----          |
1184
-| `$0001` | Point belongs to any solid line                   | Solid         |
1185
-| `$0002` | All polys with this point have the same height    | SameHeight    |
1186
-| `$0004` | Point does not belong to an un-transparent line   | Transparent   |
1168
+| Bit  | Description                                          | Name          |
1169
+| ---  | -----------                                          | ----          |
1170
+| `0`  | Point belongs to any solid line                      | Solid         |
1171
+| `1`  | All polys with this point have the same height       | SameHeight    |
1172
+| `2`  | Point does not belong to an opaque line              | Transparent   |
1187 1173
 
1188 1174
 Note that the SameHeight flag is set relative to the endpoint's lines.
1189 1175
 
1190 1176
 ### Line Flags ###
1191 1177
 
1192
-| Value   | Description                                       | Name          |
1193
-| -----   | -----------                                       | ----          |
1194
-| `$0200` | Line has a transparent side                       | TransSide     |
1195
-| `$0400` | Polygons on either side do not have same heights  | ElevVar       |
1196
-| `$0800` | Differing height between this line's polygons     | Elevation     |
1197
-| `$1000` | Line shows only sky                               | Landscape     |
1198
-| `$2000` | Both sides are see-through                        | Transparent   |
1199
-| `$4000` | Can't be walked through                           | Solid         |
1178
+| Bit  | Description                                          | Name          |
1179
+| ---  | -----------                                          | ----          |
1180
+| `9`  | Line has a transparent side                          | TransSide     |
1181
+| `10` | Polygons on either side do not have same heights     | ElevVar       |
1182
+| `11` | Differing height between this line's polygons        | Elevation     |
1183
+| `12` | Line shows only sky                                  | Landscape     |
1184
+| `13` | Both sides are see-through                           | Transparent   |
1185
+| `14` | Can't be walked through                              | Solid         |
1200 1186
 
1201 1187
 ### Side Flags ###
1202 1188
 
1203
-| Value   | Description                                       | Name          |
1204
-| -----   | -----------                                       | ----          |
1205
-| `$0001` | Button is switched                                | Status        |
1206
-| `$0002` | Control panel                                     | Panel         |
1207
-| `$0004` | Must be switched for Repair                       | Repair        |
1208
-| `$0008` | Switch uses an item (for scripts)                 | ItemUse       |
1209
-| `$0010` | Switch must be 3/4ths or more lit up to use       | Lighted       |
1210
-| `$0020` | Projectiles toggle and disable this switch        | CanDestroy    |
1211
-| `$0040` | Switch can only be hit by projectiles             | HitOnly       |
1212
-| `$0080` | Switch item is optional (for scripts)             | ItemOpt       |
1189
+| Bit  | Description                                          | Name          |
1190
+| ---  | -----------                                          | ----          |
1191
+| `0`  | Button is switched                                   | Status        |
1192
+| `1`  | Control panel                                        | Panel         |
1193
+| `2`  | Must be switched for Repair                          | Repair        |
1194
+| `3`  | Switch uses an item (for scripts)                    | ItemUse       |
1195
+| `4`  | Switch must be 3/4ths or more lit up to use          | Lighted       |
1196
+| `5`  | Projectiles toggle and disable this switch           | CanDestroy    |
1197
+| `6`  | Switch can only be hit by projectiles                | HitOnly       |
1198
+| `7`  | Switch item is optional (for scripts)                | ItemOpt       |
1213 1199
 
1214 1200
 ### Polygon Flags ###
1215 1201
 
1216
-| Value   | Description                                       | Name          |
1217
-| -----   | -----------                                       | ----          |
1218
-| `$4000` | TODO                                              | Detached      |
1202
+| Bit  | Description                                          | Name          |
1203
+| ---  | -----------                                          | ----          |
1204
+| `14` | TODO                                                 | Detached      |
1219 1205
 
1220 1206
 ### Map Object Flags ###
1221 1207
 
1222
-| Value   | Description                                       | Name          |
1223
-| -----   | -----------                                       | ----          |
1224
-| `$0001` | Initially invisible (warp-in)                     | Invisible     |
1225
-| `$0002` | Reversed Z coordinate (from ceiling)              | Ceiling       |
1226
-| `$0004` | Can not be activated by sight                     | Blind         |
1227
-| `$0008` | Can not be activated by sounds                    | Deaf          |
1228
-| `$0010` | TODO                                              | Floating      |
1229
-| `$0020` | Net-game only, only works on items                | NetOnly       |
1208
+| Bit  | Description                                          | Name          |
1209
+| ---  | -----------                                          | ----          |
1210
+| `0`  | Initially invisible (warp-in)                        | Invisible     |
1211
+| `1`  | Reversed Z coordinate (from ceiling)                 | Ceiling       |
1212
+| `2`  | Can not be activated by sight                        | Blind         |
1213
+| `3`  | Can not be activated by sounds                       | Deaf          |
1214
+| `4`  | TODO                                                 | Floating      |
1215
+| `5`  | Net-game only, only works on items                   | NetOnly       |
1230 1216
 
1231 1217
 ### Mission Flags ###
1232 1218
 
1233
-| Value   | Description                                       | Name          |
1234
-| -----   | -----------                                       | ----          |
1235
-| `$0001` | Kill a certain percentage of monsters             | Extermination |
1236
-| `$0002` | Must explore marked polygons                      | Exploration   |
1237
-| `$0004` | Must grab marked items                            | Retrieval     |
1238
-| `$0008` | Must flip marked switches                         | Repair        |
1239
-| `$0010` | Must keep certain percent of BoBs alive           | Rescue        |
1219
+| Bit  | Description                                          | Name          |
1220
+| ---  | -----------                                          | ----          |
1221
+| `0`  | Kill a certain percentage of monsters                | Extermination |
1222
+| `1`  | Must explore marked polygons                         | Exploration   |
1223
+| `2`  | Must grab marked items                               | Retrieval     |
1224
+| `3`  | Must flip marked switches                            | Repair        |
1225
+| `4`  | Must keep certain percent of BoBs alive              | Rescue        |
1240 1226
 
1241 1227
 ### Environment Flags ###
1242 1228
 
1243
-| Value   | Description                                       | Name          |
1244
-| -----   | -----------                                       | ----          |
1245
-| `$0001` | Makes most weapons not work and oxygen depletes   | Vacuum        |
1246
-| `$0002` | Motion sensor is fucked                           | Magnetic      |
1247
-| `$0004` | Friendly S'pht, strips items and health           | Rebellion     |
1248
-| `$0008` | Low gravity                                       | LowGrav       |
1249
-| `$0010` | Handles glue like Marathon 1                      | M1Glue        |
1250
-| `$0020` | The floor damages you                             | LavaFloor     |
1251
-| `$0040` | Friendly S'pht                                    | Rebellion2    |
1252
-| `$0080` | Level has music                                   | Music         |
1253
-| `$0100` | Terminals stop time (Solo only)                   | TermPause     |
1254
-| `$0200` | M1 monster activation limits                      | M1Monster     |
1255
-| `$0400` | Weapon pickups on TC, lo-G grenades               | M1Weps        |
1256
-| `$2000` | Net-play map                                      | NetPlay       |
1257
-| `$4000` | Solo map                                          | Solo          |
1229
+| Bit  | Description                                          | Name          |
1230
+| ---  | -----------                                          | ----          |
1231
+| `0`  | Makes most weapons not work and oxygen depletes      | Vacuum        |
1232
+| `1`  | Motion sensor is fucked                              | Magnetic      |
1233
+| `2`  | Friendly S'pht, strips items and health              | Rebellion     |
1234
+| `3`  | Low gravity                                          | LowGrav       |
1235
+| `4`  | Handles glue like Marathon 1                         | M1Glue        |
1236
+| `5`  | The floor damages you                                | LavaFloor     |
1237
+| `6`  | Friendly S'pht                                       | Rebellion2    |
1238
+| `7`  | Level has music                                      | Music         |
1239
+| `8`  | Terminals stop time (Solo only)                      | TermPause     |
1240
+| `9`  | M1 monster activation limits                         | M1Monster     |
1241
+| `10` | Weapon pickups on TC, lo-G grenades                  | M1Weps        |
1242
+| `13` | Net-play map                                         | NetPlay       |
1243
+| `14` | Solo map                                             | Solo          |
1258 1244
 
1259 1245
 ### Light Flags ###
1260 1246
 
1261
-| Value   | Description                                       | Name          |
1262
-| -----   | -----------                                       | ----          |
1263
-| `$0001` | TODO                                              |               |
1264
-| `$0002` | TODO                                              | Stateless     |
1247
+| Bit  | Description                                          | Name          |
1248
+| ---  | -----------                                          | ----          |
1249
+| `0`  | TODO                                                 |               |
1250
+| `1`  | TODO                                                 | Stateless     |
1265 1251
 
1266 1252
 ### Entry Point Flags ###
1267 1253
 
1268
-| Value   | Description                                       | Name          |
1269
-| -----   | -----------                                       | ----          |
1270
-| `$0001` | Solo                                              | Solo          |
1271
-| `$0002` | Co-op                                             | CoOp          |
1272
-| `$0004` | Carnage                                           | Carnage       |
1273
-| `$0008` | Kill The Man With The Ball                        | KTMWTB        |
1274
-| `$0010` | King of the Hill                                  | KOTH          |
1275
-| `$0020` | Defense                                           | Defense       |
1276
-| `$0040` | Rugby                                             | Rugby         |
1277
-| `$0080` | Capture The Flag                                  | CTF           |
1254
+| Bit  | Description                                          | Name          |
1255
+| ---  | -----------                                          | ----          |
1256
+| `0`  | Solo                                                 | Solo          |
1257
+| `1`  | Co-op                                                | CoOp          |
1258
+| `2`  | Carnage                                              | Carnage       |
1259
+| `3`  | Kill The Man With The Ball                           | KTMWTB        |
1260
+| `4`  | King of the Hill                                     | KOTH          |
1261
+| `5`  | Defense                                              | Defense       |
1262
+| `6`  | Rugby                                                | Rugby         |
1263
+| `7`  | Capture The Flag                                     | CTF           |
1278 1264
 
1279 1265
 ### Terminal Flags ###
1280 1266
 
1281
-| Value   | Description                                       | Name          |
1282
-| -----   | -----------                                       | ----          |
1283
-| `$0001` | Text is encoded                                   | Encoded       |
1267
+| Bit  | Description                                          | Name          |
1268
+| ---  | -----------                                          | ----          |
1269
+| `0`  | Text is encoded                                      | Encoded       |
1284 1270
 
1285 1271
 ### CopyBits Flags ###
1286 1272
 
1287
-| Value   | Description                                       | Name          |
1288
-| -----   | -----------                                       | ----          |
1289
-| `$4000` | Unused                                            |               |
1290
-| `$8000` | Is PICT2                                          | PICT2         |
1273
+| Bit  | Description                                          | Name          |
1274
+| ---  | -----------                                          | ----          |
1275
+| `14` | Unused                                               |               |
1276
+| `15` | Is PICT2                                             | PICT2         |
1291 1277
 
1292 1278
 ### Color Table Flags ###
1293 1279
 
1294
-| Value   | Description                                       | Name          |
1295
-| -----   | -----------                                       | ----          |
1296
-| `$8000` | Use automatic device mapping for indices          | DeviceMap     |
1280
+| Bit  | Description                                          | Name          |
1281
+| ---  | -----------                                          | ----          |
1282
+| `15` | Use automatic device mapping for indices             | DeviceMap     |
1297 1283
 
1298 1284
 <!-- EOF -->

+ 21
- 0
rustfmt.toml View File

@@ -0,0 +1,21 @@
1
+binop_separator = "Back"
2
+brace_style = "AlwaysNextLine"
3
+condense_wildcard_suffixes = true
4
+enum_discrim_align_threshold = 40
5
+format_doc_comments = true
6
+format_macro_matchers = true
7
+format_strings = true
8
+imports_indent = "Visual"
9
+indent_style = "Visual"
10
+max_width = 80
11
+merge_imports = true
12
+newline_style = "Unix"
13
+normalize_comments = true
14
+normalize_doc_attributes = true
15
+overflow_delimited_expr = true
16
+reorder_impl_items = true
17
+struct_field_align_threshold = 40
18
+tab_spaces = 3
19
+use_field_init_shorthand = true
20
+use_try_shorthand = true
21
+wrap_comments = true

Loading…
Cancel
Save