void DB_LoadGraphicsAssetsForPC() { unsigned int zoneCount = 1; XZoneInfo zoneInfo[6]; zoneInfo[0].name = "code_post_gfx"; zoneInfo[0].allocFlags = 1; zoneInfo[0].freeFlags = 0x80000000; printf("DB_LoadXAssets\n"); DB_LoadXAssets(zoneInfo, zoneCount, 0); printf("DB_SyncXAssets\n"); DB_SyncXAssets(); zoneInfo[0].name = "patch"; zoneInfo[0].allocFlags = 8; zoneInfo[0].freeFlags = 0; if(DB_ModFileExists()) { zoneInfo[zoneCount].name = "mod"; zoneInfo[zoneCount].allocFlags = 32; zoneInfo[zoneCount].freeFlags = 0; zoneCount++; } //Add frontend_patch to the zone list zoneInfo[zoneCount].name = "frontend_patch"; zoneInfo[zoneCount].allocFlags = 32; zoneInfo[zoneCount].freeFlags = 0; zoneCount++; DB_LoadXAssets(zoneInfo, zoneCount, 0); }
void R_Init(){ int XAssetscount; XZoneInfo XZoneInfoStack[6]; XZoneInfoStack[4].fastfile = "localized_common_mp"; XZoneInfoStack[4].loadpriority = 1; XZoneInfoStack[4].notknown = 0; XZoneInfoStack[3].fastfile = "common_mp"; XZoneInfoStack[3].loadpriority = 4; XZoneInfoStack[3].notknown = 0; XZoneInfoStack[2].fastfile = "ui_mp"; XZoneInfoStack[2].loadpriority = 8; XZoneInfoStack[2].notknown = 0; XZoneInfoStack[1].fastfile = "localized_code_post_gfx_mp"; XZoneInfoStack[1].loadpriority = 0; XZoneInfoStack[1].notknown = 0; XZoneInfoStack[0].fastfile = "code_post_gfx_mp"; XZoneInfoStack[0].loadpriority = 2; XZoneInfoStack[0].notknown = 0; if(DB_ModFileExists()){ XAssetscount = 6; XZoneInfoStack[5].fastfile = "mod"; XZoneInfoStack[5].loadpriority = 16; XZoneInfoStack[5].notknown = 0; }else{ XAssetscount = 5; } DB_LoadXAssets(&XZoneInfoStack[0],XAssetscount,0); Cmd_AddCommand("XAssetUsage", XAssetUsage_f); }
void __cdecl FFLoadHook1(XZoneInfo* data, int count, int unknown) { int newCount = count + 3; XZoneInfo newData[20]; memcpy(&newData[0], data, sizeof(XZoneInfo) * count); newData[0].type1 = 1; newData[1].type1 = 1; newData[count].name = "dlc1_ui_mp"; newData[count].type1 = 2; newData[count].type2 = 0; newData[count + 1].name = "dlc2_ui_mp"; newData[count + 1].type1 = 2; newData[count + 1].type2 = 0; newData[count + 2].name = "weap_trey"; newData[count + 2].type1 = newData[2].type1; newData[count + 2].type2 = newData[2].type2; /*newData[count + 3].name = newData[3].name; newData[count + 3].type1 = newData[3].type1; newData[count + 3].type2 = newData[3].type2; newData[2].name = "iw4_wc_shaders_min"; newData[2].type1 = newData[2].type1; newData[2].type2 = 0; newData[3].name = "ui_viewer_mp"; newData[3].type1 = 4; newData[3].type2 = 0;*/ return DB_LoadXAssets(newData, newCount, unknown); }
void __cdecl FFLoadHook1(XZoneInfo* data, int count, int unknown) { static XZoneInfo newData[20]; memcpy(&newData[0], data, sizeof(XZoneInfo) * count); newData[0].type1 = 1; newData[1].type1 = 1; // Adding DLC fastfiles newData[count].name = "dlc1_ui_mp"; newData[count].type1 = 2; newData[count].type2 = 0; count++; newData[count].name = "dlc2_ui_mp"; newData[count].type1 = 2; newData[count].type2 = 0; count++; // // Peacekeeper and uhhhhh... what was that weapon called again? // newData[count].name = "weap_trey"; // newData[count].type1 = newData[2].type1; // newData[count].type2 = newData[2].type2; // count++; // // newData[count].name = "weap_iw"; // newData[count].type1 = newData[2].type1; // newData[count].type2 = newData[2].type2; // count++; return DB_LoadXAssets(newData, count, unknown); }
void Com_UnloadZones(int group) { XZoneInfo unload; unload.name = NULL; unload.type1 = 0; unload.type2 = group; DB_LoadXAssets(&unload, 1, 0); }
void Com_LoadZones(XZoneInfo* zones, int count) { zoneWaitingOn = zones[count - 1].name; waitingOnLoad = true; DB_LoadXAssets(zones, count, 0); while (waitingOnLoad) Sleep(100); }
void __cdecl FFLoadHook2(XZoneInfo* data, int count, int unknown) { int newCount = count + 1; XZoneInfo newData[20]; memcpy(&newData[0], data, sizeof(XZoneInfo) * count); newData[count].name = "patch_alter_mp"; newData[count].type1 = 0; newData[count].type2 = 0; return DB_LoadXAssets(newData, newCount, unknown); }
void __cdecl FFLoadHook2(XZoneInfo* data, int count, int unknown) { XZoneInfo newData[20]; memcpy(&newData[0], data, sizeof(XZoneInfo) * count); // Append alterIWnet stuff newData[count].name = "patch_alter_mp"; newData[count].type1 = 0; newData[count].type2 = 0; count++; return DB_LoadXAssets(newData, count, unknown); }
void __cdecl UILoadHook1(XZoneInfo* data, int count, int unknown) { XZoneInfo newData[5]; memcpy(&newData[0], data, sizeof(XZoneInfo) * 2); newData[0].name = "dlc1_ui_mp"; newData[0].type1 = 3; newData[0].type2 = 0; newData[1].name = "dlc2_ui_mp"; newData[1].type1 = 3; newData[1].type2 = 0; return DB_LoadXAssets(newData, 2, unknown); }