Moderator: Graphics Moderators
The value is a bitstuffed word, containing:
Bits 0-3: effect offset: a 4 bit signed value with 0 being the center of the vehicle.
Bits 4-5: effect type: same as for trains, 0 = default, 1 = steam, 2 = diesel, 3 = spark. As there is no default for road vehicles, 0 actually means no effect.
Bit 6: unused, as effect type of 0 is disable.
Bit 7: unused, there is no powered wagons concept for road vehicles.
Bits 8-11: 4 bit unsigned height offset for effect, 0 is at road level, 10 is where the effect is placed for trains.
The value can be set using callback 36, however it is only set once on build. This could be changed if desired.
Unlike effects for trains, effect offset applies to all effect types. None of the changes here affect effects for trains.
(Though they are longer, the position offset should be enough, as effects far from center would look weird anyway when turning)
Wrt. the callback: It might be more useful when it is called on leaving the depot. So it can change after refitting.
Well you could use the bit for powered wagons, as there aren't even wagons for ships, let alone powered wagons. That would extend it to 5 bits.peter1138 wrote:Could be done for ships too, yes. The 4 bit height offset might need to be increased in that case...
EDIT: or you could extend off the other end. I think you have 4 spare bits that way. I missed that first time.
Embrace your destiny...
Unfortunately, a lot of modern vessels have their smoke stacks at the very end ...frosch wrote:Ships! Ships! Ships!
(Though they are longer, the position offset should be enough, as effects far from center would look weird anyway when turning) [...]
If this is implemented, I'll definitely stick support into HEQS for it! Zmoke belching bulldozers...peter1138 wrote:2 = diesel
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)
Road Hog (road vehicles, released)
To do this we should probably drop the train effect layout, like so:
Bits 0-1: effect type, same as above
Bits 2-7: unsigned 6 bit offset (0 to 63 game units, 32 is central)
Bits 8-12: unsigned 5 bit height offset (0 to 31 pixels)
EDIT: Effect offset for trains is not signed, it is 0 to 15 with 8 being the centre. I have modified the list to match.
Users browsing this forum: No registered users and 2 guests