mirror of
https://github.com/zeldaret/tp
synced 2026-08-08 18:43:50 -04:00
Z2AudioLib: Migrate declarations out of functions.h to respective files (#96)
Removes the strong dependency on a single header file and moves declarations to their respective header file. This allows for making dependencies explicit in cpp files and other headers, and also makes it much easier to track where everything related to a particular component is. This change also creates a few header files that previously didn't exist, making it much nicer for people implementing things, as they won't need to create the header file, it'll just be there ready to go. Ideally functions.h wouldn't even be a thing, as this header adds a lot of preprocessing overhead due to its size, and will continue to grow significantly larger over the lifespan of the project, which can also impact the performance of editors that do dependency lookups and context-aware syntax highlighting.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define C_CC_D_H_
|
||||
|
||||
#include "SComponent/c_m3d/c_m3d.h"
|
||||
#include "SComponent/c_m3d_g_cyl.h"
|
||||
#include "global.h"
|
||||
|
||||
class cCcD_ShapeAttr {
|
||||
|
||||
@@ -19,15 +19,6 @@ private:
|
||||
float field_0x1c;
|
||||
};
|
||||
|
||||
class cM3dGCyl { /* Cylinder class */
|
||||
public:
|
||||
private:
|
||||
cXyz center;
|
||||
float radius;
|
||||
float height;
|
||||
void* vtable;
|
||||
};
|
||||
|
||||
class cM3dGAab { /* Axis-aligned bounding box */
|
||||
public:
|
||||
private:
|
||||
|
||||
@@ -18,6 +18,12 @@ public:
|
||||
bool cross(const cM3dGSph*, cXyz*) const;
|
||||
bool cross(const cM3dGCyl*, cXyz*) const;
|
||||
void calcMinMax(cXyz*, cXyz*);
|
||||
|
||||
private:
|
||||
cXyz center;
|
||||
float radius;
|
||||
float height;
|
||||
void* vtable;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -18,4 +18,9 @@ public:
|
||||
void GetMinMaxCube(cXyz&, cXyz&) const;
|
||||
};
|
||||
|
||||
// additional symbols needed for cM3dGSph
|
||||
extern "C" {
|
||||
void Set__8cM3dGSphFRC4cXyzf(void);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -17,4 +17,10 @@ public:
|
||||
|
||||
extern csXyz lbl_80451160; // SComponent::csXyz::Zero
|
||||
|
||||
// additional symbols needed for csXyz
|
||||
extern "C" {
|
||||
void __pl__FsRC7cSAngle(void);
|
||||
void __mi__FsRC7cSAngle(void);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user