Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rherriman committed Sep 5, 2022
1 parent 7c4aeb3 commit c92fbea
Show file tree
Hide file tree
Showing 17 changed files with 153 additions and 153 deletions.
2 changes: 1 addition & 1 deletion bin/applergb.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def color(hex_string):

args = parser.parse_args()

srgb_color = tuple(applergb_to_srgb(args.color))
srgb_color = tuple(int(round(x * 255.0)) for x in applergb_to_srgb([x / 255.0 for x in args.color]))
print("AppleRGB -> sRGB")
input_hex = hex((args.color[0] << 16) | (args.color[1] << 8) | args.color[2])
output_hex = hex((srgb_color[0] << 16) | (srgb_color[1] << 8) | srgb_color[2])
Expand Down
2 changes: 1 addition & 1 deletion bin/bspt.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def __init__(self, raw_data):
(self.color_long & 0xff)
]
# leave marker colors alone
if self.color[:2] == [254, 254, 254] or self.color[:2] == [254, 0, 0]:
if self.color[:3] == [254, 254, 254] or self.color[:3] == [254, 0, 0]:
self.color = [x / 254.0 for x in self.color]
# but convert others to sRGBA float color format from AppleRGB
else:
Expand Down
20 changes: 10 additions & 10 deletions levels/butternut-squash/bsps/1018.json
Original file line number Diff line number Diff line change
Expand Up @@ -2539,17 +2539,17 @@
],
[
0.7676600960717326,
0.9594415197985808,
0.9594415197985809,
0.0
],
[
0.9347701340911883,
0.8103686377416388,
0.810368637741639,
0.0
],
[
0.7842786026747508,
0.9594415197985808,
0.9594415197985809,
0.0
]
],
Expand Down Expand Up @@ -4202,9 +4202,9 @@
300
],
[
310,
311,
308,
310
309
],
[
312,
Expand All @@ -4222,9 +4222,9 @@
302
],
[
302,
311,
301
301,
302
],
[
303,
Expand All @@ -4239,12 +4239,12 @@
[
307,
308,
306
305
],
[
305,
306,
308
307
],
[
308,
Expand All @@ -4254,7 +4254,7 @@
[
308,
309,
310
311
],
[
330,
Expand Down
18 changes: 9 additions & 9 deletions levels/butternut-squash/bsps/1025.json
Original file line number Diff line number Diff line change
Expand Up @@ -2147,23 +2147,23 @@
"tris": [
[
31,
128,
130
127,
128
],
[
136,
130,
31,
135
128
],
[
128,
31,
127
136,
137
],
[
137,
31,
136
135,
136,
31
],
[
130,
Expand Down
18 changes: 9 additions & 9 deletions levels/cancer/bsps/1001.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
],
[
29,
16,
15,
28
],
[
Expand All @@ -670,7 +670,7 @@
23
],
[
13,
14,
30,
31
],
Expand Down Expand Up @@ -707,22 +707,22 @@
[
15,
16,
29
28
],
[
30,
31,
13,
14
],
[
13,
32,
12
31,
12,
13
],
[
13,
31,
32
32,
12
],
[
34,
Expand Down
18 changes: 9 additions & 9 deletions levels/cancer/bsps/1002.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
],
[
29,
16,
15,
28
],
[
Expand All @@ -670,7 +670,7 @@
23
],
[
13,
14,
30,
31
],
Expand Down Expand Up @@ -707,22 +707,22 @@
[
15,
16,
29
28
],
[
30,
31,
13,
14
],
[
13,
32,
12
31,
12,
13
],
[
13,
31,
32
32,
12
],
[
34,
Expand Down
8 changes: 4 additions & 4 deletions levels/gzr-rip/bsps/5560.json
Original file line number Diff line number Diff line change
Expand Up @@ -5428,13 +5428,13 @@
157
],
[
11,
150,
12,
8
151
],
[
151,
11,
12,
8,
150
],
[
Expand Down
4 changes: 2 additions & 2 deletions levels/net-99/bsps/7.json
Original file line number Diff line number Diff line change
Expand Up @@ -2574,7 +2574,7 @@
111
],
[
140,
141,
110,
111
],
Expand Down Expand Up @@ -2699,7 +2699,7 @@
142
],
[
110,
111,
140,
141
],
Expand Down
4 changes: 2 additions & 2 deletions levels/oddities-v4/bsps/1000.json
Original file line number Diff line number Diff line change
Expand Up @@ -3157,14 +3157,14 @@
10
],
[
10,
16,
214,
14
],
[
16,
10,
14
214
],
[
16,
Expand Down
20 changes: 10 additions & 10 deletions levels/t-plus-5-part-b/bsps/1007.json
Original file line number Diff line number Diff line change
Expand Up @@ -6219,14 +6219,14 @@
114
],
[
170,
137,
138
135,
136,
170
],
[
136,
138,
170,
135
137
],
[
140,
Expand All @@ -6244,14 +6244,14 @@
136
],
[
171,
130,
131
131,
132,
171
],
[
171,
130,
131,
132
171
],
[
134,
Expand Down
14 changes: 7 additions & 7 deletions levels/t-plus-5-part-c/bsps/1000.json
Original file line number Diff line number Diff line change
Expand Up @@ -6000,19 +6000,19 @@
388
],
[
384,
514,
383,
384
383
],
[
386,
393,
385
384,
385,
393
],
[
385,
386,
393,
384
385
],
[
393,
Expand Down
18 changes: 9 additions & 9 deletions levels/t-plus-5-part-c/bsps/1002.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
],
[
29,
16,
15,
28
],
[
Expand All @@ -670,7 +670,7 @@
23
],
[
13,
14,
30,
31
],
Expand Down Expand Up @@ -707,22 +707,22 @@
[
15,
16,
29
28
],
[
30,
31,
13,
14
],
[
13,
32,
12
31,
12,
13
],
[
13,
31,
32
32,
12
],
[
34,
Expand Down
Loading

0 comments on commit c92fbea

Please sign in to comment.