summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-06-12 20:40:21 +0000
committerterkhen <terkhen@openttd.org>2011-06-12 20:40:21 +0000
commit0749c65d74e7368643e3c4f4f70768993e8b7f41 (patch)
tree70a2f6ff9ab5982b1366cc77c75afe4cf6c08a3a /src
parentdc6218aa49101b3c0e20bd7e3da7ed05b7883b78 (diff)
downloadopenttd-0749c65d74e7368643e3c4f4f70768993e8b7f41.tar.xz
(svn r22564) -Codechange: Rename Get and Store persistent storage functions to GetValue and StoreValue.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_airport.cpp4
-rw-r--r--src/newgrf_industries.cpp4
-rw-r--r--src/newgrf_industrytiles.cpp2
-rw-r--r--src/newgrf_spritegroup.cpp4
-rw-r--r--src/newgrf_spritegroup.h4
-rw-r--r--src/newgrf_storage.h10
-rw-r--r--src/newgrf_text.cpp2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp
index 6a893180d..03fa9567d 100644
--- a/src/newgrf_airport.cpp
+++ b/src/newgrf_airport.cpp
@@ -149,7 +149,7 @@ uint32 AirportGetVariable(const ResolverObject *object, byte variable, byte para
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 *object, uint pos, int32 value)
{
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)
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index 22c20495f..d2a56f8ac 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -283,7 +283,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
}
/* 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 *object, uint pos, int32 value)
{
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)
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index c69c3b8cb..0da052f2b 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -158,7 +158,7 @@ void IndustryTileStorePSA(ResolverObject *object, uint pos, int32 value)
{
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)
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp
index 1750dc389..a327a3be1 100644
--- a/src/newgrf_spritegroup.cpp
+++ b/src/newgrf_spritegroup.cpp
@@ -53,7 +53,7 @@ static inline uint32 GetVariable(const ResolverObject *object, byte variable, by
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 DeterministicSpriteGroupAdjust *adjust, ResolverObjec
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);
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h
index 528d18bfc..6cc801a74 100644
--- a/src/newgrf_spritegroup.h
+++ b/src/newgrf_spritegroup.h
@@ -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 */
diff --git a/src/newgrf_storage.h b/src/newgrf_storage.h
index a7f5788c4..dc8f86799 100644
--- a/src/newgrf_storage.h
+++ b/src/newgrf_storage.h
@@ -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 : BaseStorageArray {
* @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 : BaseStorageArray {
* @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 : BaseStorageArray {
* @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 : BaseStorageArray {
* @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;
diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp
index 1aa1af455..6213b419e 100644
--- a/src/newgrf_text.cpp
+++ b/src/newgrf_text.cpp
@@ -967,7 +967,7 @@ void PrepareTextRefStackUsage(byte numEntries)
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++;
}
}