mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New feature (by DepressivesBrot): Molle Items
- individual LBE gear can be created via MOLLE items. For each LBE item, there's a definition which pockets may be changed and how much space the new pockets may take up in total. - If there's a free pocket slot and enough space -> attach item and enable pocket. - for further description, see Doc/Design Document- MOLLE.txt git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5441 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+24
-22
@@ -26,7 +26,9 @@
|
||||
|
||||
// Room Information
|
||||
//UINT8 gubWorldRoomInfo[ WORLD_MAX ];
|
||||
UINT8* gubWorldRoomInfo = NULL;
|
||||
//DBrot: More Rooms
|
||||
//UINT8* gubWorldRoomInfo = NULL;
|
||||
UINT16* gusWorldRoomInfo = NULL;
|
||||
UINT8 gubWorldRoomHidden[ MAX_ROOMS ];
|
||||
|
||||
|
||||
@@ -41,14 +43,14 @@ void ShutdownRoomDatabase( )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SetTileRoomNum( INT32 sGridNo, UINT8 ubRoomNum )
|
||||
//DBrot: More Rooms
|
||||
void SetTileRoomNum( INT32 sGridNo, UINT16 usRoomNum )
|
||||
{
|
||||
// Add to global room list
|
||||
gubWorldRoomInfo[ sGridNo ] = ubRoomNum;
|
||||
gusWorldRoomInfo[ sGridNo ] = usRoomNum;
|
||||
}
|
||||
|
||||
void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 ubRoomNum )
|
||||
//DBrot: More Rooms
|
||||
void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 usRoomNum )
|
||||
{
|
||||
INT32 cnt1, cnt2;
|
||||
|
||||
@@ -56,20 +58,20 @@ void SetTileRangeRoomNum( SGPRect *pSelectRegion, UINT8 ubRoomNum )
|
||||
{
|
||||
for ( cnt2 = pSelectRegion->iLeft; cnt2 <= pSelectRegion->iRight; cnt2++ )
|
||||
{
|
||||
gubWorldRoomInfo[ MAPROWCOLTOPOS( cnt1, cnt2 ) ] = ubRoomNum;
|
||||
gusWorldRoomInfo[ MAPROWCOLTOPOS( cnt1, cnt2 ) ] = usRoomNum;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BOOLEAN InARoom( INT32 sGridNo, UINT8 *pubRoomNo )
|
||||
//DBrot: More Rooms
|
||||
BOOLEAN InARoom( INT32 sGridNo, UINT16 *pusRoomNo )
|
||||
{
|
||||
// WANNE: Bugzilla #360: Crash when moving via helicopter from museum sector
|
||||
if ( sGridNo >= 0 && gubWorldRoomInfo[ sGridNo ] != NO_ROOM )
|
||||
if ( sGridNo >= 0 && gusWorldRoomInfo[ sGridNo ] != NO_ROOM )
|
||||
{
|
||||
if ( pubRoomNo )
|
||||
if ( pusRoomNo )
|
||||
{
|
||||
*pubRoomNo = gubWorldRoomInfo[ sGridNo ];
|
||||
*pusRoomNo = gusWorldRoomInfo[ sGridNo ];
|
||||
}
|
||||
return( TRUE );
|
||||
}
|
||||
@@ -77,14 +79,14 @@ BOOLEAN InARoom( INT32 sGridNo, UINT8 *pubRoomNo )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN InAHiddenRoom( INT32 sGridNo, UINT8 *pubRoomNo )
|
||||
//DBrot: More Rooms
|
||||
BOOLEAN InAHiddenRoom( INT32 sGridNo, UINT16 *pusRoomNo )
|
||||
{
|
||||
if ( sGridNo >= 0 && gubWorldRoomInfo[ sGridNo ] != NO_ROOM )
|
||||
if ( sGridNo >= 0 && gusWorldRoomInfo[ sGridNo ] != NO_ROOM )
|
||||
{
|
||||
if ( (gubWorldRoomHidden[ gubWorldRoomInfo[ sGridNo ] ] ) )
|
||||
if ( (gubWorldRoomHidden[ gusWorldRoomInfo[ sGridNo ] ] ) )
|
||||
{
|
||||
*pubRoomNo = gubWorldRoomInfo[ sGridNo ];
|
||||
*pusRoomNo = gusWorldRoomInfo[ sGridNo ];
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
@@ -124,7 +126,7 @@ void SetGridNoRevealedFlag( INT32 sGridNo )
|
||||
SetRoofIndexFlagsFromTypeRange( sGridNo, FIRSTROOF, FOURTHROOF, LEVELNODE_HIDDEN );
|
||||
|
||||
// ATE: Do this only if we are in a room...
|
||||
if ( gubWorldRoomInfo[ sGridNo ] != NO_ROOM )
|
||||
if ( gusWorldRoomInfo[ sGridNo ] != NO_ROOM )
|
||||
{
|
||||
SetStructAframeFlags( sGridNo, LEVELNODE_HIDDEN );
|
||||
// Find gridno one east as well...
|
||||
@@ -186,7 +188,7 @@ void SetGridNoRevealedFlag( INT32 sGridNo )
|
||||
pStructure = pStructure->pNext;
|
||||
}
|
||||
|
||||
gubWorldRoomHidden[ gubWorldRoomInfo[ sGridNo ] ] = FALSE;
|
||||
gubWorldRoomHidden[ gusWorldRoomInfo[ sGridNo ] ] = FALSE;
|
||||
|
||||
}
|
||||
|
||||
@@ -259,8 +261,8 @@ void ExamineGridNoForSlantRoofExtraGraphic( INT32 sCheckGridNo )
|
||||
|
||||
}
|
||||
|
||||
|
||||
void RemoveRoomRoof( INT32 sGridNo, UINT8 bRoomNum, SOLDIERTYPE *pSoldier )
|
||||
//DBrot: More Rooms
|
||||
void RemoveRoomRoof( INT32 sGridNo, UINT16 usRoomNum, SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 cnt;
|
||||
ITEM_POOL *pItemPool;
|
||||
@@ -272,7 +274,7 @@ void RemoveRoomRoof( INT32 sGridNo, UINT8 bRoomNum, SOLDIERTYPE *pSoldier )
|
||||
// LOOP THORUGH WORLD AND CHECK ROOM INFO
|
||||
for ( cnt = 0; cnt < WORLD_MAX; cnt++ )
|
||||
{
|
||||
if ( gubWorldRoomInfo[ cnt ] == bRoomNum )
|
||||
if ( gusWorldRoomInfo[ cnt ] == usRoomNum )
|
||||
{
|
||||
|
||||
SetGridNoRevealedFlag( cnt );//dnl ch56 141009
|
||||
|
||||
Reference in New Issue
Block a user