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

Document various OAM and sprite data and functions #34

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

Conversation

strager
Copy link
Contributor

@strager strager commented Jul 25, 2020

No description provided.

The decompressCoordEventData_8030aa4 routine parses the header of a
map's trigger data. Document the structure of this header and a few bits
of related code.
sub_803189C touches some structures and variables. Name these structure
members and variables, and document the code for sub_803189C.
* Remove unnecessary .align directives
* Make labels function-local
* Document the loc_8031904 label
* Rename sub_8030B1E to findTriggerForTilePosition
* Add interface documentation to findTriggerForTilePosition
* Remove unnecessary .align directives
* Document .loc_8030B66 label
Document the interface of the getObjectTilePosition routine, and label
some struct members used by that routine.
See the interesting changes in asm/sprite.s.
//
// Clobbers: r3, r4, r6, r7, r8
thumb_local_start
findTriggerForTilePosition:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use PascalCase for known non-local labels.

//
// Clobbers: r1, r2, r3
thumb_local_start
getObjectTilePosition:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use PascalCase for known non-local labels.

//
// Clobbers: r0, r1, r5
thumb_local_start
initializeLayerPriorityTriggers:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use PascalCase for known non-local labels.

thumb_local_start
sub_8033B80:
updateHUDPETSprite:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use PascalCase for known non-local labels.

byte_8619BD0:: .byte 0x0, 0x0, 0x0, 0x0, 0x94, 0x8, 0x0, 0x0, 0x98, 0x8, 0x0, 0x0, 0x90, 0x12
.byte 0x0, 0x0, 0x10, 0x78, 0x14, 0x0, 0x0, 0x16, 0x2, 0x0, 0x0, 0x8A, 0x66, 0x5C

ACDCTownMapTriggers::
Copy link
Collaborator

Choose a reason for hiding this comment

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

Map Triggers/Wall Data shouldn't be included as GNU Assembler source, as they are binary files. You can keep these here for now, but remember that the end product would have these included as a custom binary format. I would also recommend reading this post by GreigaMaster which goes into extensive detail about the Map Trigger/Wall Data/Map Region format.

u32 UnkOffset_00, \unk_offset_00 // loc=0x0
u32 UnkOffset_04, \unk_offset_04 // loc=0x4
u32 LayerPriorityTriggersOffset, \layer_priority_triggers_offset // loc=0x8
u32 UnkOffset_0C, \unk_offset_0c // loc=0xc
Copy link
Collaborator

Choose a reason for hiding this comment

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

Letters in Hex offsets should be lowercase (e.g. UnkOffset_0C -> UnkOffset_0c)

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.

None yet

2 participants