static PyObject * builtin_videomode(PyObject *self, PyObject *args) { PyObject *v = NULL; if (!PyArg_UnpackTuple(args, "inb", 1, 1, &v)) return NULL; if (!PyInt_CheckExact(v)) return NULL; switch(PyInt_AS_LONG(v)) { case 0: set80x25(); break; case 1: set640x480x16(); break; case 2: set320x200x256(); break; } Py_INCREF(Py_True); return Py_True; }
int main(void) { // puts("First, have a look at the 320x200 mode. I will draw some rubbish"); // puts("on all of the four pages, then let you cycle through them by"); // puts("hitting a key on each page."); // puts("Press a key when ready..."); // getch(); // set320x200x256_X(); // doTest(); // set80x25(); // puts("Then, check out Mode X, 320x240 with 3 (and a half) pages."); // puts("Press a key when ready..."); // getch(); set320x240x256_X(); doTest(); set80x25(); puts("Where to next? It's your move!"); return 0; }