mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-05-14 03:08:45 +00:00
* Add script to verify formatting * Add newline to end of files * Add `#pragma once` to top of headers * Add own header to includes at top of source files * Remove useless namespace qualifiers * Sort visibility modifiers correctly * Format `#include`s in three blocks * Remove `;` after namespaces * Add for custom style checking to `lint`-GitHub-Action * Format: No "// 0x" offset comments * Remove macros from padding
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#include "Util/ActorDimensionKeeper.h"
|
|
|
|
#include "Util/IUseDimension.h"
|
|
|
|
void ActorDimensionKeeper::validate() {
|
|
isValid = true;
|
|
}
|
|
|
|
void ActorDimensionKeeper::invalidate() {
|
|
isValid = false;
|
|
|
|
if (is2D) {
|
|
is2D = false;
|
|
isIn2DArea = false;
|
|
isCurrently2D = false;
|
|
isCanChange3D = true;
|
|
}
|
|
}
|
|
|
|
namespace rs {
|
|
|
|
ActorDimensionKeeper* createDimensionKeeper(const al::LiveActor* actor) {
|
|
return new ActorDimensionKeeper(actor);
|
|
}
|
|
|
|
bool is2D(const IUseDimension* dimension) {
|
|
return dimension->getActorDimensionKeeper()->getIs2D();
|
|
}
|
|
|
|
bool is3D(const IUseDimension* dimension) {
|
|
ActorDimensionKeeper* keeper = dimension->getActorDimensionKeeper();
|
|
return !keeper->getIs2D() && !keeper->getIsCurrently2D();
|
|
}
|
|
|
|
bool isChange2D(const IUseDimension* dimension) {
|
|
return dimension->getActorDimensionKeeper()->getIsCanChange2D();
|
|
}
|
|
|
|
bool isChange3D(const IUseDimension* dimension) {
|
|
return dimension->getActorDimensionKeeper()->getIsCanChange3D();
|
|
}
|
|
|
|
bool isIn2DArea(const IUseDimension* dimension) {
|
|
return dimension->getActorDimensionKeeper()->getIsIn2DArea();
|
|
}
|
|
|
|
} // namespace rs
|