Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
47f306f
add metarules for SAM x Avenue DxO short Ts
jflann Jun 10, 2025
c3beb09
Update meta-generated SAM code
jflann Aug 12, 2025
a7e5f13
script: recompile RRW metarules
memo33 Aug 30, 2025
5dd8496
Merge branch 'staging' into street-sam-revisions-v50
clarencechen Oct 6, 2025
00b5aa9
First draft to update SAM metarules and resolve to fix DxD int far tiles
clarencechen Oct 8, 2025
616f4b0
Add base street DxD end int far tiles to resolver
clarencechen Oct 8, 2025
09e721a
Compile RUL2 File
clarencechen Oct 8, 2025
9c7fd99
Lint
clarencechen Oct 9, 2025
9203b1d
Merge remote-tracking branch 'NAMTeam/street-sam-revisions-v50' into …
clarencechen Oct 9, 2025
e27376c
Update new DxD thru int metarules to avoid base street thru int far tile
clarencechen Oct 10, 2025
5a48a18
Add note to add exception for new tiles in the segment orientation ch…
clarencechen Oct 10, 2025
6690446
adjust guess for SAM-End Road IIDs
clarencechen Oct 20, 2025
f45e7e0
Update SAM-End x Road Long T IIDs to align with WIP Textures
clarencechen Oct 25, 2025
e2ae693
Add rule to convert base Street short T intersections to SAM long T
clarencechen Oct 25, 2025
93ef9f0
Fix override continuation rules for Sam-thru T ints
clarencechen Oct 25, 2025
02fa8d5
Test new long-T intersection flags with SAMxSAM intersections
clarencechen Oct 26, 2025
d1cf4e2
Add new long-T intersection flags to SAMxRoad and SAMxOWR DxD interse…
clarencechen Oct 26, 2025
ef5e25a
Remove todo with new long-T flags
clarencechen Oct 26, 2025
df283a1
Merge branch 'staging' into street-sam-revisions-v50
clarencechen Nov 14, 2025
9df33c5
Merge branch 'staging' into street-sam-revisions-v50
clarencechen Dec 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,164 changes: 1,777 additions & 1,387 deletions Controller/RUL2/09_SAM/Sec9_SAM_MetaGenerated.txt

Large diffs are not rendered by default.

3,308 changes: 2,378 additions & 930 deletions Controller/RUL2/11_Rail/Sec11r_RRW_MANAGED.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/main/resources/tileOrientationCache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
0x51229E8E,(0,0)+(1,0)+(2,0)+(3,0)+(0,1)+(3,1)+(2,1)+(1,1)
0x57202310,(0,0)+(1,0)+(2,0)+(3,0)
0x57282390,(0,0)+(1,0)+(2,0)+(3,0)
0x5C010000,(0,0)+(1,0)+(2,0)+(3,0)
0x5C040000,(0,0)+(1,0)+(2,0)+(3,0)
0x5D540000,(0,0)+(1,0)+(2,0)+(3,0)
0x5D640000,(0,0)+(1,0)+(2,0)+(3,0)
0x5D671000,(0,0)+(1,0)+(2,0)+(3,0)
Expand Down
17 changes: 10 additions & 7 deletions src/main/scala/module/MiscResolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ class MiscResolver extends IdResolver {
add(0x5F500600, Street~SE & Street~EN) // DxD
add(0x05005700, Street~NS & Street~CE) // OxO T
add(0x5F500A00, Street~NS & Street~CSE) // OxD T (also has (0,2,11,2) alt implementation)
add(0x5F504000, Street~CS & Street~NE) // DxO T1
add(0x5F504100, Street~CS & Street~WS) // DxO T2
add(0x5F504200, Street~SE & Street~CEN) // DxD T1
add(0x5F504300, Street~WN & Street~CSW) // DxD T2
add(0x5F504000, Street~(0,202,0,2) & Street~NE) // DxO T1
add(0x5F504100, Street~(0,0,0,202) & Street~WS) // DxO T2
add(0x5F504200, Street~SE & Street~(0,1,203,0)) // DxD T1
add(0x5F504300, Street~WN & Street~(203,0,0,0)) // DxD T2
add(0x05000F00, Street~(0,0,2,2)) // 90 curve
add(0x5F500400, Street~(0,0,1,13)) // curve
add(0x5F500500, Street~(0,2,0,11)) // curve
Expand Down Expand Up @@ -261,7 +261,8 @@ class MiscResolver extends IdResolver {
add(0x5f502200, Road~NS & Street~ES)
add(0x5f502300, Road~CS & Street~NE)
add(0x5f502400, Road~ES & Street~NE)
add(0x5f504400, Road~ES & Street~CEN)
add(0x5f504400, Road~ES & Street~(0,1,203,0))
add(0x5f504500, Road~NW & Street~(203,0,0,0))
add(0x00aa0800, Road~WE & Street~CS)
add(0x00aa0400, Road~CE & Street~NS)
add(0x00aa0100, Road~NC & Street~CS)
Expand Down Expand Up @@ -405,7 +406,8 @@ class MiscResolver extends IdResolver {
add(0x5f503500, Onewayroad~NS & Street~CSE)
add(0x5f503600, Onewayroad~ES & Street~NE)
add(0x5f503700, Onewayroad~CS & Street~NE)
add(0x5f504600, Onewayroad~ES & Street~CEN)
add(0x5f504600, Onewayroad~ES & Street~(0,1,203,0))
add(0x5f504700, Onewayroad~NW & Street~(203,0,0,0))
add(0x09aa0800, Onewayroad~WE & Street~CS)
add(0x09aa0400, Onewayroad~CE & Street~NS)
add(0x09aa0100, Onewayroad~NC & Street~CS)
Expand Down Expand Up @@ -436,7 +438,7 @@ class MiscResolver extends IdResolver {
add(0x092d1700, Onewayroad~SW & Monorail~ES)
add(0x092d0200, Onewayroad~EW & Monorail~NS)

// Avenue + intersections
// Avenue intersections
add(0x04002100, Avenue~ES & Rail~NE)
add(0x04004300, Avenue~SharedDiagRight & Rail~SW)
builder.addOne((Avenue~SN).projectLeft & Rail~NE, IdTile(0x04001600, R0F0, nonMirroredOnly))
Expand Down Expand Up @@ -467,6 +469,7 @@ class MiscResolver extends IdResolver {
add(0x5f503300, Avenue~SharedDiagLeft & Street~ES)
add(0x04004400, Avenue~SN & Street~CE)
add(0x04008600, Avenue~SN & Street~WC)
add(0x5f502f00, Avenue~SN & Street~CSE)
add(0x04005600, Avenue~NC & Street~WE)
add(0x04009600, Avenue~NC & Street~(2,0,2,2))
add(0x04009700, Avenue~NC & Street~(0,0,0,2))
Expand Down
31 changes: 20 additions & 11 deletions src/main/scala/module/SamResolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ class SamResolver extends IdResolver {
add(0x5e574000 + offset, sam~NS & sam~NE) // OxD
add(0x5e579000 + offset, sam~SE & sam~EN) // DxD
add(0x5e575000 + offset, sam~NS & sam~CSE) // OxD T (also 0,2,11,2)
add(0x5e597000 + offset, sam~CS & sam~NE) // DxO T1
add(0x5e598000 + offset, sam~CS & sam~WS) // DxO T2
add(0x5e599000 + offset, sam~SE & sam~CEN) // DxD T1
add(0x5e59a000 + offset, sam~WN & sam~CSW) // DxD T2
add(0x5e597000 + offset, sam~(0,202,0,2) & sam~NE) // DxO T1
add(0x5e598000 + offset, sam~(0,0,0,202) & sam~WS) // DxO T2
add(0x5e599000 + offset, sam~SE & sam~(0,1,203,0)) // DxD T1
add(0x5e59a000 + offset, sam~WN & sam~(203,0,0,0)) // DxD T2

add(0x5e57a000 + offset, sam~(0,0,2,11))
// add(NoIID + offset, sam~(0,0,2,13))
Expand Down Expand Up @@ -236,15 +236,18 @@ class SamResolver extends IdResolver {
add(0x5e673000 + offset, sam~WE & Owr1~ES) // SAM x OWR-1
add(0x5e674000 + offset, sam~WE & Owr3~SE) // SAM x OWR-3
add(0x5e675000 + offset, sam~WE & Nrd4~SE) // SAM x NRD-4
add(0x5e610000 + offset, sam~WE & Dirtroad~SE) // SAM x RHW-2

// OxD T-intersections
add(0x5e55e000 + offset, sam~WE & Road~CWN) // SAM-Thru x Road-End T
add(0x5e561000 + offset, sam~WE & Onewayroad~CWN) // SAM-Thru x Onewayroad-End T
add(0x5e610000 + offset, sam~WE & Dirtroad~SE) // SAM x RHW-2

//DxO Intersections
add(0x5e582000 + offset, sam~SE & Road~NS) // SAM x Road
add(0x5e58c000 + offset, sam~SE & Onewayroad~NS) // SAM x Onewayroad
add(0x5e587000 + offset, sam~SE & Avenue~SN) // SAM x Avenue 1
add(0x5e588000 + offset, sam~NW & Avenue~SN) // SAM x Avenue 2
add(0x5e586000 + offset, sam~CSE & Avenue~SN) // SAM x Avenue DxO short T
add(0x5e587000 + offset, sam~SE & Avenue~SN) // SAM x Avenue DxO + (1)
add(0x5e588000 + offset, sam~NW & Avenue~SN) // SAM x Avenue DxO + (2)
add(0x5e53d000 + offset, sam~SE & Highway~NS) // SAM x Highway 1
add(0x5e53d080 + offset, sam~WN & Highway~NS) // SAM x Highway 2
add(0x5e514000 + offset, sam~NW & Rail~NS) // SAM-Rail
Expand All @@ -268,6 +271,7 @@ class SamResolver extends IdResolver {

add(0x5e620000 + offset, sam~WS & Dirtroad~NS) // SAM x Rhw2

// DxO T-intersections
add(0x5e581000 + offset, Road~NS & sam~CSE) // SAM-End Road T-int
add(0x5e58b000 + offset, Onewayroad~NS & sam~CSE) // SAM-End OWR T-int

Expand Down Expand Up @@ -303,11 +307,16 @@ class SamResolver extends IdResolver {

add(0x5e630000 + offset, sam~WS & Dirtroad~SE) // SAM x Rhw2

add(0x5e584000 + offset, Road~ES & sam~CEN) // temporary IID
add(0x5e58e000 + offset, Onewayroad~ES & sam~CEN) // temporary IID
// DxD T-intersections
add(0x5e59c000 + offset, Road~ES & sam~(0,1,203,0)) // SAM-End Road 1
add(0x5e59c080 + offset, Road~NW & sam~(203,0,0,0)) // SAM-End Road 2
add(0x5e59e000 + offset, Onewayroad~ES & sam~(0,1,203,0)) // SAM-End OWR 1
add(0x5e59e080 + offset, Onewayroad~NW & sam~(203,0,0,0)) // SAM-End OWR 2

add(0x5e585000 + offset, sam~NE & Road~CES) // SAM x Road (SAM Thru)
add(0x5e58f000 + offset, sam~NE & Onewayroad~CES) // SAM x Onewayroad (SAM Thru)
add(0x5e585000 + offset, sam~EN & Road~(0,0,201,3)) // SAM-Thru Road 1
add(0x5e585080 + offset, sam~SW & Road~(201,0,0,0)) // SAM-Thru Road 2
add(0x5e58f000 + offset, sam~EN & Onewayroad~(0,0,201,3)) // SAM-Thru OWR 1
add(0x5e58f080 + offset, sam~SW & Onewayroad~(201,0,0,0)) // SAM-Thru OWR 2

//Transitions
//Ortho
Expand Down
64 changes: 43 additions & 21 deletions src/main/scala/module/SamRuleGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -527,29 +527,29 @@ class SamRuleGenerator(var context: RuleTransducer.Context) extends RuleGenerato
Rules += sam~(0,2,11,2) | (Street ~> sam)~(11,3,0,0) // OxD T to orth-diag top

// DxO T (diag thru, orth Terminating)
Rules += sam~WE | (Street ~> sam)~WC & (Street ~> sam)~ES // DxO T from orth
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~CS // DxO T from diag
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~CN // DxO T from diag to aux tile
Rules += sam~ES & sam~CW | (Street ~> sam)~WN & (Street ~> sam)~CW // DxO T across
Rules += sam~ES & sam~CE | (Street ~> sam)~WN & (Street ~> sam)~CE // DxO T across
Rules += sam~ES & sam~NC | (Street ~> sam)~WN // DxO T to diag
Rules += sam~ES & sam~SC | (Street ~> sam)~WN // DxO T to diag from aux tile
Rules += sam~SW & sam~EC | (Street ~> sam)~WE // DxO T to orth
Rules += sam~WE | (Street ~> sam)~(2,0,202,0) & (Street ~> sam)~ES // DxO T from orth
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~(0,202,0,2) // DxO T from diag
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~(0,202,0,0) // DxO T from diag to aux tile
Rules += sam~ES & sam~(2,0,202,0) | (Street ~> sam)~WN & (Street ~> sam)~(202,0,0,0) // DxO T across
Rules += sam~ES & sam~(0,0,202,0) | (Street ~> sam)~WN & (Street ~> sam)~(202,0,2,0) // DxO T across
Rules += sam~ES & sam~(0,2,0,202) | (Street ~> sam)~WN // DxO T to diag
Rules += sam~ES & sam~(0,0,0,202) | (Street ~> sam)~WN // DxO T to diag from aux tile
Rules += sam~SW & sam~(202,0,2,0) | (Street ~> sam)~WE // DxO T to orth

// DxD
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~EN // DxD from diag
Rules += sam~ES & sam~EN | (Street ~> sam)~WS & (Street ~> sam)~WN // DxD across
Rules += sam~ES & sam~WS | (Street ~> sam)~WN // DxD to diag

// DxD T
Rules += sam~NE | (Street ~> sam)~CSW & (Street ~> sam)~ES // DxD T from end diag
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~CNE // DxD T from thru diag
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~CEN // DxD T from thru diag (aux tile)
Rules += sam~CEN & sam~ES | (Street ~> sam)~CSW & (Street ~> sam)~NW // DxD T across 1
Rules += sam~CNE & sam~ES | (Street ~> sam)~CWS & (Street ~> sam)~NW // DxD T across 2
Rules += sam~CNE & sam~NW | (Street ~> sam)~WS // DxD T to diag from end side
Rules += sam~CSW & sam~ES | (Street ~> sam)~NW // DxD T to diag from thru side
Rules += sam~CWS & sam~ES | (Street ~> sam)~NW // DxD T to diag from aux tile
Rules += sam~NE | (Street ~> sam)~(3,0,0,201) & (Street ~> sam)~ES // DxD T from end diag
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~(0,201,3,0) // DxD T from thru diag
Rules += sam~ES | (Street ~> sam)~NW & (Street ~> sam)~(0,201,0,0) // DxD T from thru diag (aux tile)
Rules += sam~(0,1,203,0) & sam~ES | (Street ~> sam)~(203,0,0,0) & (Street ~> sam)~NW // DxD T across 1
Rules += sam~(0,0,203,0) & sam~ES | (Street ~> sam)~(203,0,0,1) & (Street ~> sam)~NW // DxD T across 2
Rules += sam~(0,201,3,0) & sam~NW | (Street ~> sam)~WS // DxD T to diag from end side
Rules += sam~(3,0,0,201) & sam~ES | (Street ~> sam)~NW // DxD T to diag from thru side
Rules += sam~(0,0,0,201) & sam~ES | (Street ~> sam)~NW // DxD T to diag from aux tile

// intersections involving the orth-diag curve

Expand Down Expand Up @@ -709,7 +709,12 @@ class SamRuleGenerator(var context: RuleTransducer.Context) extends RuleGenerato
Rules += sam~NE & minor~WE | Street~CWS & minor~WE | sam~NE & minor~WE | sam~SW & minor~WE // DxO Ts into DxO + for Old-Style

// DxD T (sam end)
Rules += sam~ES | (Street ~> sam)~CNW & minor~EN // DxD T (End)
Rules += sam~ES | (Street ~> sam)~(1,203,0,0) & minor~EN // DxD T End 1
Rules += sam~(0,1,203,0) & minor~ES | (Street ~> sam)~(203,0,0,0) & minor~NW // DxD T End 2

Rules += sam~NE & minor~ES | sam~(203,0,0,0) & minor~NW | sam~(0,1,203,0) & minor~ES | % // DxD T End 2 Alt (Truncate stub)
Rules += sam~NE & minor~ES | minor~NW | sam~(0,1,203,0) & minor~ES | sam~(203,0,0,0) & minor~NW // DxD T End 2 Alt (Truncate and propagate)
Rules += sam~(0,1,203,0) & minor~ES | minor~NW | % | sam~(203,0,0,0) & minor~NW // DxD T End 2 Alt (Propagate SAM end)
}
}

Expand All @@ -732,6 +737,9 @@ class SamRuleGenerator(var context: RuleTransducer.Context) extends RuleGenerato
Rules += sam~WE & minor~WN | (Street ~> sam)~WE // OxD continue

// DxO
// DxO short T
Rules += sam~(0,0,11,3) | (Street ~> sam~CNW) & minor~NS // DxO short T
// DxO +
Rules += sam~ES | (Street ~> sam)~NW & minor~NS // DxO start
Rules += sam~EN & minor~EW | (Street ~> sam)~SW & minor~EW // DxO middle 1
Rules += sam~ES & minor~NS | (Street ~> sam)~NW & minor~SN // DxO middle 2
Expand Down Expand Up @@ -794,11 +802,25 @@ class SamRuleGenerator(var context: RuleTransducer.Context) extends RuleGenerato
Rules += sam~NE & minor~CS | (Street ~> sam)~SW

// DxD T (sam thru)
Rules += sam~ES | (Street ~> sam)~WN & minor~CNE // DxD T (Thru)
// Rules += sam~ES | (Street ~> sam)~NW & minor~(0,201,3,0) // DxD Thru T 1 pending base long T tile
// Rules += sam~ES | (Street ~> sam)~NW & minor~(0,201,0,0) // DxD Thru T 2 pending base long T tile
Rules += sam~ES | Street~NW & minor~CNE | % | sam~NW & minor~(0,201,3,0) // DxD Thru T 1
Rules += sam~ES | Street~NW & minor~CWS | % | sam~NW & minor~(203,0,0,1) // Temp DxD Thru T 2 (works with DxD Thru T 1-2 Alt)

// Rules += sam~ES & minor~(0,1,203,0) | (Street ~> sam)~NW & minor~(203,0,0,0) // DxD Thru T 1-2 pending base long T tile
// Rules += sam~NE & minor~(0,0,201,0) | (Street ~> sam)~WS & minor~(201,3,0,0) // DxD Thru T 2-1 pending base long T tile
Rules += sam~ES & minor~(0,1,203,0) | Street~NW | % | sam~NW & minor~(203,0,0,0) // DxD Thru T 1-2 Alt
Rules += sam~ES & minor~(0,1,203,0) | sam~NW | % | sam~NW & minor~(203,0,0,0) // DxD Thru T 1-2 Alt
Rules += sam~NE & minor~(0,0,201,0) | Street~WS & minor~CWN | % | sam~WS & minor~(201,3,0,0) // DxD Thru T 2-1

// truncate minor stub on tile 1
Rules += sam~ES & minor~EN | Street~NW | sam~ES & minor~(0,1,203,0) | sam~NW & minor~(203,0,0,0) // DxD T 2-1 Alt
Rules += sam~ES & minor~EN | sam~NW | sam~ES & minor~(0,1,203,0) | sam~NW & minor~(203,0,0,0) // DxD T 2-1 Alt
Rules += sam~ES & minor~EN | sam~NW & minor~(203,0,0,0) | sam~ES & minor~(0,1,203,0) | % // DxD T 2-1 Alt

// continue
Rules += sam~ES & minor~CSW | (Street ~> sam)~WN // Diagonal Continuation off DxD T-Thru
Rules += sam~NE & minor~CES | (Street ~> sam)~WS // Temp Diagonal Continuation off other side of DxD T-Thru
// Rules += sam~NE & minor~CES | (Street ~> sam)~WS & minor~CNW //Eventual DxD T-Thru Tile 2
Rules += sam~ES & minor~(3,0,0,201) | (Street ~> sam)~NW // DxD Thru T 1
Rules += sam~ES & minor~(0,0,0,201) | (Street ~> sam)~NW // DxD Thru T 2
}
}

Expand Down