LOCALPROC SixtiethSecondNotify(void) { #if dbglog_HAVE && 0 dbglog_WriteNote("begin new Sixtieth"); #endif Mouse_Update(); InterruptReset_Update(); #if EmClassicKbrd KeyBoard_Update(); #endif #if EmADB ADB_Update(); #endif Sixtieth_PulseNtfy(); /* Vertical Blanking Interrupt */ Sony_Update(); #if EmLocalTalk LocalTalkTick(); #endif #if EmRTC RTC_Interrupt(); #endif #if EmVidCard Vid_Update(); #endif SubTickTaskStart(); }
void Vid_Reset() { if (!initted) return; Vid_UnsetMode(); Vid_SetMode(); // need to redraw buffer to screen Vid_Update(); }
void swgets(char *s, int max) { int or_x = cur_x, or_y = cur_y; int erase_len = 0; int x, y; for (;;) { unsigned char c; // erase background from previous write for (y = 0; y < 8; ++y) { for (x = 0; x < erase_len * 8; ++x) { Vid_PlotPixel (or_x * 8 + x, SCR_HGHT - (or_y * 8 + y), 0); } } cur_x = or_x; cur_y = or_y; erase_len = (int)strlen(s); swputs(s); Vid_Update(); // read next keypress while (!(c = swgetc())); if (isprint(c) && (int)strlen(s) < max) { s[strlen(s) + 1] = '\0'; s[strlen(s)] = c; } else if (c == '\b') { // backspace s[strlen(s) - 1] = '\0'; } else if (c == '\n') { break; } } }
void swdisp() { OBJECTS *ob; int lag; Vid_ClearBuf(); // display the status bar dispstatusbar(); // heads up splats if (conf_hudsplats) swdispsplats(); // "the end" dispendmessage(); // lag = latest_player_time[player] - countmove; // calculate displx from the player position // do sanity checks to make sure we never go out of range displx = consoleplayer->ob_x - SCR_CENTR; // displx += consoleplayer->ob_dx * lag; if (displx < 0) displx = 0; else if (displx >= MAX_X - SCR_WDTH) displx = MAX_X - SCR_WDTH - 1; // draw objects for (ob = objtop; ob; ob = ob->ob_next) { int x, y; x = ob->ob_x; y = ob->ob_y; // x += ob->ob_dx * lag; // y += ob->ob_dy * lag; if (ob->ob_drwflg && x >= displx && x < displx + SCR_WDTH) { swputsym(x - displx, y, ob); if (ob->ob_drawf) (*(ob->ob_drawf)) (ob); } } dispgrnd(); forcdisp = TRUE; // need to update the screen as we arent writing // directly into vram any more Vid_Update(); }