It gives me an error about DPLAY.dll not existing, so I can only guess.
I believe Oskar may know more than me about this though.

~ Lakie
Moderator: TTDPatch Moderators
Code: Select all
508 * 14 02 00 00 81 01 00 FF 01 02 80 00 33 01 80
509 * 14 02 00 F8 81 40 08 FF 01 00 00 00 00 00 80
...
3388 * 9 02 00 00 01 01 00 00 01 00
3389 * 9 02 00 01 01 01 02 00 03 00
3390 * 15 02 00 AB 81 7E F8 00 FF 01 01 00 01 01 00 00
There are only two problems with that:CPCNMAN007 wrote:Hi, I full have problem with the TTDXC
The .grf is too big, but here is a cut down version, containing 1 engine with 4 calls to the same procedure, but a different procedure than above, all triggering an invalid sprite message.Patchman wrote:May be a bug in the procedure call code, probably the error message is wrong. Please send me the grf file for debugging.
After loading a game, and after clicking the "Apply" button in the GRF status window.OzTransLtd wrote:First, I'd like to know, when exactly is CB36 for property 09 (train speed) called ? I know, it is called whenever a vehicle is attached or removed to/from a train and when the train leaves the depot. What are the other occasions ?
It is not possible to determine whether the top speed comes from the callback, from a change in the grf, or something else, so after loading a game and resetting the graphics, the callback has to be called to check this. It must not fail outside of the depot.[...] For all other occasions, I let CB36 fail. But failing CB36, results in the original speed (action-0 prop-09) to be applied again; I would like that the current speed (which has already been set) be retained when CB36 fails.
This might be a bug. It is possible that the variables are not initialized correctly when the loco is bought, and only when a wagon is attached. I'll probably need a grf exhibiting the problem to test this though.Further to that, when in callback 36 incorrect train/vehicle information is retrieved. When constructing the very first train (#1), there are no problems, everything works as expected.
Well, it's called in the buy window, leaving the depot, applying new grf settings and when a train leaves a station. (Also when loading a saved game).OzTransLtd wrote:First, I'd like to know, when exactly is CB36 for property 09 (train speed) called ? I know, it is called whenever a vehicle is attached or removed to/from a train and when the train leaves the depot. What are the other occasions ?
Why do you make it fail, it's called like all other callbacks to get a new value, if it fails it uses the default value for the train. (Which was how it was decided to work).OzTransLtd wrote:With a rather complex speed determination, it would be prefereable to limit the number of times the speed is determined. I only want to set the speed when the train is constructed or altered; i.e. the train is stopped in a depot. For all other occasions, I let CB36 fail. But failing CB36, results in the original speed (action-0 prop-09) to be applied again; I would like that the current speed (which has already been set) be retained when CB36 fails. I could return a speed of 32767 (FFFFh) to indicate to do nothing or the callback could simply do nothing when it fails.
I'm not sure why that happens, possibly a bug.OzTransLtd wrote:Further to that, when in callback 36 incorrect train/vehicle information is retrieved. When constructing the very first train (#1), there are no problems, everything works as expected.
This should be fixed in the next nightly/beta. I haven't been able to reproduce it because I don't have your grf file, but the problem apparently was that the speed is computed before these variables are initialized. However, I'm not sure how var.60 could misbehave, so if that still doesn't work I'll need a test grf that exhibits the problem.OzTransLtd wrote:But whenever further trains are constructed, vehicle variable 42 (tt of 42) and/or 60 (vehicle count) [the ones I use] return information from train #1 or some other source.
As long as it is only called in the depot, leaving the depot, loading a saved game and applying the .grf (the latter 2, I didn't think of) then I have no problems with that and I can live with leaving a station as well.... CB 36 for prop 09 (train speed) is called when ...
The rationale was, not to go through the speed determination, unless the train was stopped (manually), which it is when it is in the depot and being constructed or altered. I have no problems to remove the 'is it stopped' check and return a callback result at all times; this I have done now.Patchman wrote: ... I don't understand why you make the callback fail at all ...
That's ok. I'm not sure myself, whether it was just 42 or 60 as well. I'll check it again, when beta 9 is out. I'm also going to recode it. If I have further problems, I'll let you know.Patchman wrote:This should be fixed in the next nightly/beta. I haven't been able to reproduce it because I don't have your grf file, but the problem apparently was that the speed is computed before these variables are initialized. However, I'm not sure how var.60 could misbehave, so if that still doesn't work I'll need a test grf that exhibits the problem.OzTransLtd wrote:But whenever further trains are constructed, vehicle variable 42 (tt of 42) and/or 60 (vehicle count) [the ones I use] return information from train #1 or some other source.
Users browsing this forum: No registered users and 11 guests