mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 10:26:40 +00:00
TWINE: renamed holomap location member
This commit is contained in:
parent
bed47375bc
commit
f5a3030b29
@ -92,9 +92,9 @@ bool Holomap::loadLocations() {
|
||||
|
||||
_engine->_text->initTextBank(TextBankId::Inventory_Intro_and_Holomap);
|
||||
for (int32 i = 0; i < _numLocations; i++) {
|
||||
_locations[i].angle.x = ClampAngle(stream.readSint16LE());
|
||||
_locations[i].angle.y = ClampAngle(stream.readSint16LE());
|
||||
_locations[i].angle.z = ClampAngle(stream.readSint16LE());
|
||||
_locations[i].angleX = ClampAngle(stream.readSint16LE());
|
||||
_locations[i].angleY = ClampAngle(stream.readSint16LE());
|
||||
_locations[i].size = stream.readSint16LE();
|
||||
_locations[i].textIndex = (TextId)stream.readUint16LE();
|
||||
|
||||
if (_engine->_text->getMenuText(_locations[i].textIndex, _locations[i].name, sizeof(_locations[i].name))) {
|
||||
@ -358,7 +358,7 @@ void Holomap::drawHolomapTrajectory(int32 trajectoryIndex) {
|
||||
renderHolomapSurfacePolygons(holomapImagePtr, holomapImageSize);
|
||||
|
||||
const Location &loc = _locations[data->locationIdx];
|
||||
renderHolomapPointModel(data->pos, loc.angle.x, loc.angle.y);
|
||||
renderHolomapPointModel(data->pos, loc.angleX, loc.angleY);
|
||||
|
||||
ActorMoveStruct move;
|
||||
AnimTimerDataStruct animTimerData;
|
||||
@ -409,8 +409,8 @@ void Holomap::drawHolomapTrajectory(int32 trajectoryIndex) {
|
||||
if (data->numAnimFrames < trajAnimFrameIdx) {
|
||||
break;
|
||||
}
|
||||
modelX = loc.angle.x;
|
||||
modelY = loc.angle.y;
|
||||
modelX = loc.angleX;
|
||||
modelY = loc.angleY;
|
||||
}
|
||||
renderHolomapPointModel(data->pos, modelX, modelY);
|
||||
++trajAnimFrameIdx;
|
||||
@ -455,8 +455,8 @@ void Holomap::renderLocations(int xRot, int yRot, int zRot, bool lower) {
|
||||
for (int locationIdx = 0; locationIdx < NUM_LOCATIONS; ++locationIdx) {
|
||||
if ((_engine->_gameState->_holomapFlags[locationIdx] & HOLOMAP_CAN_FOCUS) || locationIdx == _engine->_scene->_currentSceneIdx) {
|
||||
const Location &loc = _locations[locationIdx];
|
||||
_engine->_renderer->setBaseRotation(loc.angle.x, loc.angle.y, 0);
|
||||
const IVec3 &destPos = _engine->_renderer->getBaseRotationPosition(0, 0, loc.angle.z + 1000);
|
||||
_engine->_renderer->setBaseRotation(loc.angleX, loc.angleY, 0);
|
||||
const IVec3 &destPos = _engine->_renderer->getBaseRotationPosition(0, 0, loc.size + 1000);
|
||||
const IVec3 &destPos2 = _engine->_renderer->getBaseRotationPosition(0, 0, 1500);
|
||||
_engine->_renderer->setBaseRotation(xRot, yRot, zRot, true);
|
||||
_engine->_renderer->setBaseRotationPos(0, 0, distance(zDistanceHolomap));
|
||||
@ -498,8 +498,8 @@ void Holomap::renderLocations(int xRot, int yRot, int zRot, bool lower) {
|
||||
bodyData = &_engine->_resources->_holomapTwinsenArrowPtr;
|
||||
}
|
||||
if (bodyData != nullptr) {
|
||||
const int32 angleX = _locations[drawList.actorIdx].angle.x;
|
||||
const int32 angleY = _locations[drawList.actorIdx].angle.y;
|
||||
const int32 angleX = _locations[drawList.actorIdx].angleX;
|
||||
const int32 angleY = _locations[drawList.actorIdx].angleY;
|
||||
Common::Rect dummy;
|
||||
_engine->_renderer->renderIsoModel(drawList.x, drawList.y, drawList.z, angleX, angleY, ANGLE_0, *bodyData, dummy);
|
||||
}
|
||||
@ -541,8 +541,8 @@ void Holomap::processHolomap() {
|
||||
_engine->_text->drawHolomapLocation(_locations[currentLocation].textIndex);
|
||||
|
||||
int32 time = _engine->_lbaTime;
|
||||
int32 xRot = ClampAngle(_locations[currentLocation].angle.x);
|
||||
int32 yRot = ClampAngle(_locations[currentLocation].angle.y);
|
||||
int32 xRot = _locations[currentLocation].angleX;
|
||||
int32 yRot = _locations[currentLocation].angleY;
|
||||
bool rotate = false;
|
||||
bool redraw = true;
|
||||
int waterPaletteChangeTimer = 0;
|
||||
@ -595,8 +595,8 @@ void Holomap::processHolomap() {
|
||||
|
||||
if (rotate) {
|
||||
const int32 dt = _engine->_lbaTime - time;
|
||||
xRot = _engine->_collision->getAverageValue(ClampAngle(xRot), _locations[currentLocation].angle.x, 75, dt);
|
||||
yRot = _engine->_collision->getAverageValue(ClampAngle(yRot), _locations[currentLocation].angle.y, 75, dt);
|
||||
xRot = _engine->_collision->getAverageValue(ClampAngle(xRot), _locations[currentLocation].angleX, 75, dt);
|
||||
yRot = _engine->_collision->getAverageValue(ClampAngle(yRot), _locations[currentLocation].angleY, 75, dt);
|
||||
redraw = true;
|
||||
}
|
||||
|
||||
@ -628,7 +628,7 @@ void Holomap::processHolomap() {
|
||||
}
|
||||
}
|
||||
|
||||
if (rotate && xRot == _locations[currentLocation].angle.x && yRot == _locations[currentLocation].angle.y) {
|
||||
if (rotate && xRot == _locations[currentLocation].angleX && yRot == _locations[currentLocation].angleY) {
|
||||
rotate = false;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,9 @@ private:
|
||||
bool isTriangleVisible(const Vertex *vertices) const;
|
||||
|
||||
struct Location {
|
||||
IVec3 angle;
|
||||
int16 angleX;
|
||||
int16 angleY;
|
||||
int16 size;
|
||||
TextId textIndex = TextId::kNone;
|
||||
char name[30] = "";
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user