Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@
"-i src/dolphin/include",
"-i src/dolphin/src",
"-i src",
"-i src/rwsdk",
"-i include/rwsdk",
f"-i build/{config.version}/include",
f"-DBUILD_VERSION={version_num}",
f"-DVERSION_{config.version}",
Expand Down
46 changes: 45 additions & 1 deletion include/rwsdk/rphanim.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

#include "rwcore.h"
#include "rtanim.h"
#include "rtquat.h"

#define rpHANIMDEFAULTFRAMEID -1
#define rpHANIMSTREAMCURRENTVERSION 0x100

struct RpHAnimNodeInfo
{
Expand All @@ -12,6 +16,9 @@ struct RpHAnimNodeInfo
RwFrame* pFrame;
};

typedef struct RpHAnimNodeInfo RpHAnimNodeInfo;
typedef struct RpHAnimHierarchy RpHAnimHierarchy;

struct RpHAnimHierarchy
{
RwInt32 flags;
Expand All @@ -34,6 +41,43 @@ enum RpHAnimHierarchyFlag
rpHANIMHIERARCHYLOCALSPACEMATRICES = 0x4000,
rpHANIMHIERARCHYFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpHAnimHierarchyFlag RpHAnimHierarchyFlag;

typedef struct RpHAnimAtomicGlobalVars RpHAnimAtomicGlobalVars;

struct RpHAnimAtomicGlobalVars
{
RwInt32 engineOffset;
RwFreeList* HAnimFreeList;
};

typedef struct RpHAnimFrameExtension RpHAnimFrameExtension;

struct RpHAnimFrameExtension
{
RwInt32 id;
RpHAnimHierarchy* hierarchy;
};

typedef struct RpHAnimInterpFrame RpHAnimInterpFrame;

typedef struct RpHAnimKeyFrame RpHAnimKeyFrame;

struct RpHAnimKeyFrame
{
RpHAnimKeyFrame* prevFrame;
RwReal time;
RtQuat q;
RwV3d t;
};

struct RpHAnimInterpFrame
{
RpHAnimKeyFrame* keyFrame1;
RpHAnimKeyFrame* keyFrame2;
RtQuat q;
RwV3d t;
};

#ifdef __cplusplus
extern "C" {
Expand All @@ -60,4 +104,4 @@ extern RpHAnimHierarchy* RpHAnimFrameGetHierarchy(RwFrame* frame);
}
#endif

#endif
#endif
7 changes: 6 additions & 1 deletion include/rwsdk/rpmatfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ enum RpMatFXMaterialFlags
extern "C" {
#endif

typedef struct RxPipeline RxPipeline;
typedef enum RpMatFXGameCubePipeline RpMatFXGameCubePipeline;

extern RxPipeline* RpMatFXGetGameCubePipeline(RpMatFXGameCubePipeline gamecubePipeline);
extern RwBool RpMatFXPluginAttach(void);
extern RpAtomic* RpMatFXAtomicEnableEffects(RpAtomic* atomic);
extern RpWorldSector* RpMatFXWorldSectorEnableEffects(RpWorldSector* worldSector);
typedef enum RpMatFXMaterialFlags RpMatFXMaterialFlags;

extern RpMaterial* RpMatFXMaterialSetEffects(RpMaterial* material, RpMatFXMaterialFlags flags);
extern RpMaterial* RpMatFXMaterialSetupBumpMap(RpMaterial* material, RwTexture* texture,
RwFrame* frame, RwReal coef);
Expand Down Expand Up @@ -75,4 +80,4 @@ extern const RpMaterial* RpMatFXMaterialGetUVTransformMatrices(const RpMaterial*
}
#endif

#endif
#endif
9 changes: 7 additions & 2 deletions include/rwsdk/rpskin.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "rpworld.h"
#include "rphanim.h"

typedef struct RpSkin;
typedef struct RpSkin RpSkin;

struct RwMatrixWeights
{
Expand Down Expand Up @@ -34,13 +34,18 @@ extern RpSkin* RpSkinGeometryGetSkin(RpGeometry* geometry);
extern RpGeometry* RpSkinGeometrySetSkin(RpGeometry* geometry, RpSkin* skin);
extern RpSkin* RpSkinDestroy(RpSkin* skin);
extern RwUInt32 RpSkinGetNumBones(RpSkin* skin);
typedef struct RwMatrixWeights RwMatrixWeights;

extern const RwMatrixWeights* RpSkinGetVertexBoneWeights(RpSkin* skin);
extern const RwUInt32* RpSkinGetVertexBoneIndices(RpSkin* skin);
extern const RwMatrix* RpSkinGetSkinToBoneMatrices(RpSkin* skin);
typedef struct RpAtomic RpAtomic;
typedef enum RpSkinType RpSkinType;

extern RpAtomic* RpSkinAtomicSetType(RpAtomic* atomic, RpSkinType type);

#ifdef __cplusplus
}
#endif

#endif
#endif
35 changes: 30 additions & 5 deletions include/rwsdk/rpworld.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
#define RPWORLD_H

#include <rwsdk/rwcore.h>
#include "rpworld.h"

typedef struct RpLight;
typedef struct RpLight RpLight;
typedef struct RwSurfaceProperties RwSurfaceProperties;
typedef struct RpMaterial RpMaterial;

struct RpMaterial
{
Expand Down Expand Up @@ -81,20 +84,25 @@ struct RpBuildMeshTriangle
RwUInt16 pipelineIndex;
};

typedef struct RpBuildMeshTriangle RpBuildMeshTriangle;

struct RpBuildMesh
{
RwUInt32 triangleBufferSize;
RwUInt32 numTriangles;
RpBuildMeshTriangle* meshTriangles;
};

typedef struct RpMesh RpMesh;

struct RpMesh
{
RxVertexIndex* indices;
RwUInt32 numIndices;
RpMaterial* material;
};

typedef struct RpMeshHeader RpMeshHeader;
struct RpMeshHeader
{
RwUInt32 flags;
Expand All @@ -106,7 +114,7 @@ struct RpMeshHeader

typedef RpMesh* (*RpMeshCallBack)(RpMesh* mesh, RpMeshHeader* meshHeader, void* pData);

typedef struct RpGeometry;
typedef struct RpGeometry RpGeometry;

struct RpMorphTarget
{
Expand All @@ -116,6 +124,11 @@ struct RpMorphTarget
RwV3d* normals;
};

typedef struct RpMaterialList RpMaterialList;
typedef struct RpTriangle RpTriangle;
typedef struct RwTexCoords RwTexCoords;
typedef struct RpMorphTarget RpMorphTarget;

struct RpGeometry
{
RwObject object;
Expand Down Expand Up @@ -150,7 +163,7 @@ enum RpAtomicFlag
rpATOMICFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};

typedef struct RpClump;
typedef struct RpClump RpClump;

typedef RpClump* (*RpClumpCallBack)(RpClump* clump, void* data);

Expand All @@ -174,7 +187,7 @@ struct RpInterpolator
RwReal position;
};

typedef struct RpAtomic;
typedef struct RpAtomic RpAtomic;

typedef RpAtomic* (*RpAtomicCallBackRender)(RpAtomic* atomic);

Expand Down Expand Up @@ -318,6 +331,8 @@ typedef RpAtomic* (*RpAtomicCallBackRender)(RpAtomic* atomic);
#define RpAtomicSetPipeline RpAtomicSetPipelineMacro
#define RpAtomicGetPipeline RpAtomicGetPipelineMacro

typedef struct RpInterpolator RpInterpolator;

struct RpAtomic
{
RwObjectHasFrame object;
Expand Down Expand Up @@ -351,6 +366,10 @@ struct RpPolygon
RwUInt16 vertIndex[3];
};

typedef struct RpPolygon RpPolygon;
typedef struct RpVertexNormal RpVertexNormal;
typedef struct RpWorldSector RpWorldSector;

struct RpWorldSector
{
RwInt32 type;
Expand Down Expand Up @@ -453,6 +472,9 @@ enum RpWorldRenderOrder

typedef RpWorldSector* (*RpWorldSectorCallBackRender)(RpWorldSector* worldSector);

typedef enum RpWorldRenderOrder RpWorldRenderOrder;
typedef struct RpSector RpSector;

struct RpWorld
{
RwObject object;
Expand Down Expand Up @@ -542,6 +564,8 @@ typedef RpLight* (*RpLightCallBack)(RpLight* light, void* data);
extern "C" {
#endif

typedef struct RpWorld RpWorld;

extern RpWorld* RpWorldStreamRead(RwStream* stream);
extern RpAtomic* AtomicDefaultRenderCallBack(RpAtomic* atomic);
extern void _rpAtomicResyncInterpolatedSphere(RpAtomic* atomic);
Expand Down Expand Up @@ -654,6 +678,7 @@ extern RpMaterialList* _rpMaterialListStreamRead(RwStream* stream, RpMaterialLis
extern RpMeshHeader* _rpMeshHeaderCreate(RwUInt32 size);
extern void* _rpMeshClose(void* instance, RwInt32 offset, RwInt32 size);
extern void* _rpMeshOpen(void* instance, RwInt32 offset, RwInt32 size);
typedef struct RpBuildMesh RpBuildMesh;
extern RpBuildMesh* _rpBuildMeshCreate(RwUInt32 bufferSize);
extern RwBool _rpBuildMeshDestroy(RpBuildMesh* mesh);
extern RwBool _rpMeshDestroy(RpMeshHeader* mesh);
Expand Down Expand Up @@ -725,4 +750,4 @@ extern RxNodeDefinition* RxNodeDefinitionGetGameCubeWorldSectorAllInOne(void);
}
#endif

#endif
#endif
8 changes: 5 additions & 3 deletions include/rwsdk/rtanim.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "rwcore.h"

typedef struct RtAnimAnimation;
typedef struct RtAnimAnimation RtAnimAnimation;

typedef void (*RtAnimKeyFrameApplyCallBack)(void* result, void* voidIFrame);
typedef void (*RtAnimKeyFrameBlendCallBack)(void* voidOut, void* voidIn1, void* voidIn2,
Expand All @@ -17,6 +17,8 @@ typedef RtAnimAnimation* (*RtAnimKeyFrameStreamReadCallBack)(RwStream* stream,
typedef RwBool (*RtAnimKeyFrameStreamWriteCallBack)(RtAnimAnimation* animation, RwStream* stream);
typedef RwInt32 (*RtAnimKeyFrameStreamGetSizeCallBack)(RtAnimAnimation* animation);

typedef struct RtAnimInterpolatorInfo RtAnimInterpolatorInfo;

struct RtAnimInterpolatorInfo
{
RwInt32 typeID;
Expand All @@ -43,7 +45,7 @@ struct RtAnimAnimation
void* customData;
};

typedef struct RtAnimInterpolator;
typedef struct RtAnimInterpolator RtAnimInterpolator;

typedef RtAnimInterpolator* (*RtAnimCallBack)(RtAnimInterpolator* animInstance, void* data);

Expand Down Expand Up @@ -83,4 +85,4 @@ extern void RtAnimInterpolatorDestroy(RtAnimInterpolator* anim);
}
#endif

#endif
#endif
Loading