Skip to content

Commit

Permalink
relink odoMeter.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
EpochFlame committed Jan 2, 2024
1 parent 824cb37 commit 6416293
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
["plugPikiKando/aiAction", False],
["plugPikiKando/pikiInf", False],
["plugPikiKando/piki", False],
["plugPikiKando/odoMeter", False],
["plugPikiKando/odoMeter", True],
["plugPikiKando/pikidoKill", False],
["plugPikiKando/pikiMgr", False],
["plugPikiKando/pikiState", False],
Expand Down
2 changes: 1 addition & 1 deletion include/odoMeter.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef _ODOMETER_H
#define _ODOMETER_H

#include "types.h"
#include "Vector3f.h"
#include "math.h"

struct OdoMeter { // TODO: figure out what these actually are
float _00; // _00
Expand Down
2 changes: 1 addition & 1 deletion src/plugPikiKando/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ KANDO_FILES:=\
$(BUILD_DIR)/asm/plugPikiKando/aiAction.o\
$(BUILD_DIR)/asm/plugPikiKando/pikiInf.o\
$(BUILD_DIR)/asm/plugPikiKando/piki.o\
$(BUILD_DIR)/asm/plugPikiKando/odoMeter.o\
$(BUILD_DIR)/src/plugPikiKando/odoMeter.o\
$(BUILD_DIR)/asm/plugPikiKando/pikidoKill.o\
$(BUILD_DIR)/asm/plugPikiKando/pikiMgr.o\
$(BUILD_DIR)/asm/plugPikiKando/pikiState.o\
Expand Down
16 changes: 7 additions & 9 deletions src/plugPikiKando/odoMeter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "types.h"
#include "system.h"
#include "odoMeter.h"

/*
* --INFO--
* Address: ........
Expand Down Expand Up @@ -45,7 +44,6 @@ void OdoMeter::start(float argA, float argB)
_08 = argB;
_00 = 0.0;
}

/*
* --INFO--
* Address: 800CD82C
Expand All @@ -54,17 +52,17 @@ void OdoMeter::start(float argA, float argB)
*/
bool OdoMeter::moving(Vector3f& argA, Vector3f& argB)
{
Vector3f vec;
float dummy[4]; // Match stack allocation

unknown1();

if (_00 < 100.0f) {
// THIS IS VECTOR3F::DISTANCE!!! WHAT THE FUUUUUUUUUU
Vector3f vec;
vec.sub2(argA, argB);
f32 distance = vec.length();
vec.y = Vector3f_diffY(argA, argB);
vec.x = Vector3f_diffX(argA, argB);
vec.z = Vector3f_diffZ(argA, argB);
float distance = sqrtf(vec.x * vec.x + vec.y * vec.y + vec.z * vec.z);
_00 += distance;

}

return unknown2();

}

0 comments on commit 6416293

Please sign in to comment.