mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Brief: //dnl ch80
- Polishing and fixing mapeditor. Details: - Add scroll map editor items for mouse wheel. - Fix selection of mapinfo light and smoothing buttons when switching between taskbars. - UpdateRoofsView now will hide/show onroof tiles and back roof walls too. - Fix fake light toggle which now will remain after switching to another taskbar also fix incorrect ambient light saving during toggling fake light with HOME key. - Finish work on HandleMouseClicksInGameScreen function so most draw functions now are single clicked on same tile element instead rapid burst of events which in some situation create stacking tiles problem during save game. - Fix incorrect value for exit grids if right click on map element without exit grid, also if changing same exit grid then will update same instead to define next available slot from exit grid array. - Restricted scroll will now disable scrolling when enter in textbox at mapinfo taskbar for basement levels and for proper radar map creation. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6673 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+47
-9
@@ -1779,25 +1779,29 @@ void SetStructIndexFlagsFromTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT3
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN HideStructOfGivenType( INT32 iMapIndex, UINT32 fType, BOOLEAN fHide )
|
||||
BOOLEAN HideStructOfGivenType(INT32 iMapIndex, UINT32 fType, BOOLEAN fHide)//dnl ch80 011213
|
||||
{
|
||||
if ( fHide )
|
||||
if(fHide)
|
||||
{
|
||||
SetRoofIndexFlagsFromTypeRange( iMapIndex, fType, fType, LEVELNODE_HIDDEN );
|
||||
if(fType >= FIRSTONROOF && fType <= LASTONROOF)
|
||||
SetOnRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
else
|
||||
SetRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ONLY UNHIDE IF NOT REAVEALED ALREADY
|
||||
if ( !(gpWorldLevelData[ iMapIndex ].uiFlags & MAPELEMENT_REVEALED ) )
|
||||
if(!(gpWorldLevelData[iMapIndex].uiFlags & MAPELEMENT_REVEALED))
|
||||
{
|
||||
RemoveRoofIndexFlagsFromTypeRange( iMapIndex, fType, fType, LEVELNODE_HIDDEN );
|
||||
if(fType >= FIRSTONROOF && fType <= LASTONROOF)
|
||||
RemoveOnRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
else
|
||||
RemoveRoofIndexFlagsFromTypeRange(iMapIndex, fType, fType, LEVELNODE_HIDDEN);
|
||||
}
|
||||
}
|
||||
return( TRUE );
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void RemoveStructIndexFlagsFromTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType, UINT32 uiFlags )
|
||||
{
|
||||
LEVELNODE *pStruct = NULL;
|
||||
@@ -1938,7 +1942,10 @@ BOOLEAN RemoveShadow( INT32 iMapIndex, UINT16 usIndex )
|
||||
{
|
||||
pOldShadow->pNext = pShadow->pNext;
|
||||
}
|
||||
|
||||
#ifdef JA2EDITOR//dnl ch80 011213
|
||||
if(pShadow->uiFlags & LEVELNODE_EXITGRID && pShadow->pExitGridInfo)
|
||||
memset(pShadow->pExitGridInfo, 0, sizeof(EXITGRID));
|
||||
#endif
|
||||
// Delete memory assosiated with item
|
||||
MemFree( pShadow );
|
||||
guiLevelNodes--;
|
||||
@@ -3018,6 +3025,37 @@ BOOLEAN RemoveAllOnRoofsOfTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32
|
||||
return fRetVal;
|
||||
}
|
||||
|
||||
void RemoveOnRoofIndexFlagsFromTypeRange(INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType, UINT32 uiFlags)//dnl ch80 011213
|
||||
{
|
||||
LEVELNODE *pOnRoof, *pOldOnRoof;
|
||||
UINT32 fTileType;
|
||||
|
||||
pOnRoof = gpWorldLevelData[iMapIndex].pOnRoofHead;
|
||||
while(pOnRoof && pOnRoof->usIndex != NO_TILE)
|
||||
{
|
||||
GetTileType(pOnRoof->usIndex, &fTileType);
|
||||
pOldOnRoof = pOnRoof;
|
||||
pOnRoof = pOnRoof->pNext;
|
||||
if(fTileType >= fStartType && fTileType <= fEndType)
|
||||
pOldOnRoof->uiFlags &= (~uiFlags);
|
||||
}
|
||||
}
|
||||
|
||||
void SetOnRoofIndexFlagsFromTypeRange(INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType, UINT32 uiFlags)//dnl ch80 011213
|
||||
{
|
||||
LEVELNODE *pOnRoof, *pOldOnRoof;
|
||||
UINT32 fTileType;
|
||||
|
||||
pOnRoof = gpWorldLevelData[iMapIndex].pOnRoofHead;
|
||||
while(pOnRoof && pOnRoof->usIndex != NO_TILE)
|
||||
{
|
||||
GetTileType(pOnRoof->usIndex, &fTileType);
|
||||
pOldOnRoof = pOnRoof;
|
||||
pOnRoof = pOnRoof->pNext;
|
||||
if(fTileType >= fStartType && fTileType <= fEndType)
|
||||
pOldOnRoof->uiFlags |= uiFlags;
|
||||
}
|
||||
}
|
||||
|
||||
// Topmost layer
|
||||
// #################################################################
|
||||
|
||||
Reference in New Issue
Block a user