//------------------------------------------------------------------------- void GFX_CmdQueSetNewConfig(INT32 i4NewConfig) { _i4GfxCmdqNewConfig = i4NewConfig; { static volatile GFX_CMDQUE_T *_shm_cmd_que; static volatile UINT64 *_cmd_que_buf; GFX_Init( _shm_cmd_que, &_cmd_que_buf ); } }
char GLIB_Init(void) { GFX_Init(); GLIB_Idle = &OS_Update; GLIB_Beep = &SND_Beep; GLIB_GetInput = &INP_GetInputState; //compiler doesn't like that these two take dif parameters? GLIB_GetWheelRegion = &INP_GetWheelRegion; //next set up game data table /* m_gameDataTable[0].name = PSTR("INP"); m_gameDataTable[0].initFunc = &GameInputTest; m_gameDataTable[0].loopFunc = &GameInputTest; m_gameDataTable[2].name = PSTR("STXT"); m_gameDataTable[2].initFunc = &InitGameScrollText; m_gameDataTable[2].loopFunc = &GameScrollText; m_gameDataTable[3].name = PSTR("BATT"); m_gameDataTable[3].initFunc = &BatteryLevelTest; m_gameDataTable[3].loopFunc = &BatteryLevelTest; m_gameDataTable[0].name = PSTR("PMEM"); m_gameDataTable[0].initFunc = &ProgMemTest; m_gameDataTable[0].loopFunc = &ProgMemTest; */ m_gameDataTable[0].name = PSTR("PONG"); m_gameDataTable[0].initFunc = &InitPongGame; m_gameDataTable[0].loopFunc = &PongGameLoop; m_gameDataTable[1].name = PSTR("MEMVIEW"); m_gameDataTable[1].initFunc = &MemViewer; m_gameDataTable[1].loopFunc = &MemViewer; m_gameDataTable[2].name = PSTR("INVADERS"); m_gameDataTable[2].initFunc = &InitInvaders; m_gameDataTable[2].loopFunc = &InvadersLoop; m_gameDataTable[3].name = PSTR("GOL"); m_gameDataTable[3].initFunc = &GameOfLifeInit; m_gameDataTable[3].loopFunc = &GameOfLifeLoop; m_gameDataTable[4].name = PSTR("SMLY"); m_gameDataTable[4].initFunc = &InitSmiley; m_gameDataTable[4].loopFunc = &GameSmiley; return 1; }
static void VID_Restart_f(void) { extern void GFX_Init(void); extern void ReloadPaletteAndColormap(void); qbool old_con_suppress; if (!host_initialized) { // sanity Com_Printf("Can't do %s yet\n", Cmd_Argv(0)); return; } VID_Shutdown(); ReloadPaletteAndColormap(); // keys can get stuck because SDL2 doesn't send keyup event when the video system is down Key_ClearStates(); VID_Init(host_basepal); // force models to reload (just flush, no actual loading code here) Cache_Flush(); // shut up warnings during GFX_Init(); old_con_suppress = con_suppress; con_suppress = (developer.value ? false : true); // reload 2D textures, particles textures, some other textures and gfx.wad GFX_Init(); // reload skins Skin_Skins_f(); con_suppress = old_con_suppress; // we need done something like for map reloading, for example reload textures for brush models R_NewMap(true); // force all cached models to be loaded, so no short HDD lag then u walk over level and discover new model Mod_TouchModels(); // window may be re-created, so caption need to be forced to update CL_UpdateCaption(true); }
static bool Unknown_25C4_000E(void) { Timer_Init(); if (!Video_Init()) return false; Mouse_Init(); /* Add the general tickers */ Timer_Add(Video_Tick, 1000000 / 60); Timer_Add(Timer_Tick, 1000000 / 60); g_var_7097 = -1; GFX_Init(); GFX_ClearScreen(); if (!Font_Init()) { Error( "--------------------------\n" "ERROR LOADING DATA FILE\n" "\n" "Did you copy the Dune2 1.07eu data files into the data directory ?\n" "\n" ); return false; } Font_Select(g_fontNew8p); g_palette_998A = calloc(256 * 3, sizeof(uint8)); memset(&g_palette_998A[45], 63, 3); GFX_SetPalette(g_palette_998A); Tools_RandomLCG_Seed((unsigned)time(NULL)); Widget_SetCurrentWidget(0); return true; }
/** * Initialize Timer, Video, Mouse, GFX, Fonts, Random number generator * and current Widget */ static bool OpenDune_Init(int screen_magnification, VideoScaleFilter filter) { if (!Font_Init()) { Error( "--------------------------\n" "ERROR LOADING DATA FILE\n" "\n" "Did you copy the Dune2 1.07eu data files into the data directory ?\n" "\n" ); return false; } Timer_Init(); if (!Video_Init(screen_magnification, filter)) return false; Mouse_Init(); /* Add the general tickers */ Timer_Add(Timer_Tick, 1000000 / 60, false); Timer_Add(Video_Tick, 1000000 / 60, true); g_mouseDisabled = -1; GFX_Init(); GFX_ClearScreen(); Font_Select(g_fontNew8p); g_palette_998A = calloc(256 * 3, sizeof(uint8)); memset(&g_palette_998A[45], 63, 3); GFX_SetPalette(g_palette_998A); Tools_RandomLCG_Seed((unsigned)time(NULL)); Widget_SetCurrentWidget(0); return true; }
static bool Unknown_25C4_000E() { if (!Video_Init()) return false; /* g_var_7097 = -1; */ GFX_Init(); GFX_ClearScreen(); if (!Font_Init()) { Error( "--------------------------\n" "ERROR LOADING DATA FILE\n" "\n" "Did you copy the Dune2 1.07eu data files into the data directory\n" "%s/data ?\n" "\n", g_dune_data_dir ); return false; } Font_Select(g_fontNew8p); memset(g_palette_998A, 0, 3 * 256); memset(&g_palette_998A[45], 63, 3); GFX_SetPalette(g_palette_998A); srand((unsigned)time(NULL)); Tools_RandomLCG_Seed((unsigned)time(NULL)); Widget_SetCurrentWidget(0); return true; }