Merged New Inventory Project into main branch

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2008-03-08 15:15:25 +00:00
parent e16d166277
commit 43ca24dda8
649 changed files with 93359 additions and 82507 deletions
+21 -21
View File
@@ -51,7 +51,7 @@ void EnsureSelectionType();
//Used for offseting cursor to show that it is on the roof rather than on the ground.
//This can be conveniently executed by moving the cursor up and right 3 gridnos for a
//total of -483 -(160*3)-(1*3)
//total of -483 -(160*3)-(1*3)
#define ROOF_OFFSET (-483)
BOOLEAN gfUsingOffset;
@@ -98,7 +98,7 @@ void RemoveCursors()
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;
@@ -160,14 +160,14 @@ void UpdateCursorAreas()
}
else switch( gusSelectionType )
{
case SMALLSELECTION:
case SMALLSELECTION:
gSelectRegion.iLeft = gSelectRegion.iRight = sGridX;
gSelectRegion.iTop = gSelectRegion.iBottom = sGridY;
fValidCursor = TRUE;
break;
case MEDIUMSELECTION:
case LARGESELECTION:
case XLARGESELECTION:
case MEDIUMSELECTION:
case LARGESELECTION:
case XLARGESELECTION:
//The mouse mode value reflects the size of the cursor.
gSelectRegion.iTop = sGridY - gusSelectionType;
gSelectRegion.iBottom = sGridY + gusSelectionType;
@@ -189,13 +189,13 @@ void UpdateCursorAreas()
//Draw all of the area cursors here.
if( fValidCursor )
{
if( iDrawMode == DRAW_MODE_ENEMY || iDrawMode == DRAW_MODE_CREATURE ||
if( iDrawMode == DRAW_MODE_ENEMY || iDrawMode == DRAW_MODE_CREATURE ||
iDrawMode == DRAW_MODE_REBEL || iDrawMode == DRAW_MODE_CIVILIAN ||
iDrawMode == DRAW_MODE_SCHEDULEACTION )
{
iMapIndex = gSelectRegion.iTop * WORLD_COLS + gSelectRegion.iLeft;
if( !IsLocationSittable( iMapIndex, gfRoofPlacement ) && iDrawMode != DRAW_MODE_SCHEDULEACTION ||
!IsLocationSittableExcludingPeople( iMapIndex, gfRoofPlacement ) && iDrawMode == DRAW_MODE_SCHEDULEACTION )
if( !IsLocationSittable( iMapIndex, gfRoofPlacement ) && iDrawMode != DRAW_MODE_SCHEDULEACTION ||
!IsLocationSittableExcludingPeople( iMapIndex, gfRoofPlacement ) && iDrawMode == DRAW_MODE_SCHEDULEACTION )
{
if( sBadMarker != iMapIndex )
{
@@ -225,7 +225,7 @@ void UpdateCursorAreas()
}
}
else for( y = gSelectRegion.iTop; y <= gSelectRegion.iBottom; y++ )
{
{
for( x = gSelectRegion.iLeft; x <= gSelectRegion.iRight; x++ )
{
iMapIndex = y * WORLD_COLS + x;
@@ -238,11 +238,11 @@ void UpdateCursorAreas()
void ForceAreaSelectionWidth()
{
UINT16 gusDecSelWidth;
//If the anchor isn't set, we don't want to force the size yet.
if( !fAnchored )
return;
gusDecSelWidth = gusSelectionWidth - 1;
//compare the region with the anchor and determine if we are going to force size via
@@ -280,8 +280,8 @@ BOOLEAN HandleAreaSelection()
//When the user releases the left button, then clear and process the area.
if( fAnchored )
{
if( !gfLeftButtonState && !gfCurrentSelectionWithRightButton ||
!gfRightButtonState && gfCurrentSelectionWithRightButton )
if( !gfLeftButtonState && !gfCurrentSelectionWithRightButton ||
!gfRightButtonState && gfCurrentSelectionWithRightButton )
{
fAnchored = FALSE;
ProcessAreaSelection( (BOOLEAN)!gfCurrentSelectionWithRightButton );
@@ -341,8 +341,8 @@ BOOLEAN HandleAreaSelection()
void ValidateSelectionRegionBoundaries()
{
gSelectRegion.iLeft = max( min( 159, gSelectRegion.iLeft ) , 0 );
gSelectRegion.iRight = max( min( 159, gSelectRegion.iRight ), 0 );
gSelectRegion.iTop = max( min( 159, gSelectRegion.iTop ) , 0 );
gSelectRegion.iRight = max( min( 159, gSelectRegion.iRight ), 0 );
gSelectRegion.iTop = max( min( 159, gSelectRegion.iTop ) , 0 );
gSelectRegion.iBottom = max( min( 159, gSelectRegion.iBottom ), 0 );
}
@@ -350,10 +350,10 @@ void EnsureSelectionType()
{
BOOLEAN fPrevBrushEnabledState = gfBrushEnabled;
//At time of writing, the only drawing mode supporting right mouse button
//At time of writing, the only drawing mode supporting right mouse button
//area selections is the cave drawing mode.
gfAllowRightButtonSelections = ( iDrawMode == DRAW_MODE_CAVES );
//if we are erasing, we have more flexibility with the drawing modes.
if( iDrawMode >= DRAW_MODE_ERASE )
{
@@ -440,7 +440,7 @@ void DrawBuildingLayout( INT32 iMapIndex )
if( fAdd )
AddTopmostToTail( iMapIndex, FIRSTPOINTERS1 );
}
curr = curr->next;
curr = curr->next;
}
}
@@ -457,8 +457,8 @@ void RemoveBuildingLayout()
iMapIndex = curr->sGridNo + iOffset;
if( iMapIndex > 0 && iMapIndex < WORLD_MAX )
RemoveTopmost( iMapIndex, FIRSTPOINTERS1 );
curr = curr->next;
curr = curr->next;
}
}
#endif
#endif