mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-21 03:34:54 +00:00
Naming convention
This commit is contained in:
@@ -50,7 +50,7 @@ pub fn realloc(self: *Doom) !void {
|
|||||||
self.buffer = buffer;
|
self.buffer = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw_with_update(self: Doom) void {
|
pub fn drawWithUpdate(self: Doom) void {
|
||||||
for (0..self.terminal_buffer.width) |x| {
|
for (0..self.terminal_buffer.width) |x| {
|
||||||
for (1..self.terminal_buffer.height) |y| {
|
for (1..self.terminal_buffer.height) |y| {
|
||||||
// get source index
|
// get source index
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ pub fn realloc(self: *Matrix) !void {
|
|||||||
self.lines = lines;
|
self.lines = lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw_with_update(self: *Matrix) void {
|
pub fn drawWithUpdate(self: *Matrix) void {
|
||||||
const buf_height = self.terminal_buffer.height;
|
const buf_height = self.terminal_buffer.height;
|
||||||
const buf_width = self.terminal_buffer.width;
|
const buf_width = self.terminal_buffer.width;
|
||||||
|
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ pub fn main() !void {
|
|||||||
.doom => {
|
.doom => {
|
||||||
if (animation_timer.read() / std.time.ns_per_ms > config.animation_refresh_ms) {
|
if (animation_timer.read() / std.time.ns_per_ms > config.animation_refresh_ms) {
|
||||||
animation_timer.reset();
|
animation_timer.reset();
|
||||||
doom.draw_with_update();
|
doom.drawWithUpdate();
|
||||||
} else {
|
} else {
|
||||||
doom.draw();
|
doom.draw();
|
||||||
}
|
}
|
||||||
@@ -396,7 +396,7 @@ pub fn main() !void {
|
|||||||
.matrix => {
|
.matrix => {
|
||||||
if (animation_timer.read() / std.time.ns_per_ms > config.animation_refresh_ms) {
|
if (animation_timer.read() / std.time.ns_per_ms > config.animation_refresh_ms) {
|
||||||
animation_timer.reset();
|
animation_timer.reset();
|
||||||
matrix.draw_with_update();
|
matrix.drawWithUpdate();
|
||||||
} else {
|
} else {
|
||||||
matrix.draw();
|
matrix.draw();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user