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

* Merged Source Code from Development Trunk: Revision 4063 *
************************************************************
- Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- This will be the Source for the Beta 2011 Test

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-01-18 09:11:09 +00:00
parent 44e1646410
commit 91087ca8c0
469 changed files with 118108 additions and 24678 deletions
+18 -10
View File
@@ -39,10 +39,11 @@
#include "Soldier Create.h"
#include "GameVersion.h"
#include "Campaign Types.h"
#include "GameSettings.h"
#endif
#include "VFS/vfs.h"
#include "VFS/vfs_file_raii.h"
#include <vfs/Core/vfs.h>
#include <vfs/Core/vfs_file_raii.h>
extern BOOLEAN gfOverheadMapDirty;
@@ -416,9 +417,10 @@ void CreateSummaryWindow()
if( gfAutoLoadA9 )
{
gfAutoLoadA9++;
gsSelSectorX = 9;
gsSelSectorY = 1;
gpCurrentSectorSummary = gpSectorSummary[ 8 ][ 0 ][ 0 ];
gsSelSectorX = gGameExternalOptions.ubDefaultArrivalSectorX;//9;
gsSelSectorY = gGameExternalOptions.ubDefaultArrivalSectorY;//1;
//gpCurrentSectorSummary = gpSectorSummary[ 8 ][ 0 ][ 0 ];
gpCurrentSectorSummary = gpSectorSummary[ gGameExternalOptions.ubDefaultArrivalSectorX - 1 ][ gGameExternalOptions.ubDefaultArrivalSectorY - 1 ][ 0 ];
ButtonList[ iSummaryButton[ SUMMARY_LOAD ] ]->uiFlags |= BUTTON_CLICKED_ON;
}
}
@@ -761,6 +763,7 @@ void RenderItemDetails()
pItem = &gpWorldItemsSummaryArray[ i ].object;
uiExistChance += (100 - gpWorldItemsSummaryArray[ i ].ubNonExistChance) * pItem->ubNumberOfObjects;
uiStatus += (*pItem)[0]->data.objectStatus;
uiQuantity += pItem->ubNumberOfObjects;
}
}
}
@@ -1965,7 +1968,7 @@ void CreateGlobalSummary()
vfs::COpenWriteFile wfile(L"DevInfo\\readme.txt",true,true);
std::string str = "This information is used in conjunction with the editor.\n";
str += "This directory or it's contents shouldn't be included with final release.\n";
TRYCATCH_RETHROW( wfile.file().write(str.c_str(), str.length()), L"" );
SGP_TRYCATCH_RETHROW( wfile->write(str.c_str(), str.length()), L"" );
#endif
// Snap: Restore the data directory once we are finished.
@@ -2155,6 +2158,8 @@ void SummaryLoadMapCallback( GUI_BUTTON *btn, INT32 reason )
SetFontForeground( FONT_LTKHAKI );
SetFontShadow( FONT_NEARBLACK );
fNewMapSaved = TRUE;
//swprintf( str, L"Loading map: %s...", gszDisplayName );
//mprintf( MAP_LEFT, MAP_BOTTOM+100, str );
//InvalidateRegion( MAP_LEFT, MAP_BOTTOM+100, MAP_LEFT+150, MAP_BOTTOM+110 );
@@ -2640,11 +2645,11 @@ void GenerateSummaryList()
vfs::COpenWriteFile wfile(L"DevInfo/readme.txt",true,true);
std::string str = "This information is used in conjunction with the editor.\n";
str += "This directory or it's contents shouldn't be included with final release.\n";
TRYCATCH_RETHROW( wfile.file().write(str.c_str(), str.length()), L"");
SGP_TRYCATCH_RETHROW( wfile->write(str.c_str(), str.length()), L"");
}
catch(CBasicException &ex)
catch(std::exception &ex)
{
RETHROWEXCEPTION(L"Could not create readme.txt",&ex);
SGP_RETHROW(L"Could not create readme.txt", ex);
}
#endif
}
@@ -3220,6 +3225,9 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
OBJECTTYPE *pItem;
UINT16 usPEnemyIndex, usNEnemyIndex;
SUMMARYFILE *s = gpCurrentSectorSummary;
MAPCREATE_STRUCT *m = &gpCurrentSectorSummary->MapInfo;
//Clear memory for all the item summaries loaded
if( gpWorldItemsSummaryArray )
{
@@ -3291,7 +3299,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
gusWorldItemsSummaryArraySize = gpCurrentSectorSummary->usNumItems;
for (unsigned int x = 0; x < uiNumItems; ++x)
{
gpWorldItemsSummaryArray[x].Load(hfile);
gpWorldItemsSummaryArray[x].Load(hfile, s->dMajorMapVersion, m->ubMapVersion);
}
//NOW, do the enemy's items!