Ronnie Clark
2004-10-07 12:33:44 UTC
I'm struggling with trying to implement something which I think should is
possible - changing the graphics for the train engine depending on what
cargo is in the consist. I've tried this Action 2, and I'll explain what I
think it should be doing.
02 00 04 82 42 08 FF 02 00 00 00 00 01 00 02 02 02 00
02 00 - Action 2, for trains.
04 - Defining cargo-ID 04.
82 42 - Deterministic graphics based on whole-train consist.
Now, property 42 is supposed to return 0000cctt. I'm interested in the
common cargo, so I then right-shift by 8 bits. I'm not sure if this is the
correct amount to shift, but I've tried lots of different amounts and none
have worked.
08 FF - Right shift by 8 bits and AND with FF.
02 - 2 variations
(00 00) (00 00) - Use cargo-ID 00 if common cargo = passengers.
(01 00) (02 02) - Use cargo-ID 01 if common cargo = mail.
(02 00) - Default cargo ID.
I've given up working out why it isn't working. The engine ends up with
cargo-ID 00 no matter what cargo is behind it....
Any help? Am I trying to do something which is impossible?
Ronnie
--
Volunteer guard on the Great Central Railway, Loughborough, Leicestershire
Visit the world's only double track preserved steam railway!
http://www.gcrailway.co.uk
possible - changing the graphics for the train engine depending on what
cargo is in the consist. I've tried this Action 2, and I'll explain what I
think it should be doing.
02 00 04 82 42 08 FF 02 00 00 00 00 01 00 02 02 02 00
02 00 - Action 2, for trains.
04 - Defining cargo-ID 04.
82 42 - Deterministic graphics based on whole-train consist.
Now, property 42 is supposed to return 0000cctt. I'm interested in the
common cargo, so I then right-shift by 8 bits. I'm not sure if this is the
correct amount to shift, but I've tried lots of different amounts and none
have worked.
08 FF - Right shift by 8 bits and AND with FF.
02 - 2 variations
(00 00) (00 00) - Use cargo-ID 00 if common cargo = passengers.
(01 00) (02 02) - Use cargo-ID 01 if common cargo = mail.
(02 00) - Default cargo ID.
I've given up working out why it isn't working. The engine ends up with
cargo-ID 00 no matter what cargo is behind it....
Any help? Am I trying to do something which is impossible?
Ronnie
--
Volunteer guard on the Great Central Railway, Loughborough, Leicestershire
Visit the world's only double track preserved steam railway!
http://www.gcrailway.co.uk