Make tower LEDs more arcade accurate
Now using all the tower LED data sent by the game instead of just using 1 and repeating it across all LEDs. This will have no effect in game as the game simply sets them all to the same colour anyway :(
This commit is contained in:
parent
1cfbf74bc6
commit
84489e8fae
36
src/main.zig
36
src/main.zig
@ -299,17 +299,37 @@ export fn chuni_io_led_set_colors(board: u8, rgb: ?[*]u8) void {
|
|||||||
var n: u32 = 0;
|
var n: u32 = 0;
|
||||||
if (board == 0) {
|
if (board == 0) {
|
||||||
const out = usb_out[96..168];
|
const out = usb_out[96..168];
|
||||||
while (n < 24) : (n += 1) {
|
const led_limit: u32 = 3;
|
||||||
out[n * 3 + 1] = rgb.?[0x96];
|
const i_limit: u32 = 8;
|
||||||
out[n * 3 + 0] = rgb.?[0x97];
|
|
||||||
out[n * 3 + 2] = rgb.?[0x98];
|
var led: u32 = 0;
|
||||||
|
while (led < led_limit) {
|
||||||
|
var i: u32 = 0;
|
||||||
|
while (i < i_limit) {
|
||||||
|
n = (8 * led) + i;
|
||||||
|
out[n * 3 + 1] = rgb.?[0x96 + (led * 3)];
|
||||||
|
out[n * 3 + 0] = rgb.?[0x97 + (led * 3)];
|
||||||
|
out[n * 3 + 2] = rgb.?[0x98 + (led * 3)];
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
led += 1;
|
||||||
}
|
}
|
||||||
} else if (board == 1) {
|
} else if (board == 1) {
|
||||||
const out = usb_out[168..240];
|
const out = usb_out[168..240];
|
||||||
while (n < 24) : (n += 1) {
|
const led_limit: u32 = 3;
|
||||||
out[n * 3 + 1] = rgb.?[0xb4];
|
const i_limit: u32 = 8;
|
||||||
out[n * 3 + 0] = rgb.?[0xb5];
|
|
||||||
out[n * 3 + 2] = rgb.?[0xb6];
|
var led: u32 = 0;
|
||||||
|
while (led < led_limit) {
|
||||||
|
var i: u32 = 0;
|
||||||
|
while (i < i_limit) {
|
||||||
|
n = (8 * led) + i;
|
||||||
|
out[n * 3 + 1] = rgb.?[0xb4 + (led * 3)];
|
||||||
|
out[n * 3 + 0] = rgb.?[0xb5 + (led * 3)];
|
||||||
|
out[n * 3 + 2] = rgb.?[0xb6 + (led * 3)];
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
led += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user