static PyObject* osl_flushDataCache(PyObject *self, PyObject *args, PyObject *kwargs) { if (!PyArg_ParseTuple(args, ":flushDataCache")) return NULL; oslFlushDataCache(); Py_INCREF(Py_None); return Py_None; }
void oslConsolePrint(const char *str) { unsigned char c; // if (!osl_consoleOk) // return; OSL_FONT *oldFont = NULL; if (osl_curFont != osl_sceFont) { oldFont = osl_curFont; oslSetFont(osl_sceFont); } while(*str) { c = *(unsigned char*)str++; if (c!='\n') { oslDrawChar(osl_consolePosX, osl_consolePosY, c); osl_consolePosX += osl_curFont->charWidths[c]; } //A droite de l'écran if (osl_consolePosX+7 > osl_curBuf->sizeX || c=='\n') { osl_consolePosY += osl_curFont->charHeight; //[MARCHE PAS, TESTER] Trop bas -> défile if (osl_consolePosY + osl_curFont->charHeight > osl_curBuf->sizeY) { osl_consolePosY -= osl_curFont->charHeight; oslSyncDrawing(); oslMoveMem(oslAddVramPrefixPtr(oslGetImageLine(osl_curBuf, 0)), oslAddVramPrefixPtr(oslGetImageLine(osl_curBuf, osl_curFont->charHeight)), osl_curBuf->totalSize-(int)oslGetImageLine(osl_curBuf, osl_curFont->charHeight)); oslFlushDataCache(); oslDrawFillRect(0, osl_consolePosY, osl_curBuf->sizeX, osl_curBuf->sizeY, 0); } osl_consolePosX = 0; } } if (oldFont != NULL) oslSetFont(oldFont); }