Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Sep 02, 2010 6:19 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Crash when setting plane prop 13 to 00 00 00 00
PostPosted: Fri Feb 03, 2006 11:25 pm 
TTDPatch Developer
TTDPatch Developer
Offline

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10249
EDIT: Fixed subject. (Most of this post is no longer relevant.)

These action 0s are supposed to, among other things, set the refitability for the Zeppelins to "All passengers and mail":
Code:
    2 * 48    00 03 10 01 00 00 68 0A 02 10 03 0F 04 19 06 07 07 04 08 FF 09 00 0B 0D 0C 0A 0D 05 0E 23 0F 3C 00 11 0A 14 00 18 02 00 19 00 00 13 00 00 00 00
    3 * 48    00 03 10 01 01 00 D0 15 02 10 03 0F 04 19 06 07 07 05 08 FF 09 00 0B 10 0C 0A 0D 05 0E 30 0F 64 00 11 14 14 00 18 02 00 19 00 00 13 00 00 00 00
(Note that <num-info> is 10, but there are 12h props. This is intentional. Note also that prop 14 (callback flags) is 00. This guarantees that the callbacks (15 and 33) aren't causing strange things to happen.)

With the ECS loaded (except for the wood vector), they are both refittable to all but Mail, Tourists, ... I figure that prop 19 is messed up, and set it (increment <num-info> above) That does absolutely nothing, so I set prop 13 (increment <num-info> again). And Kaboom! TTDPatch crashes as soon as I attempt to display the aircraft purchase list. (logs and crashing version of grf attached.)

Basically the same thing happens without the ECS. The refitability is different, but still wrong, and the crash still happens.

In addition, this:
Code:
    7 * 4     01 03 01 02
//rotor sprites
   10 * 9     02 03 05 01 01 00 00 00 00

   11 * 4     01 03 01 08
//body sprites
   20 * 9     02 03 00 01 01 00 00 00 00

   21 * 4     01 03 01 01
//purchase list sprite
   23 * 9     02 03 01 01 01 00 00 00 00

   24 * 14    02 03 02 81 10 00 FF 01 49 80 01 01 00 00 // Callback 33
   25 * 14    02 03 03 81 47 00 FF 01 11 80 01 01 00 00 // Callback 15 (Cargo 01 is Tourists, due to the translation table)
   26 * 18    02 03 04 81 0C 00 FF 02 02 00 33 33 03 00 15 15 00 00
   27 * 10    03 03 01 00 01 FF 01 00 04 00
   28 * 7     03 03 81 00 00 05 00

manages to use a body sprite (the small one in the purchase list, the large ones elsewhere) as the rotor, instead of the rotor sprites.
But only for the Graf. The Hindenburg, which uses nearly identical code, gets the Coleman Count's body with a default rotor attached. (See screenshot.)
459's Planeset behaves correctly, but none of my changes (sound callback, refit-capacity callback, change refittability to cargo-class based) seem like they ought to be causing this.

In all cases, TTDPatch is started with the attached configs (the ECS grfs are currently hashed out of newgrfw.cfg, though), and "-XY 1940".

The exception is C0000005 at 001B:00618D1A (a72pre4), or at 001B:00618CD6 (a71)


Attachments:
rotors.png
rotors.png [ 6.45 KiB | Viewed 401 times ]
cfgs&grf.rar [14.52 KiB]
Downloaded 30 times
cfgs&grf.rar [14.52 KiB]
Downloaded 24 times

_________________
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
TTDPatch NFO coding consultant. (Private messages on this topic will be ignored. Ask in public only.)


Last edited by DaleStan on Tue Feb 07, 2006 7:29 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 7:21 pm 
TTDPatch Developer
TTDPatch Developer
Offline

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10249
DaleStan wrote:
These action 0s are supposed to, among other things, set the refitability for the Zeppelins to "All passengers and mail":
Code:
    2 * 48    00 03 10 01 00 ... 18 02 00 ...
    3 * 48    00 03 10 01 01 ... 18 02 00 ...

It'd figure I'd do something stupid like that. I meant 18 03 00 in both cases.

Further investigation reveals that props 13, 18, and 19 behave correctly, as long as at least one bit is set in prop 13. This bit does not have to map to a cargo[0], but it does have to be set.

Grr... And the broken graphics are caused by having
Code:
   -1 * 0       03 03 01>00<01 FF 01 00 04 00
   -1 * 0       03 03 81 01 00 05 00
for the "Hindenburg's" (ID 01) action 3.

Pardon me, I have a big foam cluebat to apply about now.

[0] Whether this is because the cargo translation table does not have sufficient entries to give that bit a meaning, or whether that entry in the translation table is not a known cargo does not matter; both cases work.

_________________
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
TTDPatch NFO coding consultant. (Private messages on this topic will be ignored. Ask in public only.)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 8:07 pm 
Moderator
Moderator
User avatar
Offline

Joined: Wed Oct 02, 2002 6:57 pm
Posts: 5552
Location: Ithaca, New York
I guess I may in one place be checking whether prop 13 is zero to determine refittability, when I should check the result of considering 13, 18 and 19. Will have to investigate...

_________________
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
PT Cruiser | Reference 2007 | Cheap Home Insurance | Cheap Home Insurance | Payday Loans
Powered by phpBB © 2000-2009 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2010.
Hosted by Zernebok.