standard houses documentation

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

standard houses documentation

Post by Wahazar »

I'm trying to make town building newgrf and I'm completly lost while looking at 'vanilla' houses parameters and sprites.
Apparently src/table/sprites.h and town_land.h doesn't match sprites defined in OpenGFX - there are more buildings in game than defined in openttd source.
Where they are defined and where I can find some documentation?
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: standard houses documentation

Post by Eddi »

Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: standard houses documentation

Post by Wahazar »

Thanks Eddi, it helped me a lot (but I'm still curious where all sprite numbers are defined, while table/sprites.h is not complete).

I'm also not sure about town zones defined in source, nfo and nml.
Here https://newgrf-specs.tt-wiki.net/wiki/TownZones
are zones 0 ... 4
Here https://newgrf-specs.tt-wiki.net/wiki/N ... town_zones
are zones TOWNZONE_EDGE ... TOWNZONE_CENTRE
And in table/town_land.h are zones HZ_ZON1 ... HZ_ZON5

If I understand correctly,
0 == TOWNZONE_EDGE == HZ_ZON1
4 == TOWNZONE_CENTRE == HZ_ZON5
?
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: standard houses documentation

Post by Wahazar »

McZapkie wrote: 02 Jun 2021 09:49 (but I'm still curious where all sprite numbers are defined, while table/sprites.h is not complete).
Well, I understand now. All sprites are defined in table/town_land.h, but some sprite names are predefined in table/sprites.h while others are not. Just source code is bit messy.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: standard houses documentation

Post by Eddi »

sprites.h usually doesn't name each sprite. but only the first sprite in a group, which is then used as "beginning + index" in the code that uses those sprites.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Bing [Bot], JohnFranklin523 and 14 guests