MCPcopy Create free account
hub / github.com/DFHack/dfhack / kittens

Function kittens

plugins/devel/kittens.cpp:380–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380command_result kittens (color_ostream &out, vector <string> & parameters)
381{
382 if (parameters.size() >= 1)
383 {
384 if (parameters[0] == "stop")
385 {
386 shutdown_flag = true;
387 while(!final_flag)
388 {
389 Core::getInstance().getConsole().msleep(60);
390 }
391 shutdown_flag = false;
392 return CR_OK;
393 }
394 }
395 final_flag = false;
396 if (!out.is_console())
397 return CR_FAILURE;
398 Console &con = static_cast<Console&>(out);
399 // http://evilzone.org/creative-arts/nyan-cat-ascii/
400 const char * nyan []=
401 {
402 "NYAN NYAN NYAN NYAN NYAN NYAN NYAN",
403 "+ o + o ",
404 " + o + +",
405 "o +",
406 " o + + +",
407 "+ o o + o",
408 "-_-_-_-_-_-_-_,------, o ",
409 "_-_-_-_-_-_-_-| /\\_/\\ ",
410 "-_-_-_-_-_-_-~|__( ^ .^) + + ",
411 "_-_-_-_-_-_-_-\"\" \"\" ",
412 "+ o o + o",
413 " + +",
414 "o o o o +",
415 " o +",
416 "+ + o o + ",
417 "NYAN NYAN NYAN NYAN NYAN NYAN NYAN",
418 0
419 };
420 const char VARIABLE_IS_NOT_USED * kittenz1 []=
421 {
422 " ____",
423 " (. \\",
424 " \\ | ",
425 " \\ |___(\\--/)",
426 " __/ ( . . )",
427 " \"'._. '-.O.'",
428 " '-. \\ \"|\\",
429 " '.,,/'.,,mrf",
430 0
431 };
432 con.cursor(false);
433 con.clear();
434 Console::color_value color = COLOR_BLUE;
435 while(1)
436 {
437 if(shutdown_flag || !con.isInited())

Callers

nothing calls this directly

Calls 9

color_valueEnum · 0.85
sizeMethod · 0.45
msleepMethod · 0.45
cursorMethod · 0.45
clearMethod · 0.45
reset_colorMethod · 0.45
colorMethod · 0.45
gotoxyMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected