aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/costume.cpp24
-rw-r--r--scumm/costume.h31
-rw-r--r--scumm/scumm.cpp3
3 files changed, 58 insertions, 0 deletions
diff --git a/scumm/costume.cpp b/scumm/costume.cpp
index eb1fcab776..f06aec4cc8 100644
--- a/scumm/costume.cpp
+++ b/scumm/costume.cpp
@@ -1003,6 +1003,30 @@ byte NESCostumeLoader::increaseAnim(Actor *a, int slot) {
return (a->_cost.curpos[slot] != oldframe);
}
+byte C64CostumeRenderer::drawLimb(const Actor *a, int limb) {
+ return 0;
+}
+
+void C64CostumeRenderer::setCostume(int costume) {
+ _loaded.loadCostume(costume);
+}
+
+void C64CostumeLoader::loadCostume(int id) {
+ _id = id;
+ _baseptr = _vm->getResourceAddress(rtCostume, id);
+}
+
+void C64CostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) {
+}
+
+byte C64CostumeLoader::increaseAnims(Actor *a) {
+ return 0;
+}
+
+byte C64CostumeLoader::increaseAnim(Actor *a, int slot) {
+ return 0;
+}
+
} // End of namespace Scumm
diff --git a/scumm/costume.h b/scumm/costume.h
index 9cca20eaea..905c1d9940 100644
--- a/scumm/costume.h
+++ b/scumm/costume.h
@@ -67,6 +67,22 @@ protected:
byte increaseAnim(Actor *a, int slot);
};
+class C64CostumeLoader : public BaseCostumeLoader {
+public:
+ int _id;
+ const byte *_baseptr;
+ const byte *_dataOffsets;
+ byte _numAnim;
+
+ C64CostumeLoader(ScummEngine *vm) : BaseCostumeLoader(vm) {}
+ void loadCostume(int id);
+ void costumeDecodeData(Actor *a, int frame, uint usemask);
+ byte increaseAnims(Actor *a);
+
+protected:
+ byte increaseAnim(Actor *a, int slot);
+};
+
class ClassicCostumeRenderer : public BaseCostumeRenderer {
protected:
ClassicCostumeLoader _loaded;
@@ -108,6 +124,21 @@ protected:
byte drawLimb(const Actor *a, int limb);
};
+class C64CostumeRenderer : public BaseCostumeRenderer {
+protected:
+ C64CostumeLoader _loaded;
+
+public:
+ C64CostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
+
+ void setPalette(byte *palette) {}
+ void setFacing(const Actor *a) {}
+ void setCostume(int costume);
+
+protected:
+ byte drawLimb(const Actor *a, int limb);
+};
+
} // End of namespace Scumm
#endif
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 7596feab47..4ada906b38 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1462,6 +1462,9 @@ int ScummEngine::init(GameDetector &detector) {
if (_features & GF_NEW_COSTUMES) {
_costumeRenderer = new AkosRenderer(this);
_costumeLoader = new AkosCostumeLoader(this);
+ } else if (_platform == Common::kPlatformC64) {
+ _costumeRenderer = new C64CostumeRenderer(this);
+ _costumeLoader = new C64CostumeLoader(this);
} else if (_platform == Common::kPlatformNES) {
_costumeRenderer = new NESCostumeRenderer(this);
_costumeLoader = new NESCostumeLoader(this);