MCPcopy Create free account
hub / github.com/devkitPro/libctru / newRow

Function newRow

libctru/source/console.c:746–770  ·  view source on GitHub ↗

---------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

744
745//---------------------------------------------------------------------------------
746static void newRow() {
747//---------------------------------------------------------------------------------
748
749
750 currentConsole->cursorY ++;
751
752
753 if(currentConsole->cursorY > currentConsole->windowHeight) {
754 currentConsole->cursorY = currentConsole->windowHeight;
755 u16 *dst = &currentConsole->frameBuffer[((currentConsole->windowX - 1 ) * 8 * 240) + (239 - ((currentConsole->windowY-1) * 8))];
756 u16 *src = dst - 8;
757
758 int i,j;
759
760 for (i=0; i<(currentConsole->windowWidth)*8; i++) {
761 u32 *from = (u32*)((int)src & ~3);
762 u32 *to = (u32*)((int)dst & ~3);
763 for (j=0;j<(((currentConsole->windowHeight-1)*8)/2);j++) *(to--) = *(from--);
764 dst += 240;
765 src += 240;
766 }
767
768 consoleClearLine(2);
769 }
770}
771//---------------------------------------------------------------------------------
772void consoleDrawChar(int c) {
773//---------------------------------------------------------------------------------

Callers 1

consolePrintCharFunction · 0.85

Calls 1

consoleClearLineFunction · 0.85

Tested by

no test coverage detected