Skip to content

match o_3spring, o_ce_tjumpdai, o_degring_linear, item boxes, o_savepoint, o_goalring; link o_ce_sobj - #7

Closed
nlopez99 wants to merge 18 commits into
roeming:mainfrom
nlopez99:pr/1-ring-objects
Closed

nlopez99 wants to merge 18 commits into
roeming:mainfrom
nlopez99:pr/1-ring-objects

Conversation

@nlopez99

@nlopez99 nlopez99 commented Sep 23, 2026 •

Copy link
Copy Markdown

Every commit builds and matches: ninja plus the sha1 check gives 95/95 OK

@roeming roeming left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, please do one TU at a time, reviewing all of them takes a lot of time and effort. I still need to look through itemboxballon, savepoint, ce_board, ce_sobj, and ce_tjumpdai.

Comment thread src/OBJECT/o_3spring.c
}

for (i = 0; i < 2; i++) {
Uint8 *timer = &GetWork(tp)->timer[i];

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is real, does this match without a temporary variable?

Comment thread src/OBJECT/o_3spring.c Outdated
} spring3wk;

#define GetWork(task) ((spring3wk *)task->mwp)
#define GetTimer(task) ((Uint8 *)GetWork(task)->timer)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd appreciate the macros to only be for used for aliasing work pointers, unless we're aliasing something directly in task. Have the member access be public, and get rid of the uint8* cast.

Comment thread src/OBJECT/o_3spring.c Outdated
extern void fn_8002FB2C(Sint8, int, int, int);
extern void SE_Call(int, int, int, int);

extern NJS_TEXLIST _rename_3spring_TexList;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are most likely part of this TU, ideally they'd be included when considering matching, check o_ring for an example of what that looking like

Comment thread src/OBJECT/o_3spring.c
Angle3 ang;
NJS_POINT3 pos;

pno = player;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fake to me, this is most likely the compiler just saving the variable to a higher register before calling functions, just use the argument passed in.

return;
}

DegRingCalcPosLinear(&twp->pos, (Uint16)twp->ang.x, (Uint16)twp->ang.y,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The casts here seem off, my guess would be the function declares it takes u16s

Comment thread src/OBJECT/o_itemboxair.c Outdated
static void ObjectItemBoxAirNormal(task *tp) {
task *hit_tp = NULL;
taskwk *twp = tp->twp;
itemboxairwk *wk = (itemboxairwk *)tp->mwp;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this would be behind a macro, make it easier to reckon with

Comment thread src/OBJECT/o_itemboxair.c
if ((twp->flag & 4 && wk->pno != -1) ||
(hit_tp = CCL_IsHitPlayer(tp)) != NULL ||
(hit_tp = fn_80006574(tp)) != NULL) {
if (hit_tp == NULL || (pno = IsThisTaskPlayer(hit_tp)) < 0) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move variable out of if statement

Comment thread src/OBJECT/o_itemboxair.c Outdated
taskwk *twp = tp->twp;

twp->scl.z += 0.2;
if (!(twp->scl.z > 5.0f)) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything after this should go inside the if statement, the !(float_comparison) feels very fake to me

Comment thread src/OBJECT/o_itemboxair.c Outdated
pos.y = 14.5f;
pos.z = 0.0f;
_rename_ItemIconDraw(itemboxair_item_info[twp->btimer].kind, &pos,
182.04445f * twp->scl.y, 9.0f);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this constant comes from radian and degrees, see o_ring for examples of the macro to use instead

Comment thread config/GSNE8P/symbols.txt
@@ -3078,7 +3078,7 @@ njMemCopy4 = .text:0x80119730; // type:function size:0x24
njMemCopy32 = .text:0x80119754; // type:function size:0x24
fn_80119778 = .text:0x80119778; // type:function size:0x24
fn_8011979C = .text:0x8011979C; // type:function size:0x34
MAlloc = .text:0x801197D0; // type:function size:0x2C

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change?

@roeming

roeming commented Sep 25, 2026

Copy link
Copy Markdown
Owner

If you want to contribute to this project, please respond as yourself and do not feed them into an LLM. I appreciate your interest, but I only wish to interact with human contributors.

@roeming roeming closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants