mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Brief: //dnl ch85
- Some fixing and adding position in overhead map to be in center of big map. Details: - Calculate overhead map cords from your current position on big maps. - Fix incorrect placing room numbers in maps with cliffs. - Fix CTD during deletion of sector items using CTRL+D or CTRL+Del. - Remove light, door and item cursor and item tiles after coping building. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6888 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -285,7 +285,9 @@ void MapInventoryPoolFilterBtn( GUI_BUTTON *btn, INT32 reason );
|
||||
void MapInventoryPoolFilterBtnMoveItemDisplay( GUI_BUTTON *btn, INT32 reason ); // Flugente
|
||||
void DisplayCurrentSector( void );
|
||||
void ResizeInventoryList( void );
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
void ClearUpTempUnSeenList( void );
|
||||
#endif
|
||||
void SaveSeenAndUnseenItems( void );
|
||||
void DrawTextOnMapInventoryBackground( void );
|
||||
void DrawTextOnSectorInventory( void );
|
||||
@@ -304,7 +306,9 @@ extern void MAPEndItemPointer( );
|
||||
extern BOOLEAN GetCurrentBattleSectorXYZAndReturnTRUEIfThereIsABattle( INT16 *psSectorX, INT16 *psSectorY, INT16 *psSectorZ );
|
||||
extern BOOLEAN MAPInternalInitItemDescriptionBox( OBJECTTYPE *pObject, UINT8 ubStatusIndex, SOLDIERTYPE *pSoldier );
|
||||
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
void DeleteAllItemsInInventoryPool();
|
||||
#endif
|
||||
void DeleteItemsOfType( UINT16 usItemType );
|
||||
// HEADROCK HAM 5: flag to indicate that all items in the stack will be sold. This is primarily used to
|
||||
// figure out the price of the top item in the stack rather than just all of them.
|
||||
@@ -930,8 +934,7 @@ void CancelSectorInventoryDisplayIfOn( BOOLEAN fExitFromMapScreen )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
void ClearUpTempUnSeenList( void )//dnl ch75 271013
|
||||
{
|
||||
// save these items and all the others
|
||||
@@ -941,6 +944,7 @@ void ClearUpTempUnSeenList( void )//dnl ch75 271013
|
||||
pSaveList = pUnSeenItems;
|
||||
pUnSeenItems.clear();
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////
|
||||
//@brief Saves pSaveList and pInventoryPoolList either into file or into memmory.
|
||||
@@ -2203,12 +2207,13 @@ void ReBuildWorldItemStashForLoadedSector( INT32 iNumberSeenItems, INT32 iNumber
|
||||
SetNumberOfVisibleWorldItemsInSectorStructureForSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ , uiTotalNumberOfVisibleItems );
|
||||
}
|
||||
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
void DestroyStash( void )
|
||||
{
|
||||
// clear out stash
|
||||
pInventoryPoolList.clear();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void BeginInventoryPoolPtr( OBJECTTYPE *pInventorySlot )
|
||||
{
|
||||
@@ -3982,6 +3987,7 @@ BOOLEAN DisplaySectorItemsInfo(void)//dnl ch51 090913 //dnl ch75 021113
|
||||
}
|
||||
//dnl ch51 081009 finish
|
||||
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
void DeleteAllItemsInInventoryPool()
|
||||
{
|
||||
pInventoryPoolList.clear();
|
||||
@@ -3997,7 +4003,7 @@ void DeleteAllItemsInInventoryPool()
|
||||
DestroyStash();
|
||||
BuildStashForSelectedSector( sSelMapX, sSelMapY, iCurrentMapSectorZ);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void DeleteItemsOfType( UINT16 usItemType )
|
||||
{
|
||||
|
||||
+25
-2
@@ -1014,8 +1014,9 @@ extern BOOLEAN CanRedistributeMilitiaInSector( INT16 sClickedSectorX, INT16 sCli
|
||||
|
||||
extern INT32 GetNumberOfMercsInUpdateList( void );
|
||||
extern INT32 SellItem( OBJECTTYPE& object, BOOLEAN fAll, BOOLEAN useModifier = TRUE );
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
void DeleteAllItemsInInventoryPool();
|
||||
|
||||
#endif
|
||||
#ifdef JA2UB
|
||||
void HandleWhenPlayerHasNoMercsAndNoLaptop();
|
||||
#endif
|
||||
@@ -1087,6 +1088,7 @@ void BeginDeleteAllCallBack( UINT8 bExitValue )
|
||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||
{
|
||||
fRestoreBackgroundForMessageBox = TRUE;
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
if ( gpItemPointer != NULL || InSectorStackPopup( ) || InItemStackPopup( ) || InItemDescriptionBox( ) || InKeyRingPopup( ) )
|
||||
{
|
||||
return;
|
||||
@@ -1107,6 +1109,12 @@ void BeginDeleteAllCallBack( UINT8 bExitValue )
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
for(UINT32 i=0; i<pInventoryPoolList.size(); i++)
|
||||
if(pInventoryPoolList[i].object.exists() && (pInventoryPoolList[i].usFlags & WORLD_ITEM_REACHABLE))
|
||||
pInventoryPoolList[i].object.initialize();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// CHRISL: New functions to handle initialization of inventory coordinates
|
||||
@@ -7026,13 +7034,20 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
break;
|
||||
|
||||
case DEL:
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
// show the inventory pool?
|
||||
if( fShowMapInventoryPool && _KeyDown( CTRL ) )
|
||||
{
|
||||
DeleteAllItemsInInventoryPool();
|
||||
break;
|
||||
}
|
||||
|
||||
#else
|
||||
if(fCtrl && fShowMapInventoryPool && !(gpItemPointer || InSectorStackPopup() || InItemStackPopup() || InItemDescriptionBox() || InKeyRingPopup()))
|
||||
{
|
||||
DoMessageBox(MSG_BOX_BASIC_STYLE, NewInvMessage[NIV_DELETE_ALL], guiCurrentScreen, (UINT8)MSG_BOX_FLAG_YESNO, BeginDeleteAllCallBack, NULL);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
// down one sublevel
|
||||
GoDownOneLevelInMap( );
|
||||
break;
|
||||
@@ -7479,6 +7494,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
#ifdef INVFIX_Moa//dnl ch85 050214
|
||||
if( fCtrl )
|
||||
{
|
||||
if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) )
|
||||
@@ -7496,6 +7512,13 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(fCtrl && fShowMapInventoryPool && !(gpItemPointer || InSectorStackPopup() || InItemStackPopup() || InItemDescriptionBox() || InKeyRingPopup()))
|
||||
{
|
||||
DoMessageBox(MSG_BOX_BASIC_STYLE, NewInvMessage[NIV_DELETE_ALL], guiCurrentScreen, (UINT8)MSG_BOX_FLAG_YESNO, BeginDeleteAllCallBack, NULL);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case 'e':
|
||||
if( gfPreBattleInterfaceActive )
|
||||
|
||||
Reference in New Issue
Block a user