mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Editor Bugfix: Added item stack no info for pre-placed map items (by Buggler)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6636 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -802,7 +802,7 @@ void RenderSelectedItemBlownUp()
|
|||||||
INT16 sScreenX, sScreenY, xp, yp;
|
INT16 sScreenX, sScreenY, xp, yp;
|
||||||
ITEM_POOL *pItemPool;
|
ITEM_POOL *pItemPool;
|
||||||
CHAR16 szItemName[ SIZE_ITEM_NAME ];
|
CHAR16 szItemName[ SIZE_ITEM_NAME ];
|
||||||
INT32 i;
|
INT32 i, iStackIndex;
|
||||||
INT16 sWidth, sHeight, sOffsetX, sOffsetY;
|
INT16 sWidth, sHeight, sOffsetX, sOffsetY;
|
||||||
|
|
||||||
GetGridNoScreenPos( gsItemGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( gsItemGridNo, 0, &sScreenX, &sScreenY );
|
||||||
@@ -866,20 +866,27 @@ void RenderSelectedItemBlownUp()
|
|||||||
mprintf( xp, yp, L"%d", Item[ gpItem->usItem ].uiIndex );
|
mprintf( xp, yp, L"%d", Item[ gpItem->usItem ].uiIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
//Count the number of items in the current pool, and display that.
|
//Display current item stack index and number of items in stack
|
||||||
i = 0;
|
i = 0;
|
||||||
GetItemPoolFromGround( gsItemGridNo, &pItemPool );
|
GetItemPoolFromGround( gsItemGridNo, &pItemPool );
|
||||||
Assert( pItemPool );
|
Assert( pItemPool );
|
||||||
|
//Count the number of items in the current pool
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
|
if ( gpItemPool == pItemPool )
|
||||||
|
iStackIndex = i;
|
||||||
pItemPool = pItemPool->pNext;
|
pItemPool = pItemPool->pNext;
|
||||||
}
|
}
|
||||||
xp = sScreenX;
|
xp = sScreenX;
|
||||||
yp = sScreenY + 10;
|
yp = sScreenY + 10;
|
||||||
SetFont( FONT10ARIAL );
|
SetFont( FONT10ARIAL );
|
||||||
SetFontForeground( FONT_YELLOW );
|
SetFontForeground( FONT_YELLOW );
|
||||||
mprintf( xp, yp, L"%d", i );
|
//Omit current item stack index if only 1 item in stack
|
||||||
|
if ( i == 1 )
|
||||||
|
mprintf( xp, yp, L"%d", i );
|
||||||
|
else
|
||||||
|
mprintf( xp - 6, yp, L"%d/%d", iStackIndex , i );
|
||||||
|
|
||||||
//If the item is hidden, render a blinking H (just like DG)
|
//If the item is hidden, render a blinking H (just like DG)
|
||||||
if( gWorldItems[ gpItemPool->iItemIndex ].bVisible == HIDDEN_ITEM ||
|
if( gWorldItems[ gpItemPool->iItemIndex ].bVisible == HIDDEN_ITEM ||
|
||||||
|
|||||||
Reference in New Issue
Block a user