It is currently 28 Apr 2025, 18:17

WELCOME TO SIMUSCAPE!


Please Sign in or Register to enable all features, remove restrictions and gain additional access!
For information on how to bypass the CAPTCHA or to contact Team Simuscape, Continue Here!


Post a new topicPost a reply Page 1 of 1   [ 5 posts ]
Author Message
PostPosted: 12 Feb 2013, 21:26 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
A bit of a clipping problem with the signs and it happens in both OTTD and TTDP...

Attachment:
signClip.png
signClip.png [ 12.19 KiB | Viewed 5521 times ]


It only happens with the signs on the slopes.
I think it might be with the bounding boxes, but I really don't know ... HELP!!! :help:

There are two Action2s that one can use for sprite definition:

Basic format for tiles with a single building sprite
<Sprite-number> * <Length> 0F <set-id> 00 <groundsprite> <buildingsprite> <xoffset> <yoffset> <xextent> <yextent> <zextent>

which I use for signs on a flat tile

and

Extended format using multiple combined sprites
// <Sprite-number> * <Length> 0F <set-id> <num-sprites> <groundsprite> [<buildingsprite> (<xoffset> <yoffset> <zoffset> <xextent> <yextent> <zextent>) | (<xpixeloffset> <ypixeloffset> 80)] ...

which I use for signs on sloped tiles.

Here is the code:

Code:
// Action 1 Define a set of real sprites
    9 * 4    01 0F 06 01
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
// - signs ----------------------------------------------------------------------------------
   10 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 16 16 09 47 64 -31 -16 // sign 1 3981 8D 0F
   11 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 96 16 09 47 64 -31 -16 // sign 2
// - signs on slope -------------------------------------------------------------------------
   12 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 16 16 09 47 64 -0 -24 // sign 1
   13 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 96 16 09 47 64 -0 -16 // sign 2
// - posts ----------------------------------------------------------------------------------
   14 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 176 16 09 23 64 -31 -0 // 03 - WS 3984 90 0F
   15 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 256 16 09 39 64 -31 -8 // 0C - NE 3993 99 0F
// Action 2 ---------------------------------------------------------------------------------
   16 * 17    02 0F 00  00
     8D 0F 00 00
     00 80 00 80
     00 00
     0F 0F E5
   17 * 17    02 0F 01  00
     8D 0F 00 00
     01 80 00 80
     00 00
     0F 0F E5
// -------------------------------------------------------------------------------------------
   18 * 25    02 0F 02 // 03
     02         // <num-sprites>
     90 0F 00 00   // <groundsprite>
     04 80 00 80   // [<buildingsprite>{post}
     00 00 00   // (<xoffset> <yoffset> <zoffset>
     0F 0F 0F   // <xextent> <yextent> <zextent>)
     02 80 00 80   // [<buildingsprite>{sign}
     00 00      // (<xpixeloffset> <ypixeloffset>
     80         // 80)] ...

   19 * 25    02 0F 03 // 0C
     02
     99 0F 00 00
     05 80 00 80
     00 00 00
     0F 0F 0F
     03 80 00 80
     00 00
     80

Does anybody have any insight into this?

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 13 Feb 2013, 01:38 
Player
Player

Joined: 12 Mar 2012, 02:39
Posts: 469
You need to give it size .. specify <xextent> <yextent> <zextent> ... your sign should be at least 8, maybe even 16 (0x10) high.


Top
 Offline Profile  
 
PostPosted: 13 Feb 2013, 09:28 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
OzTrans wrote:
You need to give it size .. specify <xextent> <yextent> <zextent> ... your sign should be at least 8, maybe even 16 (0x10) high.
Thank you. This put me on the proper track.

<xextent> <yextent> <zextent> had been specified, but my <zextent> value was incorrect.
Also, as you noted I needed to increase the size of the sprite. Positioning the sign in it's intended position over the post on the slope gave me the required overall sprite size.

Code:
// - signs on slope -------------------------------------------------------------------------
   12 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 16 80 09 47 64 -0 -0 // sign 1
   13 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 96 80 09 47 64 -0 -0 // sign 2
// - posts ----------------------------------------------------------------------------------
   14 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 176 80 09 47 64 -31 -24 // 03 - WS 3984 90 0F
   15 C:\mps\_tools\grfcodec\sprites\5_INFRA\02Signs\INFRASigns.pcx 256 80 09 55 64 -31 -24 // 0C - NE 3993 99 0F
// Action 2 ---------------------------------------------------------------------------------
   18 * 25    02 0F 02 // 03
     02         // <num-sprites>
     90 0F 00 00   // <groundsprite>
     04 80 00 80   // [<buildingsprite>{post}
     00 00 00   // (<xoffset> <yoffset> <zoffset>
     0F 0F 18   // <xextent> <yextent> <zextent>)
     02 80 00 80   // [<buildingsprite>{sign}
     00 00      // (<xpixeloffset> <ypixeloffset>
     80         // 80)] ...

   19 * 25    02 0F 03 // 0C
     02
     99 0F 00 00
     05 80 00 80
     00 00 00
     0F 0F 18
     03 80 00 80
     00 00
     80

Attachment:
INFRASigns.png
INFRASigns.png [ 2.18 KiB | Viewed 5509 times ]


This worked. Thank you.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 13 Feb 2013, 10:38 
Artists Guild Team

Joined: 02 Mar 2012, 12:10
Posts: 75
Why are you doing something like this still in plain nfo? :mrgreen:

regards
Michael


Top
 Offline Profile  
 
PostPosted: 13 Feb 2013, 14:09 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
mb wrote:
Why are you doing something like this still in plain nfo? :mrgreen:

regards
Michael
I think it's a childhood thing. I have always had a need to (proverbially) dismantle the clock to see where the "tic-toc" comes from. The real challenge (and the fun part) is trying to put the "clock" together again. :mrgreen:

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 5 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Status SimuscapeTerms of UseAbout Simuscape

Design by SAC © 2012-2015, Sweden • Powered by phpBB • Based on twilightBB by Daniel St. Jules