Skip to content

Commit

Permalink
iLight: enable match
Browse files Browse the repository at this point in the history
  • Loading branch information
escape209 committed Oct 9, 2024
1 parent 487fa69 commit 19cdc34
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def Rel(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
Object(NonMatching, "SB/Core/gc/iFile.cpp"),
Object(NonMatching, "SB/Core/gc/iFMV.cpp"),
Object(NonMatching, "SB/Core/gc/iFX.cpp"),
Object(NonMatching, "SB/Core/gc/iLight.cpp"),
Object(Matching, "SB/Core/gc/iLight.cpp"),
Object(Matching, "SB/Core/gc/iMath.cpp"),
Object(NonMatching, "SB/Core/gc/iMath3.cpp"),
Object(NonMatching, "SB/Core/gc/iMemMgr.cpp"),
Expand Down
28 changes: 12 additions & 16 deletions src/SB/Core/gc/iLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

RpWorld* gLightWorld;

// iLightCreate will not match without these floats being externed :thinking:
extern F32 _535_0; // 0.0f
extern F32 _536; // 1.0f

void iLightInit(RpWorld* world)
{
gLightWorld = world;
Expand Down Expand Up @@ -49,18 +45,18 @@ iLight* iLightCreate(iLight* light, U32 type)
RwFrameUpdateObjects(frame);

light->type = type;
light->sph.center.x = _535_0;
light->sph.center.y = _535_0;
light->sph.center.z = _535_0;
light->sph.r = _535_0;
light->color.r = _536;
light->color.g = _536;
light->color.b = _536;
light->color.a = _536;
light->dir.x = _535_0;
light->dir.y = _535_0;
light->dir.z = _536;
light->coneangle = _535_0;
light->sph.center.x = 0.0f;
light->sph.center.y = 0.0f;
light->sph.center.z = 0.0f;
light->sph.r = 0.0f;
light->color.r = 1.0f;
light->color.g = 1.0f;
light->color.b = 1.0f;
light->color.a = 1.0f;
light->dir.x = 0.0f;
light->dir.y = 0.0f;
light->dir.z = 1.0f;
light->coneangle = 0.0f;

return light;
}
Expand Down
1 change: 1 addition & 0 deletions src/SB/Core/x/xVec3.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct xVec3
static xVec3 create(F32 f);

xVec3& operator=(F32);
xVec3& operator=(const xVec3&);
xVec3 operator+(const xVec3&) const;
xVec3 operator-(const xVec3&) const;
xVec3 operator*(F32) const;
Expand Down

0 comments on commit 19cdc34

Please sign in to comment.