TWINE: reduce visibility

This commit is contained in:
Martin Gerhardy committed 2021-03-19 15:49:07 +01:00
1 parent 107d356ab8
commit d4282fca9d
2 files changed
+7 -5

No files matched your search

+5 -5
View File
@@ -117,11 +117,6 @@ private:
const int16 numVertices = READ_LE_INT16(verticesBase);
return verticesBase + 2 + numVertices * 6;
}
public:
static inline bool isAnimated(const uint8 *bodyPtr) {
const int16 bodyHeader = READ_LE_INT16(bodyPtr);
return (bodyHeader & 2) != 0;
}
static uint8 *getData(uint8 *bodyPtr) {
return bodyPtr + 0x1A;
@@ -130,6 +125,11 @@ public:
static const uint8 *getData(const uint8 *bodyPtr) {
return bodyPtr + 0x1A;
}
public:
static inline bool isAnimated(const uint8 *bodyPtr) {
const int16 bodyHeader = READ_LE_INT16(bodyPtr);
return (bodyHeader & 2) != 0;
}
static const uint8 *getVerticesBaseData(const uint8 *bodyPtr) {
return getData(bodyPtr) + 2;
+2
View File
@@ -56,6 +56,7 @@ Animations::Animations(TwinEEngine *engine) : _engine(engine) {
int32 Animations::getBodyAnimIndex(AnimationTypes animIdx, int32 actorIdx) {
ActorStruct *actor = _engine->_scene->getActor(actorIdx);
// TODO: cache this
EntityData entityData;
entityData.loadFromBuffer(actor->entityDataPtr, actor->entityDataSize);
const int32 bodyAnimIndex = entityData.getAnimIndex(animIdx);
@@ -272,6 +273,7 @@ void Animations::processAnimActions(int32 actorIdx) {
return;
}
// TODO: cache this
EntityData entityData;
entityData.loadFromBuffer(actor->entityDataPtr, actor->entityDataSize);
const Common::Array<EntityAnim::Action> *actions = entityData.getActions(actor->animExtraPtr);