Remove redundant snufit offset vector (fixes gcc11 compiler warning) (#395)

This commit is contained in:
Arceveti
2022-05-02 12:36:59 -07:00
committed by GitHub
parent ad3aa42eff
commit fe6aee22e1
2 changed files with 4 additions and 8 deletions

View File

@@ -973,11 +973,7 @@
#define /*0x104*/ oSnufitBodyScalePeriod OBJECT_FIELD_S32(0x1F)
#define /*0x108*/ oSnufitBodyBaseScale OBJECT_FIELD_S32(0x20)
#define /*0x10C*/ oSnufitBullets OBJECT_FIELD_S32(0x21)
#define /*0x1AC*/ oSnufitOffsetVec OBJECT_FIELD_S16(0x49, 0) // start pos of s16 vec
#define /*0x1AC*/ oSnufitXOffset OBJECT_FIELD_S16(0x49, 0)
#define /*0x1AE*/ oSnufitYOffset OBJECT_FIELD_S16(0x49, 1)
#define /*0x1B0*/ oSnufitZOffset OBJECT_FIELD_S16(0x4A, 0)
#define /*0x1B2*/ oSnufitBodyScale OBJECT_FIELD_S16(0x4A, 1)
#define /*0x1AC*/ oSnufitBodyScale OBJECT_FIELD_S16(0x49, 0)
/* Spindel */
#define /*0x0F4*/ oSpindelMoveTimer OBJECT_FIELD_S32(0x1B)

View File

@@ -38,7 +38,9 @@ Gfx *geo_snufit_move_mask(s32 callContext, struct GraphNode *node, UNUSED Mat4 *
if (callContext == GEO_CONTEXT_RENDER) {
struct Object *obj = (struct Object *) gCurGraphNodeObject;
struct GraphNodeTranslationRotation *transNode = (struct GraphNodeTranslationRotation *) node->next;
vec3s_copy(transNode->translation, &obj->oSnufitOffsetVec);
transNode->translation[0] = 0;
transNode->translation[1] = -32;
transNode->translation[2] = obj->oSnufitRecoil + 180;
}
return NULL;
@@ -147,8 +149,6 @@ void bhv_snufit_loop(void) {
o->oPosY = o->oHomeY + 8.0f * coss(4000 * gGlobalTimer);
o->oPosZ = o->oHomeZ + 100.0f * sins(o->oSnufitCircularPeriod);
o->oSnufitYOffset = -0x20;
o->oSnufitZOffset = o->oSnufitRecoil + 180;
o->oSnufitBodyScale
= (s16)(o->oSnufitBodyBaseScale + 666
+ o->oSnufitBodyBaseScale * coss(o->oSnufitBodyScalePeriod));