Talk:Some Other Road Types Definition

From PikkaWiki
Jump to: navigation, search

New vars for roadtypes are:

45 B check tile layout;

L5 bits 3..0: road layout bit 0 (1): NW piece bit 1 (2): SW piece bit 2 (4): SE piece bit 3 (8): NE piece

46 D Surrounding roadtype IDs

NE SE SW NW, 80 = no road.

Example Code

XX = a specific junction sprite
AA = draw junction as normal


// T-junction NE - check for roadtype 08 or 03 =========

// third level, 3!

//NW+NE+, check the SE
 1 * 1 02 0X 03 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 XX 00

//NW-NE+, check the SE
 1 * 1 02 0X 02 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

//NW+NE-, check the SE
 1 * 1 02 0X 01 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

// second level, 2!

//NW+, check the NE
 1 * 1 02 0X 01 81 46 18 FF 02
 03 00 08 08 03 00 03 03 01 00

//NW-, check the NE
 1 * 1 02 0X 00 81 46 18 FF 02
 02 00 08 08 02 00 03 03 AA 00

// first level, 1!
// check the NW
 1 * 1 02 0X 17 81 46 00 FF 02
 01 00 08 08 01 00 03 03 00 00


// T-junction SE - check for roadtype 08 or 03 =========

// third level, 3!

//NE+SW+, check the SE
 1 * 1 02 0X 03 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 XX 00

//NE-SW+, check the SE
 1 * 1 02 0X 02 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

//NE+SW-, check the SE
 1 * 1 02 0X 01 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

// second level, 2!

//NE+, check the SW
 1 * 1 02 0X 01 81 46 08 FF 02
 03 00 08 08 03 00 03 03 01 00

//NE-, check the SW
 1 * 1 02 0X 00 81 46 08 FF 02
 02 00 08 08 02 00 03 03 AA 00

// first level, 1!
// check the NE
 1 * 1 02 0X 17 81 46 18 FF 02
 01 00 08 08 01 00 03 03 00 00

// T-junction SW - check for roadtype 08 or 03 =========

// third level, 3!

//NW+SW+, check the SE
 1 * 1 02 0X 03 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 XX 00

//NW-SW+, check the SE
 1 * 1 02 0X 02 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

//NW+SW-, check the SE
 1 * 1 02 0X 01 81 46 10 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

// second level, 2!

//NW+, check the SW
 1 * 1 02 0X 01 81 46 08 FF 02
 03 00 08 08 03 00 03 03 01 00

//NW-, check the SW
 1 * 1 02 0X 00 81 46 08 FF 02
 02 00 08 08 02 00 03 03 AA 00

// first level, 1!
// check the NW
 1 * 1 02 0X 17 81 46 00 FF 02
 01 00 08 08 01 00 03 03 00 00


// T-junction NW - check for roadtype 08 or 03 =========

// third level, 3!

//NW+SW+, check the NE
 1 * 1 02 0X 03 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 XX 00

//NW-SW+, check the NE
 1 * 1 02 0X 02 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

//NW+SW-, check the NE
 1 * 1 02 0X 01 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

// second level, 2!

//NW+, check the SW
 1 * 1 02 0X 01 81 46 08 FF 02
 03 00 08 08 03 00 03 03 01 00

//NW-, check the SW
 1 * 1 02 0X 00 81 46 08 FF 02
 02 00 08 08 02 00 03 03 AA 00

// first level, 1!
// check the NW
 1 * 1 02 0X 1B 81 46 00 FF 02
 01 00 08 08 01 00 03 03 00 00

// X junction - check for roadtype 08 or 03 ============

// fourth level, 8 (except only 7, because if we're already --- we're just going to draw the normal sprites)!  Whee!

//NW+SW+SE+, check the NE
 1 * 1 02 0X 07 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

//NW-SW+SE+, check the NE
 1 * 1 02 0X 06 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 XX 00

//NW+WE-SE+, check the NE
 1 * 1 02 0X 05 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 XX 00

//NW-SW-SE+, check the NE
 1 * 1 02 0X 04 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 XX 00
 
//NW+SW+SE-, check the NE
 1 * 1 02 0X 03 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 XX 00

//NW-SW+SE-, check the NE
 1 * 1 02 0X 02 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

//NW+SW-SE-, check the NE
 1 * 1 02 0X 01 81 46 18 FF 02
 XX 00 08 08 XX 00 03 03 AA 00

// third level, 4!

//NW+SW+, check the SE
 1 * 1 02 0X 03 81 46 10 FF 02
 07 00 08 08 07 00 03 03 03 00

//NW-SW+, check the SE
 1 * 1 02 0X 02 81 46 10 FF 02
 06 00 08 08 06 00 03 03 02 00

//NW+SW-, check the SE
 1 * 1 02 0X 01 81 46 10 FF 02
 05 00 08 08 05 00 03 03 01 00

//NW-SW-, check the SE
 1 * 1 02 0X 00 81 46 10 FF 02
 04 00 08 08 04 00 03 03 AA 00

// second level, 2!

//NW+, check the SW
 1 * 1 02 0X 01 81 46 08 FF 02
 03 00 08 08 03 00 03 03 01 00

//NW-, check the SW
 1 * 1 02 0X 00 81 46 08 FF 02
 02 00 08 08 02 00 03 03 00 00

// first level, 1!
// check the NW
 1 * 1 02 0X 1F 81 46 00 FF 02
 01 00 08 08 01 00 03 03 00 00   

 1 * 1 02 0X AA 81 45 00 0F 05   // let's test for tram tracks! what is our layout?
1F 00 0F 0F // X junction
1B 00 0B 0B // T-junction NW
17 00 07 07 // T-junction SW
1E 00 0E 0E // T-junction SE
1D 00 0D 0D // T-junction NE
AA 00 // otherwise, no wukkas, just draw tram tracks as usual.
Personal tools