Callback bit Setting

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

Post Reply
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Callback bit Setting

Post by wallyweb »

In http://wiki.ttdpatch.net/tiki-index.php ... lbacks_1E_
and similarly http://wiki.ttdpatch.net/tiki-index.php ... lbacks_17_
wiki wrote:Bit is the bit you have to set, you do this by adding all the values for all the bits.

Bit / Value / Variable 0C value / Callback
0 1 10 Powered wagons and visual effect
1 2 11 Wagon length
2 4 12 Load amount
3 8 15 Set refitted capacity
4 10 16 Build articulated engines
5 20 19 show a suffix after the cargo type name
6 40 2D Select color mapping for vehicle
7 80 33 Sound effect callbacks
Adding 2 (Wagon length) + 8 (Set refitted capacity) + 10 (Build articulated engines) = 20
but 20 is the bit value for "show a suffix after the cargo type name".
Are the posted bit values incorrect or does the Patch have some way of knowing what I want?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Callback bit Setting

Post by DaleStan »

2+8+10 = 1A

Think in hex and everything will make sense. Or possibly completely stop making sense.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Callback bit Setting

Post by wallyweb »

DaleStan wrote:2+8+10 = 1A

Think in hex and everything will make sense. Or possibly completely stop making sense.
Actually, I figured it out just before your reply landed on my desk. :wink: so now everything makes perfectly good sense, although a note somewhere in the wiki for us novice coders might save some desks from severe headbanging damage.
Thanks for the reply.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Callback bit Setting

Post by PikkaBird »

Taking on grf coding, wally?
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Callback bit Setting

Post by wallyweb »

PikkaBird wrote:Taking on grf coding, wally?
Actually, I think it has taken on me. :wink:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Callback bit Setting

Post by DaleStan »

wallyweb wrote:a note somewhere in the wiki for us novice coders might save some desks from severe headbanging damage.
Go for it. You have a far better idea what would have gotten you to think hex from the start than I have.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Callback bit Setting

Post by wallyweb »

DaleStan wrote:Go for it. You have a far better idea what would have gotten you to think hex from the start than I have.
EEK! I'm caught somewhere between "I thought you'd never ask" and "I was afraid you'd ask".
Fair enough. I'll chalk the experience up to the learning process.
Before I do this, are you aware of any bit-masks in NewGraphicSpecs that are summed in DEC rather than HEX and if so, which ones(s)?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Callback bit Setting

Post by DaleStan »

I'm not aware of any that are in decimal. (If it mentions 10, 20, 40, and/or 80, it's hex. If it mentions 16, 32, 64, and/or 128, it's decimal. If it mentions some from group A and some from group B, it's broken.)

And if I found one in decimal, I'd promptly edit it into hex.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Callback bit Setting

Post by PikkaBird »

Bitmasks make no sense in decimal.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Callback bit Setting

Post by wallyweb »

Ok ... I have done my damag... erm ... duty, in the Preliminaries section which looked most appropriate as it already had a section on HEX.
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 15 guests