Skip to content

Commit 948903c

Browse files
authored
Merge pull request #531 from memo33/flex-cursor-offset
reposition various FLEX pieces to avoid cursor offset
2 parents 86f36ee + 4ce910b commit 948903c

10 files changed

Lines changed: 1590 additions & 4577 deletions

File tree

Controller/RUL0/0000_TuLEPS_CanAM/0460_FlexTurnLanes.txt

Lines changed: 412 additions & 392 deletions
Large diffs are not rendered by default.

Controller/RUL0/5000_RHW/5000_Starters.txt

Lines changed: 637 additions & 1391 deletions
Large diffs are not rendered by default.

Controller/RUL0/5000_RHW/5B00_FlexFly5x5_MANAGED.txt

Lines changed: 228 additions & 2468 deletions
Large diffs are not rendered by default.

Controller/RUL0/6000_Street_PedMall_SAM/6700_SAM.txt

Lines changed: 80 additions & 81 deletions
Large diffs are not rendered by default.

Controller/RUL0/7000_Road_NWM/7A00_NWM/7B00_Starters.txt

Lines changed: 110 additions & 117 deletions
Large diffs are not rendered by default.

Controller/RUL0/7000_Road_NWM/7F00_ElevatedViaducts.txt

Lines changed: 76 additions & 76 deletions
Large diffs are not rendered by default.

Controller/RUL0/B000_Lightrail/B3F0_DraggableGLR.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,20 @@ CopyFrom = 0x3B3F4
7575
;Added by memo 01/31/07.
7676
;modified by memo 01/17/2013 for use with Vanishing Construction Lot
7777
;Ground Light Rail Straight Puzzle Piece - drag
78-
Piece = 0.0, 0.0, 0, 0, 0x580cc706
78+
Piece = 0.0, -16.0, 0, 0, 0x580cc706
7979
PreviewEffect = preview_draggable_glr___001
8080

8181
CellLayout =.......
82-
CellLayout =...Z<..
83-
CellLayout =...a...
82+
CellLayout =...Z...
83+
CellLayout =...a..<
8484
CellLayout =...^...
8585

8686
CheckType = Z - lightrail: 0x02000200
8787
CheckType = a - lightrail: 0x02000200 Road: 0x00010100, 0xffffffff optional
8888

8989
ConsLayout =........
90-
ConsLayout =...+...<
91-
ConsLayout =........
90+
ConsLayout =...+....
91+
ConsLayout =.......<
9292
ConsLayout =...^....
9393

9494
AutoTileBase = 0x55387000 ; former 0x580cc700
@@ -119,21 +119,21 @@ CopyFrom = 0x3B3F0
119119
;Added by memo 02/26/07.
120120
;modified by memo 01/17/2013 for use with Vanishing Construction Lot
121121
;Ground Light Rail Diagonal Puzzle Piece - drag
122-
Piece = 0.0, 0.0, 0, 0, 0x580d3706
122+
Piece = 16.0, 0.0, 0, 0, 0x580d3706
123123
PreviewEffect = preview_draggable_glr___003
124124

125125
CellLayout =........
126126
CellLayout =...aZ<..
127127
CellLayout =........
128-
CellLayout =....^...
128+
CellLayout =...^....
129129

130130
CheckType = Z - lightrail: 0x00000301
131131
CheckType = a - lightrail: 0x03010000 Road: 0x01010000, 0xffffffff optional
132132

133133
ConsLayout =.........
134134
ConsLayout =....+...<
135135
ConsLayout =.........
136-
ConsLayout =....^....
136+
ConsLayout =...^.....
137137

138138
AutoTileBase = 0x55387000 ; former 0x580d3700
139139
ReplacementIntersection = 0, 0
@@ -218,20 +218,20 @@ CopyFrom = 0x3B3F5
218218
;Added by memo 03/26/07.
219219
;modified by memo 01/17/2013 for use with Vanishing Construction Lot
220220
;Ground Light Rail Rural Straight Puzzle Piece - drag
221-
Piece = 0.0, 0.0, 0, 0, 0x580cc707
221+
Piece = 0.0, -16.0, 0, 0, 0x580cc707
222222
PreviewEffect = preview_draggable_glr___004
223223

224224
CellLayout =.......
225-
CellLayout =...Z<..
226-
CellLayout =...a...
225+
CellLayout =...Z...
226+
CellLayout =...a..<
227227
CellLayout =...^...
228228

229229
CheckType = Z - lightrail: 0x02000200
230230
CheckType = a - lightrail: 0x02000200 Road: 0x00030300, 0xffffffff optional
231231

232232
ConsLayout =........
233-
ConsLayout =...+...<
234-
ConsLayout =........
233+
ConsLayout =...+....
234+
ConsLayout =.......<
235235
ConsLayout =...^....
236236

237237
AutoTileBase = 0x55387000 ; former 0x580db700
@@ -262,21 +262,21 @@ CopyFrom = 0x3B3F2
262262
;Added by memo 03/26/07.
263263
;modified by memo 01/17/2013 for use with Vanishing Construction Lot
264264
;Ground Light Rail Rural Diagonal Puzzle Piece - drag
265-
Piece = 0.0, 0.0, 0, 0, 0x580d3707
265+
Piece = 16.0, 0.0, 0, 0, 0x580d3707
266266
PreviewEffect = preview_draggable_glr___006
267267

268268
CellLayout =........
269269
CellLayout =...aZ<..
270270
CellLayout =........
271-
CellLayout =....^...
271+
CellLayout =...^....
272272

273273
CheckType = Z - lightrail: 0x00000301
274274
CheckType = a - lightrail: 0x03010000 onewayroad: 0x01010000, 0xffffffff optional
275275

276276
ConsLayout =.........
277277
ConsLayout =....+...<
278278
ConsLayout =.........
279-
ConsLayout =....^....
279+
ConsLayout =...^.....
280280

281281
AutoTileBase = 0x55387000 ; former 0x580dc700
282282
ReplacementIntersection = 0, 0

Controller/RUL0/B000_Lightrail/BD00_GLRExtension.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ AddTypes = BD01, 1BD01, 2BD01, 3BD01, 4BD01, 5BD01, 6BD01, 7BD01 ;Ground Lig
1010
;Added by Chrisim 16 September 2010
1111
;modified by memo 01/17/2013 for use with Vanishing Construction Lot
1212
;Ground Light Rail Straight Alt1 Puzzle Piece - drag
13-
Piece = 0.0, 0.0, 0, 0, 0x5F888006
13+
Piece = 0.0, -16.0, 0, 0, 0x5F888006
1414
PreviewEffect = preview_draggable_glr___011
1515

1616
CellLayout =.......
17-
CellLayout =...Z<..
18-
CellLayout =...a...
17+
CellLayout =...Z...
18+
CellLayout =...a..<
1919
CellLayout =...^...
2020

2121
CheckType = Z - lightrail: 0x02000200
2222
CheckType = a - lightrail: 0x02000200 Road: 0x00010300, 0xffffffff optional
2323

2424
ConsLayout =........
25-
ConsLayout =...+...<
26-
ConsLayout =........
25+
ConsLayout =...+....
26+
ConsLayout =.......<
2727
ConsLayout =...^....
2828

2929
AutoTileBase = 0x55387000 ; former 0x5F888000
@@ -53,20 +53,20 @@ CopyFrom = 0x3BD00
5353
;Added by Chrisim 16 September 2010
5454
;modified by memo 01/17/2013 for use with Vanishing Construction Lot
5555
;Ground Light Rail Straight Alt2 Puzzle Piece - drag
56-
Piece = 0.0, 0.0, 0, 0, 0x5F88C006
56+
Piece = 0.0, -16.0, 0, 0, 0x5F88C006
5757
PreviewEffect = preview_draggable_glr___010
5858

5959
CellLayout =.......
60-
CellLayout =...Z<..
61-
CellLayout =...a...
60+
CellLayout =...Z...
61+
CellLayout =...a..<
6262
CellLayout =...^...
6363

6464
CheckType = Z - lightrail: 0x02000200
6565
CheckType = a - lightrail: 0x02000200 onewayroad: 0x00010300, 0xffffffff optional
6666

6767
ConsLayout =........
68-
ConsLayout =...+...<
69-
ConsLayout =........
68+
ConsLayout =...+....
69+
ConsLayout =.......<
7070
ConsLayout =...^....
7171

7272
AutoTileBase = 0x55387000 ; former 0x5F88C000

lua/adv_nam_dll.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
-- This file defines advisor messages related to the NAM DLL.
44

55
-- Note that this Lua file is not intended for distribution with the DLL itself, but for distribution with the NAM DBPF files to ensure compatibility between NAM and DLL.
6-
nam_dll_version_expected = "1.1.1" -- needs to be updated whenever a new DLL version is released
6+
nam_dll_version_expected = "1.2.0" -- needs to be updated whenever a new DLL version is released
77

88
-- (When this script is first executed, the `nam_dll_version` is still `nil`, but it gets defined before the trigger conditions are evaluated.)
99
function is_nam_dll_correct()

src/main/scala/module/flexfly/CompileFlexFlyRul0And1.scala

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,22 @@ object CompileFlexFlyRul0And1 {
150150
val (previewId90, previewName90) = previewIter.next()
151151
val (previewId45, previewName45) = previewIter.next()
152152
val orient: IntFlags => IntFlags = if (reverse) reverseIntFlags else identity
153-
def ff90(cursorInside: Boolean): String = {
154-
val hidOffset = if (cursorInside) 0 else 0x80000
153+
def ff90(): String = {
154+
val hidOffset = 0
155155
f"""
156156
|[HighwayIntersectionInfo_0x${hid+hidOffset}%08X]
157157
|;Added by memo 2014/11/16
158-
|;FlexFly 90 (cursor ${if (cursorInside) "inside" else "outside"})
159-
|Piece = ${if (cursorInside) "-48.0" else "-80.0"}, 0.0, 0, 1, 0x$previewId90%08X
158+
|;FlexFly 90
159+
|Piece = -64.0, 0.0, 0, 1, 0x$previewId90%08X
160160
|PreviewEffect = $previewName90
161161
|
162162
|CellLayout=........
163163
|CellLayout=.abY....
164164
|CellLayout=...cY...
165165
|CellLayout=....dY..
166166
|CellLayout=.....e..
167-
|CellLayout=....${if (cursorInside) "Zf." else ".fZ"}<
168-
|CellLayout=....${if (cursorInside) "^.." else "..^"}.
167+
|CellLayout=....Zf.<
168+
|CellLayout=.....^..
169169
|
170170
|CheckType = Z - dirtroad: 0x02020202
171171
|CheckType = Y - dirtroad: 0x00000000, 0xFFFFFFFF optional
@@ -181,8 +181,8 @@ object CompileFlexFlyRul0And1 {
181181
|ConsLayout=........
182182
|ConsLayout=........
183183
|ConsLayout=........
184-
|ConsLayout=....${if (cursorInside) "+.." else "..+"}<
185-
|ConsLayout=....${if (cursorInside) "^.." else "..^"}.
184+
|ConsLayout=....+..<
185+
|ConsLayout=.....^..
186186
|
187187
|AutoTileBase = 0x55387000
188188
|PlaceQueryID = 0x$previewId90%08X
@@ -212,21 +212,21 @@ object CompileFlexFlyRul0And1 {
212212
|""".stripMargin.trim
213213
}
214214

215-
def ff45(cursorInside: Boolean): String = {
216-
val hidOffset = if (cursorInside) 0 else 0x80000
215+
def ff45(): String = {
216+
val hidOffset = 0
217217
f"""
218218
|[HighwayIntersectionInfo_0x${hid+hidOffset+1}%08X]
219219
|;Added by memo 2014/11/16
220-
|;FlexFly 45 (cursor ${if (cursorInside) "inside" else "outside"})
221-
|Piece = ${if (cursorInside) "0.0" else "-32.0"}, 0.0, 0, 1, 0x$previewId45%08X
220+
|;FlexFly 45
221+
|Piece = -16.0, 0.0, 0, 1, 0x$previewId45%08X
222222
|PreviewEffect = $previewName45
223223
|
224224
|CellLayout=........
225225
|CellLayout=...Xc...
226226
|CellLayout=....dY..
227227
|CellLayout=.....e..
228-
|CellLayout=....${if (cursorInside) "Zf." else ".fZ"}<
229-
|CellLayout=....${if (cursorInside) "^.." else "..^"}.
228+
|CellLayout=....Zf.<
229+
|CellLayout=.....^..
230230
|
231231
|CheckType = Z - dirtroad: 0x02020202
232232
|CheckType = Y - dirtroad: 0x00000000, 0xFFFFFFFF optional
@@ -240,8 +240,8 @@ object CompileFlexFlyRul0And1 {
240240
|ConsLayout=........
241241
|ConsLayout=........
242242
|ConsLayout=........
243-
|ConsLayout=....${if (cursorInside) "+.." else "..+"}<
244-
|ConsLayout=....${if (cursorInside) "^.." else "..^"}.
243+
|ConsLayout=....+..<
244+
|ConsLayout=.....^..
245245
|
246246
|AutoTileBase = 0x55387000
247247
|PlaceQueryID = 0x$previewId45%08X
@@ -272,14 +272,9 @@ object CompileFlexFlyRul0And1 {
272272
}
273273

274274
f"""
275-
|${ff90(cursorInside = true)}
275+
|${ff90()}
276276
|
277-
|${ff90(cursorInside = false)}
278-
|
279-
|
280-
|${ff45(cursorInside = true)}
281-
|
282-
|${ff45(cursorInside = false)}
277+
|${ff45()}
283278
|""".stripMargin
284279
}
285280

@@ -295,8 +290,8 @@ object CompileFlexFlyRul0And1 {
295290
def printRul0(file: File, resolver: IdResolver) = scala.util.Using.resource(new PrintWriter(file)) { printer =>
296291
printer.println(";This file was generated automatically. DO NOT EDIT!")
297292
val hid0 = 0x5B00
298-
for (hid <- hid0 until hid0 + 40) {
299-
val numbers = (0 until 16) map (i => f"${hid+0x10000*i}%X") mkString ", "
293+
for (hid <- hid0 until hid0 + 40) {
294+
val numbers = (0 until 8) map (i => f"${hid+0x10000*i}%X") mkString ", "
300295
val tag = if (hid == hid0) "RotationRing" else "AddTypes"
301296
printer.println(f"$tag = $numbers ; flexfly")
302297
}

0 commit comments

Comments
 (0)