/* ============= SV_RunThink Runs thinking code for this frame if necessary ============= */ qboolean SV_RunThink (edict_t *ent) { float thinktime; thinktime = ent->nextthink; if (thinktime <= 0) return true; if (thinktime > level.time+0.001) return true; //gi.dprintf("SV_RunThink()\n"); //GHz START // stupid q2, this should NEVER happen! if (!ent || (ent->inuse != 1)) { gi.dprintf("WARNING: SV_RunThink() parsing a freed entity!\n"); return true; } //GHz END ent->nextthink = 0; if (!ent->think) { showDebugInfo(ent); gi.error ("NULL ent->think"); } ent->think (ent); return false; }
void Window::initialize() { showDebugInfo(); fprintf(stdout, "Initializing SDL system\r\n"); if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_TIMER) != 0) { fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError()); exit(1); } fprintf(stdout, "Initializing font system\r\n"); if(TTF_Init() == -1) { fprintf(stderr, "Unable to init SDL_ttf: %s\n", TTF_GetError()); exit(2); } fprintf(stdout, "Initializing audio system\r\n"); if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 4096) < 0) { fprintf(stderr, "Unable to open audio channel: %s\n", Mix_GetError()); exit(3); } }