Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register Hall of Fame #313

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Conversation

PikalaxALT
Copy link
Collaborator

No description provided.

}

static inline void MTX_Copy44 (const MtxFx44 * pSrc, MtxFx44 * pDst) {

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove weird extra new lines in the functions in this file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

whoops! those were leftovers from automatic removal of SDK_ASSERT calls

main.lsf Outdated
Object asm/unk_02097BE0.o
Object asm/unk_02097D3C.o
Object src/pokemon_mood.o
Object src/unk_02097F6C.o
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why'd you flip spaces -> tabs in this file, and why only partially? Stay consistent pls

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

must've been a bad merge

@@ -1228,11 +1228,11 @@ static void ov84_0223F2B4(GAME_BOARD_SUB_3E8 *work, Party *playerParty, Party *o
ov84_0223F5E4(work, playerParty, opponentParty, type);

for (i = 0; i < 11; i++) {
sub_0200ACF0(work->resourceObj[i][0]);
sub_0200ACF0(work->resourceObj[i][GF_GFX_RES_TYPE_CHAR]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

out of scope but would it be worth changing the resource obj into a struct proper, it will prolly be more readable in the long run instead of having to use index consts each time but Im not sure what issues it might introduce

data->msgFormat = MessageFormat_New(HEAP_ID_REGISTER_HALL_OF_FAME);
data->strbuf1 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME);
data->strbuf2 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME);
data->narcA094 = NARC_New(NARC_a_1_0_1, HEAP_ID_REGISTER_HALL_OF_FAME);
Copy link
Collaborator

Choose a reason for hiding this comment

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

hof graphics narc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not yet identified; there's a reason this PR was not marked as "ready for review" (at time of review)

data->strbuf1 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME);
data->strbuf2 = String_New(500, HEAP_ID_REGISTER_HALL_OF_FAME);
data->narcA094 = NARC_New(NARC_a_1_0_1, HEAP_ID_REGISTER_HALL_OF_FAME);
data->narcA180 = NARC_New(NARC_a_1_8_0, HEAP_ID_REGISTER_HALL_OF_FAME);
Copy link
Collaborator

Choose a reason for hiding this comment

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

pokemon graphics narc?

GF_ASSERT(GF2DGfxResObj_GetResType(obj) == GF_GFX_RES_TYPE_CHAR);

int id = GF2DGfxResObj_GetResID(obj);
return sub_02021910(id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

return sub_02021910(GF2DGfxResObj_GetResID(obj))

sub_02021A50(imgProxy);
}

// ------------------
Copy link
Collaborator

Choose a reason for hiding this comment

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

?

MI_CpuClear32(sObjCharTransferTasksManager, sizeof(struct ObjCharTransferTasksManager));
sObjCharTransferTasksManager->max = template->unk_00;
sObjCharTransferTasksManager->tasks = (ObjCharTransferTask *)AllocFromHeap(template->heapId, sizeof(ObjCharTransferTask) * sObjCharTransferTasksManager->max);
for (int i = 0; i < template->unk_00; ++i) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

unk_00 is a task count?


void sub_020216F4(u32 offset, u32 size, NNS_G2D_VRAM_TYPE vram) {
int newOffset;
int sp4;
Copy link
Collaborator

Choose a reason for hiding this comment

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

no sp nomenclaure

sObjCharTransferTasksManager = a0;
}

void ObjCharTransferTask_Reset(ObjCharTransferTask *a0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

go through and rename all the unown vars to task or the like for the now documented ObjCharTranserTask

@PikalaxALT PikalaxALT marked this pull request as ready for review May 14, 2024 11:46
@PikalaxALT PikalaxALT mentioned this pull request May 14, 2024
Copy link
Member

@red031000 red031000 left a comment

Choose a reason for hiding this comment

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

I'm sorry I can't fucking do this
the lib files are a mess, they're very clearly copied almost verbatim from nintendo's sdk, with no respect to style, whether it fits in, or even whether it makes any sense whatsoever in the context of the repo
please for the love of FUCK don't EVER do this shit, it genuinely makes me really angry
fix it and I will review the rest
and for EVERYONE working on this project
NEVER put in code that's copy pasted from GF or nintendo without at least changing it so it makes sense and fits the style for fuck's sake
words cannot express how pissed off I am

sorry it's not personal or anything, this is just genuinely... really bad

@@ -7,7 +7,7 @@
.public GetMonData
.public GetPercentProgressTowardsNextLevel
.public GetMonExpBySpeciesAndLevel
.public sub_020708D8
.public GetMonPicHeightBySpeciesGenderForme
Copy link
Member

Choose a reason for hiding this comment

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

PokemonPicture_GetHeightBySpeciesGenderForm
(we are not using Forme, we already decided against it)

asm/overlay_63.s Outdated
Copy link
Member

Choose a reason for hiding this comment

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

delete associated .inc file pls

Copy link
Member

Choose a reason for hiding this comment

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

delete .inc

void sub_020087A4(u32 *a0, int a1, int dy);
void sub_02009264(UnkStruct_02009264 *a0, struct UnkStruct_02072914_sub_sub *a1);
Copy link
Member

Choose a reason for hiding this comment

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

no struct

u8 unk_2;
u8 unk_3;
u8 unk_4[10];
struct UnkStruct_02072914_sub_sub *unk_10;
Copy link
Member

Choose a reason for hiding this comment

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

no struct


typedef enum {
GX_TEXREPEAT_NONE = 0,
GX_TEXREPEAT_S = 1,
Copy link
Member

Choose a reason for hiding this comment

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

also can we please use SCALE and TRANSLATE and not S and T

} GXCull;

#ifdef SDK_ADS
typedef struct {
Copy link
Member

Choose a reason for hiding this comment

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

what thr fuck is an SDK_ADS????
this entire struct def doesn't follow the style either
indentation, struct name, also don't embed structs like this

#define GX_PACK_VIEWPORT_PARAM(x1, y1, x2, y2) ((u32)((x1) | ((y1) << 8) | ((x2) << 16) | ((y2) << 24)))

typedef struct {
u8 *curr_cmd;
Copy link
Member

Choose a reason for hiding this comment

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

does not follow style, var names, struct name, check indentation too

lib/include/nitro/gx/g3b.h Show resolved Hide resolved
lib/include/nitro/gx/g3b.h Show resolved Hide resolved
@PikalaxALT PikalaxALT dismissed red031000’s stale review May 28, 2024 23:24

Review comments invalid

adrienntindall
adrienntindall previously approved these changes May 29, 2024
Copy link
Member

@red031000 red031000 left a comment

Choose a reason for hiding this comment

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

most of these aren't really blocking, if you disagree feel free to let me know

@@ -7,7 +7,7 @@
.public GetMonData
.public GetPercentProgressTowardsNextLevel
.public GetMonExpBySpeciesAndLevel
.public sub_020708D8
.public GetMonPicHeightBySpeciesGenderForme
Copy link
Member

Choose a reason for hiding this comment

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

PokemonPicture_GetHeightBySpeciesGenderForm (or similar)

typedef struct UnkStruct_02014E30 {
int x;
int y;
int w;
Copy link
Member

Choose a reason for hiding this comment

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

width and heigh instead of w and h (not blocking)

void sub_020145B4(const void *a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 a5, void *a6);
void sub_02014494(NarcId narcId, s32 fileId, HeapID heapId, int x, int y, int width, int height, void *dest, u32 pid, BOOL isAnimated, int whichFacing, int species);
void sub_02014510(NarcId narcId, s32 fileId, HeapID heapId, UnkStruct_02014E30 *a3, void *dest, u32 personality, BOOL isAnimated, int whichFacing, int species);
void sub_02014540(NarcId narcId, s32 fileId, HeapID heapId, void *dest, u32 personality, BOOL isAnimated, int whichFacing, int species);
Copy link
Member

Choose a reason for hiding this comment

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

facingDirection instead of whichFacing, either is technically fine, it just feels facingDirection is more natural

}

static inline void MTX_Frustum (fx32 t, fx32 b, fx32 l, fx32 r, fx32 n, fx32 f, MtxFx44 * mtx) {
MTX_FrustumW(t, b, l, r, n, f, FX32_ONE, mtx);
Copy link
Member

Choose a reason for hiding this comment

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

don't mix tabs and spaces/correct indentation level

@@ -147,20 +150,77 @@ typedef enum {
GX_MTXMODE_TEXTURE = 3
} GXMtxMode;

#define GX_PACK_VIEWPORT_PARAM(x1, y1, x2, y2) ((u32)((x1) | ((y1) << 8) | ((x2) << 16) | ((y2) << 24)))
typedef enum {
GX_TEXGEN_NONE = 0,
Copy link
Member

Choose a reason for hiding this comment

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

mixed tabs and spaces in this file

confetti->particles[i].unk_08[1].y = confetti->particles[i].unk_08[0].y;
confetti->particles[i].unk_08[2].y = confetti->particles[i].unk_08[3].y;
VEC_Fx16Add(&confetti->particles[i].unk_20, &confetti->particles[i].unk_26, &confetti->particles[i].unk_20);
MTX_Identity44(&confetti->particles[i].unk_2C);
Copy link
Member

Choose a reason for hiding this comment

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

particles 2C is the translation matrix

VEC_Fx16Add(&confetti->particles[i].unk_20, &confetti->particles[i].unk_26, &confetti->particles[i].unk_20);
MTX_Identity44(&confetti->particles[i].unk_2C);
MTX_TransApply44(&confetti->particles[i].unk_2C, &confetti->particles[i].unk_2C, confetti->particles[i].unk_08[0].x, confetti->particles[i].unk_08[0].y, confetti->particles[i].unk_08[0].z);
G3B_LightColor(&confetti->gxDlInfo, GX_LIGHTID_0, RGB(11, 11, 11)); G3B_LightColor(&confetti->gxDlInfo, GX_LIGHTID_1, confetti->particles[i].color); SetVec(sp20, 0, FX16_ONE - 1, -FX16_ONE + 1);
Copy link
Member

Choose a reason for hiding this comment

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

are these all on the same line? should they be?

MTX_Identity44(&confetti->particles[i].unk_2C);
MTX_TransApply44(&confetti->particles[i].unk_2C, &confetti->particles[i].unk_2C, confetti->particles[i].unk_08[0].x, confetti->particles[i].unk_08[0].y, confetti->particles[i].unk_08[0].z);
G3B_LightColor(&confetti->gxDlInfo, GX_LIGHTID_0, RGB(11, 11, 11)); G3B_LightColor(&confetti->gxDlInfo, GX_LIGHTID_1, confetti->particles[i].color); SetVec(sp20, 0, FX16_ONE - 1, -FX16_ONE + 1);
VEC_Fx16Normalize(&sp20, &sp20);
Copy link
Member

Choose a reason for hiding this comment

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

sp20 is the light vector

SetVec(sp20, 0, -FX16_ONE + 1, FX16_ONE - 1);
VEC_Fx16Normalize(&sp20, &sp20);
G3B_LightVector(&confetti->gxDlInfo, GX_LIGHTID_1, sp20.x, sp20.y, sp20.z);
MTX_RotX44(&sp28, FX_SinIdx((u16)confetti->particles[i].unk_20.x), FX_CosIdx((u16)confetti->particles[i].unk_20.x));
Copy link
Member

Choose a reason for hiding this comment

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

sp28 is the rotation matrix

Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing this file deals with spinda's spots, but that's a complete guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants