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

Sprite is drawn partly - please implement action D vars 93 to 96 #2079

Closed
DorpsGek opened this issue Jun 14, 2008 · 8 comments
Closed

Sprite is drawn partly - please implement action D vars 93 to 96 #2079

DorpsGek opened this issue Jun 14, 2008 · 8 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

George opened the ticket and wrote:

R13485M

Sometimes a bounding box (and a sprite itself too) of a house sprite, that is not located on one tile, is drawn partly.

Attachments

Reported version: trunk
Operating system: All


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

frosch wrote:

Are you using child sprites? Child sprites are not allowed to extent over the parent sprite. (Independent of any bounding boxes)
I.e. Childsprites are drawn if and only if the parent sprite is drawn. The parent sprite is drawn if its pixels (no matter if transparent or not) overlap with the area that is requested to be redrawn.

If that is the case you have to extent the parent sprite with transparent pixels, so all childsprites are inside of it.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2079#comment4294

@DorpsGek
Copy link
Member Author

George wrote:

No. I use a sprite with its' own bounding box.

I know a problem with child sprites. It is not this case here.

// 2x1
491 * 58 02 07 E0 05
3D 05 00 00
00 80 00 80 00 00 00 10 01 06
01 80 00 80 10 00 00 01 10 06
08 80 0D 83 00 07 00 01 01 04
08 80 0B 83 03 07 00 01 01 04
2F 0C 00 00 0C 04 00 03 07 08
492 * 98 02 07 E1 09
3E 05 00 00
00 80 00 80 00 00 00 10 01 06
01 80 00 80 00 00 00 01 10 06
04 80 0B 83 01 0A 00 02 06 04
04 80 0D 83 01 03 00 02 06 04
12 80 00 80 03 01 00 06 03 07
(*) 16 80 00 80 0A 01 00 10 03 0B
08 80 0F 83 0D 07 00 01 01 04
06 00 00 80 03 0F 00 02 01 0F
1A 00 00 80 0D 0D 00 06 03 05

as you can see for (*), it is one tile long, but located in the middle of the tile, that makes it to cover two tiles.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2079#comment4295

@DorpsGek
Copy link
Member Author

frosch wrote:

Ok, I took a second look at the pictures. As you can see the sprite is clipped at about the left corner of the ground sprite.

So this is basically a feature request to implement action D vars 0x93 to 0x96, though I don't know anyone, who is planning to implement it.

For now you will have to split the sprite up and use two bounding boxes, or (as the sprite does not seem to extent over the right corner of the other tile) move the sprite into the spritelayout of the other tile.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2079#comment4305

@DorpsGek
Copy link
Member Author

George wrote:

D vars 0x93 to 0x96,

aren't they 32 by default?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2079#comment4306

@DorpsGek
Copy link
Member Author

frosch wrote:

IIRC the width of a tile is about 64. I.e. from the north corner to the left border 32... So, yes, 32 seems to be the default.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2079#comment4307

@DorpsGek
Copy link
Member Author

George wrote:

Does that mean that they exist, but can't be changed?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2079#comment4309

@DorpsGek
Copy link
Member Author

frosch wrote:

No, I just guessed where the 32 comes from, and made the assumption that default TTDP behaviour matches OTTD behaviour


This comment was imported from FlySpray: https://bugs.openttd.org/task/2079#comment4312

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Flyspray clean up: much more than 5 years old, and not obvious what should be done with this next, so closing. If this offends, discuss with andythenorth in irc. Thanks.


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

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs enhancement labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant