Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmovables on correct ground sprites #1724

Closed
DorpsGek opened this issue Jan 29, 2008 · 7 comments
Closed

Unmovables on correct ground sprites #1724

DorpsGek opened this issue Jan 29, 2008 · 7 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Gonozal_VIII opened the ticket and wrote:

I didn't like the fact that player owned land has bare land drawn under it, so i looked for a way to solve that... as a byproduct all other unmovables are now drawn on the correct ground. also the transparency switch for signs hides the player owned land sings now

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1724
@DorpsGek
Copy link
Member Author

Gonozal_VIII wrote:

added some assertions to be on the safe side :-)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1724#comment3403

@DorpsGek
Copy link
Member Author

SmatZ wrote:

Will it work with unmovables on foundations?
Transmitters and lighthouses could be placed on foundation in the scenario editor before r12014. It wouldn't be nice to assert for old savegames.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1724#comment3404

@DorpsGek
Copy link
Member Author

Gonozal_VIII wrote:

good point smatz... removed assertions and put foundation code back

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1724#comment3405

@DorpsGek
Copy link
Member Author

Gonozal_VIII wrote:

i found the nice function GetTropicZone that helped a lot with simplifying the patch and now it works with half desert tiles too :-)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1724#comment3406

@DorpsGek
Copy link
Member Author

frosch wrote:

+ if (!IsTransparencySet(TO_SIGNS)) {
This is most likely not what you want to do. This hides the owner-land-sign completely, if the background of signs (station names etc) is set to transparent.

About the GetUnmovableGround(): This should be done like everywhere else (clear_ground, trees, etc). I.e. inside TileLoop and with a ground type and density in the map array (try to use the same bits as for clear_ground or trees). Your current approach causes glitches, when only parts of the unmovable are redrawn. Furthermore:
+ switch(GetTileZ(tile) + 8 - GetSnowLine()) {
+ case 0: return SPR_FLAT_1_QUART_SNOWY_TILE; break;
+ case 8: return SPR_FLAT_2_QUART_SNOWY_TILE; break;
+ case 16: return SPR_FLAT_3_QUART_SNOWY_TILE; break;
+ default: return SPR_FLAT_SNOWY_TILE; break;
+ }
Either do that the same way as for clear_ground / trees, or better: Add a function that can be used in all three cases (maybe there are more).


This comment was imported from FlySpray: https://bugs.openttd.org/task/1724#comment3407

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 5, 2008

Gonozal_VIII wrote:

updated and changed transparency to transparent instead of invisible... i can't do that map array changing stuff, that's too complicated for my knowledge.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1724#comment3461

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Won't implement

Use NewGRF objects for this.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1724

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant