Rename E_PostInitTables back to E_PostInit and move it back to where it belongs in engine.c (i.e. preinitengine, initengine, "postinitengine"). It should not have been changed.

git-svn-id: https://svn.eduke32.com/eduke32@5952 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-12-26 06:01:32 +00:00
parent d2934c4ba5
commit e258ca51f8
6 changed files with 22 additions and 22 deletions

View file

@ -998,6 +998,7 @@ typedef struct artheader_t {
int32_t preinitengine(void); // a partial setup of the engine used for launch windows
int32_t initengine(void);
int32_t E_PostInit(void);
void uninitengine(void);
void initspritelists(void);
int32_t E_FatalError(char const * const msg);

View file

@ -39,7 +39,7 @@ extern int32_t globalblend;
extern uint32_t g_lastpalettesum;
extern palette_t getpal(int32_t col);
extern void loadpalette(void);
extern int32_t E_PostInitTables(void);
extern void E_PostLoadPalette(void);
extern void setup_blend(int32_t blend, int32_t doreverse);
extern uint8_t basepalreset;
extern int32_t curbrightness, gammabrightness;

View file

@ -692,7 +692,7 @@ int app_main(int argc, char const * const * argv)
DO_FREE_AND_NULL(g_defModules);
g_defModulesNum = 0;
if (E_PostInitTables())
if (E_PostInit())
M32_FatalEngineError();
CallExtPostInit();

View file

@ -7753,6 +7753,23 @@ int32_t initengine(void)
return 0;
}
//
// E_PostInit
//
int32_t E_PostInit(void)
{
if (!(paletteloaded & PALETTE_MAIN))
return E_FatalError("No palette found.");
if (!(paletteloaded & PALETTE_SHADE))
return E_FatalError("No shade table found.");
if (!(paletteloaded & PALETTE_TRANSLUC))
return E_FatalError("No translucency table found.");
E_PostLoadPalette();
return 0;
}
//
// uninitengine
//

View file

@ -268,7 +268,7 @@ void loadpalette(void)
uint32_t PaletteIndexFullbrights[8];
static void E_PostLoadPalette(void)
void E_PostLoadPalette(void)
{
globalpal = 0;
@ -319,24 +319,6 @@ static void E_PostLoadPalette(void)
}
}
//
// E_PostInitTables
//
int32_t E_PostInitTables(void)
{
if (!(paletteloaded & PALETTE_MAIN))
return E_FatalError("No palette found.");
if (!(paletteloaded & PALETTE_SHADE))
return E_FatalError("No shade table found.");
if (!(paletteloaded & PALETTE_TRANSLUC))
return E_FatalError("No translucency table found.");
E_PostLoadPalette();
return 0;
}
void E_ReplaceTransparentColorWithBlack(void)
{
for (bssize_t i=0; i<MAXPALOOKUPS; i++)

View file

@ -6306,7 +6306,7 @@ int app_main(int argc, char const * const * argv)
DO_FREE_AND_NULL(g_defModules);
g_defModulesNum = 0;
if (E_PostInitTables())
if (E_PostInit())
G_FatalEngineError();
G_PostLoadPalette();