The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Dwachs on April 27, 2010, 07:22:58 pm

Title: patch: allow snow images for sidewalks
Post by: Dwachs on April 27, 2010, 07:22:58 pm
Attached a simple but effective patch that allows for snowy sidewalk graphics. No new makeobj needed.

Edit: Deleted a lot of text and added:

Documentation of the incorporated feature at the wiki:
http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_MiscDef#Sidewalk
Title: Re: patch: allow snow images for sidewalks
Post by: jamespetts on April 27, 2010, 10:31:34 pm
Excellent! Now all that we need is an animation routine for the little pedestrians slipping and falling over...
Title: Re: patch: allow snow images for sidewalks
Post by: The Hood on April 28, 2010, 07:42:43 am
Good work!  I've been wanting this for a while.  Hope it gets into trunk.
Title: Re: patch: allow snow images for sidewalks
Post by: Dwachs on April 28, 2010, 08:26:47 am
I am tempted to move this topic to 'Considered patches' or even 'Incorporated patches' :D

Are there any opinions about the indexing? The trunk version uses indices 0,3,6,9,12 - these wont change. I implemented to use the old indices+16 for snow images (eg 16,19,22,25). Are there any worries to implement the snow images at+1 (ie 1,4,7,10) ?

What about transition images? Are they necessary?
Title: Re: patch: allow snow images for sidewalks
Post by: prissi on April 28, 2010, 09:51:42 am
I would leike to use rather "image[flat]", "image[NE]", and so on, if one really touches this. Or using
Code: [Select]
[0][0]
as an alternative to
Code: [Select]
[16]
to have more consistency. (It can be put into the same position by makeobj anyway.)

And being greedy, I think it should be also allowed for empty images; then the city road can have all the snow and the sidewalk.
Title: Re: patch: allow snow images for sidewalks
Post by: Fabio on April 28, 2010, 10:45:18 am
Great! I was waiting for this for ages!

Any chance to have also, say, a timeline?
Title: Re: patch: allow snow images for sidewalks
Post by: prissi on April 28, 2010, 08:57:38 pm
A timeline could be easily done by using different graphics for the actual city roads.
Title: Re: patch: allow snow images for sidewalks
Post by: gauthier on April 28, 2010, 09:44:10 pm
Quote
Now all that we need is an animation routine for the little pedestrians slipping and falling over...

I support ;)
Title: Re: patch: allow snow images for sidewalks
Post by: prissi on April 30, 2010, 12:36:53 pm
I am sorry, since the catergory of those images is misc, we have indeed go with the [16+X] definitions ... THus I am think this is ready for inclusion. (Or one would have to have a new ground obj with the name "sidewalk" ...
Title: Re: patch: allow snow images for sidewalks
Post by: Dwachs on May 01, 2010, 07:29:31 am
anyone against changing the index to X+1 (instead of X+16) as above? then the dat files will be more compact.
Title: Re: patch: allow snow images for sidewalks
Post by: prissi on May 01, 2010, 07:22:52 pm
YOu introduced this, so go ahead ...
Title: Re: patch: allow snow images for sidewalks
Post by: Dwachs on May 02, 2010, 01:13:14 pm
Implemented in revision 3194.

Snow images are at X+1, transitions images at X+2 (for sloped tiles, snow at top, no snow at bottom).
Title: Re: patch: allow snow images for sidewalks
Post by: The Hood on May 03, 2010, 04:22:44 pm
Question about transition images on sloped tiles - is it currently possible for way graphics to have a similar switch from snow at top to snow at bottom?
Title: Re: patch: allow snow images for sidewalks
Post by: Fabio on May 04, 2010, 08:02:13 am
then the dat files will be more compact.

Would it be possible to have all omissed entries in a dat file to be considered as "-" by makeobj?

e.g. this dat file:
Code: [Select]
Obj=misc
Name=Sidewalk
Image[0]=ls-tiles.0.4
Image[3]=ls-tiles.0.2
Image[6]=ls-tiles.0.3
Image[9]=ls-tiles.0.1
Image[12]=ls-tiles.0.0
Image[16]=ls-tiles-2.0.4
Image[19]=ls-tiles-2.0.2
Image[22]=ls-tiles-2.0.3
Image[25]=ls-tiles-2.0.1
Image[28]=ls-tiles-2.0.0

being the same as this one:
Code: [Select]
Obj=misc
Name=Sidewalk
Image[0]=ls-tiles.0.4
Image[1]=-
Image[2]=-
Image[3]=ls-tiles.0.2
Image[4]=-
Image[5]=-
Image[6]=ls-tiles.0.3
Image[7]=-
Image[8]=-
Image[9]=ls-tiles.0.1
Image[10]=-
Image[11]=-
Image[12]=ls-tiles.0.0
Image[13]=-
Image[14]=-
Image[15]=-
Image[16]=ls-tiles-2.0.4
Image[17]=-
Image[18]=-
Image[19]=ls-tiles-2.0.2
Image[20]=-
Image[21]=-
Image[22]=ls-tiles-2.0.3
Image[23]=-
Image[24]=-
Image[25]=ls-tiles-2.0.1
Image[26]=-
Image[27]=-
Image[28]=ls-tiles-2.0.0
Title: Re: patch: allow snow images for sidewalks
Post by: Dwachs on May 04, 2010, 08:34:55 am
Quote
Would it be possible to have all omissed entries in a dat file to be considered as "-" by makeobj?
Possible maybe, but the part of makeobj that compiles these sidewalk-graphics does not know about the maximal number of entries. Thus it stops as soon as an image-index is missing (and ****uming no more will follow).

However, the incorporated patch uses different indices than the opening post! See here:

http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_MiscDef#Sidewalk

Title: Re: patch: allow snow images for sidewalks
Post by: Fabio on May 04, 2010, 10:03:04 am
It was just a general note, i've seen something changed :)

Still going general, what if Image[0] is not the firts Image entry but, say, Image[28], makeobj goes down from 28 to 0? Does it make sense? Just curious...
Title: Re: patch: allow snow images for sidewalks
Post by: Dwachs on May 04, 2010, 10:12:29 am
Still going general, what if Image[0] is not the firts Image entry but, say, Image[28], makeobj goes down from 28 to 0? Does it make sense? Just curious...
... would have to be implmented. I do not know how hard that would be, eventually.
Title: Re: patch: allow snow images for sidewalks
Post by: Fabio on May 05, 2010, 10:29:37 am
I don't know if it fits here, but could you use the indexes 16+ to define the "sidewalk" images shown in underground mode?

thanks!
Title: Re: patch: allow snow images for sidewalks
Post by: Dwachs on May 15, 2010, 10:03:31 am
New misc-object implemented: TunnelTexture. Now guess, where it is used :)
Title: Re: patch: allow snow images for sidewalks
Post by: gauthier on May 15, 2010, 02:49:38 pm
on bridges  :-[
Title: Re: patch: allow snow images for sidewalks
Post by: Fabio on May 19, 2010, 03:06:52 pm
New misc-object implemented: TunnelTexture. Now guess, where it is used :)

Wow, i'm looking forward to seeing this incorporated ;D
Title: Re: patch: allow snow images for sidewalks
Post by: Dwachs on May 19, 2010, 04:02:33 pm
It is implemented. 'Only' graphics/paks are missing ;)
Title: Re: patch: allow snow images for sidewalks
Post by: The Hood on May 19, 2010, 04:21:05 pm
What is a TunnelTexture, and how is it used?
Title: Re: patch: allow snow images for sidewalks
Post by: jonasbb on May 19, 2010, 04:34:28 pm
http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_MiscDef#Tunnelground
Look in the wiki. There is already an entry for this.