mirror of
https://github.com/zeldaret/st
synced 2026-09-02 17:53:19 -04:00
Vector improvements (#67)
* clean up math.h and attempt to improve existing vector maths * fix broken matches and match new stuff
This commit is contained in:
@@ -11,7 +11,16 @@ extern "C" void func_0200b58c(void *);
|
||||
extern "C" void func_01ffb714(Vec3p *, Vec3p *, void *);
|
||||
extern "C" void func_01ffcfcc(Vec3p *, Vec3p *, Vec3p *);
|
||||
|
||||
static const Vec2p data_ov031_02115830(0x800, 0x800);
|
||||
struct UnkStruct_ov031_02117c84 {
|
||||
u16 mUnk_00;
|
||||
|
||||
UnkStruct_ov031_02117c84(u16 x) {
|
||||
this->mUnk_00 = x;
|
||||
}
|
||||
};
|
||||
|
||||
static const Vec2pCpp data_ov031_02115830(0x800, 0x800);
|
||||
static const UnkStruct_ov031_02117c84 data_ov031_02117c84(0x3C);
|
||||
static const UnkSubStruct19 data_ov031_02115c84;
|
||||
|
||||
ARM MapObjectTreasureSpawned_74::MapObjectTreasureSpawned_74(unk32 param1) :
|
||||
@@ -242,7 +251,8 @@ ARM bool MapObjectChestBase::vfunc_44() {
|
||||
}
|
||||
|
||||
ARM void MapObjectChestBase::func_ov031_02103f48() {
|
||||
Vec3p local_10(this->mPos.x, this->mPos.y + 0x800, this->mPos.z);
|
||||
Vec3p local_10;
|
||||
Vec3p_Init(this->mPos.x, this->mPos.y + 0x800, this->mPos.z, &local_10);
|
||||
data_027e0cec->func_ov000_0209feac(0x81f, &local_10, 4, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -739,8 +739,11 @@ ARM void MapObjectDoorDangerSpawn::func_ov031_020fe5fc(Vec3p *param1, MapObjectD
|
||||
Vec3p *piVar2 = data_027e0ce0->func_01fff148(1);
|
||||
Vec3p *piVar3 = data_027e0ce0->func_01fff148(0);
|
||||
|
||||
Vec3p temp(piVar3->x, piVar3->y, piVar3->z);
|
||||
Vec3p pos(temp.x + piVar2->x, temp.y + piVar2->y, temp.z + piVar2->z);
|
||||
Vec3p temp;
|
||||
Vec3p_Init(piVar3->x, piVar3->y, piVar3->z, &temp);
|
||||
|
||||
Vec3p pos;
|
||||
Vec3p_Init(temp.x + piVar2->x, temp.y + piVar2->y, temp.z + piVar2->z, &pos);
|
||||
|
||||
func_01ff93c0(&pos, FLOAT_TO_Q20(0.5f));
|
||||
param1->coords = pos.coords;
|
||||
|
||||
@@ -128,8 +128,10 @@ ARM void MapObjectDoorSwitch::vfunc_18(s8 *param1, s8 param2) {
|
||||
}
|
||||
|
||||
ARM void MapObjectDoorSwitch::vfunc_74(void) {
|
||||
Vec3p local_20(this->mPos);
|
||||
Vec3p local_2c(0, 0, 0x666);
|
||||
Vec3p local_20 = this->mPos;
|
||||
Vec3p local_2c;
|
||||
Vec3p_Init(0, 0, 0x666, &local_2c);
|
||||
|
||||
Mat4x3p m;
|
||||
u16 angle = this->mUnk_14;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "Unknown/Common.hpp"
|
||||
#include "Unknown/UnkStruct_027e0cd8.hpp"
|
||||
|
||||
static const Vec2p data_ov031_021157b0(0x96B, 0x99A);
|
||||
static const Vec2pCpp data_ov031_021157b0(0x96B, 0x99A);
|
||||
|
||||
ARM DECL_PROFILE(MapObjectProfileTreasureSpawned);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user