2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:07:43 +00:00

Various AutoMapper stubs

This commit is contained in:
2016-07-29 10:00:23 -07:00
parent 62ce5286fe
commit 1ee38df1ba
13 changed files with 475 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
#include "CMappableObject.hpp"
#include "ITweakAutoMapper.hpp"
namespace urde
{
const zeus::CVector3f CMappableObject::skDoorVerts[8] = {};
void CMappableObject::ReadAutoMapperTweaks(const ITweakAutoMapper& tweaks)
{
const zeus::CVector3f& center = tweaks.GetDoorCenter();
/* Ugly hack, but necessary */
zeus::CVector3f* doorVerts = (zeus::CVector3f*)CMappableObject::skDoorVerts;
/* Wrap door verts around -Z to build surface */
doorVerts[0].assign( -center.z, -center.y, 0.f);
doorVerts[1].assign( -center.z, -center.y, 2.f * center.x);
doorVerts[2].assign( -center.z, center.y, 0.f);
doorVerts[3].assign( -center.z, center.y, 2.f * center.x);
doorVerts[4].assign(.2f * -center.z, -center.y, 0.f);
doorVerts[5].assign(.2f * -center.z, -center.y, 2.f * center.x);
doorVerts[6].assign(.2f * -center.z, center.y, 0.f);
doorVerts[7].assign(.2f * -center.z, center.y, 2.f * center.x);
}
}