Proposal: cb to specify industry layout to be used.

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Proposal: cb to specify industry layout to be used.

Post by andythenorth »

I have at least one valid case for specifying the layout to be used when trying to construct an industry.

I am guessing that this would be best done with a cb, called ahead of cb28 (and I assume, after cb22).

The layout number would be returned as a byte. A preferred alternative would be to return a list of layout numbers, and let the game choose which to use, but I can't think how that would be done.

Various variables would need to be available during the cb.
- var A7 (and maybe B3)
- it would be useful but not essential to be able to get to tile info, i.e. var 62
- maybe 61, 64, 65, 66, 67, 68
- using the same vars as cb 28 has available might be best, for ease.

I wondered if it was possible to extend cb28, something like return 05 xx where xx is the layout number required. I don't know if this is possible, or wise.

cheers,

Andy
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Proposal: cb to specify industry layout to be used.

Post by frosch »

CB 28 already gets the layout in var 86
Just forbid building certain layouts. The game will try other ones.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
maquinista
Tycoon
Tycoon
Posts: 1829
Joined: 10 Jul 2006 00:43
Location: Spain

Re: Proposal: cb to specify industry layout to be used.

Post by maquinista »

It would be interesting to have this feature in the industry construction window.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 13 guests