[NFO] Slope Aware Objects, issue with steep slopes

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

Moderator: Graphics Moderators

Post Reply
User avatar
Quast65
Tycoon
Tycoon
Posts: 2665
Joined: 09 Oct 2011 13:51
Location: The Netherlands

[NFO] Slope Aware Objects, issue with steep slopes

Post by Quast65 »

Hi all!

I need some help with code for slope- and snow-aware objects...

Its been a while since I did this and for some reason its not working as I espected it to do...

When I use the following code (as a base using the code I used for my beachtiles that has slopeawareness but no snowawareness), all is fine EXCEPT for the 4 steep slopes.
Example888.png
Example888.png (36.8 KiB) Viewed 2035 times
[+] Spoiler

Code: Select all

 7453 * 35	 00 0F 09 01 88 08 "NLRM" 0A 88 D0 0B 0F 0C 11 0E 00 00 00 00 0F 00 00 00 00 10 2C 0C 15 10 00 17 02
 7454 * 4	 01 0F 13 01
 7455 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 20	 9920	64 31 -31   0 normal chunked // 00 VIEW 1 FLAT
 7456 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 100	 9920	64 31 -31   0 normal chunked // 01 VIEW 1 High corner W
 7457 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 180	 9920	64 23 -31   0 normal chunked // 02 VIEW 1 High corner S
 7458 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 260	 9920	64 24 -31  -1 normal chunked // 03 VIEW 1 High corners W-S
 7459 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 340	 9920	64 31 -31   0 normal chunked // 04 VIEW 1 High corner E
 7460 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 420	 9920	64 31 -31   0 normal chunked // 05 VIEW 1 High corners W-E
 7461 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 500	 9920	64 24 -31  -1 normal chunked // 06 VIEW 1 High corners S-E
 7462 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 580	 9920	64 23 -31   0 normal chunked // 07 VIEW 1 High corners W-S-E
 7463 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 660	 9920	64 39 -31  -8 normal chunked // 08 VIEW 1 High corner N
 7464 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 740	 9920	64 39 -31  -8 normal chunked // 09 VIEW 1 High corners W-N
 7465 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 820	 9920	64 31 -31  -8 normal chunked // 0A VIEW 1 High corners N-S
 7466 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 900	 9920	64 31 -31  -8 normal chunked // 0B VIEW 1 High corners W-N-S
 7467 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 980	 9920	64 39 -31  -8 normal chunked // 0C VIEW 1 High corners N-E
 7468 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1060 9920	64 39 -31  -8 normal chunked // 0D VIEW 1 High corners W-N-E
 7469 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1140 9920	64 31 -31  -8 normal chunked // 0E VIEW 1 High corners N-S-E
 7470 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1220 9920	64 47 -31 -16 normal chunked // 0F VIEW 1 High corners N-E-W steep
 7471 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1300 9920	64 15 -31   0 normal chunked // 10 VIEW 1 High corners S-E-W steep
 7472 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1380 9920	64 31 -31  -8 normal chunked // 11 VIEW 1 High corners E-N-S steep
 7473 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1460 9920	64 31 -31  -8 normal chunked // 12 VIEW 1 High corners W-N-S steep
 7474 * 17	 02 0F 00 00  8D 0F 00 00  00 80 00 80   00 00   0F 0F 08 // 00 grass
 7475 * 17	 02 0F 01 00  8E 0F 00 00  01 80 00 80   00 00   0F 0F 08 // 00 grass
 7476 * 17	 02 0F 02 00  8F 0F 00 00  02 80 00 80   00 00   0F 0F 08 // 00 grass
 7477 * 17	 02 0F 03 00  90 0F 00 00  03 80 00 80   00 00   0F 0F 08 // 00 grass
 7478 * 17	 02 0F 04 00  91 0F 00 00  04 80 00 80   00 00   0F 0F 08 // 00 grass
 7479 * 17	 02 0F 05 00  92 0F 00 00  05 80 00 80   00 00   0F 0F 08 // 00 grass
 7480 * 17	 02 0F 06 00  93 0F 00 00  06 80 00 80   00 00   0F 0F 08 // 00 grass
 7481 * 17	 02 0F 07 00  94 0F 00 00  07 80 00 80   00 00   0F 0F 08 // 00 grass
 7482 * 17	 02 0F 08 00  95 0F 00 00  08 80 00 80   00 00   0F 0F 08 // 00 grass
 7483 * 17	 02 0F 09 00  96 0F 00 00  09 80 00 80   00 00   0F 0F 08 // 00 grass
 7484 * 17	 02 0F 0A 00  97 0F 00 00  0A 80 00 80   00 00   0F 0F 08 // 00 grass
 7485 * 17	 02 0F 0B 00  98 0F 00 00  0B 80 00 80   00 00   0F 0F 08 // 00 grass
 7486 * 17	 02 0F 0C 00  99 0F 00 00  0C 80 00 80   00 00   0F 0F 08 // 00 grass
 7487 * 17	 02 0F 0D 00  9A 0F 00 00  0D 80 00 80   00 00   0F 0F 08 // 00 grass
 7488 * 17	 02 0F 0E 00  9B 0F 00 00  0E 80 00 80   00 00   0F 0F 08 // 00 grass
 7489 * 17	 02 0F 0F 00  9C 0F 00 00  0F 80 00 80   00 00   0F 0F 08 // 00 grass
 7490 * 17	 02 0F 10 00  9D 0F 00 00  10 80 00 80   00 00   0F 0F 08 // 00 grass
 7491 * 17	 02 0F 11 00  9E 0F 00 00  11 80 00 80   00 00   0F 0F 08 // 00 grass
 7492 * 17	 02 0F 12 00  9F 0F 00 00  12 80 00 80   00 00   0F 0F 08 // 00 grass
 7493 * 4	 01 0F 13 01
 7494 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 20	 9980	64 31 -31   0 normal chunked // 13 VIEW 1 FLAT SNOW
 7495 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 100	 9980	64 31 -31   0 normal chunked // 14 VIEW 1 High corner W SNOW
 7496 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 180	 9980	64 23 -31   0 normal chunked // 15 VIEW 1 High corner S SNOW
 7497 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 260	 9980	64 24 -31  -1 normal chunked // 16 VIEW 1 High corners W-S SNOW
 7498 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 340	 9980	64 31 -31   0 normal chunked // 17 VIEW 1 High corner E SNOW
 7499 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 420	 9980	64 31 -31   0 normal chunked // 18 VIEW 1 High corners W-E SNOW
 7500 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 500	 9980	64 24 -31  -1 normal chunked // 19 VIEW 1 High corners S-E SNOW
 7501 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 580	 9980	64 23 -31   0 normal chunked // 1A VIEW 1 High corners W-S-E SNOW
 7502 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 660	 9980	64 39 -31  -8 normal chunked // 1B VIEW 1 High corner N SNOW
 7503 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 740	 9980	64 39 -31  -8 normal chunked // 1C VIEW 1 High corners W-N SNOW
 7504 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 820	 9980	64 31 -31  -8 normal chunked // 1D VIEW 1 High corners N-S SNOW
 7505 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 900	 9980	64 31 -31  -8 normal chunked // 1E VIEW 1 High corners W-N-S SNOW
 7506 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 980	 9980	64 39 -31  -8 normal chunked // 1F VIEW 1 High corners N-E SNOW
 7507 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1060 9980	64 39 -31  -8 normal chunked // 20 VIEW 1 High corners W-N-E SNOW
 7508 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1140 9980	64 31 -31  -8 normal chunked // 21 VIEW 1 High corners N-S-E SNOW
 7509 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1220 9980	64 47 -31 -16 normal chunked // 22 VIEW 1 High corners N-E-W steep SNOW
 7510 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1300 9980	64 15 -31   0 normal chunked // 23 VIEW 1 High corners S-E-W steep SNOW
 7511 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1380 9980	64 31 -31  -8 normal chunked // 24 VIEW 1 High corners E-N-S steep SNOW
 7512 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1460 9980	64 31 -31  -8 normal chunked // 25 VIEW 1 High corners W-N-S steep SNOW
 7513 * 17	 02 0F 13 00  C6 11 00 00  00 80 00 80   00 00   0F 0F 08 // 00 snow
 7514 * 17	 02 0F 14 00  C7 11 00 00  01 80 00 80   00 00   0F 0F 08 // 00 snow
 7515 * 17	 02 0F 15 00  C8 11 00 00  02 80 00 80   00 00   0F 0F 08 // 00 snow
 7516 * 17	 02 0F 16 00  C9 11 00 00  03 80 00 80   00 00   0F 0F 08 // 00 snow
 7517 * 17	 02 0F 17 00  CA 11 00 00  04 80 00 80   00 00   0F 0F 08 // 00 snow
 7518 * 17	 02 0F 18 00  CB 11 00 00  05 80 00 80   00 00   0F 0F 08 // 00 snow
 7519 * 17	 02 0F 19 00  CC 11 00 00  06 80 00 80   00 00   0F 0F 08 // 00 snow
 7520 * 17	 02 0F 1A 00  CD 11 00 00  07 80 00 80   00 00   0F 0F 08 // 00 snow
 7521 * 17	 02 0F 1B 00  CE 11 00 00  08 80 00 80   00 00   0F 0F 08 // 00 snow
 7522 * 17	 02 0F 1C 00  CF 11 00 00  09 80 00 80   00 00   0F 0F 08 // 00 snow
 7523 * 17	 02 0F 1D 00  D0 11 00 00  0A 80 00 80   00 00   0F 0F 08 // 00 snow
 7524 * 17	 02 0F 1E 00  D1 11 00 00  0B 80 00 80   00 00   0F 0F 08 // 00 snow
 7525 * 17	 02 0F 1F 00  D2 11 00 00  0C 80 00 80   00 00   0F 0F 08 // 00 snow
 7526 * 17	 02 0F 20 00  D3 11 00 00  0D 80 00 80   00 00   0F 0F 08 // 00 snow
 7527 * 17	 02 0F 21 00  D4 11 00 00  0E 80 00 80   00 00   0F 0F 08 // 00 snow
 7528 * 17	 02 0F 22 00  D5 11 00 00  0F 80 00 80   00 00   0F 0F 08 // 00 snow
 7529 * 17	 02 0F 23 00  D6 11 00 00  10 80 00 80   00 00   0F 0F 08 // 00 snow
 7530 * 17	 02 0F 24 00  D7 11 00 00  11 80 00 80   00 00   0F 0F 08 // 00 snow
 7531 * 17	 02 0F 25 00  D8 11 00 00  12 80 00 80   00 00   0F 0F 08 // 00 snow
 7532 * 14	 02 0F 26 81 41 00 FF 01 13 00 04 04 00 00
 7533 * 14	 02 0F 27 81 41 00 FF 01 14 00 04 04 01 00
 7534 * 14	 02 0F 28 81 41 00 FF 01 15 00 04 04 02 00
 7535 * 14	 02 0F 29 81 41 00 FF 01 16 00 04 04 03 00
 7536 * 14	 02 0F 2A 81 41 00 FF 01 17 00 04 04 04 00
 7537 * 14	 02 0F 2B 81 41 00 FF 01 18 00 04 04 05 00
 7538 * 14	 02 0F 2C 81 41 00 FF 01 19 00 04 04 06 00
 7539 * 14	 02 0F 2D 81 41 00 FF 01 1A 00 04 04 07 00
 7540 * 14	 02 0F 2E 81 41 00 FF 01 1B 00 04 04 08 00
 7541 * 14	 02 0F 2F 81 41 00 FF 01 1C 00 04 04 09 00
 7542 * 14	 02 0F 30 81 41 00 FF 01 1D 00 04 04 0A 00
 7543 * 14	 02 0F 31 81 41 00 FF 01 1E 00 04 04 0B 00
 7544 * 14	 02 0F 32 81 41 00 FF 01 1F 00 04 04 0C 00
 7545 * 14	 02 0F 33 81 41 00 FF 01 20 00 04 04 0D 00
 7546 * 14	 02 0F 34 81 41 00 FF 01 21 00 04 04 0E 00
 7547 * 14	 02 0F 35 81 41 00 FF 01 22 00 04 04 0F 00
 7548 * 14	 02 0F 36 81 41 00 FF 01 23 00 04 04 10 00
 7549 * 14	 02 0F 37 81 41 00 FF 01 24 00 04 04 11 00
 7550 * 14	 02 0F 38 81 41 00 FF 01 25 00 04 04 12 00
 7551 * 4	 01 0F 01 01
 7552 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 20	 9920	64 31 -31   0 normal chunked // 00 PURCHASE VIEW 1
 7553 * 17	 02 0F 39 00 00 80 00 80 00 00 00 00 00 00 00 00 00
 7554 * 14	 02 0F 3A 81 10 00 FF  01  00 80 00 00  39 80
 7555 * 14	 02 0F 3B 81 10 00 FF  01  00 80 01 01  39 80
 7556 * 14	 02 0F 3C 81 10 00 FF  01  00 80 02 02  39 80
 7557 * 14	 02 0F 3D 81 10 00 FF  01  00 80 03 03  39 80
 7558 * 14	 02 0F 3E 81 10 00 FF  01  00 80 04 04  39 80
 7559 * 14	 02 0F 3F 81 10 00 FF  01  00 80 05 05  39 80
 7560 * 14	 02 0F 40 81 10 00 FF  01  00 80 06 06  39 80
 7561 * 14	 02 0F 41 81 10 00 FF  01  00 80 07 07  39 80
 7562 * 14	 02 0F 42 81 10 00 FF  01  00 80 08 08  39 80
 7563 * 14	 02 0F 43 81 10 00 FF  01  00 80 09 09  39 80
 7564 * 14	 02 0F 44 81 10 00 FF  01  00 80 0A 0A  39 80
 7565 * 14	 02 0F 45 81 10 00 FF  01  00 80 0B 0B  39 80
 7566 * 14	 02 0F 46 81 10 00 FF  01  00 80 0C 0C  39 80
 7567 * 14	 02 0F 47 81 10 00 FF  01  00 80 0D 0D  39 80
 7568 * 14	 02 0F 48 81 10 00 FF  01  00 80 0E 0E  39 80
 7569 * 14	 02 0F 49 81 10 00 FF  01  00 80 1D 1D  39 80
 7570 * 14	 02 0F 4A 81 10 00 FF  01  00 80 17 17  39 80
 7571 * 14	 02 0F 4B 81 10 00 FF  01  00 80 1B 1B  39 80
 7572 * 14	 02 0F 4C 81 10 00 FF  01  00 80 1E 1E  39 80
 7573 * 23	 02 0F 4D 85 0C 00 FF FF 02 02 80  5C 01 5C 01 3A 00  57 01 57 01 39 00 
 7574 * 23	 02 0F 4E 85 0C 00 FF FF 02 02 80  5C 01 5C 01 3B 00  57 01 57 01 39 00 
 7575 * 17	 02 0F 4F 85 0C 00 FF FF 01 3C 00  57 01 57 01 39 00 
 7576 * 17	 02 0F 50 85 0C 00 FF FF 01 3D 00  57 01 57 01 39 00 
 7577 * 17	 02 0F 51 85 0C 00 FF FF 01 3E 00  57 01 57 01 39 00 
 7578 * 17	 02 0F 52 85 0C 00 FF FF 01 3F 00  57 01 57 01 39 00 
 7579 * 17	 02 0F 53 85 0C 00 FF FF 01 40 00  57 01 57 01 39 00 
 7580 * 17	 02 0F 54 85 0C 00 FF FF 01 41 00  57 01 57 01 39 00 
 7581 * 17	 02 0F 55 85 0C 00 FF FF 01 42 00  57 01 57 01 39 00 
 7582 * 17	 02 0F 56 85 0C 00 FF FF 01 43 00  57 01 57 01 39 00 
 7583 * 17	 02 0F 57 85 0C 00 FF FF 01 44 00  57 01 57 01 39 00 
 7584 * 17	 02 0F 58 85 0C 00 FF FF 01 45 00  57 01 57 01 39 00 
 7585 * 17	 02 0F 59 85 0C 00 FF FF 01 46 00  57 01 57 01 39 00 
 7586 * 17	 02 0F 5A 85 0C 00 FF FF 01 47 00  57 01 57 01 39 00 
 7587 * 17	 02 0F 5B 85 0C 00 FF FF 01 48 00  57 01 57 01 39 00 
 7588 * 17	 02 0F 5C 85 0C 00 FF FF 01 49 00  57 01 57 01 39 00 
 7589 * 17	 02 0F 5D 85 0C 00 FF FF 01 4A 00  57 01 57 01 39 00 
 7590 * 17	 02 0F 5E 85 0C 00 FF FF 01 4B 00  57 01 57 01 39 00 
 7591 * 17	 02 0F 5F 85 0C 00 FF FF 01 4C 00  57 01 57 01 39 00 
 7592 * 83	 02 0F 60 81 62 00 00 FF 12 
					4E 00 01 01 
					4F 00 02 02 
					50 00 03 03 
					51 00 04 04 
					52 00 05 05 
					53 00 06 06 
					54 00 07 07 
					55 00 08 08 
					56 00 09 09 
					57 00 0A 0A 
					58 00 0B 0B 
					59 00 0C 0C 
					5A 00 0D 0D 
					5B 00 0E 0E 
					5C 00 1D 1D 
					5D 00 17 17 
					5E 00 1B 1B 
					5F 00 1E 1E 
					4D 00
 7593 * 83	 02 0F 61 81 62 00 00 FF 12 
					27 00 01 01 
					28 00 02 02 
					29 00 03 03 
					2A 00 04 04 
					2B 00 05 05 
					2C 00 06 06 
					2D 00 07 07 
					2E 00 08 08 
					2F 00 09 09 
					30 00 0A 0A 
					31 00 0B 0B 
					32 00 0C 0C 
					33 00 0D 0D 
					34 00 0E 0E 
					35 00 1D 1D 
					36 00 17 17 
					37 00 1B 1B 
					38 00 1E 1E 
					26 00
 7594 * 4	 01 0F 13 01
 7595 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 20	 10040	64 31 -31   0 normal chunked // 62 VIEW 2 FLAT
 7596 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 100	 10040	64 31 -31   0 normal chunked // 63 VIEW 2 High corner W
 7597 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 180	 10040	64 23 -31   0 normal chunked // 64 VIEW 2 High corner S
 7598 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 260	 10040	64 24 -31  -1 normal chunked // 65 VIEW 2 High corners W-S
 7599 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 340	 10040	64 31 -31   0 normal chunked // 66 VIEW 2 High corner E
 7600 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 420	 10040	64 31 -31   0 normal chunked // 67 VIEW 2 High corners W-E
 7601 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 500	 10040	64 24 -31  -1 normal chunked // 68 VIEW 2 High corners S-E
 7602 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 580	 10040	64 23 -31   0 normal chunked // 69 VIEW 2 High corners W-S-E
 7603 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 660	 10040	64 39 -31  -8 normal chunked // 6A VIEW 2 High corner N
 7604 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 740	 10040	64 39 -31  -8 normal chunked // 6B VIEW 2 High corners W-N
 7605 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 820	 10040	64 31 -31  -8 normal chunked // 6C VIEW 2 High corners N-S
 7606 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 900	 10040	64 31 -31  -8 normal chunked // 6D VIEW 2 High corners W-N-S
 7607 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 980	 10040	64 39 -31  -8 normal chunked // 6E VIEW 2 High corners N-E
 7608 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1060 10040	64 39 -31  -8 normal chunked // 6F VIEW 2 High corners W-N-E
 7609 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1140 10040	64 31 -31  -8 normal chunked // 70 VIEW 2 High corners N-S-E
 7610 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1220 10040	64 47 -31 -16 normal chunked // 71 VIEW 2 High corners N-E-W steep
 7611 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1300 10040	64 15 -31   0 normal chunked // 72 VIEW 2 High corners S-E-W steep
 7612 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1380 10040	64 31 -31  -8 normal chunked // 73 VIEW 2 High corners E-N-S steep
 7613 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1460 10040	64 31 -31  -8 normal chunked // 74 VIEW 2 High corners W-N-S steep
 7614 * 17	 02 0F 62 00  8D 0F 00 00  00 80 00 80   00 00   0F 0F 08 // 00 grass
 7615 * 17	 02 0F 63 00  8E 0F 00 00  01 80 00 80   00 00   0F 0F 08 // 00 grass
 7616 * 17	 02 0F 64 00  8F 0F 00 00  02 80 00 80   00 00   0F 0F 08 // 00 grass
 7617 * 17	 02 0F 65 00  90 0F 00 00  03 80 00 80   00 00   0F 0F 08 // 00 grass
 7618 * 17	 02 0F 66 00  91 0F 00 00  04 80 00 80   00 00   0F 0F 08 // 00 grass
 7619 * 17	 02 0F 67 00  92 0F 00 00  05 80 00 80   00 00   0F 0F 08 // 00 grass
 7620 * 17	 02 0F 68 00  93 0F 00 00  06 80 00 80   00 00   0F 0F 08 // 00 grass
 7621 * 17	 02 0F 69 00  94 0F 00 00  07 80 00 80   00 00   0F 0F 08 // 00 grass
 7622 * 17	 02 0F 6A 00  95 0F 00 00  08 80 00 80   00 00   0F 0F 08 // 00 grass
 7623 * 17	 02 0F 6B 00  96 0F 00 00  09 80 00 80   00 00   0F 0F 08 // 00 grass
 7624 * 17	 02 0F 6C 00  97 0F 00 00  0A 80 00 80   00 00   0F 0F 08 // 00 grass
 7625 * 17	 02 0F 6D 00  98 0F 00 00  0B 80 00 80   00 00   0F 0F 08 // 00 grass
 7626 * 17	 02 0F 6E 00  99 0F 00 00  0C 80 00 80   00 00   0F 0F 08 // 00 grass
 7627 * 17	 02 0F 6F 00  9A 0F 00 00  0D 80 00 80   00 00   0F 0F 08 // 00 grass
 7628 * 17	 02 0F 70 00  9B 0F 00 00  0E 80 00 80   00 00   0F 0F 08 // 00 grass
 7629 * 17	 02 0F 71 00  9C 0F 00 00  0F 80 00 80   00 00   0F 0F 08 // 00 grass
 7630 * 17	 02 0F 72 00  9D 0F 00 00  10 80 00 80   00 00   0F 0F 08 // 00 grass
 7631 * 17	 02 0F 73 00  9E 0F 00 00  11 80 00 80   00 00   0F 0F 08 // 00 grass
 7632 * 17	 02 0F 74 00  9F 0F 00 00  12 80 00 80   00 00   0F 0F 08 // 00 grass
 7633 * 4	 01 0F 13 01
 7634 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 20	 10100	64 31 -31   0 normal chunked // 75 VIEW 2 FLAT SNOW
 7635 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 100	 10100	64 31 -31   0 normal chunked // 76 VIEW 2 High corner W SNOW
 7636 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 180	 10100	64 23 -31   0 normal chunked // 77 VIEW 2 High corner S SNOW
 7637 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 260	 10100	64 24 -31  -1 normal chunked // 78 VIEW 2 High corners W-S SNOW
 7638 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 340	 10100	64 31 -31   0 normal chunked // 79 VIEW 2 High corner E SNOW
 7639 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 420	 10100	64 31 -31   0 normal chunked // 7A VIEW 2 High corners W-E SNOW
 7640 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 500	 10100	64 24 -31  -1 normal chunked // 7B VIEW 2 High corners S-E SNOW
 7641 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 580	 10100	64 23 -31   0 normal chunked // 7C VIEW 2 High corners W-S-E SNOW
 7642 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 660	 10100	64 39 -31  -8 normal chunked // 7D VIEW 2 High corner N SNOW
 7643 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 740	 10100	64 39 -31  -8 normal chunked // 7E VIEW 2 High corners W-N SNOW
 7644 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 820	 10100	64 31 -31  -8 normal chunked // 7F VIEW 2 High corners N-S SNOW
 7645 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 900	 10100	64 31 -31  -8 normal chunked // 80 VIEW 2 High corners W-N-S SNOW
 7646 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 980	 10100	64 39 -31  -8 normal chunked // 81 VIEW 2 High corners N-E SNOW
 7647 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1060 10100	64 39 -31  -8 normal chunked // 82 VIEW 2 High corners W-N-E SNOW
 7648 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1140 10100	64 31 -31  -8 normal chunked // 83 VIEW 2 High corners N-S-E SNOW
 7649 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1220 10100	64 47 -31 -16 normal chunked // 84 VIEW 2 High corners N-E-W steep SNOW
 7650 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1300 10100	64 15 -31   0 normal chunked // 85 VIEW 2 High corners S-E-W steep SNOW
 7651 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1380 10100	64 31 -31  -8 normal chunked // 86 VIEW 2 High corners E-N-S steep SNOW
 7652 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 1460 10100	64 31 -31  -8 normal chunked // 87 VIEW 2 High corners W-N-S steep SNOW
 7653 * 17	 02 0F 75 00  C6 11 00 00  00 80 00 80   00 00   0F 0F 08 // 00 snow
 7654 * 17	 02 0F 76 00  C7 11 00 00  01 80 00 80   00 00   0F 0F 08 // 00 snow
 7655 * 17	 02 0F 77 00  C8 11 00 00  02 80 00 80   00 00   0F 0F 08 // 00 snow
 7656 * 17	 02 0F 78 00  C9 11 00 00  03 80 00 80   00 00   0F 0F 08 // 00 snow
 7657 * 17	 02 0F 79 00  CA 11 00 00  04 80 00 80   00 00   0F 0F 08 // 00 snow
 7658 * 17	 02 0F 7A 00  CB 11 00 00  05 80 00 80   00 00   0F 0F 08 // 00 snow
 7659 * 17	 02 0F 7B 00  CC 11 00 00  06 80 00 80   00 00   0F 0F 08 // 00 snow
 7660 * 17	 02 0F 7C 00  CD 11 00 00  07 80 00 80   00 00   0F 0F 08 // 00 snow
 7661 * 17	 02 0F 7D 00  CE 11 00 00  08 80 00 80   00 00   0F 0F 08 // 00 snow
 7662 * 17	 02 0F 7E 00  CF 11 00 00  09 80 00 80   00 00   0F 0F 08 // 00 snow
 7663 * 17	 02 0F 7F 00  D0 11 00 00  0A 80 00 80   00 00   0F 0F 08 // 00 snow
 7664 * 17	 02 0F 80 00  D1 11 00 00  0B 80 00 80   00 00   0F 0F 08 // 00 snow
 7665 * 17	 02 0F 81 00  D2 11 00 00  0C 80 00 80   00 00   0F 0F 08 // 00 snow
 7666 * 17	 02 0F 82 00  D3 11 00 00  0D 80 00 80   00 00   0F 0F 08 // 00 snow
 7667 * 17	 02 0F 83 00  D4 11 00 00  0E 80 00 80   00 00   0F 0F 08 // 00 snow
 7668 * 17	 02 0F 84 00  D5 11 00 00  0F 80 00 80   00 00   0F 0F 08 // 00 snow
 7669 * 17	 02 0F 85 00  D6 11 00 00  10 80 00 80   00 00   0F 0F 08 // 00 snow
 7670 * 17	 02 0F 86 00  D7 11 00 00  11 80 00 80   00 00   0F 0F 08 // 00 snow
 7671 * 17	 02 0F 87 00  D8 11 00 00  12 80 00 80   00 00   0F 0F 08 // 00 snow
 7672 * 14	 02 0F 88 81 41 00 FF 01 75 00 04 04 62 00
 7673 * 14	 02 0F 89 81 41 00 FF 01 76 00 04 04 63 00
 7674 * 14	 02 0F 8A 81 41 00 FF 01 77 00 04 04 64 00
 7675 * 14	 02 0F 8B 81 41 00 FF 01 78 00 04 04 65 00
 7676 * 14	 02 0F 8C 81 41 00 FF 01 79 00 04 04 66 00
 7677 * 14	 02 0F 8D 81 41 00 FF 01 7A 00 04 04 67 00
 7678 * 14	 02 0F 8E 81 41 00 FF 01 7B 00 04 04 68 00
 7679 * 14	 02 0F 8F 81 41 00 FF 01 7C 00 04 04 69 00
 7680 * 14	 02 0F 90 81 41 00 FF 01 7D 00 04 04 6A 00
 7681 * 14	 02 0F 91 81 41 00 FF 01 7E 00 04 04 6B 00
 7682 * 14	 02 0F 92 81 41 00 FF 01 7F 00 04 04 6C 00
 7683 * 14	 02 0F 93 81 41 00 FF 01 80 00 04 04 6D 00
 7684 * 14	 02 0F 94 81 41 00 FF 01 81 00 04 04 6E 00
 7685 * 14	 02 0F 95 81 41 00 FF 01 82 00 04 04 6F 00
 7686 * 14	 02 0F 96 81 41 00 FF 01 83 00 04 04 70 00
 7687 * 14	 02 0F 97 81 41 00 FF 01 84 00 04 04 71 00
 7688 * 14	 02 0F 98 81 41 00 FF 01 85 00 04 04 72 00
 7689 * 14	 02 0F 99 81 41 00 FF 01 86 00 04 04 73 00
 7690 * 14	 02 0F 9A 81 41 00 FF 01 87 00 04 04 74 00
 7691 * 4	 01 0F 01 01
 7692 c:/grfcodec603/dutchroad/dutchroadfurniture.png  8bpp 20	 10040	64 31 -31   0 normal chunked // 00 PURCHASE VIEW 2
 7693 * 17	 02 0F 9B 00 00 80 00 80 00 00 00 00 00 00 00 00 00
 7694 * 14	 02 0F 9C 81 10 00 FF  01  00 80 00 00  9B 80
 7695 * 14	 02 0F 9D 81 10 00 FF  01  00 80 01 01  9B 80
 7696 * 14	 02 0F 9E 81 10 00 FF  01  00 80 02 02  9B 80
 7697 * 14	 02 0F 9F 81 10 00 FF  01  00 80 03 03  9B 80
 7698 * 14	 02 0F A0 81 10 00 FF  01  00 80 04 04  9B 80
 7699 * 14	 02 0F A1 81 10 00 FF  01  00 80 05 05  9B 80
 7700 * 14	 02 0F A2 81 10 00 FF  01  00 80 06 06  9B 80
 7701 * 14	 02 0F A3 81 10 00 FF  01  00 80 07 07  9B 80
 7702 * 14	 02 0F A4 81 10 00 FF  01  00 80 08 08  9B 80
 7703 * 14	 02 0F A5 81 10 00 FF  01  00 80 09 09  9B 80
 7704 * 14	 02 0F A6 81 10 00 FF  01  00 80 0A 0A  9B 80
 7705 * 14	 02 0F A7 81 10 00 FF  01  00 80 0B 0B  9B 80
 7706 * 14	 02 0F A8 81 10 00 FF  01  00 80 0C 0C  9B 80
 7707 * 14	 02 0F A9 81 10 00 FF  01  00 80 0D 0D  9B 80
 7708 * 14	 02 0F AA 81 10 00 FF  01  00 80 0E 0E  9B 80
 7709 * 14	 02 0F AB 81 10 00 FF  01  00 80 1D 1D  9B 80
 7710 * 14	 02 0F AC 81 10 00 FF  01  00 80 17 17  9B 80
 7711 * 14	 02 0F AD 81 10 00 FF  01  00 80 1B 1B  9B 80
 7712 * 14	 02 0F AE 81 10 00 FF  01  00 80 1E 1E  9B 80
 7713 * 23	 02 0F AF 85 0C 00 FF FF 02 02 80  5C 01 5C 01 9C 00  57 01 57 01 9B 00 
 7714 * 23	 02 0F B0 85 0C 00 FF FF 02 02 80  5C 01 5C 01 9D 00  57 01 57 01 9B 00 
 7715 * 17	 02 0F B1 85 0C 00 FF FF 01 9E 00  57 01 57 01 9B 00 
 7716 * 17	 02 0F B2 85 0C 00 FF FF 01 9F 00  57 01 57 01 9B 00 
 7717 * 17	 02 0F B3 85 0C 00 FF FF 01 A0 00  57 01 57 01 9B 00 
 7718 * 17	 02 0F B4 85 0C 00 FF FF 01 A1 00  57 01 57 01 9B 00 
 7719 * 17	 02 0F B5 85 0C 00 FF FF 01 A2 00  57 01 57 01 9B 00 
 7720 * 17	 02 0F B6 85 0C 00 FF FF 01 A3 00  57 01 57 01 9B 00 
 7721 * 17	 02 0F B7 85 0C 00 FF FF 01 A4 00  57 01 57 01 9B 00 
 7722 * 17	 02 0F B8 85 0C 00 FF FF 01 A5 00  57 01 57 01 9B 00 
 7723 * 17	 02 0F B9 85 0C 00 FF FF 01 A6 00  57 01 57 01 9B 00 
 7724 * 17	 02 0F BA 85 0C 00 FF FF 01 A7 00  57 01 57 01 9B 00 
 7725 * 17	 02 0F BB 85 0C 00 FF FF 01 A8 00  57 01 57 01 9B 00 
 7726 * 17	 02 0F BC 85 0C 00 FF FF 01 A9 00  57 01 57 01 9B 00 
 7727 * 17	 02 0F BD 85 0C 00 FF FF 01 AA 00  57 01 57 01 9B 00 
 7728 * 17	 02 0F BE 85 0C 00 FF FF 01 AB 00  57 01 57 01 9B 00 
 7729 * 17	 02 0F BF 85 0C 00 FF FF 01 AC 00  57 01 57 01 9B 00 
 7730 * 17	 02 0F C0 85 0C 00 FF FF 01 AD 00  57 01 57 01 9B 00 
 7731 * 17	 02 0F C1 85 0C 00 FF FF 01 AE 00  57 01 57 01 9B 00 
 7732 * 83	 02 0F C2 81 62 00 00 FF 12 
					B0 00 01 01 
					B1 00 02 02 
					B2 00 03 03 
					B3 00 04 04 
					B4 00 05 05 
					B5 00 06 06 
					B6 00 07 07 
					B7 00 08 08 
					B8 00 09 09 
					B9 00 0A 0A 
					BA 00 0B 0B 
					BB 00 0C 0C 
					BC 00 0D 0D 
					BD 00 0E 0E 
					BE 00 1D 1D 
					BF 00 17 17 
					C0 00 1B 1B 
					C1 00 1E 1E 
					AF 00
 7733 * 83	 02 0F C3 81 62 00 00 FF 12 
					89 00 01 01 
					8A 00 02 02 
					8B 00 03 03 
					8C 00 04 04 
					8D 00 05 05 
					8E 00 06 06 
					8F 00 07 07 
					90 00 08 08 
					91 00 09 09 
					92 00 0A 0A 
					93 00 0B 0B 
					94 00 0C 0C 
					95 00 0D 0D 
					96 00 0E 0E 
					97 00 1D 1D 
					98 00 17 17 
					99 00 1B 1B 
					9A 00 1E 1E 
					88 00
 7734 * 18	 04 0F FF 01 89 D0 98 "Grass Base" 00
 7735 * 28	 04 0F FF 01 8A D0 98 "Tunnel Concrete Base" 00
 7736 * 14	 02 0F C4 81 48 00 01 01 C2 00 01 01 60 00
 7737 * 14	 02 0F 00 81 48 00 01 01 8A 80 01 01 89 80 
 7738 * 17	 02 0F C4 85 0C 00 FF FF 01 00 00 5C 01 5C 01 C4 00
 7739 * 14	 02 0F C5 81 48 00 01 01 C3 00 01 01 61 00
 7740 * 10	 03 0F 01 88 01 FF C4 00 C5 00
 7741 * 33	 04 0F FF 01 88 "ÐTunnel Sides (Slope Aware)" 00
 7742 * 1	 0C
 7743 * 1	 0C
 7744 * 1	 0C
 7745 * 1	 0C
 7746 * 1	 0C
If I change prop 15 in action-0 from 10 to 11 (so adding slope check, which I do use in my beachobjects), these objects cant be built anymore..
I dont get it... ?(
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: [NFO] Slope Aware Objects, issue with steep slopes

Post by OzTrans »

Quast65 wrote: 23 Aug 2023 18:29 If I change prop 15 in action-0 from 10 to 11 (so adding slope check, which I do use in my beachobjects), these objects cant be built anymore ...
Turning on the flag in property 15 is not enough. You now need to actually check the slope for the object to be built on.

Currently, the callback fails, because you have not defined it; therefore you cannot build the object.

You need to add callback 0x0157 in the menu chain :

Code: Select all

 7738 * 17	 02 0F C4 85 0C 00 FF FF 02 xx 00 57 01 57 01 00 00 5C 01 5C 01 C4 00
Then, go and check all slopes (up to 19 of them), return 0x0400 if building allowed, 0x0401 if disallowed, or your own text message. e.g. if you are on GRF Version 8 ...

Code: Select all

 -1 * 0       02 0F xx 81 41 08 1F 05 00 84 00 02 00 84 04 04 00 84 07 08 00 84 0B 0B 00 84 0D 0E 01 84
Slopes 00, 01, 02, 04, 07, 08, 0B, 0D, 0E are allowed, all others are disallowed.

BTW, to check the slope, you should use variable 0x41 in stead of 0x62 (see above example).


You can of course, just disallow a few and allow all others by default :

The following will disallow all steep slopes and allow all others :

Code: Select all

 -1 * 0       02 0F xx 81 41 08 1F 03 01 84 17 17 01 84 1B 1B 01 84 1D 1E 00 84
User avatar
Quast65
Tycoon
Tycoon
Posts: 2665
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [NFO] Slope Aware Objects, issue with steep slopes

Post by Quast65 »

OzTrans wrote: 23 Aug 2023 22:47 .
Thank you for your swift reply!! :bow:

A couple of questions before I try it out:

1.
to check the slope, you should use variable 0x41 in stead of 0x62
And should I then just use one of those per view? Rather than the two 0x62 per view I use now?

2.
Slopes 00, 01, 02, 04, 07, 08, 0B, 0D, 0E are allowed, all others are disallowed.
I have broken down these codelines in segments that I try to understand:

Code: Select all

   -1 * 0        02 0F xx 81 41 08 1F 05 
00 84 00 02 
00 84 04 04 
00 84 07 08 
00 84 0B 0B 
00 84 0D 0E 
01 84
2a.
So, if there is a 00 before the 84 it means allow, a 01 means dissallow, right?
2b.
If so, how is slope 01 allowed then? Because I dont see that mentioned, or does it work as a sequence, so 00 to 02, 04 to 04, 07 to 08, 0B to 0B and 0D to 0E?
2c.
If so, if I want all allowed, should it look like this:

Code: Select all

   -1 * 0        02 0F xx 81 41 08 1F 12 00 84 00 1E
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: [NFO] Slope Aware Objects, issue with steep slopes

Post by Eddi »

Quast65 wrote: 24 Aug 2023 14:53?
2b.
If so, how is slope 01 allowed then? Because I dont see that mentioned, or does it work as a sequence, so 00 to 02, 04 to 04, 07 to 08, 0B to 0B and 0D to 0E?
yes, those are ranges.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: [NFO] Slope Aware Objects, issue with steep slopes

Post by OzTrans »

Quast65 wrote: 24 Aug 2023 14:53 A couple of questions before I try it out:
to check the slope, you should use variable 0x41 in stead of 0x62
And should I then just use one of those per view? Rather than the two 0x62 per view I use now?
First, I am just a bit curious, you talk about tunnel entries. Normally, tunnels sit on slopes 3, 6, 9 and 12(C) and have 4 views.

In this case you would check slope 3 for view 1 (0), slope 6 for view 2 (1) etc, and disallow all others respectively.

PS: check your PM later today, for an example.

To answer your question : For each view you check and allow all slopes that are valid for view 1; then the same for view 2.
Slopes 00, 01, 02, 04, 07, 08, 0B, 0D, 0E are allowed, all others are disallowed.
I have broken down these codelines in segments that I try to understand:

Code: Select all

   -1 * 0        02 0F xx 81 41 08 1F 05 
00 84 00 02 
00 84 04 04 
00 84 07 08 
00 84 0B 0B 
00 84 0D 0E 
01 84
So, if there is a 00 before the 84 it means allow, a 01 means dissallow, right?
Correct. The return values are : 0x0400 and 0x0401 respectively, plus 0x8000 to indicate a CB result.
If so, how is slope 01 allowed then? Because I dont see that mentioned, or does it work as a sequence, so 00 to 02, 04 to 04, 07 to 08, 0B to 0B and 0D to 0E?
Yes, 01 is included in 00 02, it is a range to check, i.e. >= 0 and <= 2.
This was just an example. you decide which slopes are allowed and which ones disallowed.
If so, if I want all allowed, should it look like this:

Code: Select all

   -1 * 0        02 0F xx 81 41 08 1F 12 00 84 00 1E
No, you simply define '00 84' where the CB is checked.

Code: Select all

7738 * 17     02 0F C4 85 0C 00 FF FF 02 00 84 57 01 57 01 00 00 5C 01 5C 01 C4 00
                                         ^^^^^^^^^^^^^^^^^
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 18 guests