**********************************************************

** Big Maps Projects code (incl. Multiplayer v1.5 **
**********************************************************
- Merged Big Maps Project code from BMP+MP trunk (Revision: 3340)
o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- Before THIS merge, I made a branch of the existing 1.13 source
o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src
- Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago
- I will add VS 2010 projects and solution file in the next few days

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2010-02-28 18:38:52 +00:00
parent a98c44ac78
commit 14750c6903
461 changed files with 23615 additions and 120157 deletions
+18 -14
View File
@@ -67,11 +67,11 @@ void UpdateWallsView()
{
if ( fBuildingShowWalls )
{
RemoveWallLevelnodeFlags( (INT16)cnt, LEVELNODE_HIDDEN );
RemoveWallLevelnodeFlags( cnt, LEVELNODE_HIDDEN );
}
else
{
SetWallLevelnodeFlags( (INT16)cnt, LEVELNODE_HIDDEN );
SetWallLevelnodeFlags( cnt, LEVELNODE_HIDDEN );
}
}
gfRenderWorld = TRUE;
@@ -102,7 +102,7 @@ void UpdateBuildingsInfo()
//4) KillBuilding at x , y-1.
//5) KillBuilding at x+1, y.
//6) KillBuilding at x , y+1.
void KillBuilding( UINT32 iMapIndex )
void KillBuilding( INT32 iMapIndex )
{
BOOLEAN fFound = FALSE;
@@ -120,13 +120,13 @@ void KillBuilding( UINT32 iMapIndex )
return;
}
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - WORLD_COLS ) ) )
if( GridNoOnVisibleWorldTile( iMapIndex - WORLD_COLS ) )
KillBuilding( iMapIndex - WORLD_COLS );
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + WORLD_COLS ) ) )
if( GridNoOnVisibleWorldTile( iMapIndex + WORLD_COLS ) )
KillBuilding( iMapIndex + WORLD_COLS );
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + 1 ) ) )
if( GridNoOnVisibleWorldTile( iMapIndex + 1 ) )
KillBuilding( iMapIndex + 1 );
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - 1 ) ) )
if( GridNoOnVisibleWorldTile( iMapIndex - 1 ) )
KillBuilding( iMapIndex - 1 );
if( gfBasement )
@@ -134,7 +134,7 @@ void KillBuilding( UINT32 iMapIndex )
}
BUILDINGLAYOUTNODE *gpBuildingLayoutList = NULL;
INT16 gsBuildingLayoutAnchorGridNo = -1;
INT32 gsBuildingLayoutAnchorGridNo = -1;
extern void RemoveBuildingLayout();
void DeleteBuildingLayout()
@@ -175,14 +175,14 @@ void BuildLayout( INT32 iMapIndex, INT32 iOffset )
curr = gpBuildingLayoutList;
while( curr )
{
if( (INT16)iMapIndex == curr->sGridNo )
if( iMapIndex == curr->sGridNo )
return;
curr = curr->next;
}
//Good, it hasn't, so process it and add it to the head of the list.
curr = (BUILDINGLAYOUTNODE*)MemAlloc( sizeof( BUILDINGLAYOUTNODE ) );
Assert( curr );
curr->sGridNo = (INT16)iMapIndex;
curr->sGridNo = iMapIndex;
curr->next = gpBuildingLayoutList;
gpBuildingLayoutList = curr;
@@ -205,11 +205,11 @@ void CopyBuilding( INT32 iMapIndex )
//Allocate the basic structure, then calculate the layout. The head node is
gpBuildingLayoutList = (BUILDINGLAYOUTNODE*)MemAlloc( sizeof( BUILDINGLAYOUTNODE ) );
Assert( gpBuildingLayoutList );
gpBuildingLayoutList->sGridNo = (INT16)iMapIndex;
gpBuildingLayoutList->sGridNo = iMapIndex;
gpBuildingLayoutList->next = NULL;
//Set the anchor point for this building -- this is where the user clicked.
gsBuildingLayoutAnchorGridNo = (INT16)iMapIndex;
gsBuildingLayoutAnchorGridNo = iMapIndex;
//Now, recursively expand out while adding unique gridnos to our list. The recursion will
//terminate when complete.
@@ -363,6 +363,8 @@ void MoveBuilding( INT32 iMapIndex )
return;
SortBuildingLayout( iMapIndex );
iOffset = iMapIndex - gsBuildingLayoutAnchorGridNo;
if(iOffset == 0)//dnl ch32 080909
return;
//First time, set the undo gridnos to everything effected.
curr = gpBuildingLayoutList;
while( curr )
@@ -390,6 +392,8 @@ void PasteBuilding( INT32 iMapIndex )
return;
SortBuildingLayout( iMapIndex );
iOffset = iMapIndex - gsBuildingLayoutAnchorGridNo;
if(iOffset == 0)//dnl ch32 080909
return;
curr = gpBuildingLayoutList;
//First time, set the undo gridnos to everything effected.
while( curr )
@@ -500,7 +504,7 @@ void DoorOkayCallback( GUI_BUTTON *btn, INT32 reason );
void DoorCancelCallback( GUI_BUTTON *btn, INT32 reason );
void DoorToggleLockedCallback( GUI_BUTTON *btn, INT32 reason );
extern BOOLEAN OpenableAtGridNo( UINT32 iMapIndex );
extern BOOLEAN OpenableAtGridNo( INT32 iMapIndex );
void InitDoorEditing( INT32 iMapIndex )
{
@@ -558,7 +562,7 @@ void ExtractAndUpdateDoorInfo()
memset( &door, 0, sizeof( DOOR ) );
door.sGridNo = (INT16)iDoorMapIndex;
door.sGridNo = iDoorMapIndex;
num = min( GetNumericStrictValueFromField( 0 ), NUM_LOCKS-1 );
door.ubLockID = (UINT8)num;