Changeset - r17769:40a7de7cde1c
[Not reviewed]
master
0 7 0
terkhen - 13 years ago 2011-06-12 20:40:21
terkhen@openttd.org
(svn r22564) -Codechange: Rename Get and Store persistent storage functions to GetValue and StoreValue.
7 files changed with 15 insertions and 15 deletions:
0 comments (0 inline, 0 general)
src/newgrf_airport.cpp
Show inline comments
 
@@ -149,7 +149,7 @@ uint32 AirportGetVariable(const Resolver
 

	
 
	switch (variable) {
 
		/* Get a variable from the persistent storage */
 
		case 0x7C: return st->airport.psa.Get(parameter);
 
		case 0x7C: return st->airport.psa.GetValue(parameter);
 

	
 
		case 0xF0: return st->facilities;
 
		case 0xFA: return Clamp(st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535);
 
@@ -194,7 +194,7 @@ void AirportStorePSA(ResolverObject *obj
 
{
 
	Station *st = object->u.airport.st;
 
	if (object->scope != VSG_SCOPE_SELF || st == NULL) return;
 
	st->airport.psa.Store(pos, value);
 
	st->airport.psa.StoreValue(pos, value);
 
}
 

	
 
static void NewAirportResolver(ResolverObject *res, TileIndex tile, Station *st, byte airport_id, byte layout)
src/newgrf_industries.cpp
Show inline comments
 
@@ -283,7 +283,7 @@ uint32 IndustryGetVariable(const Resolve
 
		}
 

	
 
		/* Get a variable from the persistent storage */
 
		case 0x7C: return industry->psa.Get(parameter);
 
		case 0x7C: return industry->psa.GetValue(parameter);
 

	
 
		/* Industry structure access*/
 
		case 0x80: return industry->location.tile;
 
@@ -386,7 +386,7 @@ void IndustryStorePSA(ResolverObject *ob
 
{
 
	Industry *ind = object->u.industry.ind;
 
	if (object->scope != VSG_SCOPE_SELF || ind->index == INVALID_INDUSTRY) return;
 
	ind->psa.Store(pos, value);
 
	ind->psa.StoreValue(pos, value);
 
}
 

	
 
static void NewIndustryResolver(ResolverObject *res, TileIndex tile, Industry *indus, IndustryType type)
src/newgrf_industrytiles.cpp
Show inline comments
 
@@ -158,7 +158,7 @@ void IndustryTileStorePSA(ResolverObject
 
{
 
	Industry *ind = object->u.industry.ind;
 
	if (object->scope != VSG_SCOPE_PARENT || ind->index == INVALID_INDUSTRY) return;
 
	ind->psa.Store(pos, value);
 
	ind->psa.StoreValue(pos, value);
 
}
 

	
 
static void NewIndustryTileResolver(ResolverObject *res, IndustryGfx gfx, TileIndex tile, Industry *indus)
src/newgrf_spritegroup.cpp
Show inline comments
 
@@ -53,7 +53,7 @@ static inline uint32 GetVariable(const R
 

	
 
		case 0x5F: return (object->GetRandomBits(object) << 8) | object->GetTriggers(object);
 

	
 
		case 0x7D: return _temp_store.Get(parameter);
 
		case 0x7D: return _temp_store.GetValue(parameter);
 

	
 
		case 0x7F:
 
			if (object == NULL || object->grffile == NULL) return 0;
 
@@ -111,7 +111,7 @@ static U EvalAdjustT(const Deterministic
 
		case DSGA_OP_AND:  return last_value & value;
 
		case DSGA_OP_OR:   return last_value | value;
 
		case DSGA_OP_XOR:  return last_value ^ value;
 
		case DSGA_OP_STO:  _temp_store.Store((U)value, (S)last_value); return last_value;
 
		case DSGA_OP_STO:  _temp_store.StoreValue((U)value, (S)last_value); return last_value;
 
		case DSGA_OP_RST:  return value;
 
		case DSGA_OP_STOP: if (object->StorePSA != NULL) object->StorePSA(object, (U)value, (S)last_value); return last_value;
 
		case DSGA_OP_ROR:  return RotateRight(last_value, value);
src/newgrf_spritegroup.h
Show inline comments
 
@@ -32,7 +32,7 @@
 
static inline uint32 GetRegister(uint i)
 
{
 
	extern TemporaryStorageArray<int32, 0x110> _temp_store;
 
	return _temp_store.Get(i);
 
	return _temp_store.GetValue(i);
 
}
 

	
 
/**
 
@@ -43,7 +43,7 @@ static inline uint32 GetRegister(uint i)
 
static inline void ClearRegister(uint i)
 
{
 
	extern TemporaryStorageArray<int32, 0x110> _temp_store;
 
	_temp_store.Store(i, 0);
 
	_temp_store.StoreValue(i, 0);
 
}
 

	
 
/* List of different sprite group types */
src/newgrf_storage.h
Show inline comments
 
@@ -36,7 +36,7 @@ struct BaseStorageArray
 
	 * @param pos   the position to write at
 
	 * @param value the value to write
 
	 */
 
	virtual void Store(uint pos, int32 value) = 0;
 
	virtual void StoreValue(uint pos, int32 value) = 0;
 
};
 

	
 
/**
 
@@ -75,7 +75,7 @@ struct PersistentStorageArray : BaseStor
 
	 * @param pos   the position to write at
 
	 * @param value the value to write
 
	 */
 
	void Store(uint pos, int32 value)
 
	void StoreValue(uint pos, int32 value)
 
	{
 
		/* Out of the scope of the array */
 
		if (pos >= SIZE) return;
 
@@ -102,7 +102,7 @@ struct PersistentStorageArray : BaseStor
 
	 * @param pos the position to get the data from
 
	 * @return the data from that position
 
	 */
 
	TYPE Get(uint pos) const
 
	TYPE GetValue(uint pos) const
 
	{
 
		/* Out of the scope of the array */
 
		if (pos >= SIZE) return 0;
 
@@ -147,7 +147,7 @@ struct TemporaryStorageArray : BaseStora
 
	 * @param pos   the position to write at
 
	 * @param value the value to write
 
	 */
 
	void Store(uint pos, int32 value)
 
	void StoreValue(uint pos, int32 value)
 
	{
 
		/* Out of the scope of the array */
 
		if (pos >= SIZE) return;
 
@@ -161,7 +161,7 @@ struct TemporaryStorageArray : BaseStora
 
	 * @param pos the position to get the data from
 
	 * @return the data from that position
 
	 */
 
	TYPE Get(uint pos) const
 
	TYPE GetValue(uint pos) const
 
	{
 
		/* Out of the scope of the array */
 
		if (pos >= SIZE) return 0;
src/newgrf_text.cpp
Show inline comments
 
@@ -967,7 +967,7 @@ void PrepareTextRefStackUsage(byte numEn
 
	byte *p = _newgrf_textrefstack->stack;
 
	for (uint i = 0; i < numEntries; i++) {
 
		for (uint j = 0; j < 32; j += 8) {
 
			*p = GB(_temp_store.Get(0x100 + i), j, 8);
 
			*p = GB(_temp_store.GetValue(0x100 + i), j, 8);
 
			p++;
 
		}
 
	}
0 comments (0 inline, 0 general)