How are extended IDs handled in varAction2s, e.g. in var60/61? Obviously, the documentation is outdated/incomplete, for 60+x it still says "the variable number must be followed by a byte, which will be given to the variable handler as parameter". For var61, the 60+x parameter is passed to register 0x10e w/o mentioning the format.
Should extended ID parameters given by a word or an extended byte in these cases?
regards
Michael
handling extended IDs
Moderator: Graphics Moderators
-
- Tycoon
- Posts: 5954
- Joined: 27 Apr 2005 07:09
- Contact:
Re: handling extended IDs
The documentation is exactly right with saying a byte has to follow. To use vehicle IDs over 255 you have to make a detour either via var 7B (works everywhere) or var 61 (can not be used everywhere). Both the accumulator and register 10E are handled with the full width, so you can just store the ID directly as a plain word/dword. Obviously somebody™ didn't remember to change that to an extended byte for GRF version 8, so that's how it is for the time being.
-- Michael Lutz
-- Michael Lutz
-
- Tycoon
- Posts: 5954
- Joined: 27 Apr 2005 07:09
- Contact:
Re: handling extended IDs
Thanks for your answer. Well, that´s a bit .. involved. OTOH, I always wondered for what 7B could be useful, but now I know.Michi_cc wrote: To use vehicle IDs over 255 you have to make a detour either via var 7B (works everywhere) or var 61 (can not be used everywhere).

Yeah, maybe for version 9 ...Michi_cc wrote: Both the accumulator and register 10E are handled with the full width, so you can just store the ID directly as a plain word/dword. Obviously somebody™ didn't remember to change that to an extended byte for GRF version 8, so that's how it is for the time being.
regards
Michael
Who is online
Users browsing this forum: No registered users and 15 guests