Editor matrix, icons, rotation, impl light

This commit is contained in:
MegaMech
2025-03-13 16:52:01 -06:00
parent 7674283449
commit 3ab8fe0d71
35 changed files with 3247 additions and 813 deletions
+8 -20
View File
@@ -1,19 +1,17 @@
#pragma once
#include <libultraship.h>
#include <libultra/gbi.h>
#include <libultra/types.h>
#include "../CoreMath.h"
#include <vector>
#include "GameObject.h"
extern "C" {
#include "common_structs.h"
}
std::vector<Mtx> EditorMatrix;
enum class CollisionType {
VTX_INTERSECT,
BOUNDING_BOX,
BOUNDING_SPHERE
};
extern std::vector<Mtx> EditorMatrix;
struct Ray {
FVector Origin;
@@ -24,17 +22,6 @@ struct Triangle {
FVector v0, v1, v2;
};
struct GameObject {
const char* Name;
FVector* Pos;
Gfx* Model;
std::vector<Triangle> Triangles;
CollisionType Collision;
float BoundingBoxSize;
int32_t* DespawnFlag;
int32_t DespawnValue;
};
/**
* Projects 2D cursor into the game world
*
@@ -55,5 +42,6 @@ void Clear(MtxF* mf);
bool IntersectRayTriangle(const Ray& ray, const Triangle& tri, const FVector& objectPos, float& t);
bool IntersectRaySphere(const Ray& ray, const FVector& sphereCenter, float radius, float& t);
void Editor_AddMatrix(Mat4 mtx, int32_t flags);
float CalculateAngle(const FVector& start, const FVector& end);
void SetDirectionFromRotator(s16 rotator[3], s8 direction[3]);