Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local event = require("event")
- local gpu = require("component").gpu
- ------------------------------------------------------------------------------------------------------------
- local maximumLines = 60
- local minimumLineLength = 5
- local maximumLineLength = 55
- local chars = { "ァ", "ア", "ィ", "イ", "ゥ", "ウ", "ェ", "エ", "ォ", "オ", "カ", "ガ", "キ", "ギ", "ク", "グ", "ケ", "ゲ", "コ", "ゴ", "サ", "ザ", "シ", "ジ", "ス", "ズ", "セ", "ゼ", "ソ", "ゾ", "タ", "ダ", "チ", "ヂ", "ッ", "ツ", "ヅ", "テ", "デ", "ト", "ド", "ナ", "ニ", "ヌ", "ネ", "ノ", "ハ", "バ", "パ", "ヒ", "ビ", "ピ", "フ", "ブ", "プ", "ヘ", "ベ", "ペ", "ホ", "ボ", "ポ", "マ", "ミ", "ム", "メ", "モ", "ャ", "ヤ", "ュ", "ユ", "ョ", "ヨ", "ラ", "リ", "ル", "レ", "ロ", "ヮ", "ワ", "ヰ", "ヱ", "ヲ", "ン", "ヴ", "ヵ", "ヶ", "・", "ー", "ヽ", "ヾ" }
- local lineColorsForeground = { 0xFFFFFF, 0xBBFFBB, 0x88FF88, 0x33FF33, 0x00FF00, 0x00EE00, 0x00DD00, 0x00CC00, 0x00BB00, 0x00AA00, 0x009900, 0x008800, 0x007700, 0x006600, 0x005500, 0x004400, 0x003300, 0x002200, 0x001100 }
- local lineColorsBackground = { 0x004400, 0x004400, 0x003300, 0x003300, 0x002200, 0x001100 }
- local charsSize = #chars
- local lineColorsForegroundSize = #lineColorsForeground
- ------------------------------------------------------------------------------------------------------------
- local screenWidth, screenHeight = gpu.getResolution()
- local lines = {}
- local currentBackground, currentForeground
- ------------------------------------------------------------------------------------------------------------
- local function setBackground(color)
- if currentBackground ~= color then
- gpu.setBackground(color)
- currentBackground = color
- end
- end
- local function setForeground(color)
- if currentForeground ~= color then
- gpu.setForeground(color)
- currentForeground = color
- end
- end
- local function clearScreen()
- setBackground(0x000000)
- setForeground(0xFFFFFF)
- gpu.fill(1, 1, screenWidth, screenHeight, " ")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement