missing parts

png-branch
an 2019-02-22 17:25:45 -05:00
parent 8f4a177f09
commit eac8686324
2 changed files with 78 additions and 30 deletions

View File

@ -438,6 +438,18 @@ Save file tags:
| `weap` | Not analyzed (saved weapon state) |
| `cint` | Not analyzed (saved terminal state) |
Preferences tags:
| Name | Description |
| ---- | ----------- |
| `graf` | Not analyzed (graphics prefs) |
| `serl` | Not analyzed (serial code) |
| `netw` | Not analyzed (network prefs) |
| `plyr` | Not analyzed (player prefs) |
| `inpu` | Not analyzed (input prefs) |
| `snd ` | Not analyzed (sound prefs) |
| `envr` | Not analyzed (environment prefs) |
Aleph One tags:
| Name | Description |
@ -2165,35 +2177,35 @@ most sensible for, for instance, lava which can be drained.
### Static Platform Flags ###
| Name | Bit |
| ---- | --- |
| `is_initially_active` | `0` |
| `is_initially_extended` | `1` |
| `deactivates_at_each_level` | `2` |
| `deactivates_at_initial_level` | `3` |
| `activates_adjacent_platforms_when_deactivating` | `4` |
| `extends_floor_to_ceiling` | `5` |
| `comes_from_floor` | `6` |
| `comes_from_ceiling` | `7` |
| `causes_damage` | `8` |
| `does_not_activate_parent` | `9` |
| `activates_only_once` | `10` |
| `activates_light` | `11` |
| `deactivates_light` | `12` |
| `is_player_controllable` | `13` |
| `is_monster_controllable` | `14` |
| `reverses_direction_when_obstructed` | `15` |
| `cannot_be_externally_deactivated` | `16` |
| `uses_native_polygon_heights` | `17` |
| `delays_before_activation` | `18` |
| `activates_adjacent_platforms_when_activating` | `19` |
| `deactivates_adjacent_platforms_when_activating` | `20` |
| `deactivates_adjacent_platforms_when_deactivating` | `21` |
| `contracts_slower` | `22` |
| `activates_adjacent_platforms_at_each_level` | `23` |
| `is_locked` | `24` |
| `is_secret` | `25` |
| `is_door` | `26` |
| Name | Bit |
| ---- | --- |
| `InitActive` | `0` |
| `InitExtended` | `1` |
| `StopAtEachLevel` | `2` |
| `StopAtInitLevel` | `3` |
| `StartAdjOnStop` | `4` |
| `ExtendsFloorToCeil` | `5` |
| `ComesFromFloor` | `6` |
| `ComesFromCeil` | `7` |
| `CausesDamage` | `8` |
| `NoActivateParent` | `9` |
| `ActivatesOnce` | `10` |
| `ActivatesLight` | `11` |
| `DeactivatesLight` | `12` |
| `PlayerControls` | `13` |
| `MonsterControls` | `14` |
| `ReverseOnObstruct` | `15` |
| `NoExtDeactivation` | `16` |
| `UsePolygonHeights` | `17` |
| `DelayedActivation` | `18` |
| `StartAdjOnStart` | `19` |
| `StopAdjOnStart` | `20` |
| `StopAdjOnStop` | `21` |
| `Slow` | `22` |
| `StartAtEachLevel` | `23` |
| `Locked` | `24` |
| `Secret` | `25` |
| `Door` | `26` |
If I could explain to you why there are this many flags, I gladly would, but
this actually hurts my head.

View File

@ -288,6 +288,8 @@ pub fn read_plat(b: &[u8]) -> ResultS<(Platform, usize)>
tag = u16[16];
}
let flags = flag_ok!(PlatformFlags, flags)?;
Ok((Platform{ptype, speed, delay, hei_min, hei_max, flags, index, tag}, 32))
}
@ -452,7 +454,7 @@ pub struct Platform
pub delay: u16,
pub hei_min: Unit,
pub hei_max: Unit,
pub flags: u32,
pub flags: PlatformFlags,
pub index: u16,
pub tag: u16,
}
@ -575,6 +577,40 @@ bitflags! {
}
}
bitflags! {
#[derive(Serialize)]
pub struct PlatformFlags: u32
{
const InitActive = 1;
const InitExtended = 1 << 1;
const StopAtEachLevel = 1 << 2;
const StopAtInitLevel = 1 << 3;
const StartAdjOnStop = 1 << 4;
const ExtendsFloorToCeil = 1 << 5;
const ComesFromFloor = 1 << 6;
const ComesFromCeil = 1 << 7;
const CausesDamage = 1 << 8;
const NoActivateParent = 1 << 9;
const ActivatesOnce = 1 << 10;
const ActivatesLight = 1 << 11;
const DeactivatesLight = 1 << 12;
const PlayerControls = 1 << 13;
const MonsterControls = 1 << 14;
const ReverseOnObstruct = 1 << 15;
const NoExtDeactivation = 1 << 16;
const UsePolygonHeights = 1 << 17;
const DelayedActivation = 1 << 18;
const StartAdjOnStart = 1 << 19;
const StopAdjOnStart = 1 << 20;
const StopAdjOnStop = 1 << 21;
const Slow = 1 << 22;
const StartAtEachLevel = 1 << 23;
const Locked = 1 << 24;
const Secret = 1 << 25;
const Door = 1 << 26;
}
}
c_enum! {
#[derive(Debug, Serialize)]
pub enum SideType: u16