8 #include "../resource.h"     9 #include "../MathUtilities.h"    31         txtHelper.SetInsertionPos(5, 5);
    32         txtHelper.SetForegroundColor(0xFFFF00FF);
    38                 txtHelper.DrawTextLine(L
"Welcome to Rise: The Vieneo Province! (64-bit debug)");
    40                 txtHelper.DrawTextLine(L
"Welcome to Rise: The Vieneo Province! (64-bit)");
    44                 txtHelper.DrawTextLine(L
"Welcome to Rise: The Vieneo Province! (32-bit debug)");
    46                 txtHelper.DrawTextLine(L
"Welcome to Rise: The Vieneo Province! (32-bit)");
    54                         sprintf_s(
msg, 
sizeof(
msg), 
"Welcome to Rise: The Vieneo Province! (64-bit debug)");
    56                         sprintf_s(
msg, 
sizeof(
msg), 
"Welcome to Rise: The Vieneo Province! (64-bit)");
    60                         sprintf_s(
msg, 
sizeof(
msg), 
"Welcome to Rise: The Vieneo Province! (32-bit debug)");
    62                         sprintf_s(
msg, 
sizeof(
msg), 
"Welcome to Rise: The Vieneo Province! (32-bit)");
    70                 txtHelper.DrawFormattedTextLine(L
"Resources loading...  (%i MB free)", pd3dDevice->GetAvailableTextureMem() / 2048000);
    72                 txtHelper.DrawFormattedTextLine(L
"Resources loaded successfully!  (%i MB free)", pd3dDevice->GetAvailableTextureMem() / 2048000);
    87                         txtHelper.DrawTextLine(L
"Game controller support enabled...");
    90                                 logger->
Log(
"Game controller support enabled...");
    96                         txtHelper.DrawTextLine(L
"No game controllers configured!");
    99                                 logger->
Log(
"No game controllers configured!", Logger::Level::Warn);
   115                         txtHelper.DrawTextLine(L
"Force feedback support enabled...");
   118                                 logger->
Log(
"Force feedback support enabled...");
   125                         txtHelper.DrawTextLine(L
"Device supports advanced occlusion effects...");
   128                                 logger->
Log(
"Device supports advanced occlusion effects...");
   134                         txtHelper.DrawTextLine(L
"Sorry, no support for advanced occlusion effects!");
   137                                 logger->
Log(
"Sorry, no support for advanced occlusion effects!", Logger::Level::Warn);
   145                         pd3dDevice->GetDeviceCaps(&caps);
   146                         if (!(caps.FVFCaps & D3DFVFCAPS_PSIZE))
   148                                 sprintf_s(
msg, 
sizeof(
msg), 
"Sorry, no support for advanced particle effects!");
   154                                 sprintf_s(
msg, 
sizeof(
msg), 
"Device has compatible particle effects support...");
   161                 txtHelper.DrawTextLine(L
"Device has compatible vertex and pixel shaders!");
   164                         logger->
Log(
"Device has compatible vertex and pixel shaders!");
   171                         txtHelper.DrawTextLine(L
"Celestial textures loaded!");
   172                 if (*stage == 2 && *instage == 1)
   174                         txtHelper.DrawTextLine(L
"Celestial textures loading (Iomere)...");
   175                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\World2a1.dds",
   176                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
   177                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
   180                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\World2a1.dds\"! (%x)", 
hr);
   187                 if (*stage == 2 && *instage == 0)
   189                         txtHelper.DrawTextLine(L
"Celestial textures loading (Yonmara)...");
   190                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\sunmap.dds",
   191                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
   192                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
   195                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\sunmap.dds\"! (%x)", 
hr);
   200                         logger->
Log(
"M -> Celestial textures loaded...");
   208                         txtHelper.DrawTextLine(L
"Vehicle textures loaded!");
   213                         txtHelper.DrawFormattedTextLine(L
"Vehicle textures loading (%i/%i)...", *instage, 
shiptextureC);
   218                                 logger->
Log(
"Vehicle textures loaded...");
   222                                 WCHAR hullfile[199], lightfile[199];
   225                                 hullfile[0] = lightfile[0] = 0;
   229                                 case 1: wcscpy_s(hullfile, 199, L
"textures\\Ships\\BOW.dds");
   230                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\BOWLIGHT.dds");
   232                                 case 2: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-cargohold-b.dds");
   233                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-cargohold-bLIGHT.dds");
   235                                 case 3: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-cockpit-a1.dds");
   236                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-cockpit-a1LIGHT.dds");
   238                                 case 4: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-bow-a-b.dds");
   239                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-bow-a-bLIGHT.dds");
   241                                 case 5: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-docking module-a-b.dds");
   242                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-docking module-a-bLIGHT.dds");
   244                                 case 6: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-landing pad pod.dds");
   246                                 case 7: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engineering-b1.dds");
   247                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-engineering-b1LIGHT.dds");
   249                                 case 8: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-port engine boom.dds");
   250                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-port engine boomLIGHT.dds");
   252                                 case 9: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-starboard engine boom.dds");
   253                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-starboard engine boomLIGHT.dds");
   255                                 case 10: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-oval wing.dds");
   256                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-oval wingLIGHT.dds");
   258                                 case 11: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engine pod mount.dds");
   260                                 case 12: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engine pod.dds");
   261                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-engine podLIGHT.dds");
   263                                 case 13: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engine pod pylon-port.dds");
   265                                 case 14: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engine pod pylon-starboard.dds");
   267                                 case 15: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-tailfin.dds");
   269                                 case 16: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engine pod wing.dds");
   271                                 case 17: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engineering-a1.dds");
   272                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-engineering-a1LIGHT.dds");
   274                                 case 18: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-access module-b1.dds");
   275                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-access module-b1LIGHT.dds");
   277                                 case 19: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-landing pad-2.dds");
   278                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-landing pad-2LIGHT.dds");
   280                                 case 20: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-landing pad-1.dds");
   281                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-landing pad-1LIGHT.dds");
   283                                 case 21: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-tailfin-flap.dds");
   285                                 case 22: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-PLATE.dds");
   286                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-PLATELIGHT.dds");
   288                                 case 23: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-oval wing-flap.dds");
   290                                 case 24: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-ramp.dds");
   291                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e10-rampLIGHT.dds");
   293                                 case 25: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-engine pod wing-flap.dds");
   296                                 case 26: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\command.dds");
   297                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\commandLIGHT.dds");
   299                                 case 27: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\DIHVengine.dds");
   300                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\DIHVengineLIGHT.dds");
   302                                 case 28: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\nosecone.dds");
   303                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\noseconeLIGHT.dds");
   305                                 case 29: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\connectring1.dds");
   306                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\connectring1LIGHT.dds");
   308                                 case 30: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\towpackage.dds");
   309                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\towpackageLIGHT.dds");
   311                                 case 31: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\cargonode.dds");
   313                                 case 32: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\cargohall.dds");
   314                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\cargohallLIGHT.dds");
   316                                 case 33: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\cargocontainer.dds");
   317                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\cargocontainerLIGHT.dds");
   319                                 case 34: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\hallcap.dds");
   320                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\hallcapLIGHT.dds");
   322                                 case 35: wcscpy_s(hullfile, 199, L
"textures\\Large Ships\\DIHV-PLATE.dds");
   323                                         wcscpy_s(lightfile, 199, L
"textures\\Large Ships\\DIHV-PLATELIGHT.dds");
   326                                 case 36: wcscpy_s(hullfile, 199, L
"textures\\Containers\\cargo-standard-ext.dds");
   328                                 case 37: wcscpy_s(hullfile, 199, L
"textures\\Containers\\tank-fuel-dynamic.dds");
   329                                         wcscpy_s(lightfile, 199, L
"textures\\Containers\\tank-fuel-dynamicLIGHT.dds");
   332                                 case 38: wcscpy_s(hullfile, 199, L
"textures\\Containers\\fuel-standard-ext.dds");
   334                                 case 39: wcscpy_s(hullfile, 199, L
"textures\\Containers\\tank-fuel.dds");
   336                                 case 40: wcscpy_s(hullfile, 199, L
"textures\\Containers\\tank-cap.dds");
   339                                 case 41: wcscpy_s(hullfile, 199, L
"textures\\Containers\\cargo-toploader-ext.dds");
   342                                 case 42: wcscpy_s(hullfile, 199, L
"textures\\Containers\\munitions-standard-ext.dds");
   345                                 case 43: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-glass-1.dds");
   346                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\GV-glass-1LIGHT.dds");
   348                                 case 44: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-construction-1.dds");
   350                                 case 45: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-guts-1.dds");
   352                                 case 46: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-mirrors-1.dds");
   354                                 case 47: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-lights-1.dds");
   356                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\GV-lights-1.dds");
   358                                 case 48: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-lockers-1.dds");
   360                                 case 49: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-mod-1.dds");
   362                                 case 50: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-galanovo-1.dds");
   364                                 case 51: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-galanovo-2.dds");
   366                                 case 52: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-stripped-1.dds");
   368                                 case 53: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-bumpers-1.dds");
   370                                 case 54: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-suspension-1.dds");
   372                                 case 55: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-tires-1.dds");
   374                                 case 56: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\licensePlateStd.dds");
   375                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\licensePlateStdLIGHT.dds");
   378                                 case 57: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-cockpit.dds");
   379                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-cockpitLIGHT.dds");
   381                                 case 58: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-intake.dds");
   383                                 case 59: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-aerodyn.dds");
   385                                 case 60: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-landing toe.dds");
   387                                 case 61: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-wing-port-flap1.dds");
   389                                 case 62: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-wing-port-flap2.dds");
   391                                 case 63: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-wing-starboard-flap1.dds");
   393                                 case 64: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-wing-starboard-flap2.dds");
   395                                 case 65: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-thruster.dds");
   397                                 case 66: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-equipment cowl.dds");
   398                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-equipment cowlLIGHT.dds");
   400                                 case 67: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-landing pod.dds");
   401                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-landing podLIGHT.dds");
   403                                 case 68: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-landing leg-4x14.dds");
   404                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-landing leg-4x14LIGHT.dds");
   406                                 case 69: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-wing-port.dds");
   407                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-wing-portLIGHT.dds");
   409                                 case 70: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-wing-starboard.dds");
   410                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-wing-starboardLIGHT.dds");
   412                                 case 71: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-weapons pod.dds");
   413                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-weapons podLIGHT.dds");
   415                                 case 72: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-corridor.dds");
   417                                 case 73: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-crewcabin.dds");
   418                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-crewcabinLIGHT.dds");
   420                                 case 74: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-engineering.dds");
   421                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-engineeringLIGHT.dds");
   423                                 case 75: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-equipment wedge.dds");
   425                                 case 76: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-propulsion unit.dds");
   426                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-propulsion unitLIGHT.dds");
   428                                 case 77: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-drive coil-port.dds");
   429                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-drive coil-portLIGHT.dds");
   431                                 case 78: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-drive coil-starboard.dds");
   432                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-drive coil-starboardLIGHT.dds");
   434                                 case 79: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-docking module.dds");
   435                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-docking moduleLIGHT.dds");
   437                                 case 80: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WEP-source1.dds");
   439                                 case 81: wcscpy_s(hullfile, 199, L
"textures\\Ships\\p13-police rack.dds");
   440                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\p13-police rackLIGHT.dds");
   443                                 case 82: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-cockpit.dds");
   444                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-cockpitLIGHT.dds");
   446                                 case 83: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-landing pod.dds");
   447                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-landing podLIGHT.dds");
   449                                 case 84: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-wing1.dds");
   451                                 case 85: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-wing1flap.dds");
   453                                 case 86: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-landing leg2.dds");
   454                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-landing leg2LIGHT.dds");
   456                                 case 87: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-wingmount.dds");
   458                                 case 88: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-braceshaft2.dds");
   460                                 case 89: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-wing1hinge.dds");
   462                                 case 90: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-corridor.dds");
   463                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-corridorLIGHT.dds");
   465                                 case 91: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-fuselage2.dds");
   466                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-fuselage2LIGHT.dds");
   468                                 case 92: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-cargoslope1.dds");
   469                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-cargoslope1LIGHT.dds");
   471                                 case 93: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-cargobay1.dds");
   472                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-cargobay1LIGHT.dds");
   474                                 case 94: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-cargoslope1hatch.dds");
   475                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-cargoslope1hatchLIGHT.dds");
   477                                 case 95: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-aerodyn.dds");
   479                                 case 96: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-wing1-angle45.dds");
   481                                 case 97: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-wing1-angle45flap.dds");
   483                                 case 98: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-tailfin.dds");
   485                                 case 99: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-tailfin-flap.dds");
   487                                 case 100: wcscpy_s(hullfile, 199, L
"textures\\Ships\\a3-enginepod.dds");
   488                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\a3-enginepodLIGHT.dds");
   492                                 case 101: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e10-access ramp-2.dds"); 
   494                                 case 102: wcscpy_s(hullfile, 199, L
"textures\\Ships\\LANDING LEG1.dds"); 
   497                                 case 103: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-1.dds");
   498                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\GV-1LIGHT.dds");
   500                                 case 104: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\lightmod1.dds");
   501                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\lightmod1.dds");
   503                                 case 105: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\cargo2.dds");
   506                                 case 106: wcscpy_s(hullfile, 199, L
"textures\\Ships\\BODY-BOTTOM.dds");
   508                                 case 107: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-ramp.dds");
   509                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-rampLIGHT.dds");
   511                                 case 108: wcscpy_s(hullfile, 199, L
"textures\\Ships\\DOOR-DOCK.dds");
   512                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\DOOR-DOCKLIGHT.dds");
   514                                 case 109: wcscpy_s(hullfile, 199, L
"textures\\Ships\\BOOM.dds");
   515                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\BOOMLIGHT.dds");
   517                                 case 110: wcscpy_s(hullfile, 199, L
"textures\\Ships\\BOW-BOTTOM.dds");
   518                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\BOW-BOTTOMLIGHT.dds");
   520                                 case 111: wcscpy_s(hullfile, 199, L
"textures\\Ships\\EXHAUST.dds");
   522                                 case 112: wcscpy_s(hullfile, 199, L
"textures\\Ships\\WING.dds");
   523                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\WINGLIGHT.dds");
   525                                 case 113: wcscpy_s(hullfile, 199, L
"textures\\Ships\\ENGINE.dds");
   526                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\ENGINELIGHT.dds");
   528                                 case 114: wcscpy_s(hullfile, 199, L
"textures\\Ships\\PAD-REAR.dds");
   529                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\PAD-REARLIGHT.dds");
   531                                 case 115: wcscpy_s(hullfile, 199, L
"textures\\Ships\\BODY.dds");
   532                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\BODYLIGHT.dds");
   534                                 case 116: wcscpy_s(hullfile, 199, L
"textures\\Ships\\DOCKCOVER.dds");
   535                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\DOCKCOVERLIGHT.dds");
   537                                 case 117: wcscpy_s(hullfile, 199, L
"textures\\Ships\\BODYCOVER.dds");
   539                                 case 118: wcscpy_s(hullfile, 199, L
"textures\\Ships\\CORECOVER.dds");
   541                                 case 119: wcscpy_s(hullfile, 199, L
"textures\\Ships\\PAD-FRONT.dds");
   542                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\PAD-FRONTLIGHT.dds");
   544                                 case 120: wcscpy_s(hullfile, 199, L
"textures\\Ships\\FLAPS.dds");
   546                                 case 121: wcscpy_s(hullfile, 199, L
"textures\\Ships\\e11-PLATE.dds");
   547                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\e11-PLATELIGHT.dds");
   549                                 case 122: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-door-standard.dds");
   550                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-door-standardLIGHT.dds");
   552                                 case 123: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-wall-lockers.dds");
   553                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-wall-lockersLIGHT.dds");
   555                                 case 124: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-wall-standard.dds");
   556                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-wall-standardLIGHT.dds");
   558                                 case 125: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-wall-supportangle.dds");
   559                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-wall-supportangleLIGHT.dds");
   561                                 case 126: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-wall-weaponrack.dds");
   562                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-wall-weaponrackLIGHT.dds");
   564                                 case 127: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-ceiling.dds");
   565                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-ceilingLIGHT.dds");
   567                                 case 128: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-conveyor.dds");
   568                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-conveyorLIGHT.dds");
   570                                 case 129: wcscpy_s(hullfile, 199, L
"textures\\Ships\\eva-wall-standard.dds");
   571                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\eva-wall-standardLIGHT.dds");
   574                                 case 130: wcscpy_s(hullfile, 199, L
"textures\\Holidays\\BeishtKione_BaseColor1.dds");
   577                                 case 131: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\Glass.dds");
   578                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\GlassLIGHT.dds");
   580                                 case 132: wcscpy_s(hullfile, 199, L
"textures\\Cockpits\\door-front.dds");
   582                                 case 133: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\body.dds");
   583                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\bodyLIGHT.dds");
   585                                 case 134: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\undercarriage.dds");
   587                                 case 135: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\back1.dds");
   589                                 case 136: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\tread1.dds");
   591                                 case 137: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\face1.dds");
   594                                 case 138: wcscpy_s(hullfile, 199, L
"textures\\Ships\\Manx_Diff.dds");
   595                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\Manx_DiffLIGHT.dds");
   597                                 case 139: wcscpy_s(hullfile, 199, L
"textures\\Ships\\name plate.dds");
   598                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\name plateLIGHT.dds");
   601                                 case 140: wcscpy_s(hullfile, 199, L
"textures\\Ships\\painted-default.dds");
   603                                 case 141: wcscpy_s(hullfile, 199, L
"textures\\Ships\\painted-windshield.dds");
   604                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\painted-windshieldLIGHT.dds");
   606                                 case 142: wcscpy_s(hullfile, 199, L
"textures\\Ships\\stainless1-bare.dds");
   608                                 case 143: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-ramp1.dds");
   609                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-ramp1.dds");
   611                                 case 144: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cabin-wall-storage.dds");
   612                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cabin-wall-storage.dds");
   614                                 case 145: wcscpy_s(hullfile, 199, L
"textures\\Ships\\gear.dds");
   615                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\gear.dds");
   617                                 case 146: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cabin-floor-carpet.dds");
   618                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cabin-floor-carpet.dds");
   620                                 case 147: wcscpy_s(hullfile, 199, L
"textures\\Ships\\painted-wing-upper.dds");
   621                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\painted-wing-upperLIGHT.dds");
   623                                 case 148: wcscpy_s(hullfile, 199, L
"textures\\Ships\\painted-wing-lower.dds");
   625                                 case 149: wcscpy_s(hullfile, 199, L
"textures\\Ships\\engine-zefferfiche-turbine.dds");
   627                                 case 150: wcscpy_s(hullfile, 199, L
"textures\\Ships\\painted-flaps-upper.dds");
   629                                 case 151: wcscpy_s(hullfile, 199, L
"textures\\Ships\\painted-flaps-lower.dds");
   631                                 case 152: wcscpy_s(hullfile, 199, L
"textures\\Ships\\lights.dds");
   632                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\lights.dds");
   634                                 case 153: wcscpy_s(hullfile, 199, L
"textures\\Ships\\dynamic-stratomaster.dds");
   636                                 case 154: wcscpy_s(hullfile, 199, L
"textures\\Ships\\substructure-standard.dds");
   637                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\substructure-standard.dds");
   639                                 case 155: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cabin-wall-standard.dds");
   640                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cabin-wall-standard.dds");
   642                                 case 156: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cabin-wall-filler.dds");
   643                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cabin-wall-filler.dds");
   645                                 case 157: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-conveyor1.dds");
   646                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-conveyor1.dds");
   648                                 case 158: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cabin-ceiling.dds");
   649                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cabin-ceiling.dds");
   651                                 case 159: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cabin-wall-weaponrack.dds");
   652                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cabin-wall-weaponrack.dds");
   654                                 case 160: wcscpy_s(hullfile, 199, L
"textures\\Ships\\painted-engine.dds");
   656                                 case 161: wcscpy_s(hullfile, 199, L
"textures\\Ships\\wheels-standard.dds");
   657                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\wheels-standard.dds");
   659                                 case 162: wcscpy_s(hullfile, 199, L
"textures\\Ships\\cargobay-door-standard1.dds");
   660                                         wcscpy_s(lightfile, 199, L
"textures\\Ships\\cargobay-door-standard1.dds");
   663                                 case 163: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\ARM-RU.dds");
   665                                 case 164: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\ARM-RL.dds");
   667                                 case 165: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\HAND-R-leisure.dds");
   669                                 case 166: wcscpy_s(hullfile, 199, L
"textures\\Holidays\\TORSO.dds");
   671                                 case 167: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\HIPS.dds");
   673                                 case 168: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\LEG-RU.dds");
   675                                 case 169: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\LEG-RL.dds");
   677                                 case 170: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\FOOT-R.dds");
   679                                 case 171: wcscpy_s(hullfile, 199, L
"textures\\Holidays\\HELMET.dds");
   681                                 case 172: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\NECK.dds");
   683                                 case 173: wcscpy_s(hullfile, 199, L
"textures\\Holidays\\ears-floatingman1.dds");
   685                                 case 174: wcscpy_s(hullfile, 199, L
"textures\\Holidays\\head-floatingman1.dds");
   687                                 case 175: wcscpy_s(hullfile, 199, L
"textures\\Holidays\\nose-floatingman1.dds");
   689                                 case 176: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\HELMET-INNER.dds");
   691                                 case 177: wcscpy_s(hullfile, 199, L
"textures\\People\\Spacesuit\\ARM-LL-fieldstandard.dds");
   692                                         wcscpy_s(lightfile, 199, L
"textures\\People\\Spacesuit\\ARM-LL-fieldstandardLIGHT.dds");
   694                                 case 178: wcscpy_s(hullfile, 199, L
"textures\\Holidays\\HELMET-GLASS.dds");
   697                                 case 179: wcscpy_s(hullfile, 199, L
"textures\\Containers\\passenger-ext.dds");
   698                                         wcscpy_s(lightfile, 199, L
"textures\\Containers\\passenger-extLIGHT.dds");
   701                                 case 180: wcscpy_s(hullfile, 199, L
"textures\\Containers\\construction-ext.dds");
   706                                 case 181: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\window-bridge.dds");
   707                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\window-bridgeLIGHT.dds");
   709                                 case 182: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\conveyorramp.dds");
   710                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\conveyorramp.dds");
   712                                 case 183: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\int-hydraulic.dds");
   713                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\int-hydraulic.dds");
   715                                 case 184: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\int-liftarm.dds");
   716                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\int-liftarm.dds");
   718                                 case 185: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\int-wall-cargo.dds");
   719                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\int-wall-cargo.dds");
   721                                 case 186: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\body-nose.dds");
   722                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\body-noseLIGHT.dds");
   724                                 case 187: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\body-common.dds");
   726                                 case 188: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\dynamic-mammoth.dds");
   727                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\dynamic-mammothLIGHT.dds");
   729                                 case 189: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\lift.dds");
   730                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\liftLIGHT.dds");
   732                                 case 190: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\guts-hydraulic.dds");
   734                                 case 191: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\door1.dds");
   736                                 case 192: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\ramp-outer.dds");
   738                                 case 193: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\lights-common.dds");
   739                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\lights-commonLIGHT.dds");
   741                                 case 194: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\conveyor.dds");
   742                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\conveyor.dds");
   744                                 case 195: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\int-column-cargo.dds");
   745                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\int-column-cargo.dds");
   747                                 case 196: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\body-windowed.dds");
   748                                         wcscpy_s(lightfile, 199, L
"textures\\Vehicles\\body-windowedLIGHT.dds");
   750                                 case 197: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\body-bottom.dds");
   752                                 case 198: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\sleeve.dds");
   754                                 case 199: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\face-toothandnail.dds");
   756                                 case 200: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\tread-toothandnail.dds");
   758                                 case 201: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\deck.dds");
   760                                 case 202: wcscpy_s(hullfile, 199, L
"textures\\Animations\\Thrust.dds");
   762                                 case 203: wcscpy_s(hullfile, 199, L
"textures\\Animations\\Afterburner.dds");
   765                                 case 204: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-SKINS-stainless.dds");
   767                                 case 205: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-SKINS-flaps.dds");
   769                                 case 206: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-SKINS-techbed.dds");
   771                                 case 207: wcscpy_s(hullfile, 199, L
"textures\\Vehicles\\GV-SKINS-underbed.dds");
   776                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, hullfile,
   777                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3, 
   778                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
   781                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\"! (%x)", hullfile, 
hr);
   786                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsShipTexture[%i]", 
t);
   789                                 if (lightfile[0] != 0)
   791                                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, lightfile,
   792                                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
   793                                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
   796                                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\"! (%x)", lightfile, 
hr);
   801                                                 sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsShipLights[%i]", 
t);
   815                         txtHelper.DrawTextLine(L
"City grids loaded!");
   820                         txtHelper.DrawFormattedTextLine(L
"City grids loading (%i/%i)...", *instage, 
RTStextureC);
   830                                 WCHAR hullfile[199], lightfile[199];
   831                                 hullfile[0] = lightfile[0] = 0;
   834                                 case 1: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f1a.dds");
   836                                 case 2: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f1b.dds");
   838                                 case 3: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f1c.dds");
   840                                 case 4: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f2a.dds");
   842                                 case 5: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f2b.dds");
   844                                 case 6: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f2c.dds");
   846                                 case 7: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f3a.dds");
   848                                 case 8: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f3b.dds");
   850                                 case 9: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f4a.dds");
   852                                 case 10: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f4b.dds");
   854                                 case 11: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f5a.dds");
   856                                 case 12: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f6a.dds");
   858                                 case 13: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f6b.dds");
   860                                 case 14: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f6c.dds");
   862                                 case 15: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f6d.dds");
   864                                 case 16: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f6e.dds");
   866                                 case 17: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f7a.dds");
   868                                 case 18: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f7b.dds");
   870                                 case 19: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f7c.dds");
   872                                 case 20: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f8a.dds");
   874                                 case 21: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f8b.dds");
   876                                 case 22: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f8c.dds");
   878                                 case 23: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f9a.dds");
   880                                 case 24: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f9b.dds");
   882                                 case 25: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f10a.dds");
   884                                 case 26: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f10b.dds");
   886                                 case 27: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f10c.dds");
   888                                 case 28: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f10d.dds");
   890                                 case 29: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f11a.dds");
   892                                 case 30: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f33_Exit-above.dds");
   893                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f33_Exit-aboveLIGHT.dds");
   895                                 case 31: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f12b.dds");
   897                                 case 32: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f33_Exit-below.dds");
   898                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f33_Exit-belowLIGHT.dds");
   900                                 case 33: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f13b.dds");
   902                                 case 34: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31_Exit-above.dds");
   903                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31_Exit-aboveLIGHT.dds");
   905                                 case 35: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f14b.dds");
   907                                 case 36: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f15a.dds");
   908                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f15aLIGHT.dds");
   910                                 case 37: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f15b.dds");
   911                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f15bLIGHT.dds");
   913                                 case 38: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f15c.dds");
   914                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f15cLIGHT.dds");
   916                                 case 39: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f15d.dds");
   917                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f15dLIGHT.dds");
   919                                 case 40: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f15e.dds");
   920                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f15eLIGHT.dds");
   922                                 case 41: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31_Exit-above-above.dds");
   923                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31_Exit-above-aboveLIGHT.dds");
   925                                 case 42: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f17.dds");
   927                                 case 43: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f18.dds");
   929                                 case 44: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f19.dds");
   931                                 case 45: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f20.dds");
   933                                 case 46: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f21.dds");
   935                                 case 47: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f22.dds");
   937                                 case 48: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f23.dds");
   939                                 case 49: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f24.dds");
   941                                 case 50: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f25.dds");
   942                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f25LIGHT.dds");
   944                                 case 51: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f26.dds");
   946                                 case 52: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f27.dds");
   948                                 case 53: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f28.dds");
   950                                 case 54: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f29.dds");
   952                                 case 55: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f30.dds");
   954                                 case 56: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f15f.dds");
   955                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f15fLIGHT.dds");
   957                                 case 57: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f15g.dds");
   958                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f15gLIGHT.dds");
   960                                 case 58: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31.dds");
   961                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31LIGHT.dds");
   963                                 case 59: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f32x.dds");
   965                                 case 60: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f33.dds");
   966                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f33LIGHT.dds");
   968                                 case 61: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f34.dds");
   969                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f34LIGHT.dds");
   971                                 case 62: swprintf_s(hullfile, 199, L
"Textures\\RTS\\city2playerN.dds");
   973                                 case 63: swprintf_s(hullfile, 199, L
"Textures\\RTS\\city2playerS.dds");
   975                                 case 64: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f3218.dds");
   976                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f32LIGHT.dds");
   978                                 case 65: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f3236.dds");
   979                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f32LIGHT.dds");
   981                                 case 66: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31aim.dds");
   982                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31LIGHT.dds");
   984                                 case 67: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31stripe1.dds");
   985                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31LIGHT.dds");
   987                                 case 68: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31stripe2.dds");
   988                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31LIGHT.dds");
   990                                 case 69: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31stripe3.dds");
   991                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31LIGHT.dds");
   993                                 case 70: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f8bpark.dds");
   995                                 case 71: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f9bpark.dds");
   999                                 case 73: swprintf_s(hullfile, 199, L
"Textures\\RTS\\f31_Exit-above-above-NOSTRIPE.dds");
  1000                                         swprintf_s(lightfile, 199, L
"Textures\\RTS\\f31_Exit-above-aboveLIGHT.dds");
  1004                                 if (hullfile[0] != 0)
  1006                                         if (FAILED(
hr = D3DXCreateTextureFromFileExW(pd3dDevice, hullfile,
  1010                                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1013                                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\"! (%x)", hullfile, 
hr);
  1018                                                 sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsRTSTexture[%i]", 
t);
  1022                                 if (lightfile[0] != 0)
  1024                                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, lightfile,
  1026                                                 D3DX_DEFAULT, 0, D3DFMT_DXT1,
  1027                                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1030                                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\"! (%x)", lightfile, 
hr);
  1035                                                 sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsRTSLights[%i]", 
t);
  1049                         txtHelper.DrawTextLine(L
"Buildings loaded!");
  1054                         txtHelper.DrawFormattedTextLine(L
"Building loading (%i/%i)...", *instage, 
citytextureC + 1);
  1063                                 WCHAR hullfile[199], lightfile[199];
  1065                                 hullfile[0] = lightfile[0] = 0;
  1066                                 D3DFORMAT format = D3DFMT_DXT1;
  1070                                 case 1: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_3_cap.dds");
  1071                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_3_capLIGHT.dds");
  1073                                 case 2: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_hangar1.dds");
  1074                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_hangar1LIGHT.dds");
  1076                                 case 3: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice.dds");
  1077                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAofficeLIGHT.dds");
  1079                                 case 4: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAhotel2.dds");
  1080                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAhotel2LIGHT.dds");
  1082                                 case 5: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice2.dds");
  1083                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAoffice2LIGHT.dds");
  1085                                 case 6: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAhotel1.dds");
  1086                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAhotel1LIGHT.dds");
  1088                                 case 7: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice3.dds");
  1089                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAoffice3LIGHT.dds");
  1091                                 case 8: wcscpy_s(hullfile, 199, L
"textures\\Cities\\tmis.dds");
  1092                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\tmisLIGHT.dds");
  1094                                 case 9: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice4.dds");
  1095                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAoffice4LIGHT.dds");
  1097                                 case 10: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice6.dds");
  1098                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAoffice6LIGHT.dds");
  1100                                 case 11: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice5.dds");
  1101                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAoffice5LIGHT.dds");
  1103                                 case 12: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice7.dds");
  1104                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAoffice7LIGHT.dds");
  1106                                 case 13: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_1_mid.dds");
  1107                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_1_midLIGHT.dds");
  1109                                 case 14: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_flat.dds");
  1110                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_flatLIGHT.dds");
  1112                                 case 15: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAoffice8.dds");
  1113                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAoffice8LIGHT.dds");
  1115                                 case 16: wcscpy_s(hullfile, 199, L
"textures\\Cities\\landing_fnd.dds");
  1116                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\landing_fndLIGHT.dds");
  1118                                 case 17: wcscpy_s(hullfile, 199, L
"textures\\Cities\\landing_cap.dds");
  1119                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\landing_capLIGHT.dds");
  1121                                 case 18: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_1_fnd.dds");
  1122                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_1_fndLIGHT.dds");
  1124                                 case 19: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_1_fnd.dds");
  1125                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_1_fndLIGHT.dds");
  1127                                 case 20: wcscpy_s(hullfile, 199, L
"textures\\Cities\\landing_flat.dds");
  1129                                 case 21: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_3_fnd.dds");
  1130                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_3_fndLIGHT.dds");
  1132                                 case 22: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_hangar_flatunder.dds");
  1133                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_hangar_flatunderLIGHT.dds");
  1135                                 case 23: wcscpy_s(hullfile, 199, L
"textures\\Cities\\t_to_r.dds");
  1136                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\t_to_rLIGHT.dds");
  1138                                 case 24: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_to_t.dds");
  1139                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_to_tLIGHT.dds");
  1141                                 case 25: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_to_b.dds");
  1142                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_to_bLIGHT.dds");
  1144                                 case 26: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_1_flat.dds");
  1145                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_1_flatLIGHT.dds");
  1147                                 case 27: wcscpy_s(hullfile, 199, L
"textures\\Cities\\comm_fnd.dds");
  1148                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\comm_fndLIGHT.dds");
  1150                                 case 28: wcscpy_s(hullfile, 199, L
"textures\\Cities\\comm_mid.dds");
  1151                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\comm_midLIGHT.dds");
  1153                                 case 29: wcscpy_s(hullfile, 199, L
"textures\\Cities\\comm_cap.dds");
  1154                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\comm_capLIGHT.dds");
  1156                                 case 30: wcscpy_s(hullfile, 199, L
"textures\\Cities\\generalgrey_cap.dds");
  1158                                 case 31: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_to_g.dds");
  1159                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_to_gLIGHT.dds");
  1161                                 case 32: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_2_cap.dds");
  1162                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_2_capLIGHT.dds");
  1164                                 case 33: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_1_mid.dds");
  1165                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_1_midLIGHT.dds");
  1167                                 case 34: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_to_r.dds");
  1168                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_to_rLIGHT.dds");
  1170                                 case 35: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_2_fnd.dds");
  1171                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_2_fndLIGHT.dds");
  1173                                 case 36: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_2_mid.dds");
  1174                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_2_midLIGHT.dds");
  1176                                 case 37: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_to_b.dds");
  1177                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_to_bLIGHT.dds");
  1179                                 case 38: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_2_mid.dds");
  1180                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_2_midLIGHT.dds");
  1182                                 case 39: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_3_mid.dds");
  1183                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_3_midLIGHT.dds");
  1185                                 case 40: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_3_fnd.dds");
  1186                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_3_fndLIGHT.dds");
  1188                                 case 41: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_3_cap.dds");
  1189                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_3_capLIGHT.dds");
  1191                                 case 42: wcscpy_s(hullfile, 199, L
"textures\\Cities\\b_1_cap.dds");
  1192                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\b_1_capLIGHT.dds");
  1194                                 case 43: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_1_cap.dds");
  1195                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_1_capLIGHT.dds");
  1197                                 case 44: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_flat.dds");
  1198                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_flatLIGHT.dds");
  1200                                 case 45: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_1_mid.dds");
  1201                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_1_midLIGHT.dds");
  1203                                 case 46: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_3_mid.dds");
  1204                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\g_3_midLIGHT.dds");
  1206                                 case 47: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-texture-b2.dds");
  1208                                 case 48: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-texture-g3.dds");
  1210                                 case 49: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-wall-b2.dds");
  1211                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\CITY-wall-b2LIGHT.dds");
  1213                                 case 50: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-wall-g3.dds");
  1214                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\CITY-wall-g3LIGHT.dds");
  1216                                 case 51: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-texture-g1.dds");
  1218                                 case 52: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-wall-g2.dds");
  1219                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\CITY-wall-g2LIGHT.dds");
  1221                                 case 53: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-wall-g1.dds");
  1222                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\CITY-wall-g1LIGHT.dds");
  1224                                 case 54: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sign-FLEET_gnd.dds");
  1225                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\sign-FLEET_gndLIGHT.dds");
  1228                                 case 55: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_2_fnd.dds");
  1229                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_2_fndLIGHT.dds");
  1231                                 case 56: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ir_fnd.dds");
  1232                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\ir_fndLIGHT.dds");
  1234                                 case 57: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ircap1.dds");
  1235                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\ircap1LIGHT.dds");
  1237                                 case 58: wcscpy_s(hullfile, 199, L
"textures\\Cities\\igcap2.dds");
  1238                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\igcap2LIGHT.dds");
  1240                                 case 59: wcscpy_s(hullfile, 199, L
"textures\\Cities\\igcap1.dds");
  1241                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\igcap1LIGHT.dds");
  1243                                 case 60: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibf-tank.dds");
  1244                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibf-tankLIGHT.dds");
  1246                                 case 61: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r-tank-tower8.dds");
  1247                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r-tank-tower8LIGHT.dds");
  1249                                 case 62: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-materialstorage.dds");
  1250                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-materialstorageLIGHT.dds");
  1252                                 case 63: wcscpy_s(hullfile, 199, L
"textures\\Cities\\R.dds");
  1253                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\RLIGHT.dds");
  1255                                 case 64: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_2_flat.dds");
  1256                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_2_flatLIGHT.dds");
  1258                                 case 65: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_2_mid.dds");
  1259                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_2_midLIGHT.dds");
  1261                                 case 66: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r-tank.dds");
  1262                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r-tankLIGHT.dds");
  1264                                 case 67: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibg-production.dds");
  1265                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibg-productionLIGHT.dds");
  1267                                 case 68: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibg-processor.dds");
  1268                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibg-processorLIGHT.dds");
  1270                                 case 69: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibg-assembly.dds");
  1271                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibg-assemblyLIGHT.dds");
  1273                                 case 70: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibg-warehouse.dds");
  1274                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibg-warehouseLIGHT.dds");
  1276                                 case 71: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-separator.dds");
  1277                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-separatorLIGHT.dds");
  1279                                 case 72: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ib.dds");
  1280                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibLIGHT.dds");
  1282                                 case 73: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-materialobliteration.dds");
  1283                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-materialobliterationLIGHT.dds");
  1285                                 case 74: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ig.dds");
  1286                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\igLIGHT.dds");
  1288                                 case 75: wcscpy_s(hullfile, 199, L
"textures\\Cities\\igs.dds");
  1289                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\igsLIGHT.dds");
  1291                                 case 76: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibe.dds");
  1292                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibeLIGHT.dds");
  1294                                 case 77: wcscpy_s(hullfile, 199, L
"textures\\Cities\\igscap1.dds");
  1295                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\igscap1LIGHT.dds");
  1297                                 case 78: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibb-1.dds");
  1298                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibb-1LIGHT.dds");
  1300                                 case 79: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibb-2.dds");
  1301                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibb-2LIGHT.dds");
  1303                                 case 80: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibb-3.dds");
  1304                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibb-3LIGHT.dds");
  1306                                 case 81: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibf-distillery.dds");
  1307                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibf-distilleryLIGHT.dds");
  1309                                 case 82: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibf-overpass1.dds");
  1310                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\ibf-overpass1LIGHT.dds");
  1312                                 case 83: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibf-processor.dds");
  1313                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibf-processorLIGHT.dds");
  1315                                 case 84: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibf-refiner.dds");
  1316                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibf-refinerLIGHT.dds");
  1318                                 case 85: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibf-tankcap.dds");
  1319                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\ibf-tankcapLIGHT.dds");
  1321                                 case 86: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ibsf-fueltank.dds");
  1322                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\ibsf-fueltankLIGHT.dds");
  1324                                 case 87: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-repairgarage.dds");
  1325                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-repairgarageLIGHT.dds");
  1327                                 case 88: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-equipmentstorage.dds");
  1328                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-equipmentstorageLIGHT.dds");
  1331                                 case 89: wcscpy_s(hullfile, 199, L
"textures\\Cities\\tank-water.dds");
  1332                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\tank-waterLIGHT.dds");
  1334                                 case 90: wcscpy_s(hullfile, 199, L
"textures\\Cities\\arch_post.dds");
  1335                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\arch_postLIGHT.dds");
  1337                                 case 91: wcscpy_s(hullfile, 199, L
"textures\\Cities\\arch.dds");
  1338                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\archLIGHT.dds");
  1340                                 case 92: wcscpy_s(hullfile, 199, L
"textures\\Cities\\g_2_cap.dds");
  1341                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\g_2_capLIGHT.dds");
  1344                                 case 93: wcscpy_s(hullfile, 199, L
"textures\\Cities\\r_1_land.dds");
  1345                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\r_1_landLIGHT.dds");
  1347                                 case 94: wcscpy_s(hullfile, 199, L
"textures\\Cities\\tower-control.dds");
  1350                                 case 95: wcscpy_s(hullfile, 199, L
"textures\\Cities\\concrete2.dds");
  1352                                 case 96: wcscpy_s(hullfile, 199, L
"textures\\Cities\\concrete1-window.dds");
  1353                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\concrete1-windowLIGHT.dds");
  1355                                 case 97: wcscpy_s(hullfile, 199, L
"textures\\Cities\\concrete1.dds");
  1357                                 case 98: wcscpy_s(hullfile, 199, L
"textures\\Cities\\glassy1-panel.dds");
  1358                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\glassy1-panelLIGHT.dds");
  1360                                 case 99: wcscpy_s(hullfile, 199, L
"textures\\Cities\\steel1-corrugated.dds");
  1362                                 case 100: wcscpy_s(hullfile, 199, L
"textures\\Cities\\steel1-smooth.dds");
  1364                                 case 101: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAcasino1.dds");
  1365                                         wcscpy_s(lightfile, 199, L
"textures\\Cities\\AAAcasino1LIGHT.dds");
  1367                                 case 102: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CITY-wall-airport.dds");
  1369                                 case 103: wcscpy_s(hullfile, 199, L
"textures\\Cities\\concrete1-groove.dds");
  1372                                 case 104: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-house1_foot.dds");
  1373                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-house1_footLIGHT.dds");
  1375                                 case 105: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-house1.dds");
  1376                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-house1LIGHT.dds");
  1379                                 case 106: wcscpy_s(hullfile, 199, L
"textures\\Cities\\mining-com_fnd.dds");
  1380                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\mining-com_fndLIGHT.dds");
  1382                                 case 107: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-residence.dds");
  1383                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-residenceLIGHT.dds");
  1385                                 case 108: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-lzcorner.dds");
  1386                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-lzcornerLIGHT.dds");
  1388                                 case 109: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAFOUNDATION.dds");
  1390                                 case 110: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAFOUNDATION-LF.dds");
  1391                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAFOUNDATION-LFLIGHT.dds");
  1393                                 case 111: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-extractor.dds");
  1394                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-extractorLIGHT.dds");
  1396                                 case 112: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-biosupport.dds");
  1397                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-biosupportLIGHT.dds");
  1399                                 case 113: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-powerplant.dds");
  1400                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-powerplantLIGHT.dds");
  1402                                 case 114: wcscpy_s(hullfile, 199, L
"textures\\Cities\\mining-com.dds");
  1403                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\mining-comLIGHT.dds");
  1405                                 case 115: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WEP-source1.dds");
  1407                                 case 116: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-watertower.dds");
  1408                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-watertowerLIGHT.dds");
  1410                                 case 117: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WEP-tower1.dds");
  1413                                 case 118: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-silo.dds");
  1414                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-siloLIGHT.dds");
  1416                                 case 119: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-greenhouse1.dds");
  1417                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-greenhouse1LIGHT.dds");
  1419                                 case 120: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-greenhouse2.dds");
  1420                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-greenhouse2LIGHT.dds");
  1422                                 case 121: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-greenhouse3.dds");
  1423                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-greenhouse3LIGHT.dds");
  1426                                 case 122: wcscpy_s(hullfile, 199, L
"textures\\Cities\\AAAcasino2.dds");
  1427                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\AAAcasino2LIGHT.dds");
  1429                                 case 123: wcscpy_s(hullfile, 199, L
"textures\\Cities\\c-powerproduction.dds");
  1430                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\c-powerproductionLIGHT.dds");
  1432                                 case 138: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CCCtownblock10-park.dds");
  1435                                 case 124: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-plat_cap.dds");
  1436                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\sea-plat_capLIGHT.dds");
  1438                                 case 125: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-bldwall3.dds");
  1439                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\sea-bldwall3LIGHT.dds");
  1441                                 case 126: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-bldwall1.dds");
  1442                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\sea-bldwall1LIGHT.dds");
  1444                                 case 127: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-bldroofA.dds");
  1446                                 case 128: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-bldroofB.dds");
  1448                                 case 129: wcscpy_s(hullfile, 199, L
"textures\\Cities\\roverstreet-segment.dds");
  1449                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\roverstreet-segmentLIGHT.dds");
  1451                                 case 130: wcscpy_s(hullfile, 199, L
"textures\\Cities\\arch_walk10.dds");
  1452                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\arch_walk10LIGHT.dds");
  1454                                 case 131: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-legs_trns.dds");
  1456                                 case 132: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-legs_fnd.dds");
  1458                                 case 133: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-legs.dds");
  1460                                 case 134: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-plat.dds");
  1461                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\sea-platLIGHT.dds");
  1463                                 case 135: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-platwall1.dds");
  1464                                         wcscpy_s(lightfile, 199, L
"textures\\cities\\sea-platwall1LIGHT.dds");
  1466                                 case 136: wcscpy_s(hullfile, 199, L
"textures\\Cities\\sea-bldwall2.dds");
  1468                                 case 137: wcscpy_s(hullfile, 199, L
"textures\\RTS\\f15d.dds");
  1469                                         wcscpy_s(lightfile, 199, L
"textures\\RTS\\f15dLIGHT.dds");
  1472                                 case 139: wcscpy_s(hullfile, 199, L
"textures\\Cities\\TOWER.dds");
  1474                                 case 140: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ROOF-1.dds");
  1476                                 case 141: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ARM-skin-3.dds");
  1478                                 case 142: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ALCOVE.dds");
  1480                                 case 143: wcscpy_s(hullfile, 199, L
"textures\\Cities\\COLUMN.dds");
  1482                                 case 144: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ARM2.dds");
  1484                                 case 145: wcscpy_s(hullfile, 199, L
"textures\\Cities\\GUTS3.dds");
  1486                                 case 146: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ARM-skin-2.dds");
  1488                                 case 147: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ARM.dds");
  1490                                 case 148: wcscpy_s(hullfile, 199, L
"textures\\Cities\\CLAMP.dds");
  1492                                 case 149: wcscpy_s(hullfile, 199, L
"textures\\Cities\\BOX.dds");
  1494                                 case 150: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WALL1-caution.dds");
  1496                                 case 151: wcscpy_s(hullfile, 199, L
"textures\\Cities\\COLUMN2.dds");
  1498                                 case 152: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WALL1-lit.dds");
  1500                                 case 153: wcscpy_s(hullfile, 199, L
"textures\\Cities\\DOORFRAME.dds");
  1502                                 case 154: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WALL2-dark.dds");
  1504                                 case 155: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WALL2-caution.dds");
  1506                                 case 156: wcscpy_s(hullfile, 199, L
"textures\\Cities\\BOX-int2.dds");
  1508                                 case 157: wcscpy_s(hullfile, 199, L
"textures\\Cities\\BOX-int.dds");
  1510                                 case 158: wcscpy_s(hullfile, 199, L
"textures\\Cities\\GUTS1.dds");
  1512                                 case 159: wcscpy_s(hullfile, 199, L
"textures\\Cities\\GUTS2.dds");
  1514                                 case 160: wcscpy_s(hullfile, 199, L
"textures\\Cities\\DISH-int.dds");
  1516                                 case 161: wcscpy_s(hullfile, 199, L
"textures\\Cities\\DISH-ext.dds");
  1518                                 case 162: wcscpy_s(hullfile, 199, L
"textures\\Cities\\ARM-skin.dds");
  1520                                 case 163: wcscpy_s(hullfile, 199, L
"textures\\Cities\\TANK.dds");
  1522                                 case 164: wcscpy_s(hullfile, 199, L
"textures\\Cities\\dome4.dds");
  1523                                         format = D3DFMT_DXT3;
  1526                                 case 165: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\terminal1.dds");
  1527                                         wcscpy_s(lightfile, 199, L
"textures\\Colonies\\Airfield\\terminal1LIGHT.dds");
  1529                                 case 166: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\gravel2.dds");
  1531                                 case 167: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\power1.dds");
  1532                                         wcscpy_s(lightfile, 199, L
"textures\\Colonies\\Airfield\\power1LIGHT.dds");
  1534                                 case 168: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\steel1-corrugated.dds");
  1536                                 case 169: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\hotel1.dds");
  1537                                         wcscpy_s(lightfile, 199, L
"textures\\Colonies\\Airfield\\hotel1LIGHT.dds");
  1539                                 case 170: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\hangar1.dds");
  1540                                         wcscpy_s(lightfile, 199, L
"textures\\Colonies\\Airfield\\hangar1LIGHT.dds");
  1542                                 case 171: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\hangardoor1.dds");
  1544                                 case 172: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\warehouse1.dds");
  1545                                         wcscpy_s(lightfile, 199, L
"textures\\Colonies\\Airfield\\warehouse1LIGHT.dds");
  1547                                 case 173: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\garage1.dds");
  1548                                         wcscpy_s(lightfile, 199, L
"textures\\Colonies\\Airfield\\garage1LIGHT.dds");
  1550                                 case 174: wcscpy_s(hullfile, 199, L
"textures\\Colonies\\Airfield\\steel2-corrugated.dds");
  1553 #ifndef skipBuildings  1554                                 if (hullfile[0] != 0)
  1556                                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, hullfile,
  1557                                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, format,
  1558                                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1561                                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\": 0x%x", hullfile, 
hr);
  1566                                                 sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsCityTexture[%i]", *instage);
  1572                                 if (lightfile[0] != 0)
  1574                                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, lightfile,
  1575                                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_DXT1,
  1576                                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1579                                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\": 0x%x", hullfile, 
hr);
  1584                                                 sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsCityLights[%i]", *instage);
  1599                         txtHelper.DrawTextLine(L
"Orbital facilities loaded!");
  1604                         txtHelper.DrawFormattedTextLine(L
"Orbital facilities loading (%i/%i)...", *instage, 
docktextureC);
  1609                                 logger->
Log(
"Orbital facilities loaded...");
  1613                                 WCHAR hullfile[199], lightfile[199];
  1616                                 hullfile[0] = lightfile[0] = 0;
  1620                                 case 1: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Stationnode.dds");
  1621                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\StationnodeLIGHT.dds");
  1623                                 case 2: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Node-ang45.dds");
  1625                                 case 3: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Corridor1-ang45.dds");
  1626                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Corridor1-ang45LIGHT.dds");
  1628                                 case 4: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Big-Tank_cap.dds");
  1629                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Big-Tank_capLIGHT.dds");
  1631                                 case 5: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Big-Tank_section1.dds");
  1632                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Big-Tank_section1LIGHT.dds");
  1634                                 case 6: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Big-Tank_section2.dds");
  1635                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Big-Tank_section2LIGHT.dds");
  1637                                 case 7: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Tank.dds");
  1638                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\TankLIGHT.dds");
  1640                                 case 8: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-ATI.dds");
  1641                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-ATI.dds");
  1643                                 case 9: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-BIGREDWIRE.dds");
  1644                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-BIGREDWIRE.dds");
  1646                                 case 10: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-JVC.dds");
  1647                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-JVC.dds");
  1649                                 case 11: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-KOSS.dds");
  1650                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-KOSS.dds");
  1652                                 case 12: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-LOCKHEED.dds");
  1653                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-LOCKHEED.dds");
  1655                                 case 13: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-TECHROFORM.dds");
  1656                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-TECHROFORM.dds");
  1658                                 case 14: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-VERBATIM.dds");
  1659                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-VERBATIM.dds");
  1661                                 case 15: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-45-CUTTER'S.dds");
  1662                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-45-CUTTER'SLIGHT.dds");
  1664                                 case 16: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-MINOLTA.dds");
  1665                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-MINOLTA.dds");
  1667                                 case 17: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Office-body1.dds");
  1668                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Office-body1LIGHT.dds");
  1670                                 case 18: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Office-int1.dds");
  1671                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Office-int1LIGHT.dds");
  1673                                 case 19: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Gangway.dds");
  1674                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\GangwayLIGHT.dds");
  1676                                 case 20: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Joint.dds");
  1677                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\JointLIGHT.dds");
  1679                                 case 21: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Reactor.dds");
  1680                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\ReactorLIGHT.dds");
  1682                                 case 22: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Brace.dds");
  1683                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\BraceLIGHT.dds");
  1685                                 case 23: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Communications.dds");
  1686                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\CommunicationsLIGHT.dds");
  1688                                 case 24: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Xition2.dds");
  1689                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Xition2LIGHT.dds");
  1691                                 case 25: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Panel1.dds");
  1692                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Panel1LIGHT.dds");
  1694                                 case 26: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Office-fnd1.dds");
  1695                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Office-fnd1LIGHT.dds");
  1697                                 case 27: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Office-cap1.dds");
  1698                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Office-cap1LIGHT.dds");
  1700                                 case 28: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Office-fnd2.dds");
  1701                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Office-fnd2LIGHT.dds");
  1703                                 case 29: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Xition1.dds");
  1704                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Xition1LIGHT.dds");
  1706                                 case 30: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Riser2.dds");
  1707                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Riser2LIGHT.dds");
  1709                                 case 31: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Interface.dds");
  1710                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\InterfaceLIGHT.dds");
  1712                                 case 32: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-rectangle.dds");
  1713                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-rectangleLIGHT.dds");
  1715                                 case 33: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Corridor1.dds");
  1716                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Corridor1LIGHT.dds");
  1718                                 case 34: wcscpy_s(hullfile, 199, L
"textures\\Cities\\WEP-source1.dds");
  1720                                 case 35: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Lounge.dds");
  1721                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\LoungeLIGHT.dds");
  1723                                 case 36: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Riser1.dds");
  1724                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Riser1LIGHT.dds");
  1726                                 case 37: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Office-cap2.dds");
  1727                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Office-cap2LIGHT.dds");
  1730                                 case 38: wcscpy_s(hullfile, 199, L
"textures\\Docks\\ring-ad.dds");
  1731                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\ring-adLIGHT.dds");
  1733                                 case 39: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZStationnode.dds");
  1734                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZStationnodeLIGHT.dds");
  1736                                 case 40: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Bracenode.dds");
  1738                                 case 41: wcscpy_s(hullfile, 199, L
"textures\\Docks\\braceshaft.dds");
  1740                                 case 42: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Braceshaft1.dds");
  1741                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Braceshaft1LIGHT.dds");
  1743                                 case 43: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZBig-Tank_cap.dds");
  1744                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZBig-Tank_capLIGHT.dds");
  1746                                 case 44: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZBig-Tank_section1.dds");
  1747                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZBig-Tank_section1LIGHT.dds");
  1749                                 case 45: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-square.dds");
  1750                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-squareLIGHT.dds");
  1752                                 case 46: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZTank.dds");
  1753                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZTankLIGHT.dds");
  1755                                 case 47: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZOffice-body1.dds");
  1756                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZOffice-body1LIGHT.dds");
  1758                                 case 48: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZOffice-int1.dds");
  1759                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZOffice-int1LIGHT.dds");
  1761                                 case 49: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZJoint.dds");
  1762                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZJointLIGHT.dds");
  1764                                 case 50: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZGangway.dds");
  1765                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZGangwayLIGHT.dds");
  1767                                 case 51: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZReactor.dds");
  1768                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZReactorLIGHT.dds");
  1770                                 case 52: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZXition2.dds");
  1771                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZXition2LIGHT.dds");
  1773                                 case 53: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZXition1.dds");
  1774                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZXition1LIGHT.dds");
  1776                                 case 54: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZOffice-fnd1.dds");
  1777                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZOffice-fnd1LIGHT.dds");
  1779                                 case 55: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZOffice-cap1.dds");
  1780                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZOffice-cap1LIGHT.dds");
  1782                                 case 56: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZOffice-fnd2.dds");
  1783                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZOffice-fnd2LIGHT.dds");
  1785                                 case 57: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZRiser2.dds");
  1786                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZRiser2LIGHT.dds");
  1788                                 case 58: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-EZDOCK.dds");
  1789                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-EZDOCKLIGHT.dds");
  1791                                 case 59: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZInterface.dds");
  1792                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZInterfaceLIGHT.dds");
  1794                                 case 60: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZCorridor1.dds");
  1795                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZCorridor1LIGHT.dds");
  1797                                 case 61: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZRiser1.dds");
  1798                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZRiser1LIGHT.dds");
  1800                                 case 62: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZLounge.dds");
  1801                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZLoungeLIGHT.dds");
  1803                                 case 63: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZOffice-cap2.dds");
  1804                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZOffice-cap2LIGHT.dds");
  1807                                 case 64: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZNode-ang45.dds");
  1808                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZNode-ang45LIGHT.dds");
  1810                                 case 65: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZCorridor1-ang45.dds");
  1811                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZCorridor1-ang45LIGHT.dds");
  1813                                 case 66: wcscpy_s(hullfile, 199, L
"textures\\Docks\\Sign-YSP.dds");
  1814                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\Sign-YSP.dds");
  1816                                 case 67: wcscpy_s(hullfile, 199, L
"textures\\Docks\\EZPanel1.dds");
  1817                                         wcscpy_s(lightfile, 199, L
"textures\\Docks\\EZPanel1LIGHT.dds");
  1821                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, hullfile,
  1822                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  1823                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1826                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\" (%i)! (%x)", hullfile, 
t, 
hr);
  1831                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsDockTexture[%i]", 
t);
  1834                                 if (lightfile[0] != 0)
  1836                                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, lightfile,
  1837                                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  1838                                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1841                                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\" (%i)! (%x)", lightfile, 
t, 
hr);
  1847                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsDockLights[%i]", 
t);
  1860                         txtHelper.DrawTextLine(L
"Landforms loaded!");
  1865                         txtHelper.DrawFormattedTextLine(L
"Landforms loading (%i/%i)...", *instage + 1, 
landformtextureC);
  1877                                 swprintf_s(filemsg, 199, L
"Textures\\Terrain\\Landform_%02i.png", 
t);
  1878                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  1879                                         D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_L8,
  1880                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1883                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\"! (%x)", filemsg, 
hr);
  1888                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsLandform[%i]", 
t);
  1902                         txtHelper.DrawTextLine(L
"Runway and road layers loaded!");
  1903                 if (*stage == 8 && *instage == 0)
  1905                         txtHelper.DrawTextLine(L
"Marston Mats loading (1)...");
  1906                         if (FAILED(
hr = D3DXCreateTextureFromFileExW(pd3dDevice, L
"Textures\\RTS\\Marston1.dds",
  1907                                 57, 28, D3DX_DEFAULT, 0, D3DFMT_DXT3,
  1908                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1911                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\RTS\\Marston1.dds\"! (%x)", 
hr);
  1918                 else if (*stage == 8 && *instage == 1)
  1920                         txtHelper.DrawTextLine(L
"Runway edge light loading (1)...");
  1921                         if (FAILED(
hr = D3DXCreateTextureFromFileExW(pd3dDevice, L
"Textures\\RTS\\RunwayEdgeLight.dds",
  1922                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_DXT1,
  1923                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1926                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\RTS\\RunwayEdgeLight.dds\"! (%x)", 
hr);
  1933                 else if (*stage == 8 && *instage == 2)
  1935                         txtHelper.DrawTextLine(L
"Road texture loading (1)...");
  1936                         if (FAILED(
hr = D3DXCreateTextureFromFileExW(pd3dDevice, L
"Textures\\RTS\\Road.dds",
  1937                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_DXT5,
  1938                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1941                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\RTS\\Road.dds\"! (%x)", 
hr);
  1948                 else if (*stage == 8 && *instage == 3)
  1950                         txtHelper.DrawTextLine(L
"Intersection texture loading (1)...");
  1951                         if (FAILED(
hr = D3DXCreateTextureFromFileExW(pd3dDevice, L
"Textures\\RTS\\Intersection.dds",
  1952                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_DXT5,
  1953                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1956                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\RTS\\Intersection.dds\"! (%x)", 
hr);
  1968                         txtHelper.DrawTextLine(L
"Landform transitions loaded!");
  1973                         txtHelper.DrawFormattedTextLine(L
"Landform transitions loading (%i/%i)...", *instage + 1, 
transitiontextureC);
  1978                                 logger->
Log(
"Landform transitions loaded...");
  1985                                 swprintf_s(filemsg, 199, L
"Textures\\Terrain\\Transition_%02i.png", 
t + 1);
  1986                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  1987                                         D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_L8,
  1988                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  1991                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"%S\"! (%x)", filemsg, 
hr);
  1996                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsTransition[%i]", 
t);
  2013                         txtHelper.DrawFormattedTextLine(L
"Cloud effects loading (%i/%i)...", *instage, 
elmoAnimateC);
  2024                                 swprintf_s(filemsg, 199, L
"Textures\\Clouds\\Elmo%i.dds", 
t + 1);
  2025                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2026                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2027                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2030                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\Elmo%i.dds\"! (%x)", 
t + 1, 
hr);
  2035                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsElmo[%i]", 
t);
  2046                         txtHelper.DrawTextLine(L
"Cloud layers loaded!");
  2047                 if (*stage == 11 && *instage == 2)
  2049                         txtHelper.DrawTextLine(L
"Cloud layers loading (tops)...");
  2050                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\cloudbase.dds",
  2051                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_L8,
  2052                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2055                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\cloudbase.dds\"! (%x)", 
hr);
  2062                 if (*stage == 11 && *instage == 1)
  2064                         txtHelper.DrawTextLine(L
"Cloud layers loading (base detail)...");
  2065                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\clouddetailbelow.dds",
  2066                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_L8,
  2067                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2068                                 D3DX_FILTER_BOX, 0, NULL, NULL,
  2071                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\clouddetailbelow.dds\"! (%x)", 
hr);
  2078                 if (*stage == 11 && *instage == 0)
  2080                         txtHelper.DrawTextLine(L
"Cloud layers loading (tops detail)...");
  2081                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\clouddetailabove.dds",
  2082                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_L8,
  2083                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2084                                 D3DX_FILTER_BOX, 0, NULL, NULL,
  2087                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\clouddetailabove.dds\"! (%x)", 
hr);
  2099                         txtHelper.DrawTextLine(L
"Holiday effects loaded!");
  2100                 if (*stage == 12 && *instage == 0)
  2102                         txtHelper.DrawTextLine(L
"Holiday effects loading...");
  2103                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Holidays\\halloween.dds",
  2104                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2105                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2108                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Holidays\\halloween.dds\"! (%x)", 
hr);
  2120                         txtHelper.DrawTextLine(L
"Weapons loaded!");
  2125                         txtHelper.DrawFormattedTextLine(L
"Weapons loading (%i/%i)...", *instage, 
weaponanimateC);
  2134 #ifndef skipAnimations  2137                                 swprintf_s(filemsg, 199, L
"Textures\\Weapons\\weapon%i.dds", 
t + 1);
  2138                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2139                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2140                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2143                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Weapons\\weapon%i.dds\"! (%x)", 
t + 1, 
hr);
  2148                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsWeapon[%i]", 
t);
  2151                                 swprintf_s(filemsg, 199, L
"Textures\\Weapons\\Sinker\\sinker%04i.dds", 
t + 1);
  2152                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2153                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2154                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2157                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Weapons\\Sinker\\sinker%04i.dds\"! (%x)", 
t + 1, 
hr);
  2162                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsSinker[%i]", 
t);
  2177                         txtHelper.DrawTextLine(L
"Explosions loading (Blast)...");
  2179 #ifndef skipAnimations  2180                         if (FAILED(
hr = D3DXCreateVolumeTextureFromFileExW(pd3dDevice, L
"Textures\\Explosions\\blast.dds",
  2181                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2182                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2185                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Explosions\\blast.dds\"! (%x)", 
hr);
  2190                         logger->
Log(
"Explosions (Blast) loaded...");
  2200                         txtHelper.DrawTextLine(L
"Explosions loading (Fuzer)...");
  2202 #ifndef skipAnimations  2203                         if (FAILED(
hr = D3DXCreateVolumeTextureFromFileExW(pd3dDevice, L
"Textures\\Explosions\\fuzer.dds",
  2204                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2205                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2208                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Explosions\\fuzer.dds\"! (%x)", 
hr);
  2213                         logger->
Log(
"Explosions (Fuzer) loaded...");
  2222                         txtHelper.DrawTextLine(L
"Explosions loaded!");
  2225                         txtHelper.DrawTextLine(L
"Explosions loading (Sinker)...");
  2227 #ifndef skipAnimations  2228                         if (FAILED(
hr = D3DXCreateVolumeTextureFromFileExW(pd3dDevice, L
"Textures\\Explosions\\sinker.dds",
  2229                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2230                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2233                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Explosions\\sinker.dds\"! (%x)", 
hr);
  2238                         logger->
Log(
"Explosions (Sinker) loaded...");
  2245         for (
t = 0; 
t < smoketrailC; 
t++)
  2247                 sprintf_s(
msg, 
sizeof(
msg), 
"Textures\\Animations\\Smoke\\smoketest%04i.png", 
t + 1);
  2248                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, Lmsg,
  2249                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_A8R8G8B8,
  2250                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2251                         D3DX_FILTER_BOX | D3DX_FILTER_MIRROR, 0, NULL, NULL, &m_pddsSmoke[
t])))
  2253                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Animations\\Smoke\\smoketest%04i.png\"! (%x)", 
t + 1, 
hr);
  2254                         Trace(
msg, Logger::Level::Fatal);
  2258                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsSmoke[%i]", 
t);
  2267 #ifndef skipAnimations  2268                 if (FAILED(
hr = D3DXCreateVolumeTextureFromFileExW(pd3dDevice, L
"Textures\\Animations\\Reentry.dds",
  2269                         512, 512, 64, 1, 0, D3DFMT_DXT1,
  2270                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2273                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Animations\\Reentry.dds\"! (%x)", 
hr);
  2287                         txtHelper.DrawFormattedTextLine(L
"Animations loading (DIHV (%i/%i))...", *instage, 
dihvanimateC);
  2292                                 logger->
Log(
"Animations (DIHV) loaded...");
  2296 #ifndef skipAnimations  2299                                 swprintf_s(filemsg, 199, L
"Textures\\Animations\\DIHV\\dihvexit%04i.dds", 
t + 1);
  2300                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2301                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2302                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2305                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Animations\\DIHV\\dihvexit%04i.dds\"! (%x)", 
t + 1, 
hr);
  2310                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsDIHV[%i]", 
t);
  2327                         txtHelper.DrawFormattedTextLine(L
"Animations loading (Caridac (%i/%i))...", *instage, 
heartanimateC);
  2332                                 logger->
Log(
"Animations (Cardiac) loaded...");
  2336 #ifndef skipAnimations  2339                                 swprintf_s(filemsg, 199, L
"Textures\\Animations\\Cardiac\\HEART%i.dds", 
t + 1);
  2340                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2341                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2342                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2345                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Animations\\Cardiac\\HEART%i.dds\"! (%x)", 
t + 1, 
hr);
  2350                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsHeart[%i]", 
t);
  2364                         txtHelper.DrawTextLine(L
"Water normal loaded!");
  2365                 if (*stage == 20 && *instage == 0)
  2367                         txtHelper.DrawTextLine(L
"Water normal loading...");
  2368                         if (FAILED(
hr = D3DXCreateTextureFromFileExW(pd3dDevice, L
"Textures\\Terrain\\Water_Normal.png",
  2369                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_R8G8B8,
  2370                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2373                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Terrain\\Water_Normal.png\"! (%x)", 
hr);
  2391                         txtHelper.DrawFormattedTextLine(L
"Animations loading (Fireworks_1 (%i/%i))...", *instage, 
firework1C);
  2396                                 logger->
Log(
"Animations (Fireworks 1/3) loaded...");
  2400 #ifndef skipAnimations  2403                                 swprintf_s(filemsg, 199, L
"Textures\\Animations\\Fireworks\\fw1%04i.dds", 
t + 1);
  2404                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2405                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2406                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2409                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Animations\\Fireworks\\fw1%04i.dds\"! (%x)", 
t + 1, 
hr);
  2414                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsFirework1[%i]", 
t);
  2431                         txtHelper.DrawFormattedTextLine(L
"Animations loading (Fireworks_2 (%i/%i))...", *instage, 
firework2C);
  2436                                 logger->
Log(
"Animations (Fireworks 2/3) loaded...");
  2440 #ifndef skipAnimations  2443                                 swprintf_s(filemsg, 199, L
"Textures\\Animations\\Fireworks\\fw2%04i.dds", 
t + 1);
  2444                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2445                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2446                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2449                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Animations\\Fireworks\\fw2%04i.dds\"! (%x)", 
t + 1, 
hr);
  2454                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsFirework2[%i]", 
t);
  2468                         txtHelper.DrawTextLine(L
"Animations loaded!");
  2473                         txtHelper.DrawFormattedTextLine(L
"Animations loading (Fireworks_3 (%i/%i))...", *instage, 
firework3C);
  2478                                 logger->
Log(
"Animations (Fireworks 3/3) loaded...");
  2482 #ifndef skipAnimations  2485                                 swprintf_s(filemsg, 199, L
"Textures\\Animations\\Fireworks\\fw3%04i.dds", 
t + 2);
  2486                                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, filemsg,
  2487                                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2488                                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2491                                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Animations\\Fireworks\\fw3%04i.dds\"! (%x)", 
t + 2, 
hr);
  2496                                         sprintf_s(
msg, 
sizeof(
msg), 
"m_pddsFirework3[%i]", 
t);
  2510                         txtHelper.DrawTextLine(L
"Instruments loaded!");
  2511                 if (*stage == 26 && *instage == 10)
  2526                 if (*stage == 26 && *instage == 9)
  2528                         txtHelper.DrawTextLine(L
"Instruments loading (Interlace)...");
  2529                         if (FAILED(
hr = D3DXCreateTextureFromResourceEx(pd3dDevice, DXUTGetHINSTANCE(),
  2531                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_L8,
  2532                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2535                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load resource IDB_BITMAP1! (%x)", 
hr);
  2540                         if (FAILED(
hr = D3DXCreateTextureFromResourceEx(pd3dDevice, DXUTGetHINSTANCE(),
  2542                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_L8,
  2543                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2546                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load resource IDB_BITMAP2! (%x)", 
hr);
  2553                 if (*stage == 26 && *instage == 8)
  2568                 if (*stage == 26 && *instage == 7)
  2570                         txtHelper.DrawTextLine(L
"Instruments loading (sunglasses)...");
  2571                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Inventory\\Burbank-Sun_02.png",
  2572                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_A8R8G8B8,
  2573                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2576                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Inventory\\Burbank-Sun_02.png\"! (%x)", 
hr);
  2583                 if (*stage == 26 && *instage == 6)
  2585                         txtHelper.DrawTextLine(L
"Instruments loading (binoculars)...");
  2586                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Inventory\\Binoculars.dds",
  2587                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2588                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2591                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Inventory\\Binoculars.dds\"! (%x)", 
hr);
  2597                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Inventory\\Binoculars-compass.dds",
  2598                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2599                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2602                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Inventory\\Binoculars-compass.dds\"! (%x)", 
hr);
  2608                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Inventory\\Binoculars-arrow.dds",
  2609                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2610                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2613                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Inventory\\Binoculars-arrow.dds\"! (%x)", 
hr);
  2620                 if (*stage == 26 && *instage == 5)
  2624                 if (*stage == 26 && *instage == 4)
  2628                 if (*stage == 26 && *instage == 3)
  2632                 if (*stage == 26 && *instage == 2)
  2636                 if (*stage == 26 && *instage == 1)
  2640                 if (*stage == 26 && *instage == 0)
  2649                         txtHelper.DrawTextLine(L
"Additional effects loaded!");
  2650                 if (*stage == 27 && *instage == 9)
  2654                 if (*stage == 27 && *instage == 8)
  2656                         txtHelper.DrawTextLine(L
"Additional effects loading (Lightning_1)...");
  2657                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\lightningbelow.dds",
  2658                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2659                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2662                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\lightningbelow.dds\"! (%x)", 
hr);
  2669                 if (*stage == 27 && *instage == 7)
  2671                         txtHelper.DrawTextLine(L
"Additional effects loading (Lightning_2)...");
  2672                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\lightningbelow1.dds",
  2673                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2674                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2677                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\lightningbelow1.dds\"! (%x)", 
hr);
  2684                 if (*stage == 27 && *instage == 6)
  2686                         txtHelper.DrawTextLine(L
"Additional effects loading (Lightning_3)...");
  2687                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\lightningbelow2.dds",
  2688                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT1,
  2689                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2692                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\lightningbelow2.dds\"! (%x)", 
hr);
  2699                 if (*stage == 27 && *instage == 5)
  2701                         txtHelper.DrawTextLine(L
"Additional effects loading (Lightning_4)...");
  2702                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\lightningtoground.dds",
  2703                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2704                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2707                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\lightningtoground.dds\"! (%x)", 
hr);
  2714                 if (*stage == 27 && *instage == 4)
  2716                         txtHelper.DrawTextLine(L
"Additional effects loading (Lightning_5)...");
  2717                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\lightningtosky.dds",
  2718                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2719                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2722                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\lightningtosky.dds\"! (%x)", 
hr);
  2729                 if (*stage == 27 && *instage == 3)
  2731                         txtHelper.DrawTextLine(L
"Additional effects loading (Lightning_6)...");
  2732                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\Clouds\\lightningincloud.dds",
  2733                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2734                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2737                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Clouds\\lightningincloud.dds\"! (%x)", 
hr);
  2744                 if (*stage == 27 && *instage == 2)
  2746                         txtHelper.DrawTextLine(L
"Additional effects loading (AA Ramp)...");
  2747                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\atmosphere.dds",
  2748                                 D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_A8R8G8B8,
  2749                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2752                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\atmosphere.dds\"! (%x)", 
hr);
  2761                 if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\treetest.dds",
  2762                         D3DX_DEFAULT, D3DX_DEFAULT, 1, 0, D3DFMT_DXT3,
  2763                         D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2764                         D3DX_FILTER_NONE, 0, NULL, NULL, &game->m_pddsTree)))
  2766                         sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"treetest.dds\"! (%x)", 
hr);
  2767                         Trace(
msg, Logger::Level::Fatal);
  2770                         game->gameclass->AddTrackedResource(
"m_pddsTree"); 
  2773                 if (*stage == 27 && *instage == 1)
  2775                         txtHelper.DrawTextLine(L
"Additional effects loading (Flare)...");
  2776                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\pointsprite.dds",
  2777                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_DXT1,
  2778                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2781                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\pointsprite.dds\"! (%x)", 
hr);
  2788                 if (*stage == 27 && *instage == 0)
  2790                         txtHelper.DrawTextLine(L
"Additional effects loading (Font)...");
  2791                         if (FAILED(
hr = D3DXCreateTextureFromFileEx(pd3dDevice, L
"Textures\\fonts\\hull.dds",
  2792                                 D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_DXT1,
  2793                                 D3DPOOL_MANAGED, D3DX_FILTER_NONE,
  2796                                 sprintf_s(
msg, 
sizeof(
msg), 
"Could not load \"Textures\\Fonts\\hull.dds\"! (%x)", 
hr);
  2813                         DXUTGetGlobalTimer()->GetElapsedTime();
  2817                                 logger->
Log(
"Was out of docking area with dock status positive, cleared...");
  2822                                 logger->
Log(
"Docking status was nominally docked, proceeding to unlock...");
  2826                                 logger->
Log(
"Docking status was nominally undocked, proceeding to unlock...");
  2830                         logger->
Log(
"Docking status was unlocked successfully...");
  2839                         txtHelper.DrawTextLine(L
"Initialized ground data!");
  2840                         txtHelper.DrawTextLine(L
"Press SPACE BAR to continue...");
  2846                         txtHelper.DrawFormattedTextLine(L
"Initializing ground data (%.0f to timeout)...", 30.0f - 
timepassed);
  2855                                         sprintf_s(
msg, 
sizeof(
msg), 
"Built-in packet hold (%f)", D3DXVec3Length(&
playerships[0].position));
  2862                                         logger->
Log(
"Built-in packet hold expired successfully!");
  2870                                         logger->
Log(
"renderer::LoadTextures is RWG now...");
  2875                                         logger->
Log(
"Built-in packet hold failed after 30 seconds!", Logger::Level::Fatal);
  2879                                 logger->
Log(
"Built-in packet hold was not required...");
  2894         D3DXMATRIX matrixTemp;
  2896         D3DXVECTOR3 vieneohit;
  2897         D3DXMATRIX matrixWorld;
  2901         float distcompare = FLT_MAX;
  2928                 float f_temp = D3DXVec3Length(&result);
  2934                         D3DXMatrixScaling(&matrixTemp, f_temp, f_temp, f_temp);
  2938                         D3DXVec3Scale(&result, &result, 1.0f - f_temp);
  2939                         D3DXMatrixTranslation(&matrixTemp, result.x, result.y, result.z);
  2945                 D3DXVECTOR4 radiosity = D3DXVECTOR4(0, 0, 0, 0);
  2949                         D3DXVec3Scale(&vieneohit, Xsunlight, 
radiusC); 
  2950                         D3DXVec3Subtract(&result, &
allobjects[
t].position, &vieneohit); 
  2951                         D3DXVec3Normalize(&result, &result);
  2952                         radiosity.x = result.x; radiosity.y = result.y; radiosity.z = -result.z;
  2953                         radiosity.w = D3DXVec3Dot(&result, Xsunlight); 
  2954                         radiosity.w = 1.0f - radiosity.w; 
  2961                 D3DXVECTOR4 Sunlight;
  2971                 short oldtexture = -1;
  2978                         D3DXVec3Add(&result, &
allobjects[
t].componentarray[
s].nominalxyz, &result);
  2980                         D3DXMatrixTranslation(&matrixTemp, result.x, result.y, result.z);
  2981                         D3DXMatrixMultiply(&matrixWorld, &matrixWorld, &matrixTemp);
  2982                         D3DXMatrixMultiply(&matrixWorld, &matrixWorld, &
allobjects[
t].matrixWorld);
  2987                         D3DXMATRIX mWorldViewProj;
  2995                         D3DXVECTOR4 clouduv;
  3026                         pd3dDevice->DrawPrimitive(D3DPT_TRIANGLELIST, 
allobjects[
t].componentarray[
s].startvertex, 
allobjects[
t].componentarray[
s].primitives);
  3050                         case 1: _sopen_s(&handle, 
"Meshes\\cutters.DAW", _O_RDONLY | _O_BINARY | _O_SEQUENTIAL, _SH_DENYWR, _S_IWRITE);
  3052                         case 2: _sopen_s(&handle, 
"Meshes\\easydock.DAW", _O_RDONLY | _O_BINARY | _O_SEQUENTIAL, _SH_DENYWR, _S_IWRITE);
  3054                         case 3: _sopen_s(&handle, 
"Meshes\\sentry station 12.DAW", _O_RDONLY | _O_BINARY | _O_SEQUENTIAL, _SH_DENYWR, _S_IWRITE);
  3061                                 strerror_s(strerr, 99, errno);
  3068                         _lseek(handle, 0L, SEEK_SET);
  3072                         sprintf_s(
msg, 
sizeof(
msg), 
"Loading file (%i vertices) for polygon object number %i...", 
polyobjects[1].vertices, 1);
  3084                         V(
polyobjects[1].VB->Lock(0, 0, reinterpret_cast<void**>(&vtx), D3DLOCK_DISCARD));
  3086                         D3DXVECTOR3 tempnormal;
  3090                                 _lseek(handle, 2L + 
s * 32L + 0L, SEEK_SET);
  3091                                 _read(handle, &tempnormal, 12);
  3092                                 (*vtx).x = tempnormal.x;
  3093                                 (*vtx).y = tempnormal.y;
  3094                                 (*vtx).z = tempnormal.z;
  3096                                 _lseek(handle, 2L + 
s * 32L + 12L, SEEK_SET);
  3097                                 _read(handle, &tempnormal, 12);
  3098                                 (*vtx).nx = tempnormal.x;
  3099                                 (*vtx).ny = tempnormal.y;
  3100                                 (*vtx).nz = tempnormal.z;
  3101                                 _lseek(handle, 2L + 
s * 32L + 24L, SEEK_SET);
  3102                                 _read(handle, &tempnormal.x, 4);
  3103                                 _read(handle, &tempnormal.y, 4);
  3104                                 (*vtx).tu = tempnormal.x;
  3105                                 (*vtx).tv = tempnormal.y;
  3113                         short numberOfEffects;
  3114                         _read(handle, &numberOfEffects, 2);
  3115                         sprintf_s(
msg, 
sizeof(
msg), 
"RenderDocks loading %i light(s) for polygon object number %i...", numberOfEffects, 
t);
  3118                         for (
s = 0; 
s < numberOfEffects; 
s++)
  3121                                 _read(handle, &lightEffect.
position, 12);
  3122                                 _read(handle, &lightEffect.
normal, 12);
  3124                                 _read(handle, &diffuse, 4);
  3125                                 lightEffect.
diffuse = diffuse;
  3127                                 _read(handle, &lightEffect.
speed, 4); 
  3128                                 _read(handle, &lightEffect.
power, 4);
  3129                                 _read(handle, &lightEffect.
attachto, 2); 
  3131                                 sprintf_s(
msg, 
sizeof(
msg), 
"\tx%f y%f z%f nx%f ny%f nz%f %x p%f", lightEffect.
position.x, lightEffect.
position.y, lightEffect.
position.z, lightEffect.
normal.x, lightEffect.
normal.y, lightEffect.
normal.z, (DWORD)lightEffect.
diffuse, lightEffect.
power);
  3147         if (drawTransparancy)
  3152         D3DXMATRIX matrixTemp;
  3153         D3DXMATRIX matrixWorld;
  3156         pd3dDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESS); 
  3182         short oldtexture = -1;
  3193                         VECTOR2SHORT actual;
  3198                         temp.x = 
static_cast<float>(actual.u);
  3199                         temp.y = 
static_cast<float>(actual.v);
  3201                         u = 
static_cast<short>(
temp.x) + 31;
  3202                         v = 
static_cast<short>(
temp.y) + 31;
  3205                         if (
u > 15 && u < 48 && v > 15 && v < 48 && viewscreen->gridvisible[
u][
v])
  3207                                 D3DXVECTOR4 clouduv;
  3220                                 V(pd3dDevice->SetStreamSource(0, buildzone1.
VB, 0, 
sizeof(
D3DVERTEX)));
  3221                                 D3DXMatrixTranslation(&matrixTemp,
  3222                                         static_cast<float>(
playerships[0].precisionx + static_cast<double>(buildzone1.
terpos.x)),
  3226                                 D3DXMATRIX mWorldViewProj;
  3241                                         if ((!drawTransparancy && (mesh_component.
texture == 164 || mesh_component.
type == 57)) ||
  3242                                                 (drawTransparancy && (mesh_component.
texture != 164 && mesh_component.
type != 57)))
  3245                                         if (oldtexture != mesh_component.
texture)
  3247                                                 oldtexture = mesh_component.
texture;
  3256                                         if (mesh_component.
texture == 164 || mesh_component.
type == 57) 
  3258                                                 pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
  3259                                                 pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
  3260                                                 pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, 
true);
  3263                                         if (mesh_component.
type == 8) 
  3277                                                 float bias = -0.00001f; 
  3278                                                 pd3dDevice->SetRenderState(D3DRS_DEPTHBIAS, *reinterpret_cast<DWORD*>(&bias));
  3283                                         if (fabs(
temp.x) < 2 && fabs(
temp.y) < 2)
  3292                                         if (mesh_component.
type == 78) 
  3299                                                 D3DXMatrixTranslation(&matTemp,
  3303                                                 D3DXMatrixMultiply(&undomat, &matTemp, &buildzone1.
matrixBase);
  3304                                                 D3DXMatrixInverse(&matTemp, 
nullptr, &undomat);
  3307                                                 D3DXMatrixRotationZ(&matrixWorld, sinf(static_cast<float>(*fTime)));
  3308                                                 matrixWorld = matTemp * matrixWorld;
  3310                                                 matrixWorld = matrixWorld * undomat;
  3312                                                 matrixWorld = matrixWorld * matrixTemp;
  3326                                         V(pd3dDevice->DrawPrimitive(D3DPT_TRIANGLELIST, mesh_component.
startvertex, mesh_component.
primitives));
  3330                                         if (mesh_component.
texture == 164 || mesh_component.
type == 57) 
  3332                                                 V(pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, 
false));
  3335                                         if (mesh_component.
type == 78)
  3337                                                 D3DXMATRIX mWorldViewProj1;
  3346                                         if (mesh_component.
type == 8) 
  3348                                                 V(pd3dDevice->SetRenderState(D3DRS_DEPTHBIAS, 0));
  3380         D3DXVECTOR3 vieneohit;
  3384         for (
t = 1; 
t < MAX_SCAN; 
t++) 
  3393                         if (f_temp > 256.0f)
  3396                         pd3dDevice->SetRenderState(D3DRS_POINTSIZE, *reinterpret_cast<DWORD*>(&f_temp));
  3398                         pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
  3399                         pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR);
  3400                         pd3dDevice->SetRenderState(D3DRS_LIGHTING, 
false);
  3401                         pd3dDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS);
  3402                         pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
false); 
  3404                         pd3dDevice->SetTransform(D3DTS_WORLD, &
playerships[
t].matrixWorld);
  3408                         pd3dDevice->DrawPrimitive(D3DPT_POINTLIST, 0, 1);
  3410                         pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
true);
  3411                         pd3dDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESS);
  3412                         pd3dDevice->SetRenderState(D3DRS_LIGHTING, 
true);
  3413                         pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
  3414                         pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
  3422                 D3DXVECTOR4 features;
  3432                         D3DXVECTOR4 Sunlight;
  3448                 D3DXVECTOR4 trimvec = D3DXVECTOR4(trimcolor.r, trimcolor.g, trimcolor.b, 0); 
  3455                                 D3DXVECTOR4 radiosity = D3DXVECTOR4(0, 0, 0, 0);
  3460                                         D3DXVec3Scale(&vieneohit, Xsunlight, 
radiusC); 
  3461                                         D3DXVec3Subtract(&result, &
playerships[
t].position, &vieneohit); 
  3462                                         D3DXVec3Normalize(&result, &result);
  3463                                         radiosity.x = result.x; radiosity.y = result.y; radiosity.z = result.z;
  3464                                         radiosity.w = fabsf(D3DXVec3Dot(&result, Xsunlight)); 
  3465                                         radiosity.w = 1.0f - radiosity.w; 
  3484                         short oldtexture = -1;
  3489                                         D3DXMATRIX mWorldViewProj;
  3523                                         D3DXVECTOR4 clouduv;
  3558         D3DXMATRIX matrixTemp;
  3566         pd3dDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESSEQUAL);
  3567         pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
  3568         pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);
  3569         pd3dDevice->SetRenderState(D3DRS_LIGHTING, 
false);
  3570         pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
false);
  3575         pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
  3576         pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
  3577         pd3dDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_POINT);
  3580         pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
  3582         pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TFACTOR);
  3586         for (
t = 1; 
t < MAX_SCAN; 
t++) 
  3591                 const float dist = D3DXVec3Length(&look);
  3596                         if (alphafog == 0.0f) 
continue;
  3604                 D3DXVECTOR3 theirnorm;
  3607                 pd3dDevice->SetTransform(D3DTS_WORLD, &
playerships[
t].matrixWorld);
  3624                                 pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TFACTOR);
  3625                                 pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
  3626                                 pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
true);
  3627                                 pd3dDevice->SetRenderState(D3DRS_TEXTUREFACTOR, 
tempcolor);
  3629                                 pd3dDevice->SetRenderState(D3DRS_POINTSIZE, 1);
  3631                                 pd3dDevice->DrawPrimitive(D3DPT_POINTLIST, 0, 1);
  3633                                 pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
false);
  3634                                 pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
  3635                                 pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); 
  3651                                 if (effect.
power == 1.5f) 
  3660                                                 result.x = -1.0f; result.y = 0.0f; result.z = 0.0f; 
  3661                                                 D3DXMatrixRotationAxis(&matrixTemp,
  3663                                                         D3DX_TAU*fmodf(static_cast<float>(*f_time)*50.0f, effect.
speed) / effect.
speed);
  3664                                                 D3DXVec3TransformNormal(&result, &result, &matrixTemp);
  3676                                         pd3dDevice->SetRenderState(D3DRS_TEXTUREFACTOR, effect.
diffuse);
  3678                                         D3DXVec3TransformNormal(&theirnorm, &result, &
playerships[
t].matrixWorld);
  3679                                         D3DXVec3Normalize(&theirnorm, &theirnorm);
  3680                                         f_temp = D3DXVec3Dot(&theirnorm, &look);
  3685                                         if (effect.
power == 1.0f) 
  3687                                         else if (effect.
power == 0.5f || 
  3688                                                 effect.
power == 1.5f) 
  3691                                                         psize *= f_temp * 2.0f;
  3695                                         else if (effect.
power == 2.0f) 
  3696                                                 psize *= 4.0f*powf(f_temp, 8.0f);
  3702                                         tempfloat = 1.0f - (tempfloat*0.5f) + tempfloat * 
RandomFloat();
  3709                                 if (psize >= 4.0f && !skip)
  3711                                         if (effect.
power == 2.0f) 
  3715                                                         pd3dDevice->SetRenderState(D3DRS_POINTSIZE, *reinterpret_cast<DWORD*>(&psize));
  3716                                                         pd3dDevice->DrawPrimitive(D3DPT_POINTLIST, effect.
primitive, 1);
  3721                                                 pd3dDevice->SetRenderState(D3DRS_POINTSIZE, *reinterpret_cast<DWORD*>(&psize));
  3722                                                 pd3dDevice->DrawPrimitive(D3DPT_POINTLIST, effect.
primitive, 1);
  3808                                         f_temp = 64.0f / powf(
allobjects[
t].distance, 0.75f);
  3809                                         if (f_temp > 256.0f)
  3811                                         pd3dDevice->SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&f_temp));
  3814                                         pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TFACTOR);
  3824                                                         pd3dDevice->SetTransform(D3DTS_WORLD, &matrixTemp);
  3825                                                         pd3dDevice->SetRenderState(D3DRS_TEXTUREFACTOR, 
polyobjects[1].effects.at(
s).diffuse);
  3826                                                         pd3dDevice->DrawPrimitive(D3DPT_POINTLIST, 0, 1);
  3829                                         pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
  3836                                 pd3dDevice->SetTransform(D3DTS_WORLD, &
allobjects[
t].matrixWorld);
  3838                                 D3DXVec3Normalize(&look, &look);
  3842                                 pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
  3843                                 pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
true);
  3844                                 pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TFACTOR);
  3845                                 pd3dDevice->SetRenderState(D3DRS_TEXTUREFACTOR, 
tempcolor);
  3846                                 float psize = 16.0f;
  3847                                 pd3dDevice->SetRenderState(D3DRS_POINTSIZE, *((DWORD*)&psize));
  3849                                 pd3dDevice->DrawPrimitive(D3DPT_POINTLIST, 0, 1);
  3851                                 pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
false);
  3852                                 pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE); 
  3853                                 pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
  3860                 pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TFACTOR);
  3867                                 for (
size_t r = 0; 
r < buildzone1.
effects.size(); 
r++)
  3873                                                 const float dist = D3DXVec3Length(&diff);
  3875                                                 if (alphafog == 0.0f) 
continue;
  3878                                                 D3DXMatrixTranslation(&matrixTemp, diff.x, diff.y, diff.z);
  3879                                                 pd3dDevice->SetTransform(D3DTS_WORLD, &matrixTemp);
  3886                                                 pd3dDevice->SetRenderState(D3DRS_TEXTUREFACTOR, effect.
diffuse);
  3888                                                 if (effect.
power == 1.5f) 
  3890                                                         D3DXVec3Normalize(&result, &buildzone1.
terpos); 
  3892                                                         D3DXMatrixRotationAxis(&matrixTemp,
  3894                                                                 D3DX_TAU*fmodf(static_cast<float>(*f_time), 8.888f) / 8.888f); 
  3895                                                         D3DXVec3TransformNormal(&result, &effect.
normal, &matrixTemp);
  3904                                                 f_temp = -D3DXVec3Dot(&result, &diff);
  3905                                                 if (effect.
power != 1.5f)
  3909                                                 else if (f_temp > 1.0f)
  3912                                                 if (effect.
power == 1.0f) 
  3913                                                         f_temp = psize * f_temp;
  3914                                                 else if (effect.
power == 0.5f) 
  3917                                                                 f_temp = psize * 2.0f; 
  3919                                                 else if (effect.
power == 1.5f) 
  3922                                                                 f_temp = psize * 4.0f*powf(f_temp, 16.0f);
  3924                                                 else if (effect.
power == 2.0f) 
  3925                                                         f_temp = psize * 4.0f*powf(f_temp, 8.0f);
  3929                                                         if (f_temp > 256.0f)
  3932                                                         pd3dDevice->SetRenderState(D3DRS_POINTSIZE, *reinterpret_cast<DWORD*>(&f_temp));
  3933                                                         pd3dDevice->DrawPrimitive(D3DPT_POINTLIST, 0, 1);
  3984         pd3dDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESS);
  3985         pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, 
true);
  3986         pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
  3988         pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); 
  3989         pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_POINT); 
  3990         pd3dDevice->SetSamplerState(0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); 
 
void CalculateCubeAndTcp()
 
InputConfig inputConfigLeftToeBrake
 
Ssorter sortme[buildingVBC]
 
LPDIRECT3DTEXTURE9 m_pddsWeapon[weaponanimateC]
 
s_mesh_component * componentarray
 
LPDIRECT3DTEXTURE9 m_pddsTransition[transitiontextureC]
 
#define transitiontextureC
 
LPDIRECT3DTEXTURE9 m_pddsCityTexture[citytextureC]
 
LPDIRECT3DTEXTURE9 m_pddsFirework1[firework1C]
 
void RenderShips(IDirect3DDevice9 *pd3dDevice, const D3DXVECTOR3 *Xsunlight)
 
LPDIRECT3DTEXTURE9 m_pddsDockTexture[docktextureC]
 
LPDIRECT3DTEXTURE9 m_pddsSinker[weaponanimateC]
 
LPDIRECT3DTEXTURE9 m_pddsWorld2a1
 
LPDIRECT3DTEXTURE9 m_pddsIntersection
 
void RenderDocks(IDirect3DDevice9 *pd3dDevice, const D3DXVECTOR3 *Xsunlight)
 
LPDIRECT3DTEXTURE9 m_pddsCloudBaseMap
 
LPDIRECT3DTEXTURE9 m_pddsHolidayTexture
 
LPDIRECT3DTEXTURE9 m_pddsCityLights[citytextureC]
 
s_network_objects playerships[MAX_SCAN]
 
LPDIRECT3DTEXTURE9 m_pddsWaterNormal
 
LPDIRECT3DTEXTURE9 m_pddsSunglasses
 
InputConfig inputConfigGas
 
std::vector< s_light_effect > effects
 
bool m_bDeviceSupportsVizQuery
 
LPD3DXSPRITE m_spriteVector
 
InputConfig inputConfigRoll
 
LPDIRECT3DTEXTURE9 m_pddsMarston1
 
LPDIRECT3DTEXTURE9 m_pddsLightningAbove[3]
 
LPDIRECT3DVERTEXBUFFER9 VB
 
LPDIRECT3DVOLUMETEXTURE9 m_pddsReentry
 
LPDIRECT3DTEXTURE9 m_pddsRunwayEdgeLight1
 
std::vector< s_light_effect > effects
 
LPDIRECT3DTEXTURE9 m_pddsFirework2[firework2C]
 
LPDIRECT3DTEXTURE9 m_pddsElmo[elmoAnimateC]
 
InputConfig inputConfigThrustLeft
 
InputConfig inputConfigThrustRight
 
s_mesh_component * componentarray
 
LPDIRECT3DTEXTURE9 m_pddsLandform[landformtextureC]
 
LPDIRECT3DTEXTURE9 m_pddsCloudDetailBelow
 
s_universe_object allobjects[maxstarC]
 
s_mesh_component * componentarray
 
LPDIRECT3DTEXTURE9 m_pddsDockLights[docktextureC]
 
void RenderLights(IDirect3DDevice9 *pd3dDevice, const double *fTime)
 
LPDIRECT3DVOLUMETEXTURE9 m_pddsFuzerX
 
SPlayerData player[MAX_ONLINEPLAYERS]
 
float Clamp(float val, float min, float max)
 
InputConfig inputConfigPitch
 
LPDIRECT3DTEXTURE9 m_pddsLetters
 
unsigned long compare[PlotType::PlotTypeEnum]
 
renderer(Viewscreen *ptr)
 
BUILDZONE buildzone[buildingVBC]
 
LPDIRECT3DTEXTURE9 m_pddsSunTexture
 
InputConfig inputConfigBrake
 
LPDIRECT3DVOLUMETEXTURE9 m_pddsSinkerX
 
LPDIRECT3DTEXTURE9 m_pddsShipLights[shiptextureC]
 
void RenderBuildings(IDirect3DDevice9 *pd3dDevice, double *fTime, bool drawTransparancy)
 
void Log(const char *msg, Level level=Info, int errorCode=0)
 
s_polygon_object polyobjects[maxpolyC]
 
InputConfig inputConfigRightToeBrake
 
LPDIRECT3DTEXTURE9 m_pddsBinoculars
 
LPDIRECT3DTEXTURE9 m_pddsShipTexture[shiptextureC]
 
LPDIRECT3DTEXTURE9 m_pddsBinocularsCompass
 
LPDIRECT3DVOLUMETEXTURE9 m_pddsBlastX
 
LPDIRECT3DTEXTURE9 m_pddsAtmosphere
 
LPDIRECT3DTEXTURE9 m_pddsRoad
 
void AddTrackedResource(const char *name, _D3DPOOL pool=D3DPOOL_MANAGED)
 
unsigned short components
 
LOCALGRID2 gridarray[64][64]
 
LPDIRECT3DTEXTURE9 m_pddsCloudDetailAbove
 
LPDIRECT3DVERTEXBUFFER9 VB
 
LPDIRECT3DTEXTURE9 m_pddsRTSTexture[RTStextureC]
 
LPDIRECT3DTEXTURE9 m_pddsLightningBelow[3]
 
LPDIRECT3DTEXTURE9 m_pddsInterlace[2]
 
LPDIRECT3DTEXTURE9 m_pddsDIHV[dihvanimateC]
 
LPDIRECT3DTEXTURE9 m_pddsHeart[heartanimateC]
 
unsigned short components
 
InputConfig inputConfigYaw
 
void AddToCallStack(const char *msg)
 
LPDIRECT3DTEXTURE9 m_pddsRTSLights[RTStextureC]
 
LPDIRECT3DVERTEXBUFFER9 m_avRunningLights
 
InputConfig inputConfigSteer
 
void LoadTextures(IDirect3DDevice9 *pd3dDevice, short *stage, short *instage)
 
static void TouchFile(const WCHAR *str)
 
LPDIRECT3DTEXTURE9 m_pddsBinocularsArrow
 
LPDIRECT3DTEXTURE9 m_pddsHullDynamicTexture[MAX_SCAN]
 
LPDIRECT3DTEXTURE9 m_pddsFirework3[firework3C]
 
unsigned short components
 
LPDIRECT3DTEXTURE9 m_pddsStarTexture