Add new reset section for nimgen and cleanup console

This commit is contained in:
Joey Yakimowich-Payne 2018-07-08 13:15:35 +09:00
commit 800877cc7e
3 changed files with 5 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# Package
version = "0.1.4"
version = "0.1.5"
author = "Joey Payne"
description = "Nintendo Switch library libnx for Nim."
license = "The Unlicense"

View file

@ -3,6 +3,7 @@ output="src/libnx/wrapper"
c_compiler="aarch64-none-elf-gcc"
cpp_compiler="aarch64-none-elf-g++"
filter=lock
reset=true
[n.include]
"${output}/nx/include"

View file

@ -6,10 +6,7 @@ import macros, strutils
type
PrintCallback* = proc (con: pointer; c: cint): bool
#Font* = ref object
# gfx*: Buffer[uint16]
# asciiOffset*: uint16
# numChars*: uint16
Font* = ref ConsoleFont
Style* {.pure.} = enum
Bold = CONSOLE_COLOR_BOLD(),
@ -71,9 +68,9 @@ proc toConsole(pconsole: ptr PrintConsole): Console =
#result.printCharCallback = cast[PrintCallback](pconsole.PrintChar)
result.initialised = pconsole.consoleInitialised
proc setFont*(console: Console; font: ConsoleFont) =
proc setFont*(console: Console; font: Font) =
var f = font
consoleSetFont(console.pcon, f.addr)
consoleSetFont(console.pcon, f[].addr)
console.font = console.pcon.font
proc setWindow*(console: Console, x, y, width, height: int) =