Skip to content

Commit 1d89da0

Browse files
authored
Merge pull request bfbbdecomp#10 from LivewireCB/dev
Ported all x***.h files over from BFBB. Ported some z***.cpp/.h files. Completed iException and linked it.
2 parents 06a0348 + 5e78bfe commit 1d89da0

File tree

228 files changed

+26424
-3202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+26424
-3202
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def MatchingFor(*versions):
339339
Object(NonMatching, "SB/Game/zParticleCustom.cpp"),
340340
Object(NonMatching, "SB/Core/gc/iWad.cpp"),
341341
Object(NonMatching, "SB/Core/gc/iTRC.cpp"),
342-
Object(NonMatching, "SB/Core/gc/iException.cpp"),
342+
Object(Matching, "SB/Core/gc/iException.cpp"),
343343
Object(NonMatching, "SB/Core/gc/iScrFX.cpp"),
344344
Object(NonMatching, "SB/Core/gc/iARAMTmp.cpp"),
345345

include/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stdlib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ long abs(long n);
1818
}
1919
#endif
2020

21-
#endif
21+
#endif

src/SB/Core/gc/iAnim.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#ifndef IANIM_H
2+
#define IANIM_H
3+
4+
#include "xMath3.h"
5+
6+
extern U8* giAnimScratch;
7+
8+
void iAnimInit();
9+
F32 iAnimDuration(void* RawData);
10+
U32 iAnimBoneCount(void* RawData);
11+
void iAnimBlend(F32 BlendFactor, F32 BlendRecip, U16* BlendTimeOffset, F32* BoneTable,
12+
U32 BoneCount, xVec3* Tran1, xQuat* Quat1, xVec3* Tran2, xQuat* Quat2,
13+
xVec3* TranDest, xQuat* QuatDest);
14+
void iAnimEval(void* RawData, float time, unsigned int flags, class xVec3* tran, class xQuat* quat);
15+
16+
#endif

src/SB/Core/gc/iAnimSKB.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifndef IANIMSKB_H
2+
#define IANIMSKB_H
3+
4+
#include "xMath3.h"
5+
6+
struct iAnimSKBHeader
7+
{
8+
U32 Magic;
9+
U32 Flags;
10+
U16 BoneCount;
11+
U16 TimeCount;
12+
U32 KeyCount;
13+
F32 Scale[3];
14+
};
15+
16+
struct iAnimSKBKey
17+
{
18+
U16 TimeIndex;
19+
S16 Quat[4];
20+
S16 Tran[3];
21+
};
22+
23+
void iAnimEvalSKB(iAnimSKBHeader* data, F32 time, U32 flags, xVec3* tran, xQuat* quat);
24+
F32 iAnimDurationSKB(iAnimSKBHeader* data);
25+
26+
#endif

src/SB/Core/gc/iCollide.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef ICOLLIDE_H
2+
#define ICOLLIDE_H
3+
4+
#include "xMath3.h"
5+
#include "xModel.h"
6+
#include "xEnv.h"
7+
#include "xCollide.h"
8+
9+
void iBoxForModelLocal(xBox* o, const xModelInstance* m);
10+
void iBoxForModel(xBox* o, const xModelInstance* m);
11+
S32 iSphereHitsEnv3(const xSphere* b, const xEnv* env, xCollis* colls, U8 ncolls, F32 sth);
12+
S32 iSphereHitsModel3(const xSphere* b, const xModelInstance* m, xCollis* colls, U8 ncolls,
13+
F32 sth);
14+
U32 iRayHitsModel(const xRay3* r, const xModelInstance* m, xCollis* coll);
15+
void iCollideInit(xScene* sc);
16+
17+
#endif

src/SB/Core/gc/iCollideFast.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef ICOLLIDEFAST_H
2+
#define ICOLLIDEFAST_H
3+
4+
#include "xScene.h"
5+
6+
void iCollideFastInit(xScene* sc);
7+
8+
#endif

src/SB/Core/gc/iColor.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#ifndef ICOLOR_H
2+
#define ICOLOR_H
3+
4+
#include <types.h>
5+
6+
struct iColor_tag
7+
{
8+
U8 r;
9+
U8 g;
10+
U8 b;
11+
U8 a;
12+
13+
iColor_tag& operator=(const iColor_tag& rhs)
14+
{
15+
this->r = rhs.r;
16+
this->g = rhs.g;
17+
this->b = rhs.b;
18+
this->a = rhs.a;
19+
return *this;
20+
};
21+
};
22+
23+
#endif

src/SB/Core/gc/iCutscene.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#ifndef ICUTSCENE_H
2+
#define ICUTSCENE_H
3+
4+
#include "xCutscene.h"
5+
#include "xSnd.h"
6+
7+
void iCSSoundSetup(xCutscene* csn);
8+
void* iCSSoundGetData(xSndVoiceInfo* vp, U32* size);
9+
U32 iCSFileOpen(xCutscene* csn);
10+
void iCSFileAsyncRead(xCutscene* csn, void* dest, U32 size);
11+
void iCSFileAsyncSkip(xCutscene* csn, U32 amount);
12+
void iCSFileClose(xCutscene* csn);
13+
S32 iCSLoadStep(xCutscene* csn);
14+
15+
#endif

src/SB/Core/gc/iDraw.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef IDRAW_H
2+
#define IDRAW_H
3+
4+
#include <types.h>
5+
6+
void iDrawSetFBMSK(U32 abgr);
7+
void iDrawBegin();
8+
void iDrawEnd();
9+
10+
#endif

src/SB/Core/gc/iEnv.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#ifndef IENV_H
2+
#define IENV_H
3+
4+
#include "xJSP.h"
5+
6+
#include <rwcore.h>
7+
#include <rpworld.h>
8+
9+
struct iEnv
10+
{
11+
RpWorld* world;
12+
RpWorld* collision;
13+
RpWorld* fx;
14+
RpWorld* camera;
15+
xJSPHeader* jsp;
16+
RpLight* light[2];
17+
RwFrame* light_frame[2];
18+
S32 memlvl;
19+
};
20+
21+
struct xEnvAsset;
22+
23+
void iEnvLoad(iEnv* env, const void* data, U32 datasize, S32 dataType);
24+
void iEnvFree(iEnv* env);
25+
void iEnvDefaultLighting(iEnv*);
26+
void iEnvLightingBasics(iEnv*, xEnvAsset*);
27+
void iEnvRender(iEnv* env);
28+
void iEnvEndRenderFX(iEnv*);
29+
30+
#endif

0 commit comments

Comments
 (0)