comparison Indoor.cpp @ 554:9caf59edb1ee

Cave and Temple load and even doesn't crash (for a while).
author Nomad
date Mon, 04 Mar 2013 22:44:41 +0200
parents 35f28d4c0ff9
children 8b77231088d8
comparison
equal deleted inserted replaced
552:bee46636df95 554:9caf59edb1ee
2677 2677
2678 pSector->pFloors = ptr_0002B0_sector_rdata + j; 2678 pSector->pFloors = ptr_0002B0_sector_rdata + j;
2679 j += pSector->uNumFloors; 2679 j += pSector->uNumFloors;
2680 2680
2681 pSector->pWalls = ptr_0002B0_sector_rdata + j; 2681 pSector->pWalls = ptr_0002B0_sector_rdata + j;
2682 j += pSector->field_C; 2682 j += pSector->uNumWalls;
2683 2683
2684 pSector->pCeilings = ptr_0002B0_sector_rdata + j; 2684 pSector->pCeilings = ptr_0002B0_sector_rdata + j;
2685 j += pSector->field_14; 2685 j += pSector->uNumCeilings;
2686 2686
2687 pSector->pFluids = ptr_0002B0_sector_rdata + j; 2687 pSector->pFluids = ptr_0002B0_sector_rdata + j;
2688 j += pSector->field_1C; 2688 j += pSector->uNumFluids;
2689 2689
2690 pSector->pPortals = ptr_0002B0_sector_rdata + j; 2690 pSector->pPortals = ptr_0002B0_sector_rdata + j;
2691 j += pSector->uNumPortals; 2691 j += pSector->uNumPortals;
2692 2692
2693 pSector->pFaceIDs = ptr_0002B0_sector_rdata + j; 2693 pSector->pFaceIDs = ptr_0002B0_sector_rdata + j;
2694 j += pSector->field_2C; 2694 j += pSector->uNumFaces;
2695 2695
2696 pSector->pCogs = ptr_0002B0_sector_rdata + j; 2696 pSector->pCogs = ptr_0002B0_sector_rdata + j;
2697 j += pSector->field_3C; 2697 j += pSector->uNumCogs;
2698 2698
2699 pSector->pDecorationIDs = ptr_0002B0_sector_rdata + j; 2699 pSector->pDecorationIDs = ptr_0002B0_sector_rdata + j;
2700 j += pSector->uNumDecorations; 2700 j += pSector->uNumDecorations;
2701 2701
2702 pSector->pMarkers = ptr_0002B0_sector_rdata + j; 2702 pSector->pMarkers = ptr_0002B0_sector_rdata + j;
2703 j += pSector->field_4C; 2703 j += pSector->uNumMarkers;
2704 2704
2705 2705
2706 //do 2706 //do
2707 //{ 2707 //{
2708 /*pSectors[v118].pFloors = (unsigned __int16 *)((char *)Src + (unsigned int)ptr_0002B0_sector_rdata); 2708 /*pSectors[v118].pFloors = (unsigned __int16 *)((char *)Src + (unsigned int)ptr_0002B0_sector_rdata);
2756 2756
2757 pGameLoadingUI_ProgressBar->Progress(); 2757 pGameLoadingUI_ProgressBar->Progress();
2758 2758
2759 for (uint i = 0, j = 0; i < uNumSectors; ++i) 2759 for (uint i = 0, j = 0; i < uNumSectors; ++i)
2760 { 2760 {
2761 pSectors->pLights = (unsigned __int16 *)(ptr_0002B8_sector_lrdata + j); 2761 pSectors[i].pLights = ptr_0002B8_sector_lrdata + j;
2762 j += pSectors->uNumLights; 2762 j += pSectors[i].uNumLights;
2763 } 2763 }
2764 2764
2765 pGameLoadingUI_ProgressBar->Progress(); 2765 pGameLoadingUI_ProgressBar->Progress();
2766 2766
2767 memcpy(&uNumDoors, pData, 4); 2767 memcpy(&uNumDoors, pData, 4);
3710 { 3710 {
3711 v24 = abs(v20 >> 15); 3711 v24 = abs(v20 >> 15);
3712 v25 = abs(v15->pFacePlane_old.vNormal.z); 3712 v25 = abs(v15->pFacePlane_old.vNormal.z);
3713 //v26 = v87; 3713 //v26 = v87;
3714 if ( v24 > v25 ) 3714 if ( v24 > v25 )
3715 Abortf( 3715 Abortf("Door Error\ndoor id: %i\nfacet no: %i\n\nOverflow dividing facet->d [%i] by facet->nz [%i]",
3716 "Door Error\ndoor id: %i\nfacet no: %i\n\nOverflow dividing facet->d [%i] by facet->nz [%i]",
3717 door->uDoorID, 3716 door->uDoorID,
3718 door->pFaceIDs[v88], 3717 door->pFaceIDs[v88],
3719 v15->pFacePlane_old.dist, 3718 v15->pFacePlane_old.dist,
3720 v15->pFacePlane_old.vNormal.z); 3719 v15->pFacePlane_old.vNormal.z);
3721 //v79 = v15->pFacePlane_old.vNormal.z; 3720 //v79 = v15->pFacePlane_old.vNormal.z;
3884 //v0 = 0; 3883 //v0 = 0;
3885 goto LABEL_62; 3884 goto LABEL_62;
3886 } 3885 }
3887 //v2 = v87; 3886 //v2 = v87;
3888 } 3887 }
3889 LOWORD(v39) = v84 + ((signed __int16)v39 != -1 ? pBitmaps_LOD->pTextures[(signed __int16)v39].uTextureWidth : 24); 3888 LOWORD(v39) = v84;
3889 if (v15->uBitmapID != -1)
3890 LOWORD(v39) += pBitmaps_LOD->pTextures[v15->uBitmapID].uTextureWidth;
3890 LABEL_50: 3891 LABEL_50:
3891 v28->sTextureDeltaU -= v39; 3892 v28->sTextureDeltaU -= v39;
3892 goto LABEL_51; 3893 goto LABEL_51;
3893 } 3894 }
3894 LABEL_62: 3895 LABEL_62: