diff options
author | Eugene Sandulenko | 2005-05-21 03:30:23 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-05-21 03:30:23 +0000 |
commit | f9e4a2d2a24fbfc8b9889ebc51cf40b61fada4cc (patch) | |
tree | de010151a79c39cc6663f68a5da4461db5c50d0b | |
parent | 50db5af186ce07e5ae9433d241638e2dea930542 (diff) | |
download | scummvm-rg350-f9e4a2d2a24fbfc8b9889ebc51cf40b61fada4cc.tar.gz scummvm-rg350-f9e4a2d2a24fbfc8b9889ebc51cf40b61fada4cc.tar.bz2 scummvm-rg350-f9e4a2d2a24fbfc8b9889ebc51cf40b61fada4cc.zip |
Stubs for C64 MM costume code. Content will follow. Fixes crash in intro
script
svn-id: r18198
-rw-r--r-- | scumm/costume.cpp | 24 | ||||
-rw-r--r-- | scumm/costume.h | 31 | ||||
-rw-r--r-- | scumm/scumm.cpp | 3 |
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); |