[Scummvm-cvs-logs] SF.net SVN: scummvm:[43599] scummvm/branches/branch-1-0-0/engines/scumm
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Fri Aug 21 16:05:33 CEST 2009
Revision: 43599
http://scummvm.svn.sourceforge.net/scummvm/?rev=43599&view=rev
Author: Kirben
Date: 2009-08-21 14:05:32 +0000 (Fri, 21 Aug 2009)
Log Message:
-----------
Backport changes to savegame format.
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/engines/scumm/actor.cpp
scummvm/branches/branch-1-0-0/engines/scumm/actor.h
scummvm/branches/branch-1-0-0/engines/scumm/akos.cpp
scummvm/branches/branch-1-0-0/engines/scumm/akos.h
scummvm/branches/branch-1-0-0/engines/scumm/base-costume.h
scummvm/branches/branch-1-0-0/engines/scumm/costume.cpp
scummvm/branches/branch-1-0-0/engines/scumm/costume.h
scummvm/branches/branch-1-0-0/engines/scumm/saveload.h
Modified: scummvm/branches/branch-1-0-0/engines/scumm/actor.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/actor.cpp 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/actor.cpp 2009-08-21 14:05:32 UTC (rev 43599)
@@ -2500,9 +2500,10 @@
MKLINE(Actor, _flip, sleByte, VER(32)),
MKLINE(Actor, _heSkipLimbs, sleByte, VER(32)),
- // Actor palette grew from 64 to 256 bytes
+ // Actor palette grew from 64 to 256 bytes and switched to uint16 in HE games
MKARRAY_OLD(Actor, _palette[0], sleByte, 64, VER(8), VER(9)),
- MKARRAY(Actor, _palette[0], sleByte, 256, VER(10)),
+ MKARRAY_OLD(Actor, _palette[0], sleByte, 256, VER(10), VER(79)),
+ MKARRAY(Actor, _palette[0], sleUint16, 256, VER(80)),
MK_OBSOLETE(Actor, _mask, sleByte, VER(8), VER(9)),
MKLINE(Actor, _shadowMode, sleByte, VER(8)),
Modified: scummvm/branches/branch-1-0-0/engines/scumm/actor.h
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/actor.h 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/actor.h 2009-08-21 14:05:32 UTC (rev 43599)
@@ -157,7 +157,7 @@
};
- byte _palette[256];
+ uint16 _palette[256];
int _elevation;
uint16 _facing;
uint16 _targetFacing;
Modified: scummvm/branches/branch-1-0-0/engines/scumm/akos.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/akos.cpp 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/akos.cpp 2009-08-21 14:05:32 UTC (rev 43599)
@@ -289,7 +289,7 @@
} while ((uint16)mask);
}
-void AkosRenderer::setPalette(byte *new_palette) {
+void AkosRenderer::setPalette(uint16 *new_palette) {
uint size, i;
size = _vm->getResourceDataSize(akpl);
Modified: scummvm/branches/branch-1-0-0/engines/scumm/akos.h
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/akos.h 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/akos.h 2009-08-21 14:05:32 UTC (rev 43599)
@@ -107,7 +107,7 @@
int16 _actorHitX, _actorHitY;
bool _actorHitResult;
- void setPalette(byte *_palette);
+ void setPalette(uint16 *_palette);
void setFacing(const Actor *a);
void setCostume(int costume, int shadow);
Modified: scummvm/branches/branch-1-0-0/engines/scumm/base-costume.h
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/base-costume.h 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/base-costume.h 2009-08-21 14:05:32 UTC (rev 43599)
@@ -145,7 +145,7 @@
}
virtual ~BaseCostumeRenderer() {}
- virtual void setPalette(byte *palette) = 0;
+ virtual void setPalette(uint16 *palette) = 0;
virtual void setFacing(const Actor *a) = 0;
virtual void setCostume(int costume, int shadow) = 0;
Modified: scummvm/branches/branch-1-0-0/engines/scumm/costume.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/costume.cpp 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/costume.cpp 2009-08-21 14:05:32 UTC (rev 43599)
@@ -791,7 +791,7 @@
}
-void NESCostumeRenderer::setPalette(byte *palette) {
+void NESCostumeRenderer::setPalette(uint16 *palette) {
// TODO
}
@@ -874,15 +874,17 @@
} while (mask&0xFFFF);
}
-void ClassicCostumeRenderer::setPalette(byte *palette) {
+void ClassicCostumeRenderer::setPalette(uint16 *palette) {
int i;
byte color;
if (_loaded._format == 0x57) {
- memcpy(_palette, palette, 13);
+ for (i = 0; i < 13; i++)
+ _palette[i] = palette[i];
} else if (_vm->_game.features & GF_OLD_BUNDLE) {
if (_vm->getCurrentLights() & LIGHTMODE_actor_use_colors) {
- memcpy(_palette, palette, 16);
+ for (i = 0; i < 16; i++)
+ _palette[i] = palette[i];
} else {
memset(_palette, 8, 16);
_palette[12] = 0;
Modified: scummvm/branches/branch-1-0-0/engines/scumm/costume.h
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/costume.h 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/costume.h 2009-08-21 14:05:32 UTC (rev 43599)
@@ -94,7 +94,7 @@
public:
ClassicCostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
- void setPalette(byte *palette);
+ void setPalette(uint16 *palette);
void setFacing(const Actor *a);
void setCostume(int costume, int shadow);
@@ -116,7 +116,7 @@
public:
NESCostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
- void setPalette(byte *palette);
+ void setPalette(uint16 *palette);
void setFacing(const Actor *a);
void setCostume(int costume, int shadow);
@@ -131,7 +131,7 @@
public:
C64CostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
- void setPalette(byte *palette) {}
+ void setPalette(uint16 *palette) {}
void setFacing(const Actor *a) {}
void setCostume(int costume, int shadow);
Modified: scummvm/branches/branch-1-0-0/engines/scumm/saveload.h
===================================================================
--- scummvm/branches/branch-1-0-0/engines/scumm/saveload.h 2009-08-21 13:57:03 UTC (rev 43598)
+++ scummvm/branches/branch-1-0-0/engines/scumm/saveload.h 2009-08-21 14:05:32 UTC (rev 43599)
@@ -50,7 +50,7 @@
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 79
+#define CURRENT_VER 80
/**
* An auxillary macro, used to specify savegame versions. We use this instead
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list