aboutsummaryrefslogtreecommitdiff
path: root/scumm/costume.h
diff options
context:
space:
mode:
authorMax Horn2005-03-27 00:23:38 +0000
committerMax Horn2005-03-27 00:23:38 +0000
commit446be21239727bcea559e201b77a48860fd5a34f (patch)
tree940fc942243ad1887ba0825ab5c462322b1f6c94 /scumm/costume.h
parent49ad27e845c504e626116f92999f2bfb74e7e1e0 (diff)
downloadscummvm-rg350-446be21239727bcea559e201b77a48860fd5a34f.tar.gz
scummvm-rg350-446be21239727bcea559e201b77a48860fd5a34f.tar.bz2
scummvm-rg350-446be21239727bcea559e201b77a48860fd5a34f.zip
Started to overhaul the costume infrastructure a bit, properly separating the NES costume code in the process (sorry if I broke stuff for the NES folks, but I figure it is better to get this done properly now before we have to untangle the mess later)
svn-id: r17257
Diffstat (limited to 'scumm/costume.h')
-rw-r--r--scumm/costume.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/scumm/costume.h b/scumm/costume.h
index 1b233e1c81..fb311608a4 100644
--- a/scumm/costume.h
+++ b/scumm/costume.h
@@ -25,7 +25,7 @@
namespace Scumm {
-class LoadedCostume {
+class ClassicCostume : public BaseCostume {
protected:
ScummEngine *_vm;
@@ -41,29 +41,36 @@ public:
byte _format;
bool _mirror;
- LoadedCostume(ScummEngine *vm) :
+ ClassicCostume(ScummEngine *vm) :
_vm(vm), _id(-1), _baseptr(0), _animCmds(0), _dataOffsets(0), _palette(0),
_frameOffsets(0), _numColors(0), _numAnim(0), _format(0), _mirror(false) {}
void loadCostume(int id);
byte increaseAnims(Actor *a);
- void loadNEScostume(void);
protected:
byte increaseAnim(Actor *a, int slot);
};
+class NESCostume : public ClassicCostume {
+public:
+ NESCostume(ScummEngine *vm) : ClassicCostume(vm) {}
+ void loadCostume(int id);
-class CostumeRenderer : public BaseCostumeRenderer {
protected:
- LoadedCostume _loaded;
+ byte increaseAnim(Actor *a, int slot);
+};
+
+class ClassicCostumeRenderer : public BaseCostumeRenderer {
+protected:
+ ClassicCostume _loaded;
byte _scaleIndexX; /* must wrap at 256 */
byte _scaleIndexY;
byte _palette[32];
public:
- CostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
+ ClassicCostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
void setPalette(byte *palette);
void setFacing(const Actor *a);
@@ -71,7 +78,6 @@ public:
protected:
byte drawLimb(const Actor *a, int limb);
- void drawNESCostume(const Actor *a, int limb);
void proc3(Codec1 &v1);
void proc3_ami(Codec1 &v1);
@@ -81,6 +87,21 @@ protected:
byte mainRoutine(int xmoveCur, int ymoveCur);
};
+class NESCostumeRenderer : public BaseCostumeRenderer {
+protected:
+ NESCostume _loaded;
+
+public:
+ NESCostumeRenderer(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