Brief: //dnl ch81

- Fix several problems with summary windows and improve map loading to any map for mapeditor.
Details:
- Add option from CTRL+L list box to load any map from any listed profiles.
- Fix incorrect loading of items option in summary window for non vanilla maps.
- Fix improper popup of radio boxes for when items is selected in summary window and summary file or map not exist.
- Summary items information is now show for non sector custom map files too.
- Fix glitches when switching from overhead map to sector summary windows.
- Fix improper opening of exit screen text box during exit from overhead map.
- Change size to fixed macro of all temporary buffers for map filename.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6687 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Kriplo
2013-12-06 21:14:09 +00:00
parent d3e92041ce
commit 37bd981181
8 changed files with 275 additions and 36 deletions
+22 -4
View File
@@ -1829,7 +1829,7 @@ BOOLEAN SaveWorld(const STR8 puiFilename, FLOAT dMajorMapVersion, UINT8 ubMinorM
UINT8 ubType;
UINT8 ubTypeSubIndex;
UINT8 ubTest = 1;
CHAR8 aFilename[ 255 ];
CHAR8 aFilename[2*FILENAME_BUFLEN];//dnl ch81 021213
UINT8 ubCombine;
// UINT8 bCounts[ WORLD_MAX ][8];
UINT8** bCounts = NULL;
@@ -2443,7 +2443,7 @@ BOOLEAN EvaluateWorld(STR8 pSector, UINT8 ubLevel)
UINT32 uiFlags, uiFileSize, uiBytesRead;
INT32 i, cnt, iTilesetID;
CHAR16 str[2*FILENAME_BUFLEN];
CHAR8 szDirFilename[2*FILENAME_BUFLEN], szFilename[FILENAME_BUFLEN];
CHAR8 szDirFilename[2*FILENAME_BUFLEN], szFilename[2*FILENAME_BUFLEN];//dnl ch81 021213
UINT8 ubCombine, ubMinorMapVersion;
UINT8 (*bCounts)[8] = NULL;
// Make sure the file exists... if not, then return false
@@ -2453,12 +2453,19 @@ BOOLEAN EvaluateWorld(STR8 pSector, UINT8 ubLevel)
if(ubLevel >= 4)
strcat(szFilename, "_a");
strcat(szFilename, ".dat");
CHAR16 szFileName[40];
CHAR16 szFileName[FILENAME_BUFLEN];//dnl ch81 021213
swprintf(szFileName, L"%S", pSector);
if(ValidMapFileName(szFileName))
strcpy(szFilename, pSector);
sprintf(szDirFilename, "MAPS\\%s", szFilename);
#ifdef USE_VFS//dnl ch81 021213
if(guiCurrentScreen == LOADSAVE_SCREEN)
hfile = FileOpen(szDirFilename, FILE_ACCESS_READ, FALSE, gzProfileName);
else
hfile = FileOpen(szDirFilename, FILE_ACCESS_READ);
#else
hfile = FileOpen(szDirFilename, FILE_ACCESS_READ, FALSE);
#endif
if(!hfile)
return(FALSE);
uiFileSize = FileGetSize(hfile);
@@ -2844,7 +2851,7 @@ BOOLEAN LoadWorld(const STR8 puiFilename, FLOAT* pMajorMapVersion, UINT8* pMinor
UINT16 usTypeSubIndex;
UINT8 ubType;
UINT8 ubSubIndex;
CHAR8 aFilename[50];
CHAR8 aFilename[2*FILENAME_BUFLEN];//dnl ch81 021213
UINT8 ubCombine;
UINT8 (*bCounts)[8] = NULL;
INT8 *pBuffer;
@@ -2865,7 +2872,18 @@ BOOLEAN LoadWorld(const STR8 puiFilename, FLOAT* pMajorMapVersion, UINT8* pMinor
else
sprintf(aFilename, "MAPS\\%s", puiFilename);
// Open file
#ifdef USE_VFS//dnl ch81 021213
#ifdef JA2EDITOR
if(guiCurrentScreen == LOADSAVE_SCREEN)
hfile = FileOpen(aFilename, FILE_ACCESS_READ, FALSE, gzProfileName);
else
hfile = FileOpen(aFilename, FILE_ACCESS_READ);
#else
hfile = FileOpen(aFilename, FILE_ACCESS_READ);
#endif
#else
hfile = FileOpen(aFilename, FILE_ACCESS_READ, FALSE);
#endif
if(!hfile)
{
#ifndef JA2EDITOR