mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- this patch allow proper loading map versions of 5.0, 5.25 and 6.0. existing mods friendly.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@447 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -23,11 +23,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Don't mess with this value, unless you want to force update all maps in the game!
|
//Don't mess with this value, unless you want to force update all maps in the game!
|
||||||
#ifdef RUSSIAN
|
// Lesh: fix the sad situation with the different major map versions
|
||||||
|
//#ifdef RUSSIAN
|
||||||
#define MAJOR_MAP_VERSION 6.00
|
#define MAJOR_MAP_VERSION 6.00
|
||||||
#else
|
//#else
|
||||||
#define MAJOR_MAP_VERSION 5.00
|
// #define MAJOR_MAP_VERSION 5.00
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
FLOAT gdMajorMapVersion = MAJOR_MAP_VERSION;
|
FLOAT gdMajorMapVersion = MAJOR_MAP_VERSION;
|
||||||
|
|
||||||
@@ -36,7 +37,8 @@ BOOLEAN gfWorldLoaded;
|
|||||||
MAPCREATE_STRUCT gMapInformation;
|
MAPCREATE_STRUCT gMapInformation;
|
||||||
|
|
||||||
//Current minor map version updater.
|
//Current minor map version updater.
|
||||||
#define MINOR_MAP_VERSION 25
|
// Lesh: increased. was 25
|
||||||
|
#define MINOR_MAP_VERSION 27
|
||||||
UINT8 gubMinorMapVersion = MINOR_MAP_VERSION;
|
UINT8 gubMinorMapVersion = MINOR_MAP_VERSION;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -2697,12 +2697,13 @@ BOOLEAN LoadWorld( UINT8 * puiFilename )
|
|||||||
// Read JA2 Version ID
|
// Read JA2 Version ID
|
||||||
LOADDATA( &dMajorMapVersion, pBuffer, sizeof( FLOAT ) );
|
LOADDATA( &dMajorMapVersion, pBuffer, sizeof( FLOAT ) );
|
||||||
|
|
||||||
#ifdef RUSSIAN
|
// Lesh: disable this because now we accept any version map
|
||||||
if( dMajorMapVersion != 6.00 )
|
//#ifdef RUSSIAN
|
||||||
{
|
// if( dMajorMapVersion != 6.00 )
|
||||||
return FALSE;
|
// {
|
||||||
}
|
// return FALSE;
|
||||||
#endif
|
// }
|
||||||
|
//#endif
|
||||||
|
|
||||||
LOADDATA( &ubMinorMapVersion, pBuffer, sizeof( UINT8 ) );
|
LOADDATA( &ubMinorMapVersion, pBuffer, sizeof( UINT8 ) );
|
||||||
|
|
||||||
@@ -2981,12 +2982,12 @@ BOOLEAN LoadWorld( UINT8 * puiFilename )
|
|||||||
fp += offset;
|
fp += offset;
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
#ifdef RUSSIAN
|
// Lesh: read additional bytes for map major version 6.00
|
||||||
|
if( dMajorMapVersion == 6.00 )
|
||||||
{
|
{
|
||||||
UINT32 uiNums[37];
|
UINT32 uiNums[37];
|
||||||
LOADDATA( uiNums, pBuffer, 37 * sizeof( INT32 ) );
|
LOADDATA( uiNums, pBuffer, 37 * sizeof( INT32 ) );
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
SetRelativeStartAndEndPercentage( 0, 58, 59, L"Loading room information..." );
|
SetRelativeStartAndEndPercentage( 0, 58, 59, L"Loading room information..." );
|
||||||
RenderProgressBar( 0, 100 );
|
RenderProgressBar( 0, 100 );
|
||||||
|
|||||||
Reference in New Issue
Block a user