mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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
|
||||
|
||||
//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
|
||||
#else
|
||||
#define MAJOR_MAP_VERSION 5.00
|
||||
#endif
|
||||
//#else
|
||||
// #define MAJOR_MAP_VERSION 5.00
|
||||
//#endif
|
||||
|
||||
FLOAT gdMajorMapVersion = MAJOR_MAP_VERSION;
|
||||
|
||||
@@ -36,7 +37,8 @@ BOOLEAN gfWorldLoaded;
|
||||
MAPCREATE_STRUCT gMapInformation;
|
||||
|
||||
//Current minor map version updater.
|
||||
#define MINOR_MAP_VERSION 25
|
||||
// Lesh: increased. was 25
|
||||
#define MINOR_MAP_VERSION 27
|
||||
UINT8 gubMinorMapVersion = MINOR_MAP_VERSION;
|
||||
|
||||
/*
|
||||
|
||||
@@ -2697,12 +2697,13 @@ BOOLEAN LoadWorld( UINT8 * puiFilename )
|
||||
// Read JA2 Version ID
|
||||
LOADDATA( &dMajorMapVersion, pBuffer, sizeof( FLOAT ) );
|
||||
|
||||
#ifdef RUSSIAN
|
||||
if( dMajorMapVersion != 6.00 )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
// Lesh: disable this because now we accept any version map
|
||||
//#ifdef RUSSIAN
|
||||
// if( dMajorMapVersion != 6.00 )
|
||||
// {
|
||||
// return FALSE;
|
||||
// }
|
||||
//#endif
|
||||
|
||||
LOADDATA( &ubMinorMapVersion, pBuffer, sizeof( UINT8 ) );
|
||||
|
||||
@@ -2981,12 +2982,12 @@ BOOLEAN LoadWorld( UINT8 * puiFilename )
|
||||
fp += offset;
|
||||
offset = 0;
|
||||
|
||||
#ifdef RUSSIAN
|
||||
// Lesh: read additional bytes for map major version 6.00
|
||||
if( dMajorMapVersion == 6.00 )
|
||||
{
|
||||
UINT32 uiNums[37];
|
||||
LOADDATA( uiNums, pBuffer, 37 * sizeof( INT32 ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
SetRelativeStartAndEndPercentage( 0, 58, 59, L"Loading room information..." );
|
||||
RenderProgressBar( 0, 100 );
|
||||
|
||||
Reference in New Issue
Block a user