mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-20 19:24:53 +00:00
Various bug fixes and small features (#606)
* Fix stray cursor, integer overflows and other bugs * check for getenvlist error, shorten code * fix cascade, set info_line before auth, make code clearer and a bug fix * Add option to turn on numlock at startup * Fix setting numlock * Update build.zig * Custom info text * Shift+Tab for previous input * update changelog and res/config * Some fixes * update build.zig * update build.zig again * Fix xauth command for some shells and fix building in ReleaseSafe * Use git describe to get dev version str * revert change to getLockState (it broke the doom animation) * add new ly error messages. Only try to make path for pam/exe during install when dest_directory is defined + print warning on error. * add warning message for workaround
This commit is contained in:
@@ -56,7 +56,7 @@ pub fn draw(self: Doom) void {
|
||||
const source = y * self.terminal_buffer.width + x;
|
||||
const random = (self.terminal_buffer.random.int(u16) % 7) & 3;
|
||||
|
||||
var dest = source - random + 1;
|
||||
var dest = (source - @min(source, random)) + 1;
|
||||
if (self.terminal_buffer.width > dest) dest = 0 else dest -= self.terminal_buffer.width;
|
||||
|
||||
const buffer_source = self.buffer[source];
|
||||
|
||||
@@ -145,15 +145,15 @@ pub fn draw(self: *Matrix) void {
|
||||
var y: u64 = 1;
|
||||
while (y <= self.terminal_buffer.height) : (y += 1) {
|
||||
const dot = self.dots[buf_width * y + x];
|
||||
var fg: u32 = @intCast(termbox.TB_GREEN);
|
||||
var fg: u16 = @intCast(termbox.TB_GREEN);
|
||||
|
||||
if (dot.value == -1 or dot.value == ' ') {
|
||||
termbox.tb_change_cell(@intCast(x), @intCast(y - 1), ' ', fg, termbox.TB_DEFAULT);
|
||||
_ = termbox.tb_set_cell(@intCast(x), @intCast(y - 1), ' ', fg, termbox.TB_DEFAULT);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dot.is_head) fg = @intCast(termbox.TB_WHITE | termbox.TB_BOLD);
|
||||
termbox.tb_change_cell(@intCast(x), @intCast(y - 1), @intCast(dot.value), fg, termbox.TB_DEFAULT);
|
||||
_ = termbox.tb_set_cell(@intCast(x), @intCast(y - 1), @intCast(dot.value), fg, termbox.TB_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user