Some changes

This commit is contained in:
MegaMech
2025-04-16 20:59:18 -06:00
parent 9cdd5902c5
commit ec8cc29e8d
16 changed files with 56 additions and 624 deletions
+3
View File
@@ -36,6 +36,9 @@ typedef struct SkyboxColours {
// Extends infinitely in the Y direction
// If a player is overtop of a water volume then it should use its height
// Recommend using the new water surface type. This is here to support the stock tracks.
// Albeit, there's no reason you cannot use this so long as you input a square.
// How to use: WaterVolumes.push_back({0, -100, 100, -100, 100});
struct WaterVolume {
float Height; // Y coordinate of the Water level
float MinX;
-6
View File
@@ -7,7 +7,6 @@
#include "Editor.h"
#include "Collision.h"
#include "Light.h"
#include "Water.h"
#include "port/Engine.h"
#include <controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h>
@@ -118,11 +117,6 @@ namespace Editor {
eGameObjects.push_back(new LightObject(name, pos, rot));
}
WaterVolumeObject* Editor::AddWaterVolume(const char* name, FVector* pos) {
eGameObjects.push_back(new WaterVolumeObject(name, pos));
return reinterpret_cast<WaterVolumeObject*>(&eGameObjects.back());
}
void Editor::ClearObjects() {
for (auto& obj : eGameObjects) {
delete obj;
-2
View File
@@ -4,7 +4,6 @@
#include <libultraship/libultraship.h>
#include <libultra/gbi.h>
#include "GameObject.h"
#include "Water.h"
#ifdef __cplusplus
@@ -24,7 +23,6 @@ public:
void Load();
GameObject* AddObject(const char* name, FVector* pos, IRotator* rot, FVector* scale, Gfx* model, float collScale, GameObject::CollisionType collision, float boundingBoxSize, int32_t* despawnFlag, int32_t despawnValue);
void AddLight(const char* name, FVector* pos, s8* rot);
WaterVolumeObject* AddWaterVolume(const char* name, FVector* pos);
void ClearObjects();
void RemoveObject();
void SelectObjectFromSceneExplorer(GameObject* object);
+3 -3
View File
@@ -212,9 +212,9 @@ bool IntersectRayTriangle(const Ray& ray, const Triangle& tri, const FVector& ob
const float EPSILON = 1e-6f;
// Adjust the triangle vertices by the object's position
FVector v0 = TransformPoint(tri.v0);
FVector v1 = TransformPoint(tri.v1);
FVector v2 = TransformPoint(tri.v2);
FVector v0 = tri.v0;
FVector v1 = tri.v1;
FVector v2 = tri.v2;
DebugPoss = v0;
+3 -14
View File
@@ -14,7 +14,7 @@
#include "engine/actors/Ship.h"
#include "port/Game.h"
#include "Handle.h"
#include "Handles.h"
extern "C" {
#include "common_structs.h"
@@ -49,13 +49,13 @@ void Gizmo::Load() {
BlueRotateCollision.Model = (Gfx*)"__OTR__editor/gizmo/rot_handle_blue";
//GenerateCollisionMesh(&RedCollision, (Gfx*)(handle_Cylinder_mesh), 1);
GenerateCollisionMesh(&RedCollision, (Gfx*)LOAD_ASSET_RAW(RedCollision.Model), 0.5f);
/*GenerateCollisionMesh(&RedCollision, (Gfx*)LOAD_ASSET_RAW(RedCollision.Model), 0.5f);
GenerateCollisionMesh(&GreenCollision, (Gfx*)LOAD_ASSET_RAW(GreenCollision.Model), 0.5f);
GenerateCollisionMesh(&BlueCollision, (Gfx*)LOAD_ASSET_RAW(BlueCollision.Model), 0.5f);
GenerateCollisionMesh(&RedRotateCollision, (Gfx*)LOAD_ASSET_RAW(RedRotateCollision.Model), 0.15f);
GenerateCollisionMesh(&GreenRotateCollision, (Gfx*)LOAD_ASSET_RAW(GreenRotateCollision.Model), 0.15f);
GenerateCollisionMesh(&BlueRotateCollision, (Gfx*)LOAD_ASSET_RAW(BlueRotateCollision.Model), 0.15f);
GenerateCollisionMesh(&BlueRotateCollision, (Gfx*)LOAD_ASSET_RAW(BlueRotateCollision.Model), 0.15f);*/
}
void Gizmo::Tick() {
@@ -317,27 +317,16 @@ void Gizmo::DrawHandles() {
gSPDisplayList(gDisplayListHead++, (Gfx*)center);
}
handle_f3dlite_material_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0xFF, 0, 0, 0x49, 0x49, 0x49);
Mat4 RedXMtx;
ApplyMatrixTransformations(RedXMtx, FVector(Pos.x, Pos.y, Pos.z - _gizmoOffset), Rot, scale);
Editor_AddMatrix(RedXMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gDisplayListHead++, (Gfx*)redHandle);
handle_f3dlite_material_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0, 0xFF, 0, 0x49, 0x49, 0x49);
Mat4 GreenYMtx;
ApplyMatrixTransformations(GreenYMtx, FVector(Pos.x - _gizmoOffset, Pos.y, Pos.z), greenRot, scale);
Editor_AddMatrix(GreenYMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gDisplayListHead++, (Gfx*)greenHandle);
handle_f3dlite_material_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0, 0, 0xFF, 0x49, 0x49, 0x49);
Mat4 BlueZMtx;
ApplyMatrixTransformations(BlueZMtx, FVector(Pos.x, Pos.y + _gizmoOffset, Pos.z), blueRot, scale);
Editor_AddMatrix(BlueZMtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
-493
View File
@@ -1,493 +0,0 @@
#include <libultraship/libultraship.h>
#include <libultra/gbi.h>
#include "Handle.h"
Lights1 handle_f3dlite_material_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49);
Vtx handle_Cylinder_mesh_vtx_cull[8] = {
{{ {-22, -22, -271}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {-22, -22, 0}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {-22, 22, 0}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {-22, 22, -271}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {22, -22, -271}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {22, -22, 0}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {22, 22, 0}, 0, {0, 0}, {0, 0, 0, 0} }},
{{ {22, 22, -271}, 0, {0, 0}, {0, 0, 0, 0} }},
};
Vtx handle_Cylinder_mesh_vtx_0[329] = {
{{ {0, -22, -194}, 0, {240, 506}, {12, 134, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {12, 134, 222, 255} }},
{{ {4, -21, -194}, 0, {288, 511}, {12, 134, 222, 255} }},
{{ {4, -21, -194}, 0, {288, 511}, {35, 139, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {35, 139, 222, 255} }},
{{ {8, -20, -194}, 0, {334, 525}, {35, 139, 222, 255} }},
{{ {8, -20, -194}, 0, {334, 525}, {58, 148, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {58, 148, 222, 255} }},
{{ {12, -18, -194}, 0, {377, 548}, {58, 148, 222, 255} }},
{{ {12, -18, -194}, 0, {377, 548}, {78, 162, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {78, 162, 222, 255} }},
{{ {15, -15, -194}, 0, {414, 578}, {78, 162, 222, 255} }},
{{ {15, -15, -194}, 0, {414, 578}, {94, 178, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {94, 178, 222, 255} }},
{{ {18, -12, -194}, 0, {444, 615}, {94, 178, 222, 255} }},
{{ {18, -12, -194}, 0, {444, 615}, {108, 198, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {108, 198, 222, 255} }},
{{ {20, -8, -194}, 0, {467, 658}, {108, 198, 222, 255} }},
{{ {20, -8, -194}, 0, {467, 658}, {117, 221, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {117, 221, 222, 255} }},
{{ {21, -4, -194}, 0, {481, 704}, {117, 221, 222, 255} }},
{{ {21, -4, -194}, 0, {481, 704}, {122, 244, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {122, 244, 222, 255} }},
{{ {22, 0, -194}, 0, {486, 752}, {122, 244, 222, 255} }},
{{ {22, 0, -194}, 0, {486, 752}, {122, 12, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {122, 12, 222, 255} }},
{{ {21, 4, -194}, 0, {481, 800}, {122, 12, 222, 255} }},
{{ {21, 4, -194}, 0, {481, 800}, {117, 35, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {117, 35, 222, 255} }},
{{ {20, 8, -194}, 0, {467, 846}, {117, 35, 222, 255} }},
{{ {20, 8, -194}, 0, {467, 846}, {108, 58, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {108, 58, 222, 255} }},
{{ {18, 12, -194}, 0, {444, 889}, {108, 58, 222, 255} }},
{{ {18, 12, -194}, 0, {444, 889}, {94, 78, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {94, 78, 222, 255} }},
{{ {15, 15, -194}, 0, {414, 926}, {94, 78, 222, 255} }},
{{ {15, 15, -194}, 0, {414, 926}, {78, 94, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {78, 94, 222, 255} }},
{{ {12, 18, -194}, 0, {377, 956}, {78, 94, 222, 255} }},
{{ {12, 18, -194}, 0, {377, 956}, {58, 108, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {58, 108, 222, 255} }},
{{ {8, 20, -194}, 0, {334, 979}, {58, 108, 222, 255} }},
{{ {8, 20, -194}, 0, {334, 979}, {35, 117, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {35, 117, 222, 255} }},
{{ {4, 21, -194}, 0, {288, 993}, {35, 117, 222, 255} }},
{{ {4, 21, -194}, 0, {288, 993}, {12, 122, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {12, 122, 222, 255} }},
{{ {0, 22, -194}, 0, {240, 998}, {12, 122, 222, 255} }},
{{ {0, 22, -194}, 0, {240, 998}, {244, 122, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {244, 122, 222, 255} }},
{{ {-4, 21, -194}, 0, {192, 993}, {244, 122, 222, 255} }},
{{ {-4, 21, -194}, 0, {192, 993}, {221, 117, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {221, 117, 222, 255} }},
{{ {-8, 20, -194}, 0, {146, 979}, {221, 117, 222, 255} }},
{{ {-8, 20, -194}, 0, {146, 979}, {198, 108, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {198, 108, 222, 255} }},
{{ {-12, 18, -194}, 0, {103, 956}, {198, 108, 222, 255} }},
{{ {-12, 18, -194}, 0, {103, 956}, {178, 94, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {178, 94, 222, 255} }},
{{ {-15, 15, -194}, 0, {66, 926}, {178, 94, 222, 255} }},
{{ {-15, 15, -194}, 0, {66, 926}, {162, 78, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {162, 78, 222, 255} }},
{{ {-18, 12, -194}, 0, {36, 889}, {162, 78, 222, 255} }},
{{ {-18, 12, -194}, 0, {36, 889}, {148, 58, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {148, 58, 222, 255} }},
{{ {-20, 8, -194}, 0, {13, 846}, {148, 58, 222, 255} }},
{{ {-20, 8, -194}, 0, {13, 846}, {139, 35, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {139, 35, 222, 255} }},
{{ {-21, 4, -194}, 0, {-1, 800}, {139, 35, 222, 255} }},
{{ {-21, 4, -194}, 0, {-1, 800}, {134, 12, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {134, 12, 222, 255} }},
{{ {-22, 0, -194}, 0, {-6, 752}, {134, 12, 222, 255} }},
{{ {-22, 0, -194}, 0, {-6, 752}, {134, 244, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {134, 244, 222, 255} }},
{{ {-21, -4, -194}, 0, {-1, 704}, {134, 244, 222, 255} }},
{{ {-21, -4, -194}, 0, {-1, 704}, {139, 221, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {139, 221, 222, 255} }},
{{ {-20, -8, -194}, 0, {13, 658}, {139, 221, 222, 255} }},
{{ {-20, -8, -194}, 0, {13, 658}, {148, 198, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {148, 198, 222, 255} }},
{{ {-18, -12, -194}, 0, {36, 615}, {148, 198, 222, 255} }},
{{ {-18, -12, -194}, 0, {36, 615}, {162, 178, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {162, 178, 222, 255} }},
{{ {-15, -15, -194}, 0, {66, 578}, {162, 178, 222, 255} }},
{{ {-15, -15, -194}, 0, {66, 578}, {178, 162, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {178, 162, 222, 255} }},
{{ {-12, -18, -194}, 0, {103, 548}, {178, 162, 222, 255} }},
{{ {-12, -18, -194}, 0, {103, 548}, {198, 148, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {198, 148, 222, 255} }},
{{ {-8, -20, -194}, 0, {146, 525}, {198, 148, 222, 255} }},
{{ {-8, -20, -194}, 0, {146, 525}, {221, 139, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {221, 139, 222, 255} }},
{{ {-4, -21, -194}, 0, {192, 511}, {221, 139, 222, 255} }},
{{ {-4, -21, -194}, 0, {192, 511}, {244, 134, 222, 255} }},
{{ {0, 0, -271}, 0, {240, 752}, {244, 134, 222, 255} }},
{{ {0, -22, -194}, 0, {240, 506}, {244, 134, 222, 255} }},
{{ {0, 9, -194}, 0, {1008, 496}, {12, 126, 0, 255} }},
{{ {0, 9, 0}, 0, {1008, -16}, {12, 126, 0, 255} }},
{{ {2, 9, 0}, 0, {976, -16}, {12, 126, 0, 255} }},
{{ {2, 9, -194}, 0, {976, 496}, {12, 126, 0, 255} }},
{{ {2, 9, -194}, 0, {976, 496}, {37, 122, 0, 255} }},
{{ {2, 9, 0}, 0, {976, -16}, {37, 122, 0, 255} }},
{{ {3, 8, 0}, 0, {944, -16}, {37, 122, 0, 255} }},
{{ {3, 8, -194}, 0, {944, 496}, {37, 122, 0, 255} }},
{{ {3, 8, -194}, 0, {944, 496}, {60, 112, 0, 255} }},
{{ {3, 8, 0}, 0, {944, -16}, {60, 112, 0, 255} }},
{{ {5, 7, 0}, 0, {912, -16}, {60, 112, 0, 255} }},
{{ {5, 7, -194}, 0, {912, 496}, {60, 112, 0, 255} }},
{{ {5, 7, -194}, 0, {912, 496}, {81, 98, 0, 255} }},
{{ {5, 7, 0}, 0, {912, -16}, {81, 98, 0, 255} }},
{{ {6, 6, 0}, 0, {880, -16}, {81, 98, 0, 255} }},
{{ {6, 6, -194}, 0, {880, 496}, {81, 98, 0, 255} }},
{{ {6, 6, -194}, 0, {880, 496}, {98, 81, 0, 255} }},
{{ {6, 6, 0}, 0, {880, -16}, {98, 81, 0, 255} }},
{{ {7, 5, 0}, 0, {848, -16}, {98, 81, 0, 255} }},
{{ {7, 5, -194}, 0, {848, 496}, {98, 81, 0, 255} }},
{{ {7, 5, -194}, 0, {848, 496}, {112, 60, 0, 255} }},
{{ {7, 5, 0}, 0, {848, -16}, {112, 60, 0, 255} }},
{{ {8, 3, 0}, 0, {816, -16}, {112, 60, 0, 255} }},
{{ {8, 3, -194}, 0, {816, 496}, {112, 60, 0, 255} }},
{{ {8, 3, -194}, 0, {816, 496}, {122, 37, 0, 255} }},
{{ {8, 3, 0}, 0, {816, -16}, {122, 37, 0, 255} }},
{{ {9, 2, 0}, 0, {784, -16}, {122, 37, 0, 255} }},
{{ {9, 2, -194}, 0, {784, 496}, {122, 37, 0, 255} }},
{{ {9, 2, -194}, 0, {784, 496}, {126, 12, 0, 255} }},
{{ {9, 2, 0}, 0, {784, -16}, {126, 12, 0, 255} }},
{{ {9, 0, 0}, 0, {752, -16}, {126, 12, 0, 255} }},
{{ {9, 0, -194}, 0, {752, 496}, {126, 12, 0, 255} }},
{{ {9, 0, -194}, 0, {752, 496}, {126, 244, 0, 255} }},
{{ {9, 0, 0}, 0, {752, -16}, {126, 244, 0, 255} }},
{{ {9, -2, 0}, 0, {720, -16}, {126, 244, 0, 255} }},
{{ {9, -2, -194}, 0, {720, 496}, {126, 244, 0, 255} }},
{{ {9, -2, -194}, 0, {720, 496}, {122, 219, 0, 255} }},
{{ {9, -2, 0}, 0, {720, -16}, {122, 219, 0, 255} }},
{{ {8, -3, 0}, 0, {688, -16}, {122, 219, 0, 255} }},
{{ {8, -3, -194}, 0, {688, 496}, {122, 219, 0, 255} }},
{{ {8, -3, -194}, 0, {688, 496}, {112, 196, 0, 255} }},
{{ {8, -3, 0}, 0, {688, -16}, {112, 196, 0, 255} }},
{{ {7, -5, 0}, 0, {656, -16}, {112, 196, 0, 255} }},
{{ {7, -5, -194}, 0, {656, 496}, {112, 196, 0, 255} }},
{{ {7, -5, -194}, 0, {656, 496}, {98, 175, 0, 255} }},
{{ {7, -5, 0}, 0, {656, -16}, {98, 175, 0, 255} }},
{{ {6, -6, 0}, 0, {624, -16}, {98, 175, 0, 255} }},
{{ {6, -6, -194}, 0, {624, 496}, {98, 175, 0, 255} }},
{{ {6, -6, -194}, 0, {624, 496}, {81, 158, 0, 255} }},
{{ {6, -6, 0}, 0, {624, -16}, {81, 158, 0, 255} }},
{{ {5, -7, 0}, 0, {592, -16}, {81, 158, 0, 255} }},
{{ {5, -7, -194}, 0, {592, 496}, {81, 158, 0, 255} }},
{{ {5, -7, -194}, 0, {592, 496}, {60, 144, 0, 255} }},
{{ {5, -7, 0}, 0, {592, -16}, {60, 144, 0, 255} }},
{{ {3, -8, 0}, 0, {560, -16}, {60, 144, 0, 255} }},
{{ {3, -8, -194}, 0, {560, 496}, {60, 144, 0, 255} }},
{{ {3, -8, -194}, 0, {560, 496}, {37, 134, 0, 255} }},
{{ {3, -8, 0}, 0, {560, -16}, {37, 134, 0, 255} }},
{{ {2, -9, 0}, 0, {528, -16}, {37, 134, 0, 255} }},
{{ {2, -9, -194}, 0, {528, 496}, {37, 134, 0, 255} }},
{{ {2, -9, -194}, 0, {528, 496}, {12, 130, 0, 255} }},
{{ {2, -9, 0}, 0, {528, -16}, {12, 130, 0, 255} }},
{{ {0, -9, 0}, 0, {496, -16}, {12, 130, 0, 255} }},
{{ {0, -9, -194}, 0, {496, 496}, {12, 130, 0, 255} }},
{{ {0, -9, -194}, 0, {496, 496}, {244, 130, 0, 255} }},
{{ {0, -9, 0}, 0, {496, -16}, {244, 130, 0, 255} }},
{{ {-2, -9, 0}, 0, {464, -16}, {244, 130, 0, 255} }},
{{ {-2, -9, -194}, 0, {464, 496}, {244, 130, 0, 255} }},
{{ {-2, -9, -194}, 0, {464, 496}, {219, 134, 0, 255} }},
{{ {-2, -9, 0}, 0, {464, -16}, {219, 134, 0, 255} }},
{{ {-3, -8, 0}, 0, {432, -16}, {219, 134, 0, 255} }},
{{ {-3, -8, -194}, 0, {432, 496}, {219, 134, 0, 255} }},
{{ {-3, -8, -194}, 0, {432, 496}, {196, 144, 0, 255} }},
{{ {-3, -8, 0}, 0, {432, -16}, {196, 144, 0, 255} }},
{{ {-5, -7, 0}, 0, {400, -16}, {196, 144, 0, 255} }},
{{ {-5, -7, -194}, 0, {400, 496}, {196, 144, 0, 255} }},
{{ {-5, -7, -194}, 0, {400, 496}, {175, 158, 0, 255} }},
{{ {-5, -7, 0}, 0, {400, -16}, {175, 158, 0, 255} }},
{{ {-6, -6, 0}, 0, {368, -16}, {175, 158, 0, 255} }},
{{ {-6, -6, -194}, 0, {368, 496}, {175, 158, 0, 255} }},
{{ {-6, -6, -194}, 0, {368, 496}, {158, 175, 0, 255} }},
{{ {-6, -6, 0}, 0, {368, -16}, {158, 175, 0, 255} }},
{{ {-7, -5, 0}, 0, {336, -16}, {158, 175, 0, 255} }},
{{ {-7, -5, -194}, 0, {336, 496}, {158, 175, 0, 255} }},
{{ {-7, -5, -194}, 0, {336, 496}, {144, 196, 0, 255} }},
{{ {-7, -5, 0}, 0, {336, -16}, {144, 196, 0, 255} }},
{{ {-8, -3, 0}, 0, {304, -16}, {144, 196, 0, 255} }},
{{ {-8, -3, -194}, 0, {304, 496}, {144, 196, 0, 255} }},
{{ {-8, -3, -194}, 0, {304, 496}, {134, 219, 0, 255} }},
{{ {-8, -3, 0}, 0, {304, -16}, {134, 219, 0, 255} }},
{{ {-9, -2, 0}, 0, {272, -16}, {134, 219, 0, 255} }},
{{ {-9, -2, -194}, 0, {272, 496}, {134, 219, 0, 255} }},
{{ {-9, -2, -194}, 0, {272, 496}, {130, 244, 0, 255} }},
{{ {-9, -2, 0}, 0, {272, -16}, {130, 244, 0, 255} }},
{{ {-9, 0, 0}, 0, {240, -16}, {130, 244, 0, 255} }},
{{ {-9, 0, -194}, 0, {240, 496}, {130, 244, 0, 255} }},
{{ {-9, 0, -194}, 0, {240, 496}, {130, 12, 0, 255} }},
{{ {-9, 0, 0}, 0, {240, -16}, {130, 12, 0, 255} }},
{{ {-9, 2, 0}, 0, {208, -16}, {130, 12, 0, 255} }},
{{ {-9, 2, -194}, 0, {208, 496}, {130, 12, 0, 255} }},
{{ {-9, 2, -194}, 0, {208, 496}, {134, 37, 0, 255} }},
{{ {-9, 2, 0}, 0, {208, -16}, {134, 37, 0, 255} }},
{{ {-8, 3, 0}, 0, {176, -16}, {134, 37, 0, 255} }},
{{ {-8, 3, -194}, 0, {176, 496}, {134, 37, 0, 255} }},
{{ {-8, 3, -194}, 0, {176, 496}, {144, 60, 0, 255} }},
{{ {-8, 3, 0}, 0, {176, -16}, {144, 60, 0, 255} }},
{{ {-7, 5, 0}, 0, {144, -16}, {144, 60, 0, 255} }},
{{ {-7, 5, -194}, 0, {144, 496}, {144, 60, 0, 255} }},
{{ {-7, 5, -194}, 0, {144, 496}, {158, 81, 0, 255} }},
{{ {-7, 5, 0}, 0, {144, -16}, {158, 81, 0, 255} }},
{{ {-6, 6, 0}, 0, {112, -16}, {158, 81, 0, 255} }},
{{ {-6, 6, -194}, 0, {112, 496}, {158, 81, 0, 255} }},
{{ {-6, 6, -194}, 0, {112, 496}, {175, 98, 0, 255} }},
{{ {-6, 6, 0}, 0, {112, -16}, {175, 98, 0, 255} }},
{{ {-5, 7, 0}, 0, {80, -16}, {175, 98, 0, 255} }},
{{ {-5, 7, -194}, 0, {80, 496}, {175, 98, 0, 255} }},
{{ {-5, 7, -194}, 0, {80, 496}, {196, 112, 0, 255} }},
{{ {-5, 7, 0}, 0, {80, -16}, {196, 112, 0, 255} }},
{{ {-3, 8, 0}, 0, {48, -16}, {196, 112, 0, 255} }},
{{ {-3, 8, -194}, 0, {48, 496}, {196, 112, 0, 255} }},
{{ {3, 8, 0}, 0, {334, 525}, {0, 0, 127, 255} }},
{{ {2, 9, 0}, 0, {288, 511}, {0, 0, 127, 255} }},
{{ {0, 9, 0}, 0, {240, 506}, {0, 0, 127, 255} }},
{{ {-3, 8, 0}, 0, {146, 525}, {0, 0, 127, 255} }},
{{ {-2, 9, 0}, 0, {192, 511}, {0, 0, 127, 255} }},
{{ {-8, 3, 0}, 0, {13, 658}, {0, 0, 127, 255} }},
{{ {-6, 6, 0}, 0, {66, 578}, {0, 0, 127, 255} }},
{{ {-5, 7, 0}, 0, {103, 548}, {0, 0, 127, 255} }},
{{ {-7, 5, 0}, 0, {36, 615}, {0, 0, 127, 255} }},
{{ {-9, 2, 0}, 0, {-1, 704}, {0, 0, 127, 255} }},
{{ {-9, 0, 0}, 0, {-6, 752}, {0, 0, 127, 255} }},
{{ {-8, -3, 0}, 0, {13, 846}, {0, 0, 127, 255} }},
{{ {-9, -2, 0}, 0, {-1, 800}, {0, 0, 127, 255} }},
{{ {-3, -8, 0}, 0, {146, 979}, {0, 0, 127, 255} }},
{{ {-6, -6, 0}, 0, {66, 926}, {0, 0, 127, 255} }},
{{ {-7, -5, 0}, 0, {36, 889}, {0, 0, 127, 255} }},
{{ {-5, -7, 0}, 0, {103, 956}, {0, 0, 127, 255} }},
{{ {-2, -9, 0}, 0, {192, 993}, {0, 0, 127, 255} }},
{{ {0, -9, 0}, 0, {240, 998}, {0, 0, 127, 255} }},
{{ {3, -8, 0}, 0, {334, 979}, {0, 0, 127, 255} }},
{{ {2, -9, 0}, 0, {288, 993}, {0, 0, 127, 255} }},
{{ {8, -3, 0}, 0, {467, 846}, {0, 0, 127, 255} }},
{{ {6, -6, 0}, 0, {414, 926}, {0, 0, 127, 255} }},
{{ {5, -7, 0}, 0, {377, 956}, {0, 0, 127, 255} }},
{{ {7, -5, 0}, 0, {444, 889}, {0, 0, 127, 255} }},
{{ {9, -2, 0}, 0, {481, 800}, {0, 0, 127, 255} }},
{{ {9, 0, 0}, 0, {486, 752}, {0, 0, 127, 255} }},
{{ {8, 3, 0}, 0, {467, 658}, {0, 0, 127, 255} }},
{{ {9, 2, 0}, 0, {481, 704}, {0, 0, 127, 255} }},
{{ {6, 6, 0}, 0, {414, 578}, {0, 0, 127, 255} }},
{{ {7, 5, 0}, 0, {444, 615}, {0, 0, 127, 255} }},
{{ {5, 7, 0}, 0, {377, 548}, {0, 0, 127, 255} }},
{{ {-3, 8, -194}, 0, {48, 496}, {219, 122, 0, 255} }},
{{ {-3, 8, 0}, 0, {48, -16}, {219, 122, 0, 255} }},
{{ {-2, 9, 0}, 0, {16, -16}, {219, 122, 0, 255} }},
{{ {-2, 9, -194}, 0, {16, 496}, {219, 122, 0, 255} }},
{{ {-2, 9, -194}, 0, {16, 496}, {244, 126, 0, 255} }},
{{ {-2, 9, 0}, 0, {16, -16}, {244, 126, 0, 255} }},
{{ {0, 9, 0}, 0, {-16, -16}, {244, 126, 0, 255} }},
{{ {0, 9, -194}, 0, {-16, 496}, {244, 126, 0, 255} }},
{{ {-2, 9, -194}, 0, {704, 511}, {0, 0, 129, 255} }},
{{ {0, 9, -194}, 0, {752, 506}, {0, 0, 129, 255} }},
{{ {2, 9, -194}, 0, {800, 511}, {0, 0, 129, 255} }},
{{ {5, 7, -194}, 0, {889, 548}, {0, 0, 129, 255} }},
{{ {3, 8, -194}, 0, {846, 525}, {0, 0, 129, 255} }},
{{ {9, 2, -194}, 0, {993, 704}, {0, 0, 129, 255} }},
{{ {7, 5, -194}, 0, {956, 615}, {0, 0, 129, 255} }},
{{ {6, 6, -194}, 0, {926, 578}, {0, 0, 129, 255} }},
{{ {8, 3, -194}, 0, {979, 658}, {0, 0, 129, 255} }},
{{ {9, 0, -194}, 0, {998, 752}, {0, 0, 129, 255} }},
{{ {9, -2, -194}, 0, {993, 800}, {0, 0, 129, 255} }},
{{ {7, -5, -194}, 0, {956, 889}, {0, 0, 129, 255} }},
{{ {8, -3, -194}, 0, {979, 846}, {0, 0, 129, 255} }},
{{ {2, -9, -194}, 0, {800, 993}, {0, 0, 129, 255} }},
{{ {5, -7, -194}, 0, {889, 956}, {0, 0, 129, 255} }},
{{ {6, -6, -194}, 0, {926, 926}, {0, 0, 129, 255} }},
{{ {3, -8, -194}, 0, {846, 979}, {0, 0, 129, 255} }},
{{ {0, -9, -194}, 0, {752, 998}, {0, 0, 129, 255} }},
{{ {-2, -9, -194}, 0, {704, 993}, {0, 0, 129, 255} }},
{{ {-5, -7, -194}, 0, {615, 956}, {0, 0, 129, 255} }},
{{ {-3, -8, -194}, 0, {658, 979}, {0, 0, 129, 255} }},
{{ {-9, -2, -194}, 0, {511, 800}, {0, 0, 129, 255} }},
{{ {-7, -5, -194}, 0, {548, 889}, {0, 0, 129, 255} }},
{{ {-6, -6, -194}, 0, {578, 926}, {0, 0, 129, 255} }},
{{ {-7, -5, -194}, 0, {548, 889}, {0, 0, 129, 255} }},
{{ {-8, -3, -194}, 0, {525, 846}, {0, 0, 129, 255} }},
{{ {-9, -2, -194}, 0, {511, 800}, {0, 0, 129, 255} }},
{{ {-9, 0, -194}, 0, {506, 752}, {0, 0, 129, 255} }},
{{ {-9, 2, -194}, 0, {511, 704}, {0, 0, 129, 255} }},
{{ {-7, 5, -194}, 0, {548, 615}, {0, 0, 129, 255} }},
{{ {-8, 3, -194}, 0, {525, 658}, {0, 0, 129, 255} }},
{{ {-2, 9, -194}, 0, {704, 511}, {0, 0, 129, 255} }},
{{ {-5, 7, -194}, 0, {615, 548}, {0, 0, 129, 255} }},
{{ {-6, 6, -194}, 0, {578, 578}, {0, 0, 129, 255} }},
{{ {-3, 8, -194}, 0, {658, 525}, {0, 0, 129, 255} }},
{{ {9, 2, -194}, 0, {993, 704}, {0, 0, 129, 255} }},
{{ {2, -9, -194}, 0, {800, 993}, {0, 0, 129, 255} }},
{{ {-4, -21, -194}, 0, {704, 511}, {0, 0, 127, 255} }},
{{ {0, -22, -194}, 0, {752, 506}, {0, 0, 127, 255} }},
{{ {4, -21, -194}, 0, {800, 511}, {0, 0, 127, 255} }},
{{ {12, -18, -194}, 0, {889, 548}, {0, 0, 127, 255} }},
{{ {8, -20, -194}, 0, {846, 525}, {0, 0, 127, 255} }},
{{ {21, -4, -194}, 0, {993, 704}, {0, 0, 127, 255} }},
{{ {18, -12, -194}, 0, {956, 615}, {0, 0, 127, 255} }},
{{ {15, -15, -194}, 0, {926, 578}, {0, 0, 127, 255} }},
{{ {20, -8, -194}, 0, {979, 658}, {0, 0, 127, 255} }},
{{ {22, 0, -194}, 0, {998, 752}, {0, 0, 127, 255} }},
{{ {21, 4, -194}, 0, {993, 800}, {0, 0, 127, 255} }},
{{ {18, 12, -194}, 0, {956, 889}, {0, 0, 127, 255} }},
{{ {20, 8, -194}, 0, {979, 846}, {0, 0, 127, 255} }},
{{ {4, 21, -194}, 0, {800, 993}, {0, 0, 127, 255} }},
{{ {12, 18, -194}, 0, {889, 956}, {0, 0, 127, 255} }},
{{ {15, 15, -194}, 0, {926, 926}, {0, 0, 127, 255} }},
{{ {8, 20, -194}, 0, {846, 979}, {0, 0, 127, 255} }},
{{ {0, 22, -194}, 0, {752, 998}, {0, 0, 127, 255} }},
{{ {-4, 21, -194}, 0, {704, 993}, {0, 0, 127, 255} }},
{{ {4, 21, -194}, 0, {800, 993}, {0, 0, 127, 255} }},
{{ {-4, 21, -194}, 0, {704, 993}, {0, 0, 127, 255} }},
{{ {-12, 18, -194}, 0, {615, 956}, {0, 0, 127, 255} }},
{{ {-8, 20, -194}, 0, {658, 979}, {0, 0, 127, 255} }},
{{ {-21, 4, -194}, 0, {511, 800}, {0, 0, 127, 255} }},
{{ {-18, 12, -194}, 0, {548, 889}, {0, 0, 127, 255} }},
{{ {-15, 15, -194}, 0, {578, 926}, {0, 0, 127, 255} }},
{{ {-20, 8, -194}, 0, {525, 846}, {0, 0, 127, 255} }},
{{ {-22, 0, -194}, 0, {506, 752}, {0, 0, 127, 255} }},
{{ {-21, -4, -194}, 0, {511, 704}, {0, 0, 127, 255} }},
{{ {-18, -12, -194}, 0, {548, 615}, {0, 0, 127, 255} }},
{{ {-20, -8, -194}, 0, {525, 658}, {0, 0, 127, 255} }},
{{ {-4, -21, -194}, 0, {704, 511}, {0, 0, 127, 255} }},
{{ {-12, -18, -194}, 0, {615, 548}, {0, 0, 127, 255} }},
{{ {-15, -15, -194}, 0, {578, 578}, {0, 0, 127, 255} }},
{{ {-8, -20, -194}, 0, {658, 525}, {0, 0, 127, 255} }},
{{ {21, -4, -194}, 0, {993, 704}, {0, 0, 127, 255} }},
};
Gfx handle_Cylinder_mesh_tri_0[106] = {
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 0, 30, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 15, 16, 17, 0),
gsSP2Triangles(18, 19, 20, 0, 21, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 27, 28, 29, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 30, 30, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 15, 16, 17, 0),
gsSP2Triangles(18, 19, 20, 0, 21, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 27, 28, 29, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 60, 30, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 9, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 15, 16, 17, 0),
gsSP2Triangles(18, 19, 20, 0, 21, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 27, 28, 29, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 90, 30, 0),
gsSP2Triangles(0, 1, 2, 0, 3, 4, 5, 0),
gsSP2Triangles(6, 7, 8, 0, 6, 8, 9, 0),
gsSP2Triangles(10, 11, 12, 0, 10, 12, 13, 0),
gsSP2Triangles(14, 15, 16, 0, 14, 16, 17, 0),
gsSP2Triangles(18, 19, 20, 0, 18, 20, 21, 0),
gsSP2Triangles(22, 23, 24, 0, 22, 24, 25, 0),
gsSP2Triangles(26, 27, 28, 0, 26, 28, 29, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 120, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
gsSP2Triangles(16, 17, 18, 0, 16, 18, 19, 0),
gsSP2Triangles(20, 21, 22, 0, 20, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 24, 26, 27, 0),
gsSP2Triangles(28, 29, 30, 0, 28, 30, 31, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 152, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
gsSP2Triangles(16, 17, 18, 0, 16, 18, 19, 0),
gsSP2Triangles(20, 21, 22, 0, 20, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 24, 26, 27, 0),
gsSP2Triangles(28, 29, 30, 0, 28, 30, 31, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 184, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0),
gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
gsSP2Triangles(16, 17, 18, 0, 16, 18, 19, 0),
gsSP2Triangles(20, 21, 22, 0, 20, 22, 23, 0),
gsSP2Triangles(24, 25, 26, 0, 24, 26, 27, 0),
gsSP2Triangles(28, 29, 30, 0, 28, 30, 31, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 216, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(2, 4, 3, 0, 0, 3, 5, 0),
gsSP2Triangles(3, 6, 5, 0, 3, 7, 6, 0),
gsSP2Triangles(6, 8, 5, 0, 5, 9, 10, 0),
gsSP2Triangles(5, 10, 11, 0, 10, 12, 11, 0),
gsSP2Triangles(5, 11, 13, 0, 11, 14, 13, 0),
gsSP2Triangles(11, 15, 14, 0, 14, 16, 13, 0),
gsSP2Triangles(13, 17, 18, 0, 13, 18, 19, 0),
gsSP2Triangles(18, 20, 19, 0, 13, 19, 21, 0),
gsSP2Triangles(19, 22, 21, 0, 19, 23, 22, 0),
gsSP2Triangles(22, 24, 21, 0, 21, 25, 26, 0),
gsSP2Triangles(21, 26, 27, 0, 26, 28, 27, 0),
gsSP2Triangles(21, 27, 0, 0, 27, 29, 0, 0),
gsSP2Triangles(27, 30, 29, 0, 29, 31, 0, 0),
gsSP2Triangles(0, 5, 13, 0, 13, 21, 0, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 248, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(4, 5, 6, 0, 4, 6, 7, 0),
gsSP2Triangles(8, 9, 10, 0, 8, 10, 11, 0),
gsSP2Triangles(10, 12, 11, 0, 8, 11, 13, 0),
gsSP2Triangles(11, 14, 13, 0, 11, 15, 14, 0),
gsSP2Triangles(14, 16, 13, 0, 13, 17, 18, 0),
gsSP2Triangles(13, 18, 19, 0, 18, 20, 19, 0),
gsSP2Triangles(13, 19, 21, 0, 19, 22, 21, 0),
gsSP2Triangles(19, 23, 22, 0, 22, 24, 21, 0),
gsSP2Triangles(21, 25, 26, 0, 21, 26, 27, 0),
gsSP2Triangles(26, 28, 27, 0, 21, 27, 29, 0),
gsSP2Triangles(27, 30, 29, 0, 27, 31, 30, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 280, 32, 0),
gsSP2Triangles(0, 1, 2, 0, 2, 3, 4, 0),
gsSP2Triangles(2, 4, 5, 0, 4, 6, 5, 0),
gsSP2Triangles(2, 5, 7, 0, 5, 8, 7, 0),
gsSP2Triangles(5, 9, 8, 0, 8, 10, 7, 0),
gsSP2Triangles(7, 11, 12, 0, 12, 2, 7, 0),
gsSP2Triangles(13, 14, 15, 0, 13, 15, 16, 0),
gsSP2Triangles(15, 17, 16, 0, 13, 16, 18, 0),
gsSP2Triangles(16, 19, 18, 0, 16, 20, 19, 0),
gsSP2Triangles(19, 21, 18, 0, 18, 22, 23, 0),
gsSP2Triangles(18, 23, 24, 0, 23, 25, 24, 0),
gsSP2Triangles(18, 24, 26, 0, 24, 27, 26, 0),
gsSP2Triangles(24, 28, 27, 0, 27, 29, 26, 0),
gsSP1Triangle(26, 30, 31, 0),
gsSPVertex(handle_Cylinder_mesh_vtx_0 + 312, 17, 0),
gsSP2Triangles(0, 1, 2, 0, 1, 3, 2, 0),
gsSP2Triangles(0, 2, 4, 0, 2, 5, 4, 0),
gsSP2Triangles(2, 6, 5, 0, 5, 7, 4, 0),
gsSP2Triangles(4, 8, 9, 0, 4, 9, 10, 0),
gsSP2Triangles(9, 11, 10, 0, 4, 10, 12, 0),
gsSP2Triangles(10, 13, 12, 0, 10, 14, 13, 0),
gsSP2Triangles(13, 15, 12, 0, 12, 16, 0, 0),
gsSP1Triangle(0, 4, 12, 0),
gsSPEndDisplayList(),
};
Gfx mat_handle_f3dlite_material[9] = {
gsSPClearGeometryMode(G_CLIPPING | G_ZBUFFER),
//gsSPSetLights1(handle_f3dlite_material_lights),
gsDPPipeSync(),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsDPSetAlphaDither(G_AD_NOISE),
gsSPTexture(65535, 65535, 0, 0, 1),
gsSPEndDisplayList(),
};
Gfx mat_revert_handle_f3dlite_material[4] = {
gsSPSetGeometryMode(G_CLIPPING | G_ZBUFFER),
gsDPPipeSync(),
gsDPSetAlphaDither(G_AD_DISABLE),
gsSPEndDisplayList(),
};
Gfx handle_Cylinder_mesh[13] = {
gsSPClearGeometryMode(G_LIGHTING),
gsSPVertex(handle_Cylinder_mesh_vtx_cull + 0, 8, 0),
gsSPSetGeometryMode(G_LIGHTING),
gsSPCullDisplayList(0, 7),
gsSPDisplayList(mat_handle_f3dlite_material),
gsSPDisplayList(handle_Cylinder_mesh_tri_0),
gsSPDisplayList(mat_revert_handle_f3dlite_material),
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 0),
gsSPEndDisplayList(),
};
-7
View File
@@ -1,7 +0,0 @@
#pragma once
#include <libultraship/libultraship.h>
#include <libultra/gbi.h>
extern Gfx handle_Cylinder_mesh[];
extern Lights1 handle_f3dlite_material_lights;
+23
View File
@@ -0,0 +1,23 @@
#include <libultraship/libultraship.h>
#include <libultra/gbi.h>
#include "Handles.h"
namespace Editor {
Handles::Handles() {
Pos = &pos;
Rot = &rot;
}
void Handles::Load() {
}
void Handles::Tick() {
}
void Handles::Draw() {
}
}
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#include <libultraship/libultraship.h>
#include <libultra/gbi.h>
#include "GameObject.h"
namespace Editor {
class Handles : public GameObject {
Handles();
virtual void Tick() override;
virtual void Draw() override;
virtual void Load() override;
FVector pos;
IRotator rot;
};
}
-1
View File
@@ -15,7 +15,6 @@
#include "Gizmo.h"
#include "EditorMath.h"
#include "Handle.h"
extern "C" {
#include "common_structs.h"
+2 -2
View File
@@ -84,7 +84,7 @@ void ObjectPicker::DragHandle() {
for (auto tri = eGizmo.RedCollision.Triangles.begin(); tri < eGizmo.RedCollision.Triangles.end(); tri++) {
float t;
//FVector pos = TransformPoint(*tri, FVector(eGizmo.Pos.x, eGizmo.Pos.y, eGizmo.Pos.z - eGizmo._gizmoOffset), {0, 90, 0}, {1, 1, 1});
FVector pos = FVector(eGizmo.Pos.x, eGizmo.Pos.y, eGizmo.Pos.z - eGizmo._gizmoOffset);
if (IntersectRayTriangle(ray, *tri, pos, t)) {
eGizmo.SelectedHandle = Gizmo::GizmoHandle::Z_Axis;
@@ -98,7 +98,7 @@ void ObjectPicker::DragHandle() {
for (auto tri = eGizmo.GreenCollision.Triangles.begin(); tri < eGizmo.GreenCollision.Triangles.end(); tri++) {
float t;
FVector pos = TransformPoint(FVector(eGizmo.Pos.x - eGizmo._gizmoOffset, eGizmo.Pos.y, eGizmo.Pos.z), {90, 0, 0}, {1, 1, 1});
FVector pos = (FVector(eGizmo.Pos.x - eGizmo._gizmoOffset, eGizmo.Pos.y, eGizmo.Pos.z));
if (IntersectRayTriangle(ray, *tri, pos, t)) {
eGizmo.SelectedHandle = Gizmo::GizmoHandle::X_Axis;
eGizmo._ray = ray.Direction;
-60
View File
@@ -1,60 +0,0 @@
#include <iostream>
#include <libultraship/libultraship.h>
#include <libultra/gbi.h>
#include "Water.h"
#include "../CoreMath.h"
#include <libultra/types.h>
#include "../World.h"
#include "port/Engine.h"
#include "engine/actors/Ship.h"
#include "port/Game.h"
#include "Gizmo.h"
#include "EditorMath.h"
extern "C" {
#include "main.h"
#include "common_structs.h"
#include "defines.h"
#include "actors.h"
#include "camera.h"
#include "math_util.h"
#include "math_util_2.h"
}
namespace Editor {
size_t WaterVolumeObject::NumWaterVolumes = 0;
WaterVolumeObject::WaterVolumeObject(const char* name, FVector* pos) : GameObject() {
Name = name;
Pos = &WaterPos;
Rot = &WaterRot;
Scale = &WaterScale;
DespawnFlag = &_despawnFlag;
DespawnValue = -1;
Collision = CollisionType::VTX_INTERSECT;
NumWaterVolumes += 1;
}
void WaterVolumeObject::Load() {
}
void WaterVolumeObject::Tick() {
}
void WaterVolumeObject::Draw() {
Mat4 mtx;
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
IRotator rot = WaterRot;
rot.yaw += 0x4000;
ApplyMatrixTransformations(mtx, WaterPos, rot, WaterScale);
Editor_AddMatrix(mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gDisplayListHead++, (Gfx*)"__OTR__editor/water/water_plane");
}
}
-23
View File
@@ -1,23 +0,0 @@
#pragma once
#include <libultraship/libultraship.h>
#include "CoreMath.h"
#include "GameObject.h"
namespace Editor {
class WaterVolumeObject : public GameObject {
public:
WaterVolumeObject(const char* name, FVector* pos);
virtual void Draw() override;
virtual void Tick() override;
virtual void Load() override;
static size_t NumWaterVolumes;
FVector WaterPos = FVector(0, 100, 0);
IRotator WaterRot = IRotator(0, 0, 0);
FVector WaterScale = FVector(0.1, 0.1, 0.1);
s32 _despawnFlag = 0;
};
}
-4
View File
@@ -48,7 +48,6 @@
#include "engine/editor/Editor.h"
#include "engine/editor/EditorMath.h"
#include "engine/editor/SceneManager.h"
#include "engine/editor/Water.h"
extern "C" {
#include "main.h"
@@ -400,9 +399,6 @@ void CM_BeginPlay() {
}
gEditor.AddLight("Sun", nullptr, D_800DC610[1].l->l.dir);
Editor::WaterVolumeObject* volume = gEditor.AddWaterVolume("Water", nullptr);
f32 waterLevel = gWorldInstance.CurrentCourse->Props.WaterLevel;
volume->WaterPos = FVector(0, waterLevel, 0);
course->BeginPlay();
}
+2 -9
View File
@@ -142,7 +142,7 @@ namespace Editor {
}
if (!foundTrackFile) {
std::string label = fmt::format("{} {}", "ADD PATH AND MESH TO TRACK PROPS AND CLICK HERE TO INIT TRACK:", track);
std::string label = fmt::format("{} {}", ICON_FA_EXCLAMATION_TRIANGLE, track);
if (ImGui::Button(label.c_str())) {
SetSceneFile(TrackPath[track]);
SaveLevel();
@@ -158,13 +158,6 @@ namespace Editor {
FVector pos = GetPositionAheadOfCamera(300.0f);
size_t i_actor = 0;
std::string volumeLabel = fmt::format("{}##{}", "Water Volume", i_actor);
if (ImGui::Button(volumeLabel.c_str())) {
auto* volume = gEditor.AddWaterVolume("Water Volume", nullptr);
volume->WaterPos = pos;
i_actor += 1;
}
for (const auto& actor : ActorList) {
if ((i_actor != 0) && (i_actor % 10 == 0)) {
} else {
@@ -241,7 +234,7 @@ namespace Editor {
size_t start = pos + 7; // Move past "tracks/"
size_t end = file.find('/', start); // Find next '/'
std::string trackName = file.substr(start, end - start);
TrackAssetMap[trackName].push_back(file);
// Insert into set (ensuring uniqueness)
+1
View File
@@ -39,6 +39,7 @@ namespace Editor {
ImGui::InputText("Course Length", gWorldInstance.CurrentCourse->Props.CourseLength, IM_ARRAYSIZE(lengthBuffer));
ImGui::InputFloat("Minimap Finishline X Offset", &gWorldInstance.CurrentCourse->Props.MinimapFinishlineX);
ImGui::InputFloat("Minimap Finishline Y Offset", &gWorldInstance.CurrentCourse->Props.MinimapFinishlineY);
ImGui::InputFloat("Water Level", &gWorldInstance.CurrentCourse->Props.WaterLevel);
if (ImGui::CollapsingHeader("Camera")) {
ImGui::InputFloat("Near Perspective", &gWorldInstance.CurrentCourse->Props.NearPersp);