Esempio n. 1
0
void dEngine_Init(void) 
{
	FS_InitFilesystem();
    Log_Printf("dEngine Initialization...\n");
    
	ENT_InitCacheSystem();
	TEXT_InitCacheSystem();
	MAT_InitCacheSystem();

#ifdef GENERATE_VIDEO	
	dEngine_INIT_ScreenshotBuffer();
#endif
	
	engine.sceneId = -1;
	dEngine_RequireSceneId(0);
	
	//engine.recordVideo = 0;
	
	engine.musicFilename[0] = '\0';
	engine.musicStartAt = 0;
	engine.playback.filename[0] = '\0';
	
	// Enable/disable sounds here
	engine.soundEnabled = 0;
	engine.musicEnabled = 0;

	engine.gameCenterEnabled = 0;
	
	ENPAR_Init();
	
	

	dEngine_ReadConfig();

	SCR_Init();
	
	
	
	
	MATLIB_LoadLibraries();
	

	
	COLL_InitUnitCube();
	
	
	ENE_Mem_Init();
	
	//SND_Init();
	
	
	MENU_Init();
	
	
}
Esempio n. 2
0
void dEngine_Init()
{
	ENT_InitCacheSystem();
	TEXT_InitCacheSystem();
	MAT_InitCacheSystem();

#ifdef GENERATE_VIDEO	
	dEngine_INIT_ScreenshotBuffer();
#endif
	
	engine.sceneId = -1;
	dEngine_RequireSceneId(0);
	
	//engine.recordVideo = 0;
	
	engine.musicFilename[0] = '\0';
	engine.musicStartAt = 0;
	engine.playback.filename[0] = '\0';
	
	engine.soundEnabled = 1;
	engine.musicEnabled = 1;
	engine.gameCenterEnabled = 0;
	
	ENPAR_Init();
	
	
	FS_InitFilesystem();

	dEngine_ReadConfig();

	SCR_Init();
	
	
	
	
	MATLIB_LoadLibraries();
	

	
	COLL_InitUnitCube();
	
	
	ENE_Mem_Init();
	
	SND_Init();
	
	
	MENU_Init();
	
	
	
	//TESTS
	/*
	char c = CHAR_MAX;
	unsigned char uc = UCHAR_MAX;
	short s = SHRT_MAX;
	unsigned short us = USHRT_MAX;
	int i = INT_MAX;
	unsigned int ui = UINT_MAX;
	long l = LONG_MAX;
	unsigned long ul = ULONG_MAX;
	
	printf("\n");
	printf("LIMITS: c:%d, uc:%u, s:%d, us:%u\n"
		   "LIMITS: i:%d, ui:%u, l:%ld, ul:%lu\n",
		   c, uc, s, us, i, ui, l, ul);
	
	// promotion 
	printf("\n");
	printf("i = s: %d, \n", i = s);
	printf("i = us: %d, \n", i = us);
	printf("ui = s: %u, \n", ui = s);
	printf("ui = us: %u\n", ui = us);
	
	// narrowing 
	printf("\n");
	printf("c = s: %d, \n", c = s);
	printf("c = us: %d, \n", c = us);
	printf("uc = s: %d, \n", uc = s); //Ln:31
	printf("uc = us: %d\n", uc = us);
	
	printf("\n");
	printf("uc = UCHAR_MAX (%u) + 1: %u, \n",
		   UCHAR_MAX, uc = UCHAR_MAX + 1); // Ln:36 
	printf("uc = -1: %d\n", uc = -1);
	*/
	
}