Skip to content

Instantly share code, notes, and snippets.

@LizzyTrickster
Created November 17, 2018 20:33

Revisions

  1. LizzyTrickster created this gist Nov 17, 2018.
    19 changes: 19 additions & 0 deletions thing.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    function set(x, y, char, fc, bc)
    fgc = fc or 0xFFFFFF
    bgc = bc or 0x000000
    gp.setBackground(bcg)
    gp.setForeground(fcg)
    if x <= screen_x and y <= screen_y then
    gp.bind(screens.TL, false)
    gp.set(x, y, char)
    elseif x > screen_x and y <= screen_y then
    gp.bind(screens.TR, false)
    gp.set(x-screen_x, y, char)
    elseif x<= screen_x and y > screen_y then
    gp.bind(screens.BL, false)
    gp.set(x, y-screen_y, char)
    elseif x > screen_x and y > screen_y then
    gp.bind(screens.BR, false)
    gp.set(x-screen_x, y-screen_y, char)
    end
    end