Skip to content
Merged
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
5 changes: 1 addition & 4 deletions src/SB/Core/x/xScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ typedef const char* (*xSceneID2NameCallback)(U32);
typedef xBase* (*xSceneResolvIDCallback)(U32);
typedef xEnt* (*xSceneEntCallback)(xEnt* ent, xScene* sc, void* data);

struct xScene
struct xScene // Updated Struct
{
U32 sceneID;
U16 flags;
U16 num_ents;
U16 num_trigs;
U16 num_stats;
U16 num_dyns;
U16 num_npcs;
U16 num_act_ents;
U16 num_nact_ents;
F32 gravity;
F32 drag;
F32 friction;
Expand All @@ -36,7 +34,6 @@ struct xScene
xEnt** dyns;
xEnt** npcs;
xEnt** act_ents;
xEnt** nact_ents;
xEnv* env;
xMemPool mempool;
xSceneResolvIDCallback resolvID;
Expand Down
9 changes: 5 additions & 4 deletions src/SB/Core/x/xWad4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ void xSceneInit(xScene* sc, U16 num_trigs, U16 num_stats, U16 num_dyns, U16 num_
sc->num_ents_allocd = (U32)num_trigs + (U32)num_stats + (U32)num_dyns + (U32)num_npcs;
sc->num_act_ents = 0;
sc->act_ents = (xEnt**)xMemAllocSize(sc->num_ents_allocd * sizeof(xEnt*));
sc->num_nact_ents = 0;
sc->num_ents = 0;
sc->num_trigs = 0;
sc->num_stats = 0;
sc->num_dyns = 0;
sc->num_npcs = 0;

sc->resolvID = NULL;

Expand All @@ -208,7 +208,7 @@ void xSceneInit(xScene* sc, U16 num_trigs, U16 num_stats, U16 num_dyns, U16 num_
xAnimPoolInit(&sc->mempool, 50, 1, 0x1, 4);
xModelPoolInit(49, 64);
xModelPoolInit(74, 8);
xModelPoolInit(164, 1);
xModelPoolInit(324, 1);
}

// xQuickCull WEAK
Expand Down Expand Up @@ -3724,7 +3724,8 @@ S32 xPadUpdate(S32 idx, F32 time_passed)

if (p->flags & 0x10)
{
if (!(p->on & (XPAD_BUTTON_UP | XPAD_BUTTON_DOWN | XPAD_BUTTON_LEFT | XPAD_BUTTON_RIGHT)))
if (!(p->on &
(XPAD_BUTTON_UP | XPAD_BUTTON_DOWN | XPAD_BUTTON_LEFT | XPAD_BUTTON_RIGHT)))
{
p->d_timer = 0.0f;
}
Expand Down