Switch to c++

This commit is contained in:
2025-12-07 17:22:12 +00:00
parent 2927df7710
commit 7acf35c8ea
55 changed files with 3506 additions and 304 deletions

30
__old__/fm.rb Normal file
View File

@@ -0,0 +1,30 @@
module FileManager
@hidden = true
module_function
def start(x, y, width, height)
@hidden = false
@x = x
@y = y
@width = width
@height = height
end
def toggle!
@hidden = !@hidden
end
def render
return if @hidden
(0...@height).each { |h| (0...@width).each { |w|
C.update @y + h, @x + w, ' ', 0x000000, 0x000000, 0
} }
files = $folder.children
files.each_with_index do |f, i|
f.each_char.with_index do |c, j|
C.update @y + i, @x + j, c, 0xFFFFFF, 0x000000, 0
end
end
end
end