init order cleanup

This commit is contained in:
Bill Currie 2002-01-17 04:11:36 +00:00
parent 303581b798
commit 5a1c7ecd2b
8 changed files with 30 additions and 61 deletions

View file

@ -83,7 +83,5 @@ COM_Init (void)
cmdline = Cvar_Get ("cmdline", "0", CVAR_SERVERINFO, Cvar_Info, "None");
Cmd_AddCommand ("path", COM_Path_f, "Show what paths Quake is using");
COM_Filesystem_Init_Cvars ();
COM_Filesystem_Init ();
COM_CheckRegistered ();
}

View file

@ -880,6 +880,8 @@ Host_Init (quakeparms_t *parms)
Cmd_Init_Hash ();
Memory_Init (parms->membase, parms->memsize);
Cvar_Init ();
Sys_Init_Cvars ();
Sys_Init ();
Cbuf_Init ();
Cmd_Init ();
@ -910,8 +912,11 @@ Host_Init (quakeparms_t *parms)
Cmd_StuffCmds_f ();
Cbuf_Execute_Sets ();
PI_Init ();
Chase_Init_Cvars ();
CL_InitCvars ();
COM_Filesystem_Init_Cvars ();
IN_Init_Cvars ();
VID_Init_Cvars ();
S_Init_Cvars ();
@ -928,10 +933,12 @@ Host_Init (quakeparms_t *parms)
Cmd_StuffCmds_f ();
Cbuf_Execute_Sets ();
PI_Init ();
V_Init ();
COM_Filesystem_Init ();
Game_Init ();
COM_Init ();
PI_RegisterPlugins (client_plugin_list);
if (isDedicated)
Con_Init ("server");
else
@ -940,42 +947,34 @@ Host_Init (quakeparms_t *parms)
con_module->data->console->realtime = &realtime;
}
V_Init ();
COM_Init ();
GIB_Init ();
Game_Init ();
NET_Init ();
Host_InitVCR (parms);
Host_InitLocal ();
W_LoadWadFile ("gfx.wad");
Key_Init ();
Mod_Init ();
// FIXME: MENUCODE
// M_Init ();
PR_Init ();
SV_Progs_Init ();
Mod_Init ();
NET_Init ();
SV_Init ();
Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
// Con_Printf ("Exe: " __TIME__ " " __DATE__ "\n");
Con_Printf ("%4.1f megabyte heap\n", parms->memsize / (1024 * 1024.0));
if (cls.state != ca_dedicated) {
vid_basepal = (byte *) COM_LoadHunkFile ("gfx/palette.lmp");
if (!vid_basepal)
Sys_Error ("Couldn't load gfx/palette.lmp");
// LordHavoc: force the transparent color to black
vid_basepal[765] = vid_basepal[766] = vid_basepal[767] = 0;
vid_colormap = (byte *) COM_LoadHunkFile ("gfx/colormap.lmp");
if (!vid_colormap)
Sys_Error ("Couldn't load gfx/colormap.lmp");
VID_Init (vid_basepal);
IN_Init ();
Draw_Init ();
SCR_Init ();
R_Init ();
@ -985,6 +984,8 @@ Host_Init (quakeparms_t *parms)
CDAudio_Init ();
Sbar_Init ();
CL_Init ();
IN_Init ();
CL_SetState (ca_disconnected);
}
Host_Skin_Init ();
@ -1002,7 +1003,7 @@ Host_Init (quakeparms_t *parms)
host_initialized = true;
Con_Printf ("========Quake Initialized=========\n");
Con_Printf ("\x80\x81\x81\x81\x81\x81\x81\x81%s Initialized\x81\x81\x81\x81\x81\x81\x81\x81\x82\n", PROGRAM);
CL_UpdateScreen (cl.time);
}

View file

@ -200,9 +200,6 @@ SDL_main (int c, char **v)
Host_Init (&host_parms);
Sys_Init_Cvars ();
Sys_Init ();
oldtime = Sys_DoubleTime ();
while (1) {
// find time spent rendering last frame

View file

@ -179,9 +179,6 @@ main (int c, const char *v[])
Con_Printf ("Host_Init\n");
Host_Init (&parms);
Sys_Init_Cvars ();
Sys_Init ();
if (!sys_nostdout->int_val) {
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
Con_Printf ("Quake -- Version %s\n", NQ_VERSION);

View file

@ -181,9 +181,6 @@ main (int argc, const char **argv)
Sys_Printf ("Host_Init\n");
Host_Init (&parms);
Sys_Init_Cvars ();
Sys_Init ();
oldtime = Sys_DoubleTime () - 0.1;
while (1) { // Main message loop
// find time spent rendering last frame

View file

@ -425,8 +425,6 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
InitConProc (hFile, heventParent, heventChild);
}
Sys_Init ();
// because sound is off until we become active
//XXX S_BlockSound ();
@ -436,9 +434,6 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
Con_Printf ("Host_Init\n");
Host_Init (&parms);
Sys_Init_Cvars ();
Sys_Init ();
oldtime = Sys_DoubleTime ();
/* main window message loop */

View file

@ -159,9 +159,6 @@ main (int argc, const char **argv)
Con_Printf ("Host_Init\n");
Host_Init (&parms);
Sys_Init_Cvars ();
Sys_Init ();
oldtime = Sys_DoubleTime ();
/* main window message loop */

View file

@ -1642,8 +1642,6 @@ Host_Init (void)
cls.userinfo = Info_ParseString ("", MAX_INFO_STRING);
cl.serverinfo = Info_ParseString ("", MAX_INFO_STRING);
Locs_Init ();
PI_Init ();
CL_Cam_Init_Cvars ();
@ -1673,6 +1671,14 @@ Host_Init (void)
Game_Init ();
COM_Init ();
PI_RegisterPlugins (client_plugin_list);
Con_Init ("client");
if (con_module) {
con_module->data->console->dl_name = cls.downloadname;
con_module->data->console->dl_percent = &cls.downloadpercent;
con_module->data->console->realtime = &realtime;
}
NET_Init (cl_port->int_val);
Netchan_Init ();
{
@ -1686,19 +1692,12 @@ Host_Init (void)
W_LoadWadFile ("gfx.wad");
Key_Init ();
PI_RegisterPlugins (client_plugin_list);
Con_Init ("client");
if (con_module) {
con_module->data->console->dl_name = cls.downloadname;
con_module->data->console->dl_percent = &cls.downloadpercent;
con_module->data->console->realtime = &realtime;
}
Mod_Init ();
CL_TimeFrames_Init();
// Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
Con_Printf ("%4.1f megs RAM used.\n", cl_mem_size->value);
Con_Printf ("%4.1f megabyte heap.\n", cl_mem_size->value);
vid_basepal = (byte *) COM_LoadHunkFile ("gfx/palette.lmp");
if (!vid_basepal)
@ -1706,20 +1705,7 @@ Host_Init (void)
vid_colormap = (byte *) COM_LoadHunkFile ("gfx/colormap.lmp");
if (!vid_colormap)
Sys_Error ("Couldn't load gfx/colormap.lmp");
#ifdef __linux__
CDAudio_Init ();
VID_Init (vid_basepal);
IN_Init ();
Draw_Init ();
SCR_Init ();
R_Init ();
S_Init (&cl.worldmodel, &viewentity, &host_frametime);
Sbar_Init ();
CL_Skin_Init ();
CL_Init ();
#else
VID_Init (vid_basepal);
Draw_Init ();
SCR_Init ();
@ -1729,10 +1715,12 @@ Host_Init (void)
CDAudio_Init ();
Sbar_Init ();
CL_Skin_Init ();
CL_Init ();
IN_Init ();
#endif
CL_SetState (ca_disconnected);
CL_Skin_Init ();
Locs_Init ();
if (cl_quakerc->int_val)
Cbuf_InsertText ("exec quake.rc\n");
@ -1751,12 +1739,11 @@ Host_Init (void)
host_initialized = true;
CL_SetState (ca_disconnected);
Con_Printf ("\nClient version %s (build %04d)\n\n", VERSION,
build_number ());
Con_Printf ("<EFBFBD><EFBFBD> %s initialized €<><E282AC>\n", PROGRAM);
Con_Printf ("\x80\x81\x81\x82 %s initialized \x80\x81\x81\x82\n", PROGRAM);
CL_UpdateScreen (realtime);
}