mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 12:50:51 +00:00
WINTERMUTE: Be explicit when storing Floats in savegames.
This commit is contained in:
parent
693c8ca5cc
commit
9ea315747e
@ -404,7 +404,7 @@ bool AdRegion::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_alpha));
|
||||
persistMgr->transfer(TMEMBER(_blocked));
|
||||
persistMgr->transfer(TMEMBER(_decoration));
|
||||
persistMgr->transfer(TMEMBER(_zoom));
|
||||
persistMgr->transferFloat(TMEMBER(_zoom));
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ bool AdRotLevel::persist(BasePersistenceManager *persistMgr) {
|
||||
|
||||
BaseObject::persist(persistMgr);
|
||||
|
||||
persistMgr->transfer(TMEMBER(_rotation));
|
||||
persistMgr->transferFloat(TMEMBER(_rotation));
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ bool AdScaleLevel::persist(BasePersistenceManager *persistMgr) {
|
||||
|
||||
BaseObject::persist(persistMgr);
|
||||
|
||||
persistMgr->transfer(TMEMBER(_scale));
|
||||
persistMgr->transferFloat(TMEMBER(_scale));
|
||||
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ bool AdWaypointGroup::persist(BasePersistenceManager *persistMgr) {
|
||||
|
||||
persistMgr->transfer(TMEMBER(_active));
|
||||
persistMgr->transfer(TMEMBER(_editorSelectedPoint));
|
||||
persistMgr->transfer(TMEMBER(_lastMimicScale));
|
||||
persistMgr->transferFloat(TMEMBER(_lastMimicScale));
|
||||
persistMgr->transfer(TMEMBER(_lastMimicX));
|
||||
persistMgr->transfer(TMEMBER(_lastMimicY));
|
||||
_points.persist(persistMgr);
|
||||
|
@ -3068,8 +3068,8 @@ bool BaseGame::persist(BasePersistenceManager *persistMgr) {
|
||||
|
||||
persistMgr->transfer(TMEMBER(_offsetX));
|
||||
persistMgr->transfer(TMEMBER(_offsetY));
|
||||
persistMgr->transfer(TMEMBER(_offsetPercentX));
|
||||
persistMgr->transfer(TMEMBER(_offsetPercentY));
|
||||
persistMgr->transferFloat(TMEMBER(_offsetPercentX));
|
||||
persistMgr->transferFloat(TMEMBER(_offsetPercentY));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_origInteractive));
|
||||
persistMgr->transfer(TMEMBER_INT(_origState));
|
||||
|
@ -968,9 +968,9 @@ bool BaseObject::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_movable));
|
||||
persistMgr->transfer(TMEMBER(_posX));
|
||||
persistMgr->transfer(TMEMBER(_posY));
|
||||
persistMgr->transfer(TMEMBER(_relativeScale));
|
||||
persistMgr->transferFloat(TMEMBER(_relativeScale));
|
||||
persistMgr->transfer(TMEMBER(_rotatable));
|
||||
persistMgr->transfer(TMEMBER(_scale));
|
||||
persistMgr->transferFloat(TMEMBER(_scale));
|
||||
persistMgr->transferPtr(TMEMBER_PTR(_sFX));
|
||||
persistMgr->transfer(TMEMBER(_sFXStart));
|
||||
persistMgr->transfer(TMEMBER(_sFXVolume));
|
||||
@ -982,21 +982,21 @@ bool BaseObject::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_soundEvent));
|
||||
persistMgr->transfer(TMEMBER(_zoomable));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_scaleX));
|
||||
persistMgr->transfer(TMEMBER(_scaleY));
|
||||
persistMgr->transferFloat(TMEMBER(_scaleX));
|
||||
persistMgr->transferFloat(TMEMBER(_scaleY));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_rotate));
|
||||
persistMgr->transferFloat(TMEMBER(_rotate));
|
||||
persistMgr->transfer(TMEMBER(_rotateValid));
|
||||
persistMgr->transfer(TMEMBER(_relativeRotate));
|
||||
persistMgr->transferFloat(TMEMBER(_relativeRotate));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_saveState));
|
||||
persistMgr->transfer(TMEMBER(_nonIntMouseEvents));
|
||||
|
||||
persistMgr->transfer(TMEMBER_INT(_sFXType));
|
||||
persistMgr->transfer(TMEMBER(_sFXParam1));
|
||||
persistMgr->transfer(TMEMBER(_sFXParam2));
|
||||
persistMgr->transfer(TMEMBER(_sFXParam3));
|
||||
persistMgr->transfer(TMEMBER(_sFXParam4));
|
||||
persistMgr->transferFloat(TMEMBER(_sFXParam1));
|
||||
persistMgr->transferFloat(TMEMBER(_sFXParam2));
|
||||
persistMgr->transferFloat(TMEMBER(_sFXParam3));
|
||||
persistMgr->transferFloat(TMEMBER(_sFXParam4));
|
||||
|
||||
|
||||
persistMgr->transfer(TMEMBER_INT(_blendMode));
|
||||
|
@ -637,7 +637,7 @@ bool BasePersistenceManager::transfer(const char *name, uint32 *val) {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// float
|
||||
bool BasePersistenceManager::transfer(const char *name, float *val) {
|
||||
bool BasePersistenceManager::transferFloat(const char *name, float *val) {
|
||||
if (_saving) {
|
||||
putFloat(*val);
|
||||
if (_saveStream->err()) {
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
bool transferPtr(const char *name, void *val);
|
||||
bool transfer(const char *name, int32 *val);
|
||||
bool transfer(const char *name, uint32 *val);
|
||||
bool transfer(const char *name, float *val);
|
||||
bool transferFloat(const char *name, float *val);
|
||||
bool transfer(const char *name, double *val);
|
||||
bool transfer(const char *name, bool *val);
|
||||
bool transfer(const char *name, byte *val);
|
||||
|
@ -432,7 +432,7 @@ bool BaseRegion::persist(BasePersistenceManager *persistMgr) {
|
||||
|
||||
persistMgr->transfer(TMEMBER(_active));
|
||||
persistMgr->transfer(TMEMBER(_editorSelectedPoint));
|
||||
persistMgr->transfer(TMEMBER(_lastMimicScale));
|
||||
persistMgr->transferFloat(TMEMBER(_lastMimicScale));
|
||||
persistMgr->transfer(TMEMBER(_lastMimicX));
|
||||
persistMgr->transfer(TMEMBER(_lastMimicY));
|
||||
_points.persist(persistMgr);
|
||||
|
@ -1163,12 +1163,12 @@ bool PartEmitter::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_angle1));
|
||||
persistMgr->transfer(TMEMBER(_angle2));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_velocity1));
|
||||
persistMgr->transfer(TMEMBER(_velocity2));
|
||||
persistMgr->transferFloat(TMEMBER(_velocity1));
|
||||
persistMgr->transferFloat(TMEMBER(_velocity2));
|
||||
persistMgr->transfer(TMEMBER(_velocityZBased));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_scale1));
|
||||
persistMgr->transfer(TMEMBER(_scale2));
|
||||
persistMgr->transferFloat(TMEMBER(_scale1));
|
||||
persistMgr->transferFloat(TMEMBER(_scale2));
|
||||
persistMgr->transfer(TMEMBER(_scaleZBased));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_maxParticles));
|
||||
@ -1196,14 +1196,14 @@ bool PartEmitter::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_alpha2));
|
||||
persistMgr->transfer(TMEMBER(_alphaTimeBased));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_angVelocity1));
|
||||
persistMgr->transfer(TMEMBER(_angVelocity2));
|
||||
persistMgr->transferFloat(TMEMBER(_angVelocity1));
|
||||
persistMgr->transferFloat(TMEMBER(_angVelocity2));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_rotation1));
|
||||
persistMgr->transfer(TMEMBER(_rotation2));
|
||||
persistMgr->transferFloat(TMEMBER(_rotation1));
|
||||
persistMgr->transferFloat(TMEMBER(_rotation2));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_growthRate1));
|
||||
persistMgr->transfer(TMEMBER(_growthRate2));
|
||||
persistMgr->transferFloat(TMEMBER(_growthRate1));
|
||||
persistMgr->transferFloat(TMEMBER(_growthRate2));
|
||||
persistMgr->transfer(TMEMBER(_exponentialGrowth));
|
||||
|
||||
persistMgr->transfer(TMEMBER(_useRegion));
|
||||
|
@ -234,9 +234,9 @@ bool PartParticle::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_alpha2));
|
||||
persistMgr->transfer(TMEMBER(_border));
|
||||
persistMgr->transfer(TMEMBER(_pos));
|
||||
persistMgr->transfer(TMEMBER(_posZ));
|
||||
persistMgr->transferFloat(TMEMBER(_posZ));
|
||||
persistMgr->transfer(TMEMBER(_velocity));
|
||||
persistMgr->transfer(TMEMBER(_scale));
|
||||
persistMgr->transferFloat(TMEMBER(_scale));
|
||||
persistMgr->transfer(TMEMBER(_creationTime));
|
||||
persistMgr->transfer(TMEMBER(_lifeTime));
|
||||
persistMgr->transfer(TMEMBER(_isDead));
|
||||
@ -244,9 +244,9 @@ bool PartParticle::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_fadeStart));
|
||||
persistMgr->transfer(TMEMBER(_fadeTime));
|
||||
persistMgr->transfer(TMEMBER(_currentAlpha));
|
||||
persistMgr->transfer(TMEMBER(_angVelocity));
|
||||
persistMgr->transfer(TMEMBER(_rotation));
|
||||
persistMgr->transfer(TMEMBER(_growthRate));
|
||||
persistMgr->transferFloat(TMEMBER(_angVelocity));
|
||||
persistMgr->transferFloat(TMEMBER(_rotation));
|
||||
persistMgr->transferFloat(TMEMBER(_growthRate));
|
||||
persistMgr->transfer(TMEMBER(_exponentialGrowth));
|
||||
persistMgr->transfer(TMEMBER(_fadeStartAlpha));
|
||||
|
||||
|
@ -498,7 +498,7 @@ bool VideoTheoraPlayer::persist(BasePersistenceManager *persistMgr) {
|
||||
persistMgr->transfer(TMEMBER(_alphaFilename));
|
||||
persistMgr->transfer(TMEMBER(_posX));
|
||||
persistMgr->transfer(TMEMBER(_posY));
|
||||
persistMgr->transfer(TMEMBER(_playZoom));
|
||||
persistMgr->transferFloat(TMEMBER(_playZoom));
|
||||
persistMgr->transfer(TMEMBER_INT(_playbackType));
|
||||
persistMgr->transfer(TMEMBER(_looping));
|
||||
persistMgr->transfer(TMEMBER(_volume));
|
||||
|
Loading…
Reference in New Issue
Block a user