Changeset - r10935:662e8d56289a
[Not reviewed]
master
0 3 0
smatz - 16 years ago 2009-01-25 22:50:00
smatz@openttd.org
(svn r15274) -Fix (r8705): oldloader wasn't updated to use 64bit airport_flags
3 files changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/saveload/oldloader.cpp
Show inline comments
 
@@ -160,12 +160,13 @@ bool LoadChunk(LoadgameState *ls, void *
 
					case OC_VAR_U8: *(uint8 *)ptr = GB(res, 0, 8); break;
 
					case OC_VAR_I16:*(int16 *)ptr = GB(res, 0, 16); break;
 
					case OC_VAR_U16:*(uint16*)ptr = GB(res, 0, 16); break;
 
					case OC_VAR_I32:*(int32 *)ptr = res; break;
 
					case OC_VAR_U32:*(uint32*)ptr = res; break;
 
					case OC_VAR_I64:*(int64 *)ptr = res; break;
 
					case OC_VAR_U64:*(uint64*)ptr = res; break;
 
					default: NOT_REACHED();
 
				}
 

	
 
				/* Increase pointer base for arrays when looping */
 
				if (chunk->amount > 1 && chunk->ptr != NULL) ptr += CalcOldVarLen(chunk->type);
 
			}
src/saveload/oldloader.h
Show inline comments
 
@@ -44,12 +44,13 @@ enum OldChunkType {
 
	OC_VAR_U8    = 2 << 8,
 
	OC_VAR_I16   = 3 << 8,
 
	OC_VAR_U16   = 4 << 8,
 
	OC_VAR_I32   = 5 << 8,
 
	OC_VAR_U32   = 6 << 8,
 
	OC_VAR_I64   = 7 << 8,
 
	OC_VAR_U64   = 8 << 8,
 
	/* 8 bits allocated (256 max) */
 

	
 
	OC_FILE_I8   = 1 << 16,
 
	OC_FILE_U8   = 2 << 16,
 
	OC_FILE_I16  = 3 << 16,
 
	OC_FILE_U16  = 4 << 16,
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -774,16 +774,16 @@ static const OldChunks station_chunk[] =
 
	OCL_SVAR(  OC_UINT8, Station, time_since_load ),
 
	OCL_SVAR(  OC_UINT8, Station, time_since_unload ),
 
	OCL_SVAR(  OC_UINT8, Station, delete_ctr ),
 
	OCL_SVAR(  OC_UINT8, Station, owner ),
 
	OCL_SVAR(  OC_UINT8, Station, facilities ),
 
	OCL_SVAR( OC_TTD | OC_UINT8, Station, airport_type ),
 
	OCL_SVAR( OC_TTO | OC_FILE_U16 | OC_VAR_U32, Station, airport_flags ),
 
	OCL_SVAR( OC_TTO | OC_FILE_U16 | OC_VAR_U64, Station, airport_flags ),
 
	OCL_NULL( 3 ),          ///< bus/truck status, blocked months, no longer in use
 
	OCL_CNULL( OC_TTD, 1 ), ///< unknown
 
	OCL_SVAR( OC_TTD | OC_FILE_U16 | OC_VAR_U32, Station, airport_flags ),
 
	OCL_SVAR( OC_TTD | OC_FILE_U16 | OC_VAR_U64, Station, airport_flags ),
 
	OCL_CNULL( OC_TTD, 2 ), ///< last_vehicle. now last_vehicle_type
 
	OCL_CNULL( OC_TTD, 4 ), ///< junk at end of chunk
 

	
 
	OCL_END()
 
};
 

	
0 comments (0 inline, 0 general)