JANITORIAL: Fix template definition whitespace
This commit is contained in:
parent
0deea6fbf8
commit
edc5249772
20 changed files with 48 additions and 48 deletions
|
@ -211,7 +211,7 @@ static const Common::KeyCode jkeymap[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// floating point. use sparingly
|
// floating point. use sparingly
|
||||||
template <class T>
|
template<class T>
|
||||||
static inline T scalef(T in, float numerator, float denominator) {
|
static inline T scalef(T in, float numerator, float denominator) {
|
||||||
return static_cast<float>(in) * numerator / denominator;
|
return static_cast<float>(in) * numerator / denominator;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ static inline GLfixed xdiv(int numerator, int denominator) {
|
||||||
return (numerator << 16) / denominator;
|
return (numerator << 16) / denominator;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template<class T>
|
||||||
static T nextHigher2(T k) {
|
static T nextHigher2(T k) {
|
||||||
if (k == 0)
|
if (k == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -60,14 +60,14 @@ struct IgnoreCase_Hash {
|
||||||
// case insensitve hashing, then only because one wants to use
|
// case insensitve hashing, then only because one wants to use
|
||||||
// IgnoreCase_EqualTo, and then one has to specify a custom
|
// IgnoreCase_EqualTo, and then one has to specify a custom
|
||||||
// hash anyway.
|
// hash anyway.
|
||||||
template <>
|
template<>
|
||||||
struct Hash<String> {
|
struct Hash<String> {
|
||||||
uint operator()(const String& s) const {
|
uint operator()(const String& s) const {
|
||||||
return hashit(s.c_str());
|
return hashit(s.c_str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
struct Hash<const char *> {
|
struct Hash<const char *> {
|
||||||
uint operator()(const char *s) const {
|
uint operator()(const char *s) const {
|
||||||
return hashit(s);
|
return hashit(s);
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace ListInternal {
|
||||||
NodeBase *_next;
|
NodeBase *_next;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template<typename T>
|
||||||
struct Node : public NodeBase {
|
struct Node : public NodeBase {
|
||||||
T _data;
|
T _data;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace Common {
|
||||||
|
|
||||||
|
|
||||||
#define SYNC_AS(SUFFIX,TYPE,SIZE) \
|
#define SYNC_AS(SUFFIX,TYPE,SIZE) \
|
||||||
template <typename T> \
|
template<typename T> \
|
||||||
void syncAs ## SUFFIX(T &val, Version minVersion = 0, Version maxVersion = kLastVersion) { \
|
void syncAs ## SUFFIX(T &val, Version minVersion = 0, Version maxVersion = kLastVersion) { \
|
||||||
if (_version < minVersion || _version > maxVersion) \
|
if (_version < minVersion || _version > maxVersion) \
|
||||||
return; \
|
return; \
|
||||||
|
|
|
@ -43,7 +43,7 @@ private:
|
||||||
* singleton class might be pure virtual (or "abstract" in Java terminology),
|
* singleton class might be pure virtual (or "abstract" in Java terminology),
|
||||||
* and you specialise makeInstance to return an instance of a subclass.
|
* and you specialise makeInstance to return an instance of a subclass.
|
||||||
*/
|
*/
|
||||||
//template <class T>
|
//template<class T>
|
||||||
#if defined (_WIN32_WCE) || defined (_MSC_VER) || defined (__WINS__)
|
#if defined (_WIN32_WCE) || defined (_MSC_VER) || defined (__WINS__)
|
||||||
//FIXME evc4 and msvc7 doesn't like it as private member
|
//FIXME evc4 and msvc7 doesn't like it as private member
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -117,7 +117,7 @@ protected:
|
||||||
void restoreSeq(object_t *obj);
|
void restoreSeq(object_t *obj);
|
||||||
|
|
||||||
inline bool checkBoundary(int16 x, int16 y);
|
inline bool checkBoundary(int16 x, int16 y);
|
||||||
template <typename T>
|
template<typename T>
|
||||||
inline int sign(T a) { if ( a < 0) return -1; else return 1; }
|
inline int sign(T a) { if ( a < 0) return -1; else return 1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2181,7 +2181,7 @@ void Screen::decodeFrameDelta(uint8 *dst, const uint8 *src, bool noXor) {
|
||||||
wrapped_decodeFrameDelta<false>(dst, src);
|
wrapped_decodeFrameDelta<false>(dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <bool noXor>
|
template<bool noXor>
|
||||||
void Screen::wrapped_decodeFrameDelta(uint8 *dst, const uint8 *src) {
|
void Screen::wrapped_decodeFrameDelta(uint8 *dst, const uint8 *src) {
|
||||||
while (1) {
|
while (1) {
|
||||||
uint8 code = *src++;
|
uint8 code = *src++;
|
||||||
|
|
|
@ -219,7 +219,7 @@ protected:
|
||||||
|
|
||||||
void loadIndex(ResourceSlots *slots);
|
void loadIndex(ResourceSlots *slots);
|
||||||
|
|
||||||
template <class T>
|
template<class T>
|
||||||
T *createResource(uint32 resType, int index) {
|
T *createResource(uint32 resType, int index) {
|
||||||
ResourceSlot *slot = getResourceSlot(resType, index);
|
ResourceSlot *slot = getResourceSlot(resType, index);
|
||||||
if (!slot)
|
if (!slot)
|
||||||
|
|
|
@ -71,7 +71,7 @@ typedef Common::Array<const ProgramOpcode*> ProgramOpcodeSet;
|
||||||
#define DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(op) void instOp_##op(ProgramContext &)
|
#define DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(op) void instOp_##op(ProgramContext &)
|
||||||
|
|
||||||
|
|
||||||
template <class OpcodeSet>
|
template<class OpcodeSet>
|
||||||
class Exec {
|
class Exec {
|
||||||
protected:
|
protected:
|
||||||
OpcodeSet _opcodes;
|
OpcodeSet _opcodes;
|
||||||
|
|
|
@ -795,7 +795,7 @@ bool Location::keepAnimation_br(AnimationPtr a) {
|
||||||
return keepZone_br(a);
|
return keepZone_br(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template<class T>
|
||||||
void Location::freeList(Common::List<T> &list, bool removeAll, Common::MemFunc1<bool, T, Location> filter) {
|
void Location::freeList(Common::List<T> &list, bool removeAll, Common::MemFunc1<bool, T, Location> filter) {
|
||||||
typedef typename Common::List<T>::iterator iterator;
|
typedef typename Common::List<T>::iterator iterator;
|
||||||
iterator it = list.begin();
|
iterator it = list.begin();
|
||||||
|
|
|
@ -178,7 +178,7 @@ protected:
|
||||||
bool keepAnimation_ns(AnimationPtr a);
|
bool keepAnimation_ns(AnimationPtr a);
|
||||||
bool keepAnimation_br(AnimationPtr a);
|
bool keepAnimation_br(AnimationPtr a);
|
||||||
|
|
||||||
template <class T>
|
template<class T>
|
||||||
void freeList(Common::List<T> &list, bool removeAll, Common::MemFunc1<bool, T, Location> filter);
|
void freeList(Common::List<T> &list, bool removeAll, Common::MemFunc1<bool, T, Location> filter);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -66,7 +66,7 @@ void syncWithSerializer(Common::Serializer &s, T &obj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// By default, sync using syncWithSerializer, which in turn can easily be overloaded.
|
// By default, sync using syncWithSerializer, which in turn can easily be overloaded.
|
||||||
template <typename T>
|
template<typename T>
|
||||||
struct DefaultSyncer : Common::BinaryFunction<Common::Serializer, T, void> {
|
struct DefaultSyncer : Common::BinaryFunction<Common::Serializer, T, void> {
|
||||||
void operator()(Common::Serializer &s, T &obj) const {
|
void operator()(Common::Serializer &s, T &obj) const {
|
||||||
//obj.saveLoadWithSerializer(s);
|
//obj.saveLoadWithSerializer(s);
|
||||||
|
@ -87,7 +87,7 @@ struct DefaultSyncer : Common::BinaryFunction<Common::Serializer, T, void> {
|
||||||
*
|
*
|
||||||
* TODO: Add something like this for lists, queues....
|
* TODO: Add something like this for lists, queues....
|
||||||
*/
|
*/
|
||||||
template <typename T, class Syncer = DefaultSyncer<T> >
|
template<typename T, class Syncer = DefaultSyncer<T> >
|
||||||
struct ArraySyncer : Common::BinaryFunction<Common::Serializer, T, void> {
|
struct ArraySyncer : Common::BinaryFunction<Common::Serializer, T, void> {
|
||||||
void operator()(Common::Serializer &s, Common::Array<T> &arr) const {
|
void operator()(Common::Serializer &s, Common::Array<T> &arr) const {
|
||||||
uint len = arr.size();
|
uint len = arr.size();
|
||||||
|
@ -113,13 +113,13 @@ void syncArray(Common::Serializer &s, Common::Array<T> &arr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, reg_t &obj) {
|
void syncWithSerializer(Common::Serializer &s, reg_t &obj) {
|
||||||
s.syncAsUint16LE(obj.segment);
|
s.syncAsUint16LE(obj.segment);
|
||||||
s.syncAsUint16LE(obj.offset);
|
s.syncAsUint16LE(obj.offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, synonym_t &obj) {
|
void syncWithSerializer(Common::Serializer &s, synonym_t &obj) {
|
||||||
s.syncAsUint16LE(obj.replaceant);
|
s.syncAsUint16LE(obj.replaceant);
|
||||||
s.syncAsUint16LE(obj.replacement);
|
s.syncAsUint16LE(obj.replacement);
|
||||||
|
@ -247,7 +247,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, Class &obj) {
|
void syncWithSerializer(Common::Serializer &s, Class &obj) {
|
||||||
s.syncAsSint32LE(obj.script);
|
s.syncAsSint32LE(obj.script);
|
||||||
syncWithSerializer(s, obj.reg);
|
syncWithSerializer(s, obj.reg);
|
||||||
|
@ -326,14 +326,14 @@ void Object::saveLoadWithSerializer(Common::Serializer &s) {
|
||||||
syncArray<reg_t>(s, _variables);
|
syncArray<reg_t>(s, _variables);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Clone>::Entry &obj) {
|
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Clone>::Entry &obj) {
|
||||||
s.syncAsSint32LE(obj.next_free);
|
s.syncAsSint32LE(obj.next_free);
|
||||||
|
|
||||||
syncWithSerializer<Object>(s, obj);
|
syncWithSerializer<Object>(s, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<List>::Entry &obj) {
|
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<List>::Entry &obj) {
|
||||||
s.syncAsSint32LE(obj.next_free);
|
s.syncAsSint32LE(obj.next_free);
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<List>::Entry &obj
|
||||||
syncWithSerializer(s, obj.last);
|
syncWithSerializer(s, obj.last);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Node>::Entry &obj) {
|
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Node>::Entry &obj) {
|
||||||
s.syncAsSint32LE(obj.next_free);
|
s.syncAsSint32LE(obj.next_free);
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Node>::Entry &obj
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_SCI32
|
#ifdef ENABLE_SCI32
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciArray<reg_t> >::Entry &obj) {
|
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciArray<reg_t> >::Entry &obj) {
|
||||||
s.syncAsSint32LE(obj.next_free);
|
s.syncAsSint32LE(obj.next_free);
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciArray<reg_t> >
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template<>
|
||||||
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciString>::Entry &obj) {
|
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciString>::Entry &obj) {
|
||||||
s.syncAsSint32LE(obj.next_free);
|
s.syncAsSint32LE(obj.next_free);
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciString>::Entry
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template<typename T>
|
||||||
void sync_Table(Common::Serializer &s, T &obj) {
|
void sync_Table(Common::Serializer &s, T &obj) {
|
||||||
s.syncAsSint32LE(obj.first_free);
|
s.syncAsSint32LE(obj.first_free);
|
||||||
s.syncAsSint32LE(obj.entries_used);
|
s.syncAsSint32LE(obj.entries_used);
|
||||||
|
|
|
@ -370,7 +370,7 @@ public:
|
||||||
|
|
||||||
#ifdef ENABLE_SCI32
|
#ifdef ENABLE_SCI32
|
||||||
|
|
||||||
template <typename T>
|
template<typename T>
|
||||||
class SciArray {
|
class SciArray {
|
||||||
public:
|
public:
|
||||||
SciArray() : _type(-1), _data(NULL), _size(0), _actualSize(0) { }
|
SciArray() : _type(-1), _data(NULL), _size(0), _actualSize(0) { }
|
||||||
|
|
|
@ -687,7 +687,7 @@ void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstTyp
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_RGB_COLOR
|
#ifdef USE_RGB_COLOR
|
||||||
template <int type>
|
template<int type>
|
||||||
void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *xmapPtr) {
|
void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *xmapPtr) {
|
||||||
uint16 col = READ_LE_UINT16(dataPtr);
|
uint16 col = READ_LE_UINT16(dataPtr);
|
||||||
if (type == kWizXMap) {
|
if (type == kWizXMap) {
|
||||||
|
@ -701,7 +701,7 @@ void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int type>
|
template<int type>
|
||||||
void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr) {
|
void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr) {
|
||||||
const uint8 *dataPtr, *dataPtrNext;
|
const uint8 *dataPtr, *dataPtrNext;
|
||||||
uint8 code;
|
uint8 code;
|
||||||
|
@ -804,7 +804,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const u
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <int type>
|
template<int type>
|
||||||
void Wiz::write8BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) {
|
void Wiz::write8BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) {
|
||||||
if (bitDepth == 2) {
|
if (bitDepth == 2) {
|
||||||
if (type == kWizXMap) {
|
if (type == kWizXMap) {
|
||||||
|
@ -833,7 +833,7 @@ void Wiz::write8BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int type>
|
template<int type>
|
||||||
void Wiz::decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) {
|
void Wiz::decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) {
|
||||||
const uint8 *dataPtr, *dataPtrNext;
|
const uint8 *dataPtr, *dataPtrNext;
|
||||||
uint8 code, *dstPtr, *dstPtrNext;
|
uint8 code, *dstPtr, *dstPtrNext;
|
||||||
|
@ -942,7 +942,7 @@ template void Wiz::decompressWizImage<kWizXMap>(uint8 *dst, int dstPitch, int ds
|
||||||
template void Wiz::decompressWizImage<kWizRMap>(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth);
|
template void Wiz::decompressWizImage<kWizRMap>(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth);
|
||||||
template void Wiz::decompressWizImage<kWizCopy>(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth);
|
template void Wiz::decompressWizImage<kWizCopy>(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth);
|
||||||
|
|
||||||
template <int type>
|
template<int type>
|
||||||
void Wiz::decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitDepth) {
|
void Wiz::decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitDepth) {
|
||||||
if (type == kWizRMap) {
|
if (type == kWizRMap) {
|
||||||
assert(palPtr != 0);
|
assert(palPtr != 0);
|
||||||
|
|
|
@ -507,7 +507,7 @@ void APU::Reset () {
|
||||||
Frame.Cycles = 1;
|
Frame.Cycles = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template<class T>
|
||||||
int step(T &obj, int sampcycles, uint frame_Cycles, int frame_Num) {
|
int step(T &obj, int sampcycles, uint frame_Cycles, int frame_Num) {
|
||||||
int samppos = 0;
|
int samppos = 0;
|
||||||
while (sampcycles) {
|
while (sampcycles) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void saveOrLoadPtr(Common::ReadStream &stream, int16 *&p, int16 *base) {
|
||||||
p = base + offset;
|
p = base + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, Common::Rect &r) {
|
static void saveOrLoad(S &s, Common::Rect &r) {
|
||||||
saveOrLoad(s, r.left);
|
saveOrLoad(s, r.left);
|
||||||
saveOrLoad(s, r.top);
|
saveOrLoad(s, r.top);
|
||||||
|
@ -68,13 +68,13 @@ static void saveOrLoad(S &s, Common::Rect &r) {
|
||||||
saveOrLoad(s, r.bottom);
|
saveOrLoad(s, r.bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, SequenceEntry &seq) {
|
static void saveOrLoad(S &s, SequenceEntry &seq) {
|
||||||
saveOrLoad(s, seq.sprNum);
|
saveOrLoad(s, seq.sprNum);
|
||||||
saveOrLoad(s, seq.seqNum);
|
saveOrLoad(s, seq.seqNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, KeyChar &key) {
|
static void saveOrLoad(S &s, KeyChar &key) {
|
||||||
saveOrLoad(s, key.num);
|
saveOrLoad(s, key.num);
|
||||||
saveOrLoad(s, key.flags);
|
saveOrLoad(s, key.flags);
|
||||||
|
@ -134,14 +134,14 @@ static void saveOrLoad(S &s, KeyChar &key) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, TalkEntry &entry) {
|
static void saveOrLoad(S &s, TalkEntry &entry) {
|
||||||
saveOrLoad(s, entry.otherKeyChar);
|
saveOrLoad(s, entry.otherKeyChar);
|
||||||
saveOrLoad(s, entry.talkingKeyChar);
|
saveOrLoad(s, entry.talkingKeyChar);
|
||||||
saveOrLoad(s, entry.num);
|
saveOrLoad(s, entry.num);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, ProgramHitBoxData &data) {
|
static void saveOrLoad(S &s, ProgramHitBoxData &data) {
|
||||||
saveOrLoad(s, data.item);
|
saveOrLoad(s, data.item);
|
||||||
saveOrLoad(s, data.talk);
|
saveOrLoad(s, data.talk);
|
||||||
|
@ -156,14 +156,14 @@ static void saveOrLoad(S &s, ProgramHitBoxData &data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, Area &area) {
|
static void saveOrLoad(S &s, Area &area) {
|
||||||
saveOrLoad(s, area.r);
|
saveOrLoad(s, area.r);
|
||||||
saveOrLoad(s, area.srcX);
|
saveOrLoad(s, area.srcX);
|
||||||
saveOrLoad(s, area.srcY);
|
saveOrLoad(s, area.srcY);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, ProgramBackgroundData &data) {
|
static void saveOrLoad(S &s, ProgramBackgroundData &data) {
|
||||||
saveOrLoad(s, data.area);
|
saveOrLoad(s, data.area);
|
||||||
saveOrLoad(s, data.type);
|
saveOrLoad(s, data.type);
|
||||||
|
@ -172,7 +172,7 @@ static void saveOrLoad(S &s, ProgramBackgroundData &data) {
|
||||||
saveOrLoad(s, data.scaleDiv);
|
saveOrLoad(s, data.scaleDiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, ProgramAreaData &data) {
|
static void saveOrLoad(S &s, ProgramAreaData &data) {
|
||||||
saveOrLoad(s, data.area);
|
saveOrLoad(s, data.area);
|
||||||
saveOrLoad(s, data.id);
|
saveOrLoad(s, data.id);
|
||||||
|
@ -181,7 +181,7 @@ static void saveOrLoad(S &s, ProgramAreaData &data) {
|
||||||
saveOrLoad(s, data.animNext);
|
saveOrLoad(s, data.animNext);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, ProgramWalkData &data) {
|
static void saveOrLoad(S &s, ProgramWalkData &data) {
|
||||||
saveOrLoad(s, data.point1);
|
saveOrLoad(s, data.point1);
|
||||||
saveOrLoad(s, data.point2);
|
saveOrLoad(s, data.point2);
|
||||||
|
@ -190,7 +190,7 @@ static void saveOrLoad(S &s, ProgramWalkData &data) {
|
||||||
saveOrLoad(s, data.area2);
|
saveOrLoad(s, data.area2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
static void saveOrLoad(S &s, ProgramPointData &data) {
|
static void saveOrLoad(S &s, ProgramPointData &data) {
|
||||||
saveOrLoad(s, data.x);
|
saveOrLoad(s, data.x);
|
||||||
saveOrLoad(s, data.y);
|
saveOrLoad(s, data.y);
|
||||||
|
@ -198,7 +198,7 @@ static void saveOrLoad(S &s, ProgramPointData &data) {
|
||||||
saveOrLoad(s, data.order);
|
saveOrLoad(s, data.order);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class A>
|
template<class A>
|
||||||
static void saveOrLoadCommonArray(Common::WriteStream &stream, A &array) {
|
static void saveOrLoadCommonArray(Common::WriteStream &stream, A &array) {
|
||||||
uint count = array.size();
|
uint count = array.size();
|
||||||
assert(count < 0xFFFF);
|
assert(count < 0xFFFF);
|
||||||
|
@ -208,7 +208,7 @@ static void saveOrLoadCommonArray(Common::WriteStream &stream, A &array) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class A>
|
template<class A>
|
||||||
static void saveOrLoadCommonArray(Common::ReadStream &stream, A &array) {
|
static void saveOrLoadCommonArray(Common::ReadStream &stream, A &array) {
|
||||||
uint count = stream.readUint16LE();
|
uint count = stream.readUint16LE();
|
||||||
if (count == array.size()) {
|
if (count == array.size()) {
|
||||||
|
@ -218,7 +218,7 @@ static void saveOrLoadCommonArray(Common::ReadStream &stream, A &array) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S, class A>
|
template<class S, class A>
|
||||||
static void saveOrLoadStaticArray(S &s, A &array, uint count) {
|
static void saveOrLoadStaticArray(S &s, A &array, uint count) {
|
||||||
for (uint i = 0; i < count; ++i) {
|
for (uint i = 0; i < count; ++i) {
|
||||||
saveOrLoad(s, array[i]);
|
saveOrLoad(s, array[i]);
|
||||||
|
|
|
@ -49,7 +49,7 @@ static void saveOrLoadInt(Common::ReadStream &stream, int &i) {
|
||||||
i = stream.readSint32LE();
|
i = stream.readSint32LE();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class S>
|
template<class S>
|
||||||
void TuckerEngine::saveOrLoadGameStateData(S &s) {
|
void TuckerEngine::saveOrLoadGameStateData(S &s) {
|
||||||
for (int i = 0; i < kFlagsTableSize; ++i) {
|
for (int i = 0; i < kFlagsTableSize; ++i) {
|
||||||
saveOrLoadInt(s, _flagsTable[i]);
|
saveOrLoadInt(s, _flagsTable[i]);
|
||||||
|
|
|
@ -563,7 +563,7 @@ protected:
|
||||||
void updateSprite_locationNum81_1(int i);
|
void updateSprite_locationNum81_1(int i);
|
||||||
void updateSprite_locationNum82(int i);
|
void updateSprite_locationNum82(int i);
|
||||||
|
|
||||||
template <class S> void saveOrLoadGameStateData(S &s);
|
template<class S> void saveOrLoadGameStateData(S &s);
|
||||||
virtual Common::Error loadGameState(int num);
|
virtual Common::Error loadGameState(int num);
|
||||||
virtual Common::Error saveGameState(int num, const Common::String &description);
|
virtual Common::Error saveGameState(int num, const Common::String &description);
|
||||||
virtual bool canLoadGameStateCurrently();
|
virtual bool canLoadGameStateCurrently();
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace CxxTest
|
||||||
//
|
//
|
||||||
// The default ValueTraits class dumps up to 8 bytes as hex values
|
// The default ValueTraits class dumps up to 8 bytes as hex values
|
||||||
//
|
//
|
||||||
template <class T>
|
template<class T>
|
||||||
class ValueTraits
|
class ValueTraits
|
||||||
{
|
{
|
||||||
enum { MAX_BYTES = 8 };
|
enum { MAX_BYTES = 8 };
|
||||||
|
@ -85,7 +85,7 @@ namespace CxxTest
|
||||||
// traits( T t )
|
// traits( T t )
|
||||||
// Creates an object of type ValueTraits<T>
|
// Creates an object of type ValueTraits<T>
|
||||||
//
|
//
|
||||||
template <class T>
|
template<class T>
|
||||||
inline ValueTraits<T> traits( T t )
|
inline ValueTraits<T> traits( T t )
|
||||||
{
|
{
|
||||||
return ValueTraits<T>( t );
|
return ValueTraits<T>( t );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue