mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
nuke all the #if 0's
scripted commit:
find . -not -path '*/.*' -and -not -path '*/ext*' -type d -exec coan source -R -E {} ';'
https://coan2.sourceforge.net/coan_man_1.html
This commit is contained in:
committed by
Asdow
parent
6afe785f4b
commit
8b1c4effa0
@@ -12,68 +12,14 @@
|
||||
#include "SaveLoadMap.h"
|
||||
#include "Text.h"
|
||||
|
||||
#if 0//dnl ch86 180214
|
||||
BOOLEAN gfLoadingExitGrids = FALSE;
|
||||
|
||||
//used by editor.
|
||||
EXITGRID gExitGrid = {0,1,1,0};
|
||||
|
||||
BOOLEAN gfOverrideInsertionWithExitGrid = FALSE;
|
||||
|
||||
//<SB>
|
||||
|
||||
#define MAX_EXITGRIDS 4096
|
||||
|
||||
EXITGRID gpExitGrids[MAX_EXITGRIDS];
|
||||
UINT guiExitGridsCount = 0;
|
||||
|
||||
|
||||
//INT32 ConvertExitGridToINT32( EXITGRID *pExitGrid )
|
||||
//{
|
||||
// INT32 iExitGridInfo;
|
||||
// iExitGridInfo = (pExitGrid->ubGotoSectorX-1)<< 28;
|
||||
// iExitGridInfo += (pExitGrid->ubGotoSectorY-1)<< 24;
|
||||
// iExitGridInfo += pExitGrid->ubGotoSectorZ << 20;
|
||||
// iExitGridInfo += pExitGrid->usGridNo & 0x0000ffff;
|
||||
// return iExitGridInfo;
|
||||
//}
|
||||
//
|
||||
//void ConvertINT32ToExitGrid( INT32 iExitGridInfo, EXITGRID *pExitGrid )
|
||||
//{
|
||||
// //convert the int into 4 unsigned bytes.
|
||||
// pExitGrid->ubGotoSectorX = (UINT8)(((iExitGridInfo & 0xf0000000)>>28)+1);
|
||||
// pExitGrid->ubGotoSectorY = (UINT8)(((iExitGridInfo & 0x0f000000)>>24)+1);
|
||||
// pExitGrid->ubGotoSectorZ = (UINT8)((iExitGridInfo & 0x00f00000)>>20);
|
||||
// pExitGrid->usGridNo = (UINT16)(iExitGridInfo & 0x0000ffff);
|
||||
//}
|
||||
#else
|
||||
BOOLEAN gfLoadingExitGrids = FALSE;
|
||||
BOOLEAN gfOverrideInsertionWithExitGrid = FALSE;
|
||||
EXITGRID gExitGrid;
|
||||
EXITGRID *ExitGridTable = NULL;
|
||||
UINT16 gusNumExitGrids = 0;
|
||||
#endif
|
||||
|
||||
BOOLEAN GetExitGrid( UINT32 usMapIndex, EXITGRID *pExitGrid )
|
||||
{
|
||||
#if 0//dnl ch86 170214
|
||||
LEVELNODE *pShadow;
|
||||
pShadow = gpWorldLevelData[ usMapIndex ].pShadowHead;
|
||||
//Search through object layer for an exitgrid
|
||||
while( pShadow )
|
||||
{
|
||||
if ( pShadow->uiFlags & LEVELNODE_EXITGRID )
|
||||
{
|
||||
//<SB>
|
||||
// ConvertINT32ToExitGrid( pShadow->iExitGridInfo, pExitGrid );
|
||||
memcpy(pExitGrid, pShadow->pExitGridInfo, sizeof(EXITGRID));
|
||||
//</SB>
|
||||
return TRUE;
|
||||
}
|
||||
pShadow = pShadow->pNext;
|
||||
}
|
||||
return FALSE;
|
||||
#else
|
||||
INT32 i = 0;
|
||||
while(i < gusNumExitGrids)
|
||||
{
|
||||
@@ -85,7 +31,6 @@ BOOLEAN GetExitGrid( UINT32 usMapIndex, EXITGRID *pExitGrid )
|
||||
i++;
|
||||
}
|
||||
return(FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOLEAN ExitGridAtGridNo( UINT32 usMapIndex )
|
||||
@@ -123,42 +68,6 @@ BOOLEAN GetExitGridLevelNode( UINT32 usMapIndex, LEVELNODE **ppLevelNode )
|
||||
|
||||
void AddExitGridToWorld( INT32 iMapIndex, EXITGRID *pExitGrid )
|
||||
{
|
||||
#if 0//dnl ch86 180214
|
||||
LEVELNODE *pShadow, *tail;
|
||||
pShadow = gpWorldLevelData[ iMapIndex ].pShadowHead;
|
||||
|
||||
//Search through object layer for an exitgrid
|
||||
while( pShadow )
|
||||
{
|
||||
tail = pShadow;
|
||||
if( pShadow->uiFlags & LEVELNODE_EXITGRID )
|
||||
{ //we have found an existing exitgrid in this node, so replace it with the new information.
|
||||
memcpy(pShadow->pExitGridInfo, pExitGrid, sizeof(EXITGRID));//dnl ch80 011213
|
||||
return;
|
||||
}
|
||||
pShadow = pShadow->pNext;
|
||||
}
|
||||
|
||||
// Add levelnode
|
||||
AddShadowToHead( iMapIndex, MOCKFLOOR1 );
|
||||
// Get new node
|
||||
pShadow = gpWorldLevelData[ iMapIndex ].pShadowHead;
|
||||
|
||||
//fill in the information for the new exitgrid levelnode.
|
||||
//<SB>
|
||||
// pShadow->iExitGridInfo = ConvertExitGridToINT32( pExitGrid );
|
||||
memcpy(gpExitGrids + guiExitGridsCount, pExitGrid, sizeof(EXITGRID));
|
||||
pShadow->pExitGridInfo = gpExitGrids + guiExitGridsCount;
|
||||
guiExitGridsCount++;
|
||||
//</SB>
|
||||
pShadow->uiFlags |= ( LEVELNODE_EXITGRID | LEVELNODE_HIDDEN );
|
||||
|
||||
//Add the exit grid to the sector, only if we call ApplyMapChangesToMapTempFile() first.
|
||||
if( !gfEditMode && !gfLoadingExitGrids )
|
||||
{
|
||||
AddExitGridToMapTempFile( iMapIndex, pExitGrid, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
}
|
||||
#else
|
||||
pExitGrid->iMapIndex = iMapIndex;
|
||||
INT32 i = 0, j = -1;
|
||||
while(i < gusNumExitGrids)
|
||||
@@ -196,18 +105,10 @@ void AddExitGridToWorld( INT32 iMapIndex, EXITGRID *pExitGrid )
|
||||
if(!gfEditMode && !gfLoadingExitGrids)
|
||||
AddExitGridToMapTempFile(iMapIndex, pExitGrid, gWorldSectorX, gWorldSectorY, gbWorldSectorZ);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void RemoveExitGridFromWorld( INT32 iMapIndex )
|
||||
{
|
||||
#if 0//dnl ch86 180214
|
||||
UINT16 usDummy;
|
||||
if( TypeExistsInShadowLayer( iMapIndex, MOCKFLOOR, &usDummy ) )
|
||||
{
|
||||
RemoveAllShadowsOfTypeRange( iMapIndex, MOCKFLOOR, MOCKFLOOR );
|
||||
}
|
||||
#else
|
||||
INT32 i = 0;
|
||||
while(i < gusNumExitGrids)
|
||||
{
|
||||
@@ -219,7 +120,6 @@ void RemoveExitGridFromWorld( INT32 iMapIndex )
|
||||
}
|
||||
i++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void TrashExitGridTable(void)//dnl ch86 170214
|
||||
@@ -284,37 +184,15 @@ void LoadExitGrids(INT8** hBuffer, FLOAT dMajorMapVersion)
|
||||
UINT16 usNumExitGrids;
|
||||
INT32 usMapIndex;
|
||||
EXITGRID ExitGrid;
|
||||
#if 0//dnl ch86 170214
|
||||
// New world is loading so trash all old EXITGRID's
|
||||
memset(gpExitGrids, 0, sizeof(gpExitGrids));
|
||||
guiExitGridsCount = 0;
|
||||
#else
|
||||
TrashExitGridTable();
|
||||
#endif
|
||||
gfLoadingExitGrids = TRUE;
|
||||
LOADDATA(&usNumExitGrids, *hBuffer, sizeof(usNumExitGrids));
|
||||
for(int i=0; i<usNumExitGrids; i++)
|
||||
{
|
||||
#if 0//dnl ch86 170214
|
||||
if(dMajorMapVersion < 7.0)
|
||||
{
|
||||
UINT16 usOldMapIndex;
|
||||
LOADDATA(&usOldMapIndex, *hBuffer, sizeof(usOldMapIndex));
|
||||
usMapIndex = usOldMapIndex;
|
||||
}
|
||||
else
|
||||
LOADDATA(&usMapIndex, *hBuffer, sizeof(usMapIndex));
|
||||
ExitGrid.Load(hBuffer, dMajorMapVersion);
|
||||
//dnl ch44 280909 EXITGRID translation
|
||||
gMapTrn.GetTrnCnt(usMapIndex);
|
||||
//gMapTrn.GetTrnCnt(ExitGrid.usGridNo);//dnl ch56 151009 This is gridno in sector which size you don't know, so no translation here
|
||||
AddExitGridToWorld(usMapIndex, &ExitGrid);
|
||||
#else
|
||||
ExitGrid.Load(hBuffer, dMajorMapVersion);
|
||||
gMapTrn.GetTrnCnt(ExitGrid.iMapIndex);
|
||||
usMapIndex = ExitGrid.iMapIndex;
|
||||
AddExitGridToWorld(usMapIndex, &ExitGrid);
|
||||
#endif
|
||||
}
|
||||
gfLoadingExitGrids = FALSE;
|
||||
}
|
||||
@@ -329,15 +207,6 @@ void SaveExitGrids(HWFILE hFile, UINT16 usNumExitGrids, FLOAT dMajorMapVersion,
|
||||
{
|
||||
if(GetExitGrid(i, &ExitGrid))
|
||||
{
|
||||
#if 0//dnl ch86 170214
|
||||
if(dMajorMapVersion < 7.0)
|
||||
{
|
||||
UINT16 usOldMapIndex = i;
|
||||
FileWrite(hFile, &usOldMapIndex, sizeof(usOldMapIndex), &uiBytesWritten);
|
||||
}
|
||||
else
|
||||
FileWrite(hFile, &i, sizeof(i), &uiBytesWritten);
|
||||
#endif
|
||||
ExitGrid.Save(hFile, dMajorMapVersion, ubMinorMapVersion);
|
||||
usNumSaved++;
|
||||
}
|
||||
|
||||
@@ -821,11 +821,7 @@ INT8 ExplosiveDamageStructureAtGridNo( STRUCTURE * pCurrent, STRUCTURE **ppNextC
|
||||
{
|
||||
if ( !(ppTile[ ubLoop ]->fFlags & TILE_ON_ROOF ) )
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
sStructGridNo = pBase->sGridNo + ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
sStructGridNo = AddPosRelToBase(pBase->sGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
// there might be two structures in this tile, one on each level, but we just want to
|
||||
// delete one on each pass
|
||||
|
||||
@@ -1456,11 +1452,7 @@ void ExplosiveDamageGridNo( INT32 sGridNo, INT16 sWoundAmt, UINT32 uiDist, BOOLE
|
||||
|
||||
for ( ubLoop = BASE_TILE; ubLoop < ubNumberOfTiles; ubLoop++)
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
sNewGridNo = sBaseGridNo + ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
sNewGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
// look in adjacent tiles
|
||||
for ( ubLoop2 = 0; ubLoop2 < NUM_WORLD_DIRECTIONS; ubLoop2++ )
|
||||
{
|
||||
|
||||
@@ -669,16 +669,6 @@ BOOLEAN GetMouseWorldCoordsInCenter( INT16 *psMouseX, INT16 *psMouseY )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
#if 0
|
||||
// 0verhaul
|
||||
// I did that (or actually uncasted a bunch of stuff and re-typed others to correct them), so
|
||||
// no worries
|
||||
// (jonathanl) to save me having to cast all the previous code
|
||||
BOOLEAN GetMouseMapPos( UINT32 *psMapPos )
|
||||
{
|
||||
return GetMouseMapPos( (INT32 *)psMapPos );
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOLEAN GetMouseMapPos( INT32 *psMapPos )
|
||||
{
|
||||
@@ -1309,11 +1299,7 @@ BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo )
|
||||
|
||||
// Get screen coordinates for current position of soldier
|
||||
GetWorldXYAbsoluteScreenXY( sXMapPos, sYMapPos, &sWorldX, &sWorldY);
|
||||
#if 0//dnl ch53 151009
|
||||
if ( sWorldX > 0 && sWorldX < ( gsTRX - gsTLX - 20 ) && sWorldY > 20 && sWorldY < ( gsBLY - gsTLY - 20 ) )
|
||||
#else
|
||||
if ( sWorldX >= 30 && sWorldX <= (gsTRX - gsTLX - 30) && sWorldY >= 20 && sWorldY <= (gsBLY - gsTLY - 10) )
|
||||
#endif
|
||||
{
|
||||
return GridNoOnWalkableWorldTile(sGridNo);
|
||||
}
|
||||
@@ -1321,31 +1307,6 @@ BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#if 0//dnl ch53 101009
|
||||
// This function is used when we care about astetics with the top Y portion of the
|
||||
// gma eplay area
|
||||
// mostly due to UI bar that comes down....
|
||||
BOOLEAN GridNoOnVisibleWorldTileGivenYLimits( INT32 sGridNo )
|
||||
{
|
||||
INT16 sWorldX;
|
||||
INT16 sWorldY;
|
||||
INT16 sXMapPos, sYMapPos;
|
||||
|
||||
// Check for valid gridno...
|
||||
ConvertGridNoToXY( sGridNo, &sXMapPos, &sYMapPos );
|
||||
|
||||
// Get screen coordinates for current position of soldier
|
||||
GetWorldXYAbsoluteScreenXY( sXMapPos, sYMapPos, &sWorldX, &sWorldY);
|
||||
|
||||
if ( sWorldX > 0 && sWorldX < ( gsTRX - gsTLX - 20 ) &&
|
||||
sWorldY > 40 && sWorldY < ( gsBLY - gsTLY - 20 ) )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOLEAN GridNoOnEdgeOfMap( INT32 sGridNo, INT8 * pbDirection )
|
||||
{
|
||||
|
||||
@@ -208,11 +208,7 @@ void ExamineGridNoForSlantRoofExtraGraphic( INT32 sCheckGridNo )
|
||||
for ( ubLoop = 0; ubLoop < pBase->pDBStructureRef->pDBStructure->ubNumberOfTiles; ubLoop++ )
|
||||
{
|
||||
ppTile = pBase->pDBStructureRef->ppTile;
|
||||
#if 0//dnl ch83 080114
|
||||
sGridNo = pBase->sGridNo + ppTile[ ubLoop ]->sPosRelToBase;
|
||||
#else
|
||||
sGridNo = AddPosRelToBase(pBase->sGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
if (sGridNo < 0 || sGridNo > WORLD_MAX)
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -540,12 +540,6 @@ UINT8 ubTravelCost;
|
||||
//bDirection = atan8( iX, iY, iSrcX, iSrcY );
|
||||
bDirection = atan8( iSrcX, iSrcY, iX, iY );
|
||||
|
||||
#if 0
|
||||
if ( usTileNo == 20415 && bDirection == 3 )
|
||||
{
|
||||
int i = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
ubTravelCost = gubWorldMovementCosts[ usTileNo ][ bDirection ][ 0 ];
|
||||
|
||||
@@ -564,50 +558,6 @@ UINT8 ubTravelCost;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
pStruct = gpWorldLevelData[ usTileNo ].pStructHead;
|
||||
while ( pStruct != NULL )
|
||||
{
|
||||
if ( pStruct->usIndex < giNumberOfTiles )
|
||||
{
|
||||
GetTileType( pStruct->usIndex, &uiType );
|
||||
|
||||
// ATE: Changed to use last decordations rather than last decal
|
||||
// Could maybe check orientation value? Depends on our
|
||||
// use of the orientation value flags..
|
||||
if((uiType >= FIRSTWALL) && (uiType <=LASTDECORATIONS ))
|
||||
{
|
||||
GetWallOrientation(pStruct->usIndex, &usWallOrientation);
|
||||
|
||||
bWallCount++;
|
||||
}
|
||||
}
|
||||
|
||||
pStruct=pStruct->pNext;
|
||||
}
|
||||
|
||||
if ( bWallCount )
|
||||
{
|
||||
// ATE: If TWO or more - assume it's BLOCKED and return TRUE
|
||||
if ( bWallCount != 1 )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
switch(usWallOrientation)
|
||||
{
|
||||
case INSIDE_TOP_RIGHT:
|
||||
case OUTSIDE_TOP_RIGHT:
|
||||
return( iSrcX < iX );
|
||||
|
||||
case INSIDE_TOP_LEFT:
|
||||
case OUTSIDE_TOP_LEFT:
|
||||
return( iSrcY < iY );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
@@ -2152,28 +2102,6 @@ BOOLEAN LightIlluminateWall(INT16 iSourceX, INT16 iSourceY, INT16 iTileX, INT16
|
||||
|
||||
// return( LightTileHasWall( iSourceX, iSourceY, iTileX, iTileY ) );
|
||||
|
||||
#if 0
|
||||
UINT16 usWallOrientation;
|
||||
|
||||
GetWallOrientation(pStruct->usIndex, &usWallOrientation);
|
||||
|
||||
switch(usWallOrientation)
|
||||
{
|
||||
case NO_ORIENTATION:
|
||||
return(TRUE);
|
||||
|
||||
case INSIDE_TOP_RIGHT:
|
||||
case OUTSIDE_TOP_RIGHT:
|
||||
return(iSourceX >= iTileX);
|
||||
|
||||
case INSIDE_TOP_LEFT:
|
||||
case OUTSIDE_TOP_LEFT:
|
||||
return(iSourceY >= iTileY);
|
||||
|
||||
}
|
||||
return(FALSE);
|
||||
|
||||
#endif
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
@@ -995,15 +995,8 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
||||
|
||||
// Black color for the background!
|
||||
//ColorFillVideoSurfaceArea( FRAME_BUFFER, sStartPointX_S, sStartPointY_S, sEndXS, sEndYS, 0 );
|
||||
#if 0//dnl ch79 291113
|
||||
if(gfTacticalPlacementGUIActive)//dnl ch45 021009 Skip overwrite buttons area which is not refresh during scroll //dnl ch77 211113
|
||||
ColorFillVideoSurfaceArea(uiBigMap, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-160, 0);
|
||||
else
|
||||
ColorFillVideoSurfaceArea(uiBigMap, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-120, 0);
|
||||
#else
|
||||
if(uiVSurface == FRAME_BUFFER)//dnl ch82 090114
|
||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-(gfTacticalPlacementGUIActive?160:120), 0);
|
||||
#endif
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
|
||||
InvalidateScreen();
|
||||
|
||||
@@ -1457,43 +1457,6 @@ BOOLEAN PhysicsMoveObject( REAL_OBJECT *pObject )
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
{
|
||||
LEVELNODE *pNode;
|
||||
INT32 sNewGridNo;
|
||||
|
||||
//Determine new gridno
|
||||
sNewGridNo = MAPROWCOLTOPOS( ( pObject->Position.y / CELL_Y_SIZE ), ( pObject->Position.x / CELL_X_SIZE ) );
|
||||
|
||||
// Look at old gridno
|
||||
if ( sNewGridNo != pObject->sGridNo )
|
||||
{
|
||||
// We're at a new gridno!
|
||||
|
||||
// First find levelnode of our object and delete
|
||||
pNode = gpWorldLevelData[ pObject->sGridNo ].pStructHead;
|
||||
|
||||
// LOOP THORUGH OBJECT LAYER
|
||||
while( pNode != NULL )
|
||||
{
|
||||
if ( pNode->uiFlags & LEVELNODE_PHYSICSOBJECT )
|
||||
{
|
||||
if ( pNode->iPhysicsObjectID == pObject->iID )
|
||||
{
|
||||
RemoveStruct( pObject->sGridNo, pNode->usIndex );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pNode = ppNode->pNext;
|
||||
}
|
||||
|
||||
// Set new gridno, add
|
||||
}
|
||||
// Add new object / update position
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void ObjectHitWindow( INT32 sGridNo, UINT16 usStructureID, BOOLEAN fBlowWindowSouth, BOOLEAN fLargeForce )
|
||||
{
|
||||
|
||||
@@ -354,14 +354,6 @@ UINT32 uiAdditiveLayerUsedFlags = 0xffffffff;
|
||||
// Array of shade values to use.....
|
||||
#define NUM_GLOW_FRAMES 30
|
||||
|
||||
#if 0
|
||||
INT16 gsGlowFrames[] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
|
||||
};
|
||||
#endif
|
||||
|
||||
INT16 gsGlowFrames[] =
|
||||
{
|
||||
@@ -1608,28 +1600,6 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT
|
||||
{
|
||||
if (fUseTileElem)
|
||||
{
|
||||
#if 0
|
||||
// DONOT RENDER IF IT'S A HIDDEN STRUCT AND TILE IS NOT REVEALED
|
||||
if (uiTileElemFlags & HIDDEN_TILE)
|
||||
{
|
||||
// IF WORLD IS NOT REVEALED, QUIT
|
||||
#ifdef JA2EDITOR
|
||||
if (!gfEditMode)
|
||||
#endif
|
||||
{
|
||||
if (!(gpWorldLevelData[uiTileIndex].uiFlags & MAPELEMENT_REVEALED) && !(gTacticalStatus.uiFlags&SHOW_ALL_MERCS))
|
||||
{
|
||||
//CONTINUE, DONOT RENDER
|
||||
if (!fLinkedListDirection)
|
||||
pNode = pNode->pPrevNode;
|
||||
else
|
||||
pNode = pNode->pNext;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9084,33 +9054,6 @@ void SetMercGlowNormal( )
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
if ( gAnimControl[ pSoldier->usAnimState ].uiFlags & ANIM_MOVING )
|
||||
{
|
||||
if ( sZOffsetY > 0 )
|
||||
{
|
||||
sZOffsetY++;
|
||||
}
|
||||
if ( sZOffsetX > 0 )
|
||||
{
|
||||
sZOffsetX++;
|
||||
}
|
||||
}
|
||||
|
||||
sZOffsetX = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetX;\
|
||||
sZOffsetY = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetY;\
|
||||
|
||||
|
||||
if ( ( pSoldier->flags.uiStatusFlags & SOLDIER_MULTITILE ) )\
|
||||
{\
|
||||
sZOffsetX = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetX;\
|
||||
sZOffsetY = pNode->pStructureData->pDBStructureRef->pDBStructure->bZTileOffsetY;\
|
||||
\
|
||||
sWorldY = GetMapXYWorldY( sMapX + sZOffsetX, sMapY + sZOffsetY );\
|
||||
}\
|
||||
else
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void SetRenderCenter( INT16 sNewX, INT16 sNewY )
|
||||
|
||||
@@ -660,11 +660,7 @@ BOOLEAN OkayToAddStructureToTile( INT32 sBaseGridNo, INT16 sCubeOffset, DB_STRUC
|
||||
}
|
||||
|
||||
ppTile = pDBStructureRef->ppTile;
|
||||
#if 0//dnl ch83 080114
|
||||
sGridNo = sBaseGridNo + ppTile[ubTileIndex]->sPosRelToBase;
|
||||
#else
|
||||
sGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubTileIndex]);
|
||||
#endif
|
||||
if (sGridNo < 0 || sGridNo > WORLD_MAX)
|
||||
{
|
||||
return( FALSE );
|
||||
@@ -835,16 +831,8 @@ BOOLEAN OkayToAddStructureToTile( INT32 sBaseGridNo, INT16 sCubeOffset, DB_STRUC
|
||||
}
|
||||
for (bLoop2 = 0; bLoop2 < pDBStructure->ubNumberOfTiles; bLoop2++)
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
if ( sBaseGridNo + ppTile[bLoop2]->sPosRelToBase == sOtherGridNo)
|
||||
{
|
||||
// obstacle will straddle wall!
|
||||
return( FALSE );
|
||||
}
|
||||
#else
|
||||
if(AddPosRelToBase(sBaseGridNo, ppTile[bLoop2]) == sOtherGridNo)
|
||||
return(FALSE);// obstacle will straddle wall!
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1107,11 +1095,7 @@ STRUCTURE * InternalAddStructureToWorld( INT32 sBaseGridNo, INT8 bLevel, DB_STRU
|
||||
MemFree( ppStructure );
|
||||
return( NULL );
|
||||
}
|
||||
#if 0//dnl ch83 080114
|
||||
ppStructure[ubLoop]->sGridNo = sBaseGridNo + ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
ppStructure[ubLoop]->sGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
if (ubLoop != BASE_TILE)
|
||||
{
|
||||
#ifdef JA2EDITOR
|
||||
@@ -1319,11 +1303,7 @@ BOOLEAN DeleteStructureFromWorld( STRUCTURE * pStructure )
|
||||
// Free all the tiles
|
||||
for (ubLoop = BASE_TILE; ubLoop < ubNumberOfTiles; ubLoop++)
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
sGridNo = sBaseGridNo + ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
sGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
// there might be two structures in this tile, one on each level, but we just want to
|
||||
// delete one on each pass
|
||||
pCurrent = FindStructureByID( sGridNo, usStructureID );
|
||||
|
||||
@@ -594,23 +594,6 @@ UINT8 gubEncryptionArray2[ BASE_NUMBER_OF_ROTATION_ARRAYS * 3 ][ NEW_ROTATION_AR
|
||||
},
|
||||
};
|
||||
|
||||
#if 0
|
||||
// These values coorespond to TerrainTypeDefines order
|
||||
UINT8 gTileTypeMovementCost[ NUM_TERRAIN_TYPES ] =
|
||||
{
|
||||
TRAVELCOST_FLAT, // NO_TERRAIN
|
||||
TRAVELCOST_FLAT, // FLAT GROUND
|
||||
TRAVELCOST_FLATFLOOR, // FLAT FLOOR
|
||||
TRAVELCOST_PAVEDROAD, // PAVED ROAD
|
||||
TRAVELCOST_DIRTROAD, // DIRT ROAD
|
||||
TRAVELCOST_GRASS, // LOW_GRASS
|
||||
TRAVELCOST_THICK, // HIGH GRASS
|
||||
TRAVELCOST_TRAINTRACKS, // TRAIN TRACKS
|
||||
TRAVELCOST_SHORE, // LOW WATER
|
||||
TRAVELCOST_KNEEDEEP, // MED WATER
|
||||
TRAVELCOST_DEEPWATER, // DEEP WATER
|
||||
};
|
||||
#else
|
||||
// These values coorespond to TerrainTypeDefines order
|
||||
UINT8 gTileTypeMovementCost[ NUM_TERRAIN_TYPES ] =
|
||||
{
|
||||
@@ -626,7 +609,6 @@ UINT8 gTileTypeMovementCost[ NUM_TERRAIN_TYPES ] =
|
||||
TRAVELCOST_SHORE, // MED WATER
|
||||
TRAVELCOST_SHORE, // DEEP WATER
|
||||
};
|
||||
#endif
|
||||
|
||||
ADDITIONAL_TILE_PROPERTIES_VALUES zAdditionalTileProperties;
|
||||
|
||||
|
||||
@@ -2276,15 +2276,6 @@ BOOLEAN SaveWorld(const STR8 puiFilename, FLOAT dMajorMapVersion, UINT8 ubMinorM
|
||||
{
|
||||
SaveMapLights( hfile );
|
||||
}
|
||||
#if 0//dnl ch74 191013 from 050611 Scheinworld reported problem with basement levels and similar maps which doesn't need entry points so decide to remove this check completely
|
||||
if(gMapInformation.sCenterGridNo == -1 || gMapInformation.ubEditorSmoothingType == SMOOTHING_NORMAL && (gMapInformation.sNorthGridNo == -1 && gMapInformation.sEastGridNo == -1 && gMapInformation.sSouthGridNo == -1 && gMapInformation.sWestGridNo == -1))//dnl ch17 290909
|
||||
{
|
||||
swprintf(gzErrorCatchString, L"SAVE ABORTED! Center and at least one of (N,S,E,W) entry point should be set.");
|
||||
gfErrorCatch = TRUE;
|
||||
FileClose(hfile);
|
||||
return(FALSE);
|
||||
}
|
||||
#endif
|
||||
gMapInformation.ubMapVersion = ubMinorMapVersion;//dnl ch74 241013 all this years MapInfo saves incorrect version :-(
|
||||
SaveMapInformation(hfile, dMajorMapVersion, ubMinorMapVersion);//dnl ch33 150909
|
||||
|
||||
|
||||
@@ -2293,10 +2293,6 @@ BOOLEAN RemoveShadow( INT32 iMapIndex, UINT16 usIndex )
|
||||
{
|
||||
pOldShadow->pNext = pShadow->pNext;
|
||||
}
|
||||
#if 0//#ifdef JA2EDITOR//dnl ch80 011213 //dnl ch86 190214
|
||||
if(pShadow->uiFlags & LEVELNODE_EXITGRID && pShadow->pExitGridInfo)
|
||||
memset(pShadow->pExitGridInfo, 0, sizeof(EXITGRID));
|
||||
#endif
|
||||
// Delete memory assosiated with item
|
||||
MemFree( pShadow );
|
||||
guiLevelNodes--;
|
||||
|
||||
Reference in New Issue
Block a user