add changes from second code review

This commit is contained in:
hynak 2025-12-03 18:27:16 -05:00
commit 47134d1671
2 changed files with 3 additions and 9 deletions

View file

@ -197,7 +197,7 @@ const tb_color_16 = [16]u32{
// Using bold for bright colors allows for all 16 colors to be rendered on tty term
const rgb_color_16 = [16]u32{
Color.DEFAULT, // DEFAULT instead of TRUE_BLACK to not break compositors (the ladder ignores transparency)
Color.DEFAULT, // DEFAULT instead of TRUE_BLACK to not break compositors (the latter ignores transparency)
Color.TRUE_DIM_RED,
Color.TRUE_DIM_GREEN,
Color.TRUE_DIM_YELLOW,

View file

@ -574,14 +574,8 @@ pub fn main() !void {
animation = game_of_life.animation();
},
.dur_file => {
var dur : ?DurFile = DurFile.init(allocator, &buffer, log_writer, config.dur_file_path, config.dur_x_offset, config.dur_y_offset, config.full_color) catch null;
if (dur) |*d| {
animation = d.animation();
} else {
var dummy = Dummy{};
animation = dummy.animation();
}
var dur = try DurFile.init(allocator, &buffer, log_writer, config.dur_file_path, config.dur_x_offset, config.dur_y_offset, config.full_color);
animation = dur.animation();
},
}
defer animation.deinit();