Skip to content

Commit ac4317e

Browse files
authored
Optimise invisible car sprites
With the frames rotation factor getting merged recently we can now remove many of the duplicate invisible sprites that certain vehicles use for their invisible cars. This works by making all of the cars with invisible sprites only use 1 frame of slopesFlat rather than the full 32 which reduces the amount of sprites by 31 for most vehicles. This saves a total of 1850 sprites from all of the rides with invisible cars. I've also went ahead and made the invisible sprites all use the same generic "" invisible sprite entry which should make these objects more OpenGraphics friendly as this means OpenGraphics won't have to provide tons of duplicate invisible sprites for these vehicles in the future.
1 parent 3497d30 commit ac4317e

34 files changed

Lines changed: 141 additions & 176 deletions

objects/official/ride/rct2dlc.ride.zpanda/object.json

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@
5050
"loadingPositions": [ 0 ]
5151
},
5252
{
53-
"rotationFrameMask": 31,
53+
"rotationFrameMask": 0,
5454
"spacing": 34864,
5555
"frictionSoundId": 2,
5656
"soundRange": 2,
5757
"carVisual": 1,
5858
"drawOrder": 8,
59-
"frames": {
60-
"flat": true
59+
"spriteGroups": {
60+
"slopeFlat":1
6161
},
6262
"hasScreamingRiders": true
6363
}
@@ -796,37 +796,6 @@
796796
{ "path": "images/000728.png","x": -4, "y": -16 },
797797
{ "path": "images/000729.png","x": -9, "y": -16 },
798798
{ "path": "images/000730.png","x": -5, "y": -13 },
799-
"",
800-
"",
801-
"",
802-
"",
803-
"",
804-
"",
805-
"",
806-
"",
807-
"",
808-
"",
809-
"",
810-
"",
811-
"",
812-
"",
813-
"",
814-
"",
815-
"",
816-
"",
817-
"",
818-
"",
819-
"",
820-
"",
821-
"",
822-
"",
823-
"",
824-
"",
825-
"",
826-
"",
827-
"",
828-
"",
829-
"",
830799
""
831800
],
832801
"strings": {

objects/rct2/ride/rct2.ride.4x4.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@
5555
"loadingPositions": [4, -4]
5656
},
5757
{
58-
"rotationFrameMask": 31,
58+
"rotationFrameMask": 0,
5959
"spacing": 34864,
6060
"poweredAcceleration": 80,
6161
"poweredMaxSpeed": 8,
6262
"carVisual": 1,
6363
"drawOrder": 8,
64-
"frames": {
65-
"flat": true
64+
"spriteGroups": {
65+
"slopeFlat":1
6666
},
6767
"hasAdditionalColour2": true,
6868
"isPowered": true
6969
}
7070
]
7171
},
72-
"images": ["$RCT2:OBJDATA/4X4.DAT[0..426]"],
72+
"images": ["$RCT2:OBJDATA/4X4.DAT[0..394]", ""],
7373
"strings": {
7474
"name": {
7575
"en-GB": "Monster Trucks",

objects/rct2/ride/rct2.ride.cstboat.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,22 @@
5454
"loadingPositions": [7, 9, 2, 4, -3, -1]
5555
},
5656
{
57-
"rotationFrameMask": 31,
57+
"rotationFrameMask": 0,
5858
"spacing": 87160,
5959
"frictionSoundId": 2,
6060
"soundRange": 2,
6161
"carVisual": 8,
6262
"drawOrder": 8,
63-
"frames": {
64-
"flat": true
63+
"spriteGroups": {
64+
"slopeFlat":1
6565
},
6666
"hasAdditionalColour1": true,
6767
"hasScreamingRiders": true
6868
}
6969
],
7070
"buildMenuPriority": 1
7171
},
72-
"images": ["$RCT2:OBJDATA/CSTBOAT.DAT[0..1762]"],
72+
"images": ["$RCT2:OBJDATA/CSTBOAT.DAT[0..1730]", ""],
7373
"strings": {
7474
"name": {
7575
"en-GB": "Coaster Boats",

objects/rct2/ride/rct2.ride.ctcar.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@
4545
"loadingPositions": [3, -3]
4646
},
4747
{
48-
"rotationFrameMask": 31,
48+
"rotationFrameMask": 0,
4949
"spacing": 34864,
5050
"poweredAcceleration": 70,
5151
"poweredMaxSpeed": 7,
5252
"carVisual": 1,
5353
"drawOrder": 8,
54-
"frames": {
55-
"flat": true
54+
"spriteGroups": {
55+
"slopeFlat":1
5656
},
5757
"isPowered": true
5858
}
5959
],
6060
"buildMenuPriority": 1
6161
},
62-
"images": ["$RCT2:OBJDATA/CTCAR.DAT[0..242]"],
62+
"images": ["$RCT2:OBJDATA/CTCAR.DAT[0..210]", ""],
6363
"strings": {
6464
"name": {
6565
"en-GB": "Cheshire Cats",

objects/rct2/ride/rct2.ride.gtc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
"loadingPositions": [3, -3]
5252
},
5353
{
54-
"rotationFrameMask": 31,
54+
"rotationFrameMask": 0,
5555
"spacing": 34864,
5656
"poweredAcceleration": 80,
5757
"poweredMaxSpeed": 9,
5858
"carVisual": 1,
5959
"drawOrder": 8,
60-
"frames": {
61-
"flat": true
60+
"spriteGroups": {
61+
"slopeFlat":1
6262
},
6363
"isPoweredRideWithUnrestrictedGravity": true,
6464
"hasNoUpstopWheels": true,
@@ -69,7 +69,7 @@
6969
],
7070
"buildMenuPriority": 2
7171
},
72-
"images": ["$RCT2:OBJDATA/GTC.DAT[0..242]"],
72+
"images": ["$RCT2:OBJDATA/GTC.DAT[0..210]", ""],
7373
"strings": {
7474
"name": {
7575
"en-GB": "Ghost Train Cars",

objects/rct2/ride/rct2.ride.helicar.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@
5454
"loadingPositions": [3, -3]
5555
},
5656
{
57-
"rotationFrameMask": 31,
57+
"rotationFrameMask": 0,
5858
"spacing": 34864,
5959
"poweredAcceleration": 40,
6060
"poweredMaxSpeed": 5,
6161
"carVisual": 1,
6262
"drawOrder": 8,
63-
"frames": {
64-
"flat": true
63+
"spriteGroups": {
64+
"slopeFlat":1
6565
},
6666
"isPowered": true
6767
}
6868
],
6969
"buildMenuPriority": 1
7070
},
71-
"images": ["$RCT2:OBJDATA/HELICAR.DAT[0..866]"],
71+
"images": ["$RCT2:OBJDATA/HELICAR.DAT[0..834]", ""],
7272
"strings": {
7373
"name": {
7474
"en-GB": "Mini Helicopters",

objects/rct2/ride/rct2.ride.hmcar.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@
5050
"loadingPositions": [3, -3]
5151
},
5252
{
53-
"rotationFrameMask": 31,
53+
"rotationFrameMask": 0,
5454
"spacing": 34864,
5555
"poweredAcceleration": 80,
5656
"poweredMaxSpeed": 9,
5757
"carVisual": 1,
5858
"drawOrder": 8,
59-
"frames": {
60-
"flat": true
59+
"spriteGroups": {
60+
"slopeFlat":1
6161
},
6262
"isPoweredRideWithUnrestrictedGravity": true,
6363
"hasNoUpstopWheels": true,
@@ -68,7 +68,7 @@
6868
],
6969
"buildMenuPriority": 1
7070
},
71-
"images": ["$RCT2:OBJDATA/HMCAR.DAT[0..242]"],
71+
"images": ["$RCT2:OBJDATA/HMCAR.DAT[0..210]", ""],
7272
"strings": {
7373
"name": {
7474
"en-GB": "Haunted Mansion Cars",

objects/rct2/ride/rct2.ride.rcr.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,21 @@
4848
"loadingPositions": [0]
4949
},
5050
{
51-
"rotationFrameMask": 31,
51+
"rotationFrameMask": 0,
5252
"spacing": 34864,
5353
"poweredAcceleration": 110,
5454
"poweredMaxSpeed": 9,
5555
"carVisual": 1,
5656
"drawOrder": 8,
57-
"frames": {
58-
"flat": true
57+
"spriteGroups": {
58+
"slopeFlat":1
5959
},
6060
"isPowered": true
6161
}
6262
],
6363
"buildMenuPriority": 4
6464
},
65-
"images": ["$RCT2:OBJDATA/RCR.DAT[0..242]"],
65+
"images": ["$RCT2:OBJDATA/RCR.DAT[0..210]", ""],
6666
"strings": {
6767
"name": {
6868
"en-GB": "Racing Cars",

objects/rct2/ride/rct2.ride.smc1.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,21 @@
7171
"loadingPositions": [7, 9, -3, -1]
7272
},
7373
{
74-
"rotationFrameMask": 31,
74+
"rotationFrameMask": 0,
7575
"spacing": 34864,
7676
"frictionSoundId": 2,
7777
"soundRange": 2,
7878
"carVisual": 1,
7979
"drawOrder": 8,
80-
"frames": {
81-
"flat": true
80+
"spriteGroups": {
81+
"slopeFlat":1
8282
},
8383
"hasScreamingRiders": true
8484
}
8585
],
8686
"buildMenuPriority": 3
8787
},
88-
"images": ["$RCT2:OBJDATA/SMC1.DAT[0..622]"],
88+
"images": ["$RCT2:OBJDATA/SMC1.DAT[0..590]", ""],
8989
"strings": {
9090
"name": {
9191
"en-GB": "Mouse Cars",

objects/rct2/ride/rct2.ride.smc2.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
"loadingPositions": [7, 9, -3, -1]
4444
},
4545
{
46-
"rotationFrameMask": 31,
46+
"rotationFrameMask": 0,
4747
"spacing": 34864,
4848
"frictionSoundId": 2,
4949
"soundRange": 2,
5050
"carVisual": 1,
5151
"drawOrder": 8,
52-
"frames": {
53-
"flat": true
52+
"spriteGroups": {
53+
"slopeFlat":1
5454
},
5555
"hasScreamingRiders": true
5656
}
@@ -61,7 +61,8 @@
6161
"$RCT2:OBJDATA/SMC2.DAT[1]",
6262
"",
6363
"",
64-
"$RCT2:OBJDATA/SMC2.DAT[3..586]"
64+
"$RCT2:OBJDATA/SMC2.DAT[3..554]",
65+
""
6566
],
6667
"strings": {
6768
"name": {

0 commit comments

Comments
 (0)