Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Sep 24, 2018 4:31 pm

All times are UTC




Post new topic  Reply to topic  [ 32 posts ]  Go to page Previous 1 2
Author Message
PostPosted: Wed Jul 11, 2018 7:43 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5327
Location: Canada
Quast65 wrote:
Code:
When using OpenGFX-extra version XX.XX and newer, Action-1-2-3 is needed to change Canal-graphics and not Action-5.
Except for the Lock-Icon, for that you still need to use Action-5 (type 88, offset 40).
Are you sure? Using types 08/88 Action5 should be good for the top group of 65 canal graphics (sprite numbers 276 through 241).

Type 8 addresses all 65 sprites at once. Type 88 allows the coder to address sprites beginning at a specific sprite by referencing the offset for that sprite. In hexadecimal the offsets for canals start with 0x00 for sprite 276 and end with 0x40 for sprite 241.

Perhaps your note suggestion should be:
Code:
The Action 0-1-2-3 scheme can be used instead of Action5 and might be the preferable method considering that the river sprites and supplemental canal sprites are not included in the Action5 range of 65 sprites.


Your closing question might be better stated:
Has the Action 5 range of 65 canal sprites been extended since it was originally set?

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
PostPosted: Wed Jul 11, 2018 10:23 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1601
Location: The Netherlands
wallyweb wrote:
Are you sure?

The following may sound rude or harsh, but please know that I dont mean it that way, I mean it in the kindest and friendliest way, but I just dont know how else to write it down...

Try it out yourself.

Check that you use the most recent version of OGFX for the base-sprites of your game.
Then code a simple Action-5 GRF and try to change one of the 65 graphics (except the lock-icon) of the canals with type 88 and an offset.
See if anything changes, it probably wont.
Then set the offset to 40 and you will see that the lock-icon is the only one of the 65 graphics that you can change using Action-5.

I really really hope that you prove me wrong...

I think that from the moment that a version of OGFX basegraphics came out with the new canal and rivergraphics added, that from that moment on Action-5 cannot be used anymore to change those graphics (except for the lock-icon).
Maybe, just maybe, it still can. If so, I would really like to know how.

_________________
Projects: viewtopic.php?f=26&t=57266
Screenshots: viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.


Top
   
PostPosted: Thu Jul 12, 2018 1:52 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5327
Location: Canada
You were not at all harsh. :D

Quast65 wrote:
Try it out yourself.

Which version of OpenGFX are you using?

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
PostPosted: Thu Jul 12, 2018 2:39 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1601
Location: The Netherlands
Quote:
You were not at all harsh.

Pfew! 8)
Quote:
Which version of OpenGFX are you using?

0.5.2, but basically you can use any version of OGFX that provides river-sprites. Since those sprites are added I think the issue has risen...

_________________
Projects: viewtopic.php?f=26&t=57266
Screenshots: viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.


Top
   
PostPosted: Thu Jul 12, 2018 12:39 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5327
Location: Canada
Quast65 wrote:
And also with this one, only the icon of the locks was changed.


Ok ... I think I've got this figured out:

- Action5 addresses the first 65 canal/river sprites of ogfxe_extra.grf
- The canal/river sprites are repeated in ogfxe_extra.grf. There are two sets of canal/river sprites.
- The second set of canal/river sprites are beyond the 65 sprite limit.
- The canal icon sprite is not repeated. It remains with the first set.
- ogfxe_extra.grf uses the second set.

Result:
You were able to change the canal icon because it is still used by ogfxe_extra.grf.
You did successfully modify the other sprites, but they are not used by ogfxe_extra.grf
This is why nforenum did not throw any errors.

Conclusion:
For ogfxe_extra.grf canal /river sprites, use the Canals Action0-1-2-3 scheme to modify them in the repeated set of sprites and pray that nobody alters ogfxe_extra.grf in future revisions.

Fix:
Increase the 65 sprite limit
or
add a note to the GRF Action5 specifications that the canal/river sprites modified by Action5 are not the ones used by ogfxe_extra.grf

Several days of headbanging were wasted causing many keyboards to be mangled all because this was not noted in the specifications.

DISCLAIMER: The above is pure speculation until confirmed by someone who is familiar with ogfxe_extra.grf development.

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
PostPosted: Thu Jul 12, 2018 1:25 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1601
Location: The Netherlands
Thank you for taking the time to also test this out! :bow:

wallyweb wrote:
Ok ... I think I've got this figured out:
*text*

I agree

wallyweb wrote:
Result:
*text*

Yes!

wallyweb wrote:
Conclusion:
For ogfxe_extra.grf canal /river sprites, use the Canals Action0-1-2-3 scheme to modify them in the repeated set of sprites and pray that nobody alters ogfxe_extra.grf in future revisions.

Yep! And indeed a confirmation by an ogfxe_extra.grf developer is needed to make sure that this is absolutely the case.

wallyweb wrote:
Fix:
Increase the 65 sprite limit

Not only that…
Action-5 needs to be modified also.
At the moment the max number of realsprites and the offset is FF (255)
But there are more than 255 sprites in the repeated set of sprites, so extra Bytes are needed, so a general Action-5 should be changed from this:
Code:
6 * 4    05 TT NN OO 

(TT = Type, NN = Number of realsprites, OO = Offset)
to:
Code:
6 * 4    05 TT NN NN OO OO 


wallyweb wrote:
or
add a note to the GRF Action5 specifications that the canal/river sprites modified by Action5 are not the ones used by ogfxe_extra.grf

Probably easier than fixing the 65 sprite limit of that Type and the Action-5 properties ;-)

wallyweb wrote:
Several days of headbanging were wasted causing many keyboards to be mangled all because this was not noted in the specifications.

When I look in the mirror, I can read QWERTY on my forehead :mrgreen:

wallyweb wrote:
DISCLAIMER: The above is pure speculation until confirmed by someone who is familiar with ogfxe_extra.grf development.

Yes, please! :bow:

_________________
Projects: viewtopic.php?f=26&t=57266
Screenshots: viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.


Top
   
PostPosted: Thu Jul 12, 2018 1:52 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5327
Location: Canada
Quast65 wrote:
When I look in the mirror, I can read QWERTY on my forehead :mrgreen:
That's better than 666 :twisted:

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
PostPosted: Thu Jul 12, 2018 2:47 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9036
Location: Sol d
It's quite a bit ago that I coded anything on the river part, so take the following with a grain of salt. IIRC: You necessarily need an action3 in order to distinguish between canal and river. In the absence of such distinction anywhere (base set, newgrfs), canals and rivers simply look the same. But honestly I don't recall why there's 65 sprites for that action5.

btw: If you write a NewGRF - and not a base set - better refer to what and how it is done in OpenGFX+ Landscape than looking at a base set.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Thu Jul 12, 2018 4:41 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5327
Location: Canada
planetmaker wrote:
It's quite a bit ago that I coded anything on the river part, so take the following with a grain of salt. IIRC: You necessarily need an action3 in order to distinguish between canal and river. In the absence of such distinction anywhere (base set, newgrfs), canals and rivers simply look the same.
:bow:
Quote:
But honestly I don't recall why there's 65 sprites for that action5.
It's a remnant of TTDPatch from before they dropped Action5 support for canals.

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
PostPosted: Thu Jul 12, 2018 4:49 pm 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5237
mb wrote:

Bis repetita non placent.

regards
Michael

_________________
Image


Top
   
PostPosted: Thu Jul 12, 2018 6:09 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Oct 09, 2011 1:51 pm
Posts: 1601
Location: The Netherlands
michael blunck wrote:
Bis repetita non placent.

True, but sometimes you need a second opinion to be sure, because multis viae Romam ducunt and you want to take the shortest one possible ;-)

Thnx guys for all your help and comments!! :bow:

_________________
Projects: viewtopic.php?f=26&t=57266
Screenshots: viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.


Top
   
PostPosted: Thu Jul 12, 2018 6:40 pm 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5237
Quast65 wrote:
multis viae Romam ducunt

Not in this case. :p

regards
Michael

_________________
Image


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 32 posts ]  Go to page Previous 1 2

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:  
Powered by phpBB © 2000-2018 phpBB Limited

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