Robots/Wren: Difference between revisions

→‎Code: Sharper colors.
m (→‎Code: Added libheaders.)
(→‎Code: Sharper colors.)
Line 17:
class NC {
foreign static initScr()
foreign static useDefaultColors()
foreign static startColor()
 
Line 225 ⟶ 226:
var play = Fn.new {
NC.initScr()
NC.useDefaultColors()
NC.startColor()
for (i in 0...colors.count) {
NC.initPair(i+1, colors[i], 0-1)
NC.initPair(i+11, colors[i], 2)
}
Line 312 ⟶ 314:
void C_initScr(WrenVM* vm) {
initscr();
}
 
void C_useDefaultColors(WrenVM* vm) {
use_default_colors();
}
 
Line 415 ⟶ 421:
if (strcmp(module, "main") == 0) {
if (strcmp(className, "NC") == 0) {
if (isStatic && strcmp(signature, "initScr()") == 0) return C_initScr;
if (isStatic && strcmp(signature, "startColoruseDefaultColors()") == 0) return C_startColorC_useDefaultColors;
if (isStatic && strcmp(signature, "cbreakstartColor()") == 0) return C_cbreakC_startColor;
if (isStatic && strcmp(signature, "nocbreakcbreak()") == 0) return C_nocbreakC_cbreak;
if (isStatic && strcmp(signature, "echonocbreak()") == 0) return C_echoC_nocbreak;
if (isStatic && strcmp(signature, "noechoecho()") == 0) return C_noechoC_echo;
if (isStatic && strcmp(signature, "cursSetnoecho(_)") == 0) return C_cursSetC_noecho;
if (isStatic && strcmp(signature, "initPaircursSet(_,_,_)") == 0) return C_initPairC_cursSet;
if (isStatic && strcmp(signature, "attroninitPair(_,_,_)") == 0) return C_attronC_initPair;
if (isStatic && strcmp(signature, "attroffattron(_)") == 0) return C_attroffC_attron;
if (isStatic && strcmp(signature, "moveattroff(_,_)") == 0) return C_moveC_attroff;
if (isStatic && strcmp(signature, "mvaddStrmove(_,_,_)") == 0) return C_mvaddStrC_move;
if (isStatic && strcmp(signature, "getchmvaddStr(_,_,_)") == 0) return C_getchC_mvaddStr;
if (isStatic && strcmp(signature, "refreshgetch()") == 0) return C_refreshC_getch;
if (isStatic && strcmp(signature, "napmsrefresh(_)") == 0) return C_napmsC_refresh;
if (isStatic && strcmp(signature, "endwinnapms(_)") == 0) return C_endwinC_napms;
if (isStatic && strcmp(signature, "endwin()") == 0) return C_endwin;
}
}
9,490

edits