[m4nfo] make long platforms; bounding box with negative x/y-position

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

Moderator: Graphics Moderators

Post Reply
User avatar
Erato
Director
Director
Posts: 525
Joined: 25 May 2015 09:09
Location: The Netherlands

[m4nfo] make long platforms; bounding box with negative x/y-position

Post by Erato »

Hey, I want to make long platforms that go up, much like what Garry did in Auzstations:
Image
So I reckoned I could just paste two sprites next to eachother, and give one an offset of -16, like so:

Code: Select all

layout(0x04, //IDs for sprites and tiles might not represent nfo IDs
	tile(
	  ground(1012)
	  regular(0, xyz(-16,11,0),dxdydz(16,5,7))
	  regular(0, xyz(0,11,0),dxdydz(16,5,7))
	)
	tile(
	  ground(1011)
	  regular(1, xyz(11,-16,0),dxdydz(5,16,7))
	  regular(1, xyz(11,0,0),dxdydz(5,16,7))
	)
)
But the NFO this generates gets this error:

Code: Select all

//!!Apparent real sprite does not contain a file name.
//!!Invalid character: "-".
//    0 * 0	 00 04 01 01 c3 09 02
//f4 03 00 00
//		  -10 0b 00 10 05 07 2d 04 00 00
//		  00 0b 00 10 05 07 2d 04 00 00
//		  80
//		f3 03 00 00
//		  0b -10 00 05 10 07 2e 04 00 00
//		  0b 00 00 05 10 07 2e 04 00 00
//		  80
How can I make this work?
No pics no clicks. Seriously.
ImageImageImageImageImageImageImage
michael blunck
Tycoon
Tycoon
Posts: 5883
Joined: 27 Apr 2005 07:09
Contact:

Re: [m4nfo] make long platforms; bounding box with negative x/y-position

Post by michael blunck »

I don't think the game allows for negative offsets in station tile layouts:
nfo specs wrote: Note that the coordinates here are 3D coordinates with x running from top-right to bottom-left and y running from top-left to bottom-right, with the tile dimensions being 16x16 (and 8 for one height level). This means the x and y values should always be within 0-15 (decimal).
regards
Michael
Image
User avatar
Erato
Director
Director
Posts: 525
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: [m4nfo] make long platforms; bounding box with negative x/y-position

Post by Erato »

I figured it out. The values in xyz are signed integers.
Instead of -16 I should use 0xF0, which is the 2's complement of 16.

Image
No pics no clicks. Seriously.
ImageImageImageImageImageImageImage
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests