From 6e33b3f0a7b80a5d84c277bed05ee376b4ebb517 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 15 Mar 2005 21:48:06 +0000 Subject: Some cleanup/costume code unification. Note: NES costume code probably should be using subclasses; and maybe we should add AKOSLoadedCostume and NESLoadedCostume ? svn-id: r17161 --- scumm/costume.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'scumm/costume.cpp') diff --git a/scumm/costume.cpp b/scumm/costume.cpp index 36b5bd9866..27c5a4ce5b 100644 --- a/scumm/costume.cpp +++ b/scumm/costume.cpp @@ -808,7 +808,7 @@ byte CostumeRenderer::drawLimb(const Actor *a, int limb) { } -extern void DecodeNESTileData(const byte *src, byte *dest); +extern void decodeNESTileData(const byte *src, byte *dest); void ScummEngine::cost_decodeNESCostumeGfx() { for (int n = 0; n < 2; n++) { @@ -817,16 +817,12 @@ void ScummEngine::cost_decodeNESCostumeGfx() { if (maxSprites == 0) maxSprites = 256; _v1MMNESCostumeGfx[n] = (byte *)calloc(maxSprites * 16, 1); - DecodeNESTileData(patTable,_v1MMNESCostumeGfx[n]); + decodeNESTileData(patTable,_v1MMNESCostumeGfx[n]); // We will not need it anymore nukeResource(rtCostume, v1MMNEScostTables[n][4]); } } -int ScummEngine::cost_frameToAnim(Actor *a, int frame) { - return newDirToOldDir(a->getFacing()) + frame * 4; -} - void ScummEngine::cost_decodeData(Actor *a, int frame, uint usemask) { const byte *r; uint mask, j; @@ -837,7 +833,7 @@ void ScummEngine::cost_decodeData(Actor *a, int frame, uint usemask) { lc.loadCostume(a->_costume); - anim = cost_frameToAnim(a, frame); + anim = newDirToOldDir(a->getFacing()) + frame * 4; if (anim > lc._numAnim) { return; -- cgit v1.2.3