Skip to main content
Topic: patch: allow snow images for sidewalks (Read 5191 times) previous topic - next topic

patch: allow snow images for sidewalks

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
Parsley, sage, rosemary, and maggikraut.

Re: patch: allow snow images for sidewalks

Reply #1
Excellent! Now all that we need is an animation routine for the little pedestrians slipping and falling over...
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: patch: allow snow images for sidewalks

Reply #2
Good work!  I've been wanting this for a while.  Hope it gets into trunk.

Re: patch: allow snow images for sidewalks

Reply #3
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?
Parsley, sage, rosemary, and maggikraut.

Re: patch: allow snow images for sidewalks

Reply #4
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.

Re: patch: allow snow images for sidewalks

Reply #5
Great! I was waiting for this for ages!

Any chance to have also, say, a timeline?

Re: patch: allow snow images for sidewalks

Reply #6
A timeline could be easily done by using different graphics for the actual city roads.


Re: patch: allow snow images for sidewalks

Reply #8
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" ...

Re: patch: allow snow images for sidewalks

Reply #9
anyone against changing the index to X+1 (instead of X+16) as above? then the dat files will be more compact.
Parsley, sage, rosemary, and maggikraut.

Re: patch: allow snow images for sidewalks

Reply #10
YOu introduced this, so go ahead ...

Re: patch: allow snow images for sidewalks

Reply #11
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).
Parsley, sage, rosemary, and maggikraut.

Re: patch: allow snow images for sidewalks

Reply #12
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?

Re: patch: allow snow images for sidewalks

Reply #13
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

Re: patch: allow snow images for sidewalks

Reply #14
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

Parsley, sage, rosemary, and maggikraut.

Re: patch: allow snow images for sidewalks

Reply #15
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...

Re: patch: allow snow images for sidewalks

Reply #16
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.
Parsley, sage, rosemary, and maggikraut.

 

Re: patch: allow snow images for sidewalks

Reply #17
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!

Re: patch: allow snow images for sidewalks

Reply #18
New misc-object implemented: TunnelTexture. Now guess, where it is used :)
Parsley, sage, rosemary, and maggikraut.



Re: patch: allow snow images for sidewalks

Reply #21
It is implemented. 'Only' graphics/paks are missing ;)
Parsley, sage, rosemary, and maggikraut.

Re: patch: allow snow images for sidewalks

Reply #22
What is a TunnelTexture, and how is it used?