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

Various RAM map documentation and alignment with SA3 #175

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

JaceCear
Copy link
Collaborator

@JaceCear JaceCear commented Dec 9, 2024

No description provided.

@@ -35,7 +35,8 @@ u8 gNumHBlankIntrs = 0;
struct BlendRegs gBldRegs ALIGNED(8) = {};
u8 gOamFreeIndex = 0;
struct Task gEmptyTask ALIGNED(16) = {};
BgAffineReg gBgAffineRegs[NUM_AFFINE_BACKGROUNDS] ALIGNED(8) = {};
u8 gNextFreeAffineIndex = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, so I understand that including this means that we don't need to ALIGNED(8) the struct, but all structs are 8 aligned so I don't think the 8 align is because this var was actually here. Think I'd be happier with the CURRENT_GAME macro here too?

Copy link
Collaborator Author

@JaceCear JaceCear Dec 9, 2024

Choose a reason for hiding this comment

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

I'd say it just means that there are more variables we need to uncover.
The space here didn't just appear at random.

And I actually had the #if here initially, but decided to remove it because it's not needed for matching.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I don't think so. Structs are always 16 aligned and arrays are always 8 aligned. I'm ok with the extra if for accuracy

src/sprite.c Outdated Show resolved Hide resolved
include/game/game.h Outdated Show resolved Hide resolved
src/core.c Outdated
@@ -251,7 +253,7 @@ void GameInit(void)
gBgAffineRegs[1].x = 0;
gBgAffineRegs[1].y = 0;

#if (CURRENT_GAME >= GAME_SA3)
#if (GAME >= GAME_SA3)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be engine ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's inside Gameinit, so... no?

@@ -1,4 +1,5 @@
#include "global.h"
#include "game/game.h"
Copy link
Collaborator

Choose a reason for hiding this comment

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

No longer needed since it moved to config.h

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