diff --git a/d3xp/Pvs.cpp b/d3xp/Pvs.cpp index 8ff144f..74781e7 100644 --- a/d3xp/Pvs.cpp +++ b/d3xp/Pvs.cpp @@ -374,7 +374,7 @@ pvsStack_t *idPVS::FloodPassagePVS_r( pvsPortal_t *source, const pvsPortal_t *po // use the portal PVS if it has been calculated if ( p->done ) { portalVis = reinterpret_cast(p->vis); - for ( j = 0; j < portalVisLongs; j++ ) { + for ( j = 0; j < portalVisInts; j++ ) { // get new PVS which is decreased by going through this passage m = *prevMightSee++ & *passageVis++ & *portalVis++; // check if anything might be visible through this passage that wasn't yet visible @@ -385,7 +385,7 @@ pvsStack_t *idPVS::FloodPassagePVS_r( pvsPortal_t *source, const pvsPortal_t *po } else { // the p->mightSee is implicitely stored in the passageVis - for ( j = 0; j < portalVisLongs; j++ ) { + for ( j = 0; j < portalVisInts; j++ ) { // get new PVS which is decreased by going through this passage m = *prevMightSee++ & *passageVis++; // check if anything might be visible through this passage that wasn't yet visible @@ -758,7 +758,7 @@ int idPVS::AreaPVSFromPortalPVS( void ) const { for ( j = 1; j < area->numPortals; j++ ) { p1 = reinterpret_cast(area->portals[0]->vis); p2 = reinterpret_cast(area->portals[j]->vis); - for ( k = 0; k < portalVisLongs; k++ ) { + for ( k = 0; k < portalVisInts; k++ ) { *p1++ |= *p2++; } } @@ -808,7 +808,7 @@ void idPVS::Init( void ) { areaQueue = new int[numAreas]; areaVisBytes = ( ((numAreas+31)&~31) >> 3); - areaVisLongs = areaVisBytes/sizeof(int); + areaVisInts = areaVisBytes/sizeof(int); areaPVS = new byte[numAreas * areaVisBytes]; memset( areaPVS, 0xFF, numAreas * areaVisBytes ); @@ -816,7 +816,7 @@ void idPVS::Init( void ) { numPortals = GetPortalCount(); portalVisBytes = ( ((numPortals+31)&~31) >> 3); - portalVisLongs = portalVisBytes/sizeof(int); + portalVisInts = portalVisBytes/sizeof(int); for ( int i = 0; i < MAX_CURRENT_PVS; i++ ) { currentPVS[i].handle.i = -1; @@ -1037,7 +1037,7 @@ pvsHandle_t idPVS::SetupCurrentPVS( const int *sourceAreas, const int numSourceA vis = reinterpret_cast(areaPVS + sourceAreas[i] * areaVisBytes); pvs = reinterpret_cast(currentPVS[handle.i].pvs); - for ( j = 0; j < areaVisLongs; j++ ) { + for ( j = 0; j < areaVisInts; j++ ) { *pvs++ |= *vis++; } } @@ -1089,7 +1089,7 @@ pvsHandle_t idPVS::MergeCurrentPVS( pvsHandle_t pvs1, pvsHandle_t pvs2 ) const { pvs1Ptr = reinterpret_cast(currentPVS[pvs1.i].pvs); pvs2Ptr = reinterpret_cast(currentPVS[pvs2.i].pvs); - for ( i = 0; i < areaVisLongs; i++ ) { + for ( i = 0; i < areaVisInts; i++ ) { *ptr++ = *pvs1Ptr++ | *pvs2Ptr++; } diff --git a/d3xp/Pvs.h b/d3xp/Pvs.h index a85e2bb..f97d6cf 100644 --- a/d3xp/Pvs.h +++ b/d3xp/Pvs.h @@ -111,9 +111,9 @@ private: mutable pvsCurrent_t currentPVS[MAX_CURRENT_PVS]; // used to create PVS int portalVisBytes; - int portalVisLongs; // Note: these are really ints now.. + int portalVisInts; int areaVisBytes; - int areaVisLongs; // Note: these are really ints now.. + int areaVisInts; struct pvsPortal_s *pvsPortals; struct pvsArea_s * pvsAreas; diff --git a/game/Pvs.cpp b/game/Pvs.cpp index c8a86a1..5c189e0 100644 --- a/game/Pvs.cpp +++ b/game/Pvs.cpp @@ -374,7 +374,7 @@ pvsStack_t *idPVS::FloodPassagePVS_r( pvsPortal_t *source, const pvsPortal_t *po // use the portal PVS if it has been calculated if ( p->done ) { portalVis = reinterpret_cast(p->vis); - for ( j = 0; j < portalVisLongs; j++ ) { + for ( j = 0; j < portalVisInts; j++ ) { // get new PVS which is decreased by going through this passage m = *prevMightSee++ & *passageVis++ & *portalVis++; // check if anything might be visible through this passage that wasn't yet visible @@ -385,7 +385,7 @@ pvsStack_t *idPVS::FloodPassagePVS_r( pvsPortal_t *source, const pvsPortal_t *po } else { // the p->mightSee is implicitely stored in the passageVis - for ( j = 0; j < portalVisLongs; j++ ) { + for ( j = 0; j < portalVisInts; j++ ) { // get new PVS which is decreased by going through this passage m = *prevMightSee++ & *passageVis++; // check if anything might be visible through this passage that wasn't yet visible @@ -758,7 +758,7 @@ int idPVS::AreaPVSFromPortalPVS( void ) const { for ( j = 1; j < area->numPortals; j++ ) { p1 = reinterpret_cast(area->portals[0]->vis); p2 = reinterpret_cast(area->portals[j]->vis); - for ( k = 0; k < portalVisLongs; k++ ) { + for ( k = 0; k < portalVisInts; k++ ) { *p1++ |= *p2++; } } @@ -808,7 +808,7 @@ void idPVS::Init( void ) { areaQueue = new int[numAreas]; areaVisBytes = ( ((numAreas+31)&~31) >> 3); - areaVisLongs = areaVisBytes/sizeof(int); + areaVisInts = areaVisBytes/sizeof(int); areaPVS = new byte[numAreas * areaVisBytes]; memset( areaPVS, 0xFF, numAreas * areaVisBytes ); @@ -816,7 +816,7 @@ void idPVS::Init( void ) { numPortals = GetPortalCount(); portalVisBytes = ( ((numPortals+31)&~31) >> 3); - portalVisLongs = portalVisBytes/sizeof(int); + portalVisInts = portalVisBytes/sizeof(int); for ( int i = 0; i < MAX_CURRENT_PVS; i++ ) { currentPVS[i].handle.i = -1; @@ -1037,7 +1037,7 @@ pvsHandle_t idPVS::SetupCurrentPVS( const int *sourceAreas, const int numSourceA vis = reinterpret_cast(areaPVS + sourceAreas[i] * areaVisBytes); pvs = reinterpret_cast(currentPVS[handle.i].pvs); - for ( j = 0; j < areaVisLongs; j++ ) { + for ( j = 0; j < areaVisInts; j++ ) { *pvs++ |= *vis++; } } @@ -1089,7 +1089,7 @@ pvsHandle_t idPVS::MergeCurrentPVS( pvsHandle_t pvs1, pvsHandle_t pvs2 ) const { pvs1Ptr = reinterpret_cast(currentPVS[pvs1.i].pvs); pvs2Ptr = reinterpret_cast(currentPVS[pvs2.i].pvs); - for ( i = 0; i < areaVisLongs; i++ ) { + for ( i = 0; i < areaVisInts; i++ ) { *ptr++ = *pvs1Ptr++ | *pvs2Ptr++; } diff --git a/game/Pvs.h b/game/Pvs.h index 65b3a01..963b178 100644 --- a/game/Pvs.h +++ b/game/Pvs.h @@ -107,9 +107,9 @@ private: mutable pvsCurrent_t currentPVS[MAX_CURRENT_PVS]; // used to create PVS int portalVisBytes; - int portalVisLongs; // Note: these are really ints now.. + int portalVisInts; int areaVisBytes; - int areaVisLongs; // Note: these are really ints now.. + int areaVisInts; struct pvsPortal_s *pvsPortals; struct pvsArea_s * pvsAreas;