Skip to content

Commit

Permalink
zParPTank nearly 100% equivalent.
Browse files Browse the repository at this point in the history
Game crashes after leaving the main menu.
  • Loading branch information
SquareMan committed Jun 27, 2024
1 parent a887e29 commit 53aca7c
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 33 deletions.
3 changes: 1 addition & 2 deletions src/SB/Core/x/xClimate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

_tagClimate* sClimate;

float snow_life = 3.0f;

const float snow_life = 3.0f;
const xVec3 snow_vel = { 0.0f, -2.0f, 0.0f };
const xVec3 snow_dvel = { 0.1f, 0.1f, 0.1f };

Expand Down
2 changes: 1 addition & 1 deletion src/SB/Core/x/xClimate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
struct xEnvAsset;
struct zParEmitter;

extern float snow_life = 3.0f;
extern const float snow_life;

struct _tagRain
{
Expand Down
6 changes: 5 additions & 1 deletion src/SB/Core/x/xMath2.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ struct xVec2
float32 x;
float32 y;

xVec2& assign(float32 xy)
{
return assign(xy,xy);
}
xVec2& assign(float32 x, float32 y);
float32 length() const;

Expand All @@ -52,4 +56,4 @@ float32 xVec2Dist(float32 x1, float32 y1, float32 x2, float32 y2);
float32 xVec2Dot(const xVec2* a, const xVec2* b);
void xVec2Init(xVec2* v, float32 _x, float32 _y);

#endif
#endif
5 changes: 5 additions & 0 deletions src/SB/Core/x/xPtankPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ struct ptank_pool
RpAtomic* ptank;
_class hide;

int8 valid() const;
void reset();
void flush();
void grab_block(ptank_group_type type);
};
Expand All @@ -51,6 +53,9 @@ struct ptank_pool__pos_color_size_uv2 : public ptank_pool
xVec2* size;
xVec2* uv;
int32 stride;

void next();
void flush();
};

void xPTankPoolSceneEnter();
Expand Down
3 changes: 2 additions & 1 deletion src/SB/Core/x/xVec3Inlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ void xVec3SubFrom(xVec3* o, const xVec3* v);
void xVec3Lerp(xVec3* o, const xVec3* a, const xVec3* b, float32 t);
void xVec3ScaleC(xVec3* o, const xVec3* v, float32 x, float32 y, float32 z);
float32 xVec3Dist(const xVec3* a, const xVec3* b);
float32 xVec3Dist2(const xVec3* vecA, const xVec3* vecB);
float32 xVec3Length2(const xVec3* vec);
float32 xVec3LengthFast(float32 x, float32 y, float32 z);
void xVec3AddScaled(xVec3* o, const xVec3* v, float32 s);

#endif
#endif
1 change: 0 additions & 1 deletion src/SB/Game/zCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,5 @@ void zCameraDisableWallJump(xCamera* cam);
void zCameraSetReward(int32 reward);
void zCameraMinTargetHeightSet(float32 min_height);
void zCameraMinTargetHeightClear();
float32 xVec3Dist2(const xVec3* vecA, const xVec3* vecB);

#endif
Loading

0 comments on commit 53aca7c

Please sign in to comment.