void RemoveCursors() { INT32 x, y, iMapIndex; if( gpBuildingLayoutList ) { RemoveBuildingLayout(); } Assert( gSelectRegion.iTop >= 0 && gSelectRegion.iTop <= gSelectRegion.iBottom ); Assert( gSelectRegion.iLeft >= 0 && gSelectRegion.iLeft <= gSelectRegion.iRight ); for( y = gSelectRegion.iTop; y <= gSelectRegion.iBottom; y++ ) { for( x = gSelectRegion.iLeft; x <= gSelectRegion.iRight; x++ ) { LEVELNODE* pNode; iMapIndex = y * WORLD_COLS + x; if( gfUsingOffset ) iMapIndex += ROOF_OFFSET; pNode = gpWorldLevelData[ iMapIndex ].pTopmostHead; while( pNode ) { if( pNode->usIndex == FIRSTPOINTERS1 || pNode->usIndex == FIRSTPOINTERS5 ) { RemoveTopmost( iMapIndex, pNode->usIndex ); break; } pNode = pNode->pNext; } } } fValidCursor = FALSE; gfUsingOffset = FALSE; }
void RemoveBuildingLayout() { BUILDINGLAYOUTNODE *curr; INT32 iOffset; INT32 iMapIndex; iMapIndex = gSelectRegion.iLeft + gSelectRegion.iTop * WORLD_COLS; iOffset = iMapIndex - gsBuildingLayoutAnchorGridNo; curr = gpBuildingLayoutList; while( curr ) { iMapIndex = curr->sGridNo + iOffset; if( iMapIndex > 0 && iMapIndex < WORLD_MAX ) RemoveTopmost( iMapIndex, FIRSTPOINTERS1 ); curr = curr->next; } }
void RemoveBadMarker() { LEVELNODE *pNode; if( sBadMarker < 0 ) return; pNode = gpWorldLevelData[ sBadMarker ].pTopmostHead; while( pNode ) { if( pNode->usIndex == BADMARKER1 ) { RemoveTopmost( sBadMarker, pNode->usIndex ); sBadMarker = -1; break; } pNode = pNode->pNext; } }
void RemoveLockedDoorCursors() { DOOR *pDoor; INT i; LEVELNODE* pNode; LEVELNODE* pTemp; for( i = 0; i < gubNumDoors; i++ ) { pDoor = &DoorTable[ i ]; pNode = gpWorldLevelData[ pDoor->sGridNo ].pTopmostHead; while( pNode ) { if( pNode->usIndex == ROTATINGKEY1 ) { pTemp = pNode; pNode = pNode->pNext; RemoveTopmost( pDoor->sGridNo, pTemp->usIndex ); } else pNode = pNode->pNext; } } }
void HideExitGrids() { INT32 i; LEVELNODE *pLevelNode; if( !gfShowExitGrids ) return; gfShowExitGrids = FALSE; for( i = 0; i < WORLD_MAX; i++ ) { if( GetExitGridLevelNode( i, &pLevelNode ) ) { pLevelNode = gpWorldLevelData[ i ].pTopmostHead; while( pLevelNode ) { if( pLevelNode->usIndex == FIRSTPOINTERS8 ) { RemoveTopmost( i, pLevelNode->usIndex ); break; } pLevelNode = pLevelNode->pNext; } } } }
void HideItemCursor( INT32 iMapIndex ) { RemoveTopmost( iMapIndex, SELRING1 ); }