Naming convention

This commit is contained in:
peterc-s 2024-10-23 12:58:53 +01:00
parent 1ddccf2683
commit 7e69260511
No known key found for this signature in database
GPG Key ID: 41E806B8F7F83E59
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;

View File

@ -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();
} }