|
1 |
| -namespace Definitions.ObjectModels.Objects.Airport; |
2 |
| - |
3 |
| -public enum AirportMovementNodeFlags : uint16_t |
4 |
| -{ |
5 |
| - None = 0, |
6 |
| - Terminal = 1 << 0, |
7 |
| - TakeoffEnd = 1 << 1, |
8 |
| - Flag2 = 1 << 2, |
9 |
| - Taxiing = 1 << 3, |
10 |
| - InFlight = 1 << 4, |
11 |
| - HeliTakeoffBegin = 1 << 5, |
12 |
| - TakeoffBegin = 1 << 6, |
13 |
| - HeliTakeoffEnd = 1 << 7, |
14 |
| - Touchdown = 1 << 8, |
15 |
| -} |
| 1 | +using Definitions.ObjectModels.Objects.Building; |
16 | 2 |
|
17 |
| -public record MovementEdge( |
18 |
| - uint8_t var_00, |
19 |
| - uint8_t CurrNode, |
20 |
| - uint8_t NextNode, |
21 |
| - uint8_t var_03, |
22 |
| - uint32_t MustBeClearEdges, // Which edges must be clear to use the transition edge. should probably be some kind of flags? |
23 |
| - uint32_t AtLeastOneClearEdges // Which edges must have at least one clear to use transition edge. should probably be some kind of flags? |
24 |
| - ) : ILocoStruct |
25 |
| -{ |
26 |
| - public MovementEdge() : this(0, 0, 0, 0, 0, 0) |
27 |
| - { } |
28 |
| - |
29 |
| - public bool Validate() |
30 |
| - => true; |
31 |
| -} |
32 |
| - |
33 |
| -public record MovementNode( |
34 |
| - int16_t X, |
35 |
| - int16_t Y, |
36 |
| - int16_t Z, |
37 |
| - AirportMovementNodeFlags Flags |
38 |
| - ) : ILocoStruct |
39 |
| -{ |
40 |
| - public MovementNode() : this(0, 0, 0, AirportMovementNodeFlags.None) |
41 |
| - { } |
42 |
| - |
43 |
| - public bool Validate() |
44 |
| - => true; |
45 |
| -} |
46 |
| - |
47 |
| -public record AirportBuilding( |
48 |
| - uint8_t Index, |
49 |
| - uint8_t Rotation, |
50 |
| - int8_t X, |
51 |
| - int8_t Y |
52 |
| - ) : ILocoStruct |
53 |
| -{ |
54 |
| - public AirportBuilding() : this(0, 0, 0, 0) |
55 |
| - { } |
56 |
| - |
57 |
| - public bool Validate() |
58 |
| - => true; |
59 |
| -} |
60 |
| - |
61 |
| -public record BuildingPartAnimation( |
62 |
| - uint8_t NumFrames, // Must be a power of 2 (0 = no part animation, could still have animation sequence) |
63 |
| - uint8_t AnimationSpeed // Also encodes in bit 7 if the animation is position modified |
64 |
| - ) : ILocoStruct |
65 |
| -{ |
66 |
| - public BuildingPartAnimation() : this(0, 0) |
67 |
| - { } |
68 |
| - |
69 |
| - public bool Validate() |
70 |
| - => IsPowerOfTwo(NumFrames); |
71 |
| - |
72 |
| - static bool IsPowerOfTwo(uint8_t x) |
73 |
| - => (x & (x - 1)) == 0 && x > 0; |
74 |
| -} |
| 3 | +namespace Definitions.ObjectModels.Objects.Airport; |
75 | 4 |
|
76 | 5 | public class AirportObject : ILocoStruct
|
77 | 6 | {
|
|
0 commit comments