mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'loadbar_plus' into '22-merge-again'
(22mergeagain) Loadbar plus See merge request KartKrew/Kart!407
This commit is contained in:
commit
553d708525
10 changed files with 108 additions and 104 deletions
|
|
@ -57,7 +57,6 @@ I_mutex con_mutex;
|
||||||
|
|
||||||
static boolean con_started = false; // console has been initialised
|
static boolean con_started = false; // console has been initialised
|
||||||
boolean con_startup = false; // true at game startup
|
boolean con_startup = false; // true at game startup
|
||||||
boolean con_refresh = false; // screen needs refreshing
|
|
||||||
|
|
||||||
con_loadprogress_t con_startup_loadprogress = 0; // Progress for startup load bar
|
con_loadprogress_t con_startup_loadprogress = 0; // Progress for startup load bar
|
||||||
|
|
||||||
|
|
@ -457,7 +456,6 @@ void CON_Init(void)
|
||||||
|
|
||||||
con_started = true;
|
con_started = true;
|
||||||
con_startup = true;
|
con_startup = true;
|
||||||
con_refresh = true; // needs explicit screen refresh until we are in the main game loop
|
|
||||||
consoletoggle = false;
|
consoletoggle = false;
|
||||||
|
|
||||||
Unlock_state();
|
Unlock_state();
|
||||||
|
|
@ -477,7 +475,6 @@ void CON_Init(void)
|
||||||
|
|
||||||
con_started = true;
|
con_started = true;
|
||||||
con_startup = false;
|
con_startup = false;
|
||||||
con_refresh = false; // disable explicit screen refresh
|
|
||||||
consoletoggle = true;
|
consoletoggle = true;
|
||||||
|
|
||||||
Unlock_state();
|
Unlock_state();
|
||||||
|
|
@ -1497,7 +1494,6 @@ void CONS_Printf(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
static char *txt = NULL;
|
static char *txt = NULL;
|
||||||
boolean refresh;
|
|
||||||
|
|
||||||
if (txt == NULL)
|
if (txt == NULL)
|
||||||
txt = malloc(8192);
|
txt = malloc(8192);
|
||||||
|
|
@ -1519,16 +1515,8 @@ void CONS_Printf(const char *fmt, ...)
|
||||||
|
|
||||||
// make sure new text is visible
|
// make sure new text is visible
|
||||||
con_scrollup = 0;
|
con_scrollup = 0;
|
||||||
refresh = con_refresh;
|
|
||||||
|
|
||||||
Unlock_state();
|
Unlock_state();
|
||||||
|
|
||||||
// if not in display loop, force screen update
|
|
||||||
if (refresh)
|
|
||||||
{
|
|
||||||
CON_Drawer(); // here we display the console text
|
|
||||||
I_FinishUpdate(); // page flip or blit buffer
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CONS_Alert(alerttype_t level, const char *fmt, ...)
|
void CONS_Alert(alerttype_t level, const char *fmt, ...)
|
||||||
|
|
@ -1892,6 +1880,25 @@ void CON_Drawer(void)
|
||||||
Unlock_state();
|
Unlock_state();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *CON_LoadingStrings[LOADED_ALLDONE+1] =
|
||||||
|
{
|
||||||
|
"Init zone memory...", //LOADED_ZINIT
|
||||||
|
"Init game timing...", //LOADED_ISTARTUPTIMER
|
||||||
|
"Loading main assets...", //LOADED_IWAD
|
||||||
|
"Loading add-ons...", //LOADED_PWAD
|
||||||
|
"Init graphics subsystem...", //LOADED_ISTARTUPGRAPHICS
|
||||||
|
"Cache fonts...", //LOADED_HUINIT
|
||||||
|
"Load settings...", //LOADED_CONFIG
|
||||||
|
"Cache textures...", //LOADED_INITTEXTUREDATA
|
||||||
|
"Cache sprites...", //LOADED_INITSPIRTES
|
||||||
|
"Load characters...", //LOADED_INITSKINS
|
||||||
|
"Init rendering daemon...", //LOADED_RINIT
|
||||||
|
"Init audio subsystem...", //LOADED_SINITSFXCHANNELS
|
||||||
|
"Cache HUD...", //LOADED_STINIT
|
||||||
|
"Check game status...", //LOADED_DCHECKNETGAME
|
||||||
|
"Now starting..."
|
||||||
|
}; // see also con_loadprogress_t in console.h
|
||||||
|
|
||||||
//
|
//
|
||||||
// Error handling for the loading bar, to ensure it doesn't skip any steps.
|
// Error handling for the loading bar, to ensure it doesn't skip any steps.
|
||||||
//
|
//
|
||||||
|
|
@ -1906,6 +1913,14 @@ void CON_SetLoadingProgress(con_loadprogress_t newStep)
|
||||||
}
|
}
|
||||||
|
|
||||||
con_startup_loadprogress = newStep;
|
con_startup_loadprogress = newStep;
|
||||||
|
|
||||||
|
if (con_startup_loadprogress <= LOADED_ALLDONE)
|
||||||
|
CONS_Printf("LOADING UPDATE - %s\n", CON_LoadingStrings[con_startup_loadprogress]);
|
||||||
|
|
||||||
|
if (con_startup_loadprogress < LOADED_ISTARTUPGRAPHICS) // rendering not possible?
|
||||||
|
return;
|
||||||
|
CON_DrawLoadBar(); // here we display the console text
|
||||||
|
I_FinishUpdate(); // page flip or blit buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -1928,6 +1943,10 @@ void CON_DrawLoadBar(void)
|
||||||
|
|
||||||
barwidth = (BASEVIDWIDTH * con_startup_loadprogress) / LOADED_ALLDONE;
|
barwidth = (BASEVIDWIDTH * con_startup_loadprogress) / LOADED_ALLDONE;
|
||||||
V_DrawFill(0, BASEVIDHEIGHT - barheight, barwidth, barheight, 0);
|
V_DrawFill(0, BASEVIDHEIGHT - barheight, barwidth, barheight, 0);
|
||||||
|
#ifdef DEVELOP
|
||||||
|
if (con_startup_loadprogress <= LOADED_ALLDONE)
|
||||||
|
V_DrawString(4, BASEVIDHEIGHT - (barheight + 8 + 4), 0, CON_LoadingStrings[con_startup_loadprogress]);
|
||||||
|
#endif
|
||||||
|
|
||||||
Unlock_state();
|
Unlock_state();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,7 @@ extern boolean con_recalc;
|
||||||
// console being displayed at game startup
|
// console being displayed at game startup
|
||||||
extern boolean con_startup;
|
extern boolean con_startup;
|
||||||
|
|
||||||
// needs explicit screen refresh until we are in the main game loop
|
// when modifying the below, you must also adjust d_main and console.c
|
||||||
extern boolean con_refresh;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
LOADED_ZINIT = 1,
|
LOADED_ZINIT = 1,
|
||||||
|
|
@ -38,8 +36,11 @@ typedef enum
|
||||||
LOADED_IWAD,
|
LOADED_IWAD,
|
||||||
LOADED_PWAD,
|
LOADED_PWAD,
|
||||||
LOADED_ISTARTUPGRAPHICS,
|
LOADED_ISTARTUPGRAPHICS,
|
||||||
LOADED_HULOADGRAPHICS,
|
LOADED_HUINIT,
|
||||||
LOADED_MINIT,
|
LOADED_CONFIG,
|
||||||
|
LOADED_INITTEXTUREDATA,
|
||||||
|
LOADED_INITSPRITES,
|
||||||
|
LOADED_INITSKINS,
|
||||||
LOADED_RINIT,
|
LOADED_RINIT,
|
||||||
LOADED_SINITSFXCHANNELS,
|
LOADED_SINITSFXCHANNELS,
|
||||||
LOADED_STINIT,
|
LOADED_STINIT,
|
||||||
|
|
|
||||||
69
src/d_main.c
69
src/d_main.c
|
|
@ -706,7 +706,6 @@ void D_SRB2Loop(void)
|
||||||
oldentertics = I_GetTime();
|
oldentertics = I_GetTime();
|
||||||
|
|
||||||
// end of loading screen: CONS_Printf() will no more call FinishUpdate()
|
// end of loading screen: CONS_Printf() will no more call FinishUpdate()
|
||||||
con_refresh = false;
|
|
||||||
con_startup = false;
|
con_startup = false;
|
||||||
|
|
||||||
// make sure to do a d_display to init mode _before_ load a level
|
// make sure to do a d_display to init mode _before_ load a level
|
||||||
|
|
@ -1435,7 +1434,6 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
CONS_Printf("I_StartupGraphics()...\n");
|
CONS_Printf("I_StartupGraphics()...\n");
|
||||||
I_StartupGraphics();
|
I_StartupGraphics();
|
||||||
CON_SetLoadingProgress(LOADED_ISTARTUPGRAPHICS);
|
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
// Lactozilla: Add every hardware mode CVAR and CCMD.
|
// Lactozilla: Add every hardware mode CVAR and CCMD.
|
||||||
|
|
@ -1448,10 +1446,15 @@ void D_SRB2Main(void)
|
||||||
// setup loading screen
|
// setup loading screen
|
||||||
SCR_Startup();
|
SCR_Startup();
|
||||||
|
|
||||||
|
CON_SetLoadingProgress(LOADED_ISTARTUPGRAPHICS);
|
||||||
|
|
||||||
|
CONS_Printf("HU_Init()...\n");
|
||||||
HU_Init();
|
HU_Init();
|
||||||
|
|
||||||
CON_Init();
|
CON_Init();
|
||||||
|
|
||||||
|
CON_SetLoadingProgress(LOADED_HUINIT);
|
||||||
|
|
||||||
memset(timelimits, 0, sizeof(timelimits));
|
memset(timelimits, 0, sizeof(timelimits));
|
||||||
memset(pointlimits, 0, sizeof(pointlimits));
|
memset(pointlimits, 0, sizeof(pointlimits));
|
||||||
|
|
||||||
|
|
@ -1464,14 +1467,10 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
I_RegisterSysCommands();
|
I_RegisterSysCommands();
|
||||||
|
|
||||||
CONS_Printf("HU_LoadGraphics()...\n");
|
|
||||||
HU_LoadGraphics();
|
|
||||||
CON_SetLoadingProgress(LOADED_HULOADGRAPHICS);
|
|
||||||
|
|
||||||
//--------------------------------------------------------- CONFIG.CFG
|
//--------------------------------------------------------- CONFIG.CFG
|
||||||
M_FirstLoadConfig(); // WARNING : this do a "COM_BufExecute()"
|
M_FirstLoadConfig(); // WARNING : this do a "COM_BufExecute()"
|
||||||
|
|
||||||
G_LoadGameData();
|
M_Init();
|
||||||
|
|
||||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
||||||
VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen
|
VID_PrepareModeList(); // Regenerate Modelist according to cv_fullscreen
|
||||||
|
|
@ -1480,35 +1479,28 @@ void D_SRB2Main(void)
|
||||||
// set user default mode or mode set at cmdline
|
// set user default mode or mode set at cmdline
|
||||||
SCR_CheckDefaultMode();
|
SCR_CheckDefaultMode();
|
||||||
|
|
||||||
|
if (M_CheckParm("-noupload"))
|
||||||
|
COM_BufAddText("downloading 0\n");
|
||||||
|
|
||||||
|
G_LoadGameData();
|
||||||
|
|
||||||
wipegamestate = gamestate;
|
wipegamestate = gamestate;
|
||||||
|
|
||||||
savedata.lives = 0; // flag this as not-used
|
savedata.lives = 0; // flag this as not-used
|
||||||
|
|
||||||
//------------------------------------------------ COMMAND LINE PARAMS
|
CON_SetLoadingProgress(LOADED_CONFIG);
|
||||||
|
|
||||||
// this must be done after loading gamedata,
|
CONS_Printf("R_InitTextureData()...\n");
|
||||||
// to avoid setting off the corrupted gamedata code in G_LoadGameData if a SOC with custom gamedata is added
|
R_InitTextureData(); // seperated out from below because it takes ages by itself
|
||||||
// -- Monster Iestyn 20/02/20
|
CON_SetLoadingProgress(LOADED_INITTEXTUREDATA);
|
||||||
if (M_CheckParm("-warp") && M_IsNextParm())
|
|
||||||
{
|
|
||||||
const char *word = M_GetNextParm();
|
|
||||||
pstartmap = G_FindMapByNameOrCode(word, 0);
|
|
||||||
if (! pstartmap)
|
|
||||||
I_Error("Cannot find a map remotely named '%s'\n", word);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!M_CheckParm("-server"))
|
|
||||||
G_SetGameModified(multiplayer, true);
|
|
||||||
autostart = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (M_CheckParm("-noupload"))
|
CONS_Printf("R_InitSprites()...\n");
|
||||||
COM_BufAddText("downloading 0\n");
|
R_InitSprites(); // ditto
|
||||||
|
CON_SetLoadingProgress(LOADED_INITSPRITES);
|
||||||
|
|
||||||
CONS_Printf("M_Init(): Init miscellaneous info.\n");
|
CONS_Printf("R_InitSkins()...\n");
|
||||||
M_Init();
|
R_InitSkins(); // ditto
|
||||||
CON_SetLoadingProgress(LOADED_MINIT);
|
CON_SetLoadingProgress(LOADED_INITSKINS);
|
||||||
|
|
||||||
CONS_Printf("R_Init(): Init SRB2 refresh daemon.\n");
|
CONS_Printf("R_Init(): Init SRB2 refresh daemon.\n");
|
||||||
R_Init();
|
R_Init();
|
||||||
|
|
@ -1556,6 +1548,25 @@ void D_SRB2Main(void)
|
||||||
ST_Init();
|
ST_Init();
|
||||||
CON_SetLoadingProgress(LOADED_STINIT);
|
CON_SetLoadingProgress(LOADED_STINIT);
|
||||||
|
|
||||||
|
//------------------------------------------------ COMMAND LINE PARAMS
|
||||||
|
|
||||||
|
// this must be done after loading gamedata,
|
||||||
|
// to avoid setting off the corrupted gamedata code in G_LoadGameData if a SOC with custom gamedata is added
|
||||||
|
// -- Monster Iestyn 20/02/20
|
||||||
|
if (M_CheckParm("-warp") && M_IsNextParm())
|
||||||
|
{
|
||||||
|
const char *word = M_GetNextParm();
|
||||||
|
pstartmap = G_FindMapByNameOrCode(word, 0);
|
||||||
|
if (! pstartmap)
|
||||||
|
I_Error("Cannot find a map remotely named '%s'\n", word);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!M_CheckParm("-server"))
|
||||||
|
G_SetGameModified(multiplayer, true);
|
||||||
|
autostart = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set up splitscreen players before joining!
|
// Set up splitscreen players before joining!
|
||||||
if (!dedicated && (M_CheckParm("-splitscreen") && M_IsNextParm()))
|
if (!dedicated && (M_CheckParm("-splitscreen") && M_IsNextParm()))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3466,8 +3466,6 @@ void M_Init(void)
|
||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
COM_AddCommand("manual", Command_Manual_f);
|
|
||||||
|
|
||||||
CV_RegisterVar(&cv_nextmap);
|
CV_RegisterVar(&cv_nextmap);
|
||||||
CV_RegisterVar(&cv_newgametype);
|
CV_RegisterVar(&cv_newgametype);
|
||||||
CV_RegisterVar(&cv_chooseskin);
|
CV_RegisterVar(&cv_chooseskin);
|
||||||
|
|
@ -3476,6 +3474,8 @@ void M_Init(void)
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
COM_AddCommand("manual", Command_Manual_f);
|
||||||
|
|
||||||
// Menu hacks
|
// Menu hacks
|
||||||
CV_RegisterVar(&cv_dummymenuplayer);
|
CV_RegisterVar(&cv_dummymenuplayer);
|
||||||
CV_RegisterVar(&cv_dummyteam);
|
CV_RegisterVar(&cv_dummyteam);
|
||||||
|
|
|
||||||
30
src/r_data.c
30
src/r_data.c
|
|
@ -262,27 +262,10 @@ static void R_InitExtraColormaps(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
|
||||||
// R_InitSpriteLumps
|
|
||||||
// Finds the width and hoffset of all sprites in the wad, so the sprite does not need to be
|
|
||||||
// cached completely, just for having the header info ready during rendering.
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// allocate sprite lookup tables
|
|
||||||
//
|
|
||||||
static void R_InitSpriteLumps(void)
|
|
||||||
{
|
|
||||||
numspritelumps = 0;
|
|
||||||
max_spritelumps = 8192;
|
|
||||||
|
|
||||||
Z_Malloc(max_spritelumps*sizeof(*spritecachedinfo), PU_STATIC, &spritecachedinfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// R_InitColormaps
|
// R_InitColormaps
|
||||||
//
|
//
|
||||||
static void R_InitColormaps(void)
|
void R_InitColormaps(void)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
lumpnum_t lump;
|
lumpnum_t lump;
|
||||||
|
|
@ -1180,12 +1163,12 @@ static void R_Init8to16(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// R_InitData
|
// R_InitTextureData
|
||||||
//
|
//
|
||||||
// Locates all the lumps that will be used by all views
|
// Locates all the lumps that will be used by all views
|
||||||
// Must be called after W_Init.
|
// Must be called after W_Init.
|
||||||
//
|
//
|
||||||
void R_InitData(void)
|
void R_InitTextureData(void)
|
||||||
{
|
{
|
||||||
if (highcolor)
|
if (highcolor)
|
||||||
{
|
{
|
||||||
|
|
@ -1198,13 +1181,6 @@ void R_InitData(void)
|
||||||
|
|
||||||
CONS_Printf("P_InitPicAnims()...\n");
|
CONS_Printf("P_InitPicAnims()...\n");
|
||||||
P_InitPicAnims();
|
P_InitPicAnims();
|
||||||
|
|
||||||
CONS_Printf("R_InitSprites()...\n");
|
|
||||||
R_InitSpriteLumps();
|
|
||||||
R_InitSprites();
|
|
||||||
|
|
||||||
CONS_Printf("R_InitColormaps()...\n");
|
|
||||||
R_InitColormaps();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ extern CV_PossibleValue_t Color_cons_t[];
|
||||||
extern CV_PossibleValue_t Followercolor_cons_t[]; // follower colours table, not a duplicate because of the "Match" option.
|
extern CV_PossibleValue_t Followercolor_cons_t[]; // follower colours table, not a duplicate because of the "Match" option.
|
||||||
|
|
||||||
// I/O, setting up the stuff.
|
// I/O, setting up the stuff.
|
||||||
void R_InitData(void);
|
void R_InitTextureData(void);
|
||||||
void R_PrecacheLevel(void);
|
void R_PrecacheLevel(void);
|
||||||
|
|
||||||
extern size_t flatmemory, spritememory, texturememory;
|
extern size_t flatmemory, spritememory, texturememory;
|
||||||
|
|
@ -58,6 +58,7 @@ extern size_t flatmemory, spritememory, texturememory;
|
||||||
// Uncomment to make extra_colormaps order Newest -> Oldest
|
// Uncomment to make extra_colormaps order Newest -> Oldest
|
||||||
//#define COLORMAPREVERSELIST
|
//#define COLORMAPREVERSELIST
|
||||||
|
|
||||||
|
void R_InitColormaps(void);
|
||||||
void R_ReInitColormaps(UINT16 num, lumpnum_t newencoremap);
|
void R_ReInitColormaps(UINT16 num, lumpnum_t newencoremap);
|
||||||
void R_ClearColormaps(void);
|
void R_ClearColormaps(void);
|
||||||
extracolormap_t *R_CreateDefaultColormap(boolean lighttable);
|
extracolormap_t *R_CreateDefaultColormap(boolean lighttable);
|
||||||
|
|
|
||||||
|
|
@ -1084,7 +1084,9 @@ void R_Init(void)
|
||||||
{
|
{
|
||||||
// screensize independent
|
// screensize independent
|
||||||
//I_OutputMsg("\nR_InitData");
|
//I_OutputMsg("\nR_InitData");
|
||||||
R_InitData();
|
//R_InitData(); -- split to d_main for its own startup steps since it takes AGES
|
||||||
|
CONS_Printf("R_InitColormaps()...\n");
|
||||||
|
R_InitColormaps();
|
||||||
|
|
||||||
//I_OutputMsg("\nR_InitViewBorder");
|
//I_OutputMsg("\nR_InitViewBorder");
|
||||||
R_InitViewBorder();
|
R_InitViewBorder();
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,11 @@ static void Sk_SetDefaultValue(skin_t *skin)
|
||||||
//
|
//
|
||||||
void R_InitSkins(void)
|
void R_InitSkins(void)
|
||||||
{
|
{
|
||||||
#ifdef SKINVALUES
|
size_t i;
|
||||||
INT32 i;
|
|
||||||
|
|
||||||
|
// it can be is do before loading config for skin cvar possible value
|
||||||
|
// (... what the fuck did you just say to me? "it can be is do"?)
|
||||||
|
#ifdef SKINVALUES
|
||||||
for (i = 0; i <= MAXSKINS; i++)
|
for (i = 0; i <= MAXSKINS; i++)
|
||||||
{
|
{
|
||||||
skin_cons_t[i].value = 0;
|
skin_cons_t[i].value = 0;
|
||||||
|
|
@ -145,6 +147,14 @@ void R_InitSkins(void)
|
||||||
|
|
||||||
// no default skin!
|
// no default skin!
|
||||||
numskins = 0;
|
numskins = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < numwadfiles; i++)
|
||||||
|
{
|
||||||
|
R_AddSkins((UINT16)i);
|
||||||
|
R_PatchSkins((UINT16)i);
|
||||||
|
R_LoadSpriteInfoLumps(i, wadfiles[i]->numlumps);
|
||||||
|
}
|
||||||
|
ST_ReloadSkinFaceGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 R_GetSkinAvailabilities(void)
|
UINT32 R_GetSkinAvailabilities(void)
|
||||||
|
|
|
||||||
|
|
@ -513,6 +513,11 @@ void R_InitSprites(void)
|
||||||
float fa;
|
float fa;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// allocate sprite lookup tables
|
||||||
|
numspritelumps = 0;
|
||||||
|
max_spritelumps = 8192;
|
||||||
|
Z_Malloc(max_spritelumps*sizeof(*spritecachedinfo), PU_STATIC, &spritecachedinfo);
|
||||||
|
|
||||||
for (i = 0; i < MAXVIDWIDTH; i++)
|
for (i = 0; i < MAXVIDWIDTH; i++)
|
||||||
negonearray[i] = -1;
|
negonearray[i] = -1;
|
||||||
|
|
||||||
|
|
@ -541,30 +546,6 @@ void R_InitSprites(void)
|
||||||
for (i = 0; i < numwadfiles; i++)
|
for (i = 0; i < numwadfiles; i++)
|
||||||
R_AddSpriteDefs((UINT16)i);
|
R_AddSpriteDefs((UINT16)i);
|
||||||
|
|
||||||
//
|
|
||||||
// now check for skins
|
|
||||||
//
|
|
||||||
|
|
||||||
// it can be is do before loading config for skin cvar possible value
|
|
||||||
// (... what the fuck did you just say to me? "it can be is do"?)
|
|
||||||
#ifdef SKINVALUES
|
|
||||||
for (i = 0; i <= MAXSKINS; i++)
|
|
||||||
{
|
|
||||||
skin_cons_t[i].value = 0;
|
|
||||||
skin_cons_t[i].strvalue = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
numskins = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < numwadfiles; i++)
|
|
||||||
{
|
|
||||||
R_AddSkins((UINT16)i);
|
|
||||||
R_PatchSkins((UINT16)i);
|
|
||||||
R_LoadSpriteInfoLumps(i, wadfiles[i]->numlumps);
|
|
||||||
}
|
|
||||||
ST_ReloadSkinFaceGraphics();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// check if all sprites have frames
|
// check if all sprites have frames
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,9 @@ static boolean InitCube(void)
|
||||||
float globalgammamul, globalgammaoffs;
|
float globalgammamul, globalgammaoffs;
|
||||||
boolean doinggamma;
|
boolean doinggamma;
|
||||||
|
|
||||||
|
if (con_startup_loadprogress < LOADED_CONFIG)
|
||||||
|
return false;
|
||||||
|
|
||||||
#define diffcons(cv) (cv.value != atoi(cv.defaultvalue))
|
#define diffcons(cv) (cv.value != atoi(cv.defaultvalue))
|
||||||
|
|
||||||
doinggamma = diffcons(cv_globalgamma);
|
doinggamma = diffcons(cv_globalgamma);
|
||||||
|
|
@ -1089,7 +1092,7 @@ void V_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 c)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode != render_soft && !con_startup)
|
if (rendermode == render_opengl)
|
||||||
{
|
{
|
||||||
HWR_DrawDiag(x, y, wh, c);
|
HWR_DrawDiag(x, y, wh, c);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue