mirror of https://github.com/zeldaret/tp.git
c_API
This commit is contained in:
parent
0b09be34fb
commit
87bc0e711b
|
|
@ -3,4 +3,8 @@
|
|||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
typedef void (*cAPIGph_Mthd)(void);
|
||||
|
||||
extern cAPIGph_Mthd g_cAPI_Interface[6];
|
||||
|
||||
#endif /* C_API_H */
|
||||
|
|
|
|||
|
|
@ -3,4 +3,8 @@
|
|||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
void cAPIGph_Painter(void);
|
||||
void cAPIGph_BeforeOfDraw(void);
|
||||
void cAPIGph_AfterOfDraw(void);
|
||||
|
||||
#endif /* C_API_GRAPHIC_H */
|
||||
|
|
|
|||
|
|
@ -2,5 +2,31 @@
|
|||
#define C_M3D_G_CYL_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
|
||||
// Cylinder
|
||||
struct cM3dGCylS {
|
||||
cXyz mCenter;
|
||||
f32 mRadius;
|
||||
f32 mHeight;
|
||||
};
|
||||
class cM3dGSph;
|
||||
|
||||
class cM3dGCyl : public cM3dGCylS {
|
||||
public:
|
||||
cM3dGCyl(const cXyz*, f32, f32);
|
||||
~cM3dGCyl();
|
||||
void Set(const cM3dGCylS&);
|
||||
void Set(const cXyz&, f32, f32);
|
||||
void SetC(const cXyz&);
|
||||
void SetH(f32);
|
||||
void SetR(f32);
|
||||
bool cross(const cM3dGSph*, cXyz*) const;
|
||||
bool cross(const cM3dGCyl*, cXyz*) const;
|
||||
void calcMinMax(cXyz*, cXyz*);
|
||||
const cXyz& GetCP(void) const { return mCenter; }
|
||||
f32 GetR(void) const { return mRadius; }
|
||||
f32 GetH(void) const { return mHeight; }
|
||||
};
|
||||
|
||||
#endif /* C_M3D_G_CYL_H */
|
||||
|
|
|
|||
|
|
@ -7,12 +7,6 @@
|
|||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
extern "C" extern void* g_cAPI_Interface[6];
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
|
@ -24,20 +18,13 @@ void mDoGph_AfterOfDraw();
|
|||
void mDoGph_Painter();
|
||||
void mDoGph_Create();
|
||||
|
||||
extern "C" void mDoGph_BlankingON__Fv();
|
||||
extern "C" void mDoGph_BlankingOFF__Fv();
|
||||
extern "C" void mDoGph_BeforeOfDraw__Fv();
|
||||
extern "C" void mDoGph_AfterOfDraw__Fv();
|
||||
extern "C" void mDoGph_Painter__Fv();
|
||||
extern "C" void mDoGph_Create__Fv();
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803C3528-803C3540 0018+00 s=0 e=3 z=0 None .data g_cAPI_Interface */
|
||||
SECTION_DATA void* g_cAPI_Interface[6] = {
|
||||
(void*)mDoGph_Create__Fv, (void*)mDoGph_BeforeOfDraw__Fv, (void*)mDoGph_AfterOfDraw__Fv,
|
||||
(void*)mDoGph_Painter__Fv, (void*)mDoGph_BlankingON__Fv, (void*)mDoGph_BlankingOFF__Fv,
|
||||
cAPIGph_Mthd g_cAPI_Interface[6] = {
|
||||
mDoGph_Create, mDoGph_BeforeOfDraw, mDoGph_AfterOfDraw,
|
||||
mDoGph_Painter, mDoGph_BlankingON, mDoGph_BlankingOFF,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,57 +4,25 @@
|
|||
//
|
||||
|
||||
#include "SSystem/SComponent/c_API_graphic.h"
|
||||
#include "SSystem/SComponent/c_API.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
void cAPIGph_Painter();
|
||||
void cAPIGph_BeforeOfDraw();
|
||||
void cAPIGph_AfterOfDraw();
|
||||
|
||||
extern "C" void cAPIGph_Painter__Fv();
|
||||
extern "C" void cAPIGph_BeforeOfDraw__Fv();
|
||||
extern "C" void cAPIGph_AfterOfDraw__Fv();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
extern "C" extern void* g_cAPI_Interface[6];
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802632C8-802632F8 0030+00 s=0 e=1 z=0 None .text cAPIGph_Painter__Fv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void cAPIGph_Painter() {
|
||||
nofralloc
|
||||
#include "asm/SSystem/SComponent/c_API_graphic/cAPIGph_Painter__Fv.s"
|
||||
void cAPIGph_Painter(void) {
|
||||
g_cAPI_Interface[3]();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802632F8-80263328 0030+00 s=0 e=1 z=0 None .text cAPIGph_BeforeOfDraw__Fv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void cAPIGph_BeforeOfDraw() {
|
||||
nofralloc
|
||||
#include "asm/SSystem/SComponent/c_API_graphic/cAPIGph_BeforeOfDraw__Fv.s"
|
||||
void cAPIGph_BeforeOfDraw(void) {
|
||||
g_cAPI_Interface[1]();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 80263328-80263358 0030+00 s=0 e=1 z=0 None .text cAPIGph_AfterOfDraw__Fv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void cAPIGph_AfterOfDraw() {
|
||||
nofralloc
|
||||
#include "asm/SSystem/SComponent/c_API_graphic/cAPIGph_AfterOfDraw__Fv.s"
|
||||
void cAPIGph_AfterOfDraw(void) {
|
||||
g_cAPI_Interface[2]();
|
||||
}
|
||||
#pragma pop
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
// Translation Unit: c_m3d_g_cyl
|
||||
//
|
||||
|
||||
#include "SSystem/SComponent/c_m3d_g_cyl.h"
|
||||
// #include "SSystem/SComponent/c_m3d_g_cyl.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue