mirror of https://github.com/zeldaret/tmc.git
formatting
This commit is contained in:
parent
b5734d09a4
commit
5b2cafdc89
|
|
@ -18,4 +18,4 @@ extern void DrawEntities(void);
|
|||
extern void sub_080ADA04(OAMCommand*, void*);
|
||||
extern void DrawDirect(u32 spriteIndex, u32 frameIndex);
|
||||
|
||||
#endif //AFFINE_H
|
||||
#endif // AFFINE_H
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
void Armos_SetFlagFromTransition(u32 armosId);
|
||||
|
||||
#endif //ARMOS_H
|
||||
#endif // ARMOS_H
|
||||
|
|
|
|||
|
|
@ -101,6 +101,9 @@ void FadeVBlank(void);
|
|||
void ResetFadeMask(void);
|
||||
|
||||
extern u32 gUsedPalettes;
|
||||
#define USE_PALETTE(i) do { gUsedPalettes |= 1 << (i); } while(0)
|
||||
#define USE_PALETTE(i) \
|
||||
do { \
|
||||
gUsedPalettes |= 1 << (i); \
|
||||
} while (0)
|
||||
|
||||
#endif // FADE_H
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
extern const u8 gGlobalGfxAndPalettes[];
|
||||
|
||||
#endif //GFX_H
|
||||
#endif // GFX_H
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@ typedef struct {
|
|||
|
||||
static_assert(sizeof(ItemDefinition) == 0xc);
|
||||
|
||||
#endif //ITEMDEFINITIONS_H
|
||||
#endif // ITEMDEFINITIONS_H
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
extern void sub_0806D0B0(struct Entity_*);
|
||||
|
||||
#endif //BIGGORON_H
|
||||
#endif // BIGGORON_H
|
||||
|
|
|
|||
|
|
@ -201,7 +201,6 @@ typedef enum {
|
|||
LINK_ANIMATION,
|
||||
} Object;
|
||||
|
||||
|
||||
Entity* CreateLinkAnimation(Entity* parent, u32 type, u32 type2);
|
||||
void ObjectInit(Entity* this);
|
||||
u32 LoadObjectSprite(Entity* this, s32 type, const ObjectDefinition* definition);
|
||||
|
|
@ -221,7 +220,6 @@ void sub_0808C650(Entity*, u32);
|
|||
u32 sub_0808C67C(void);
|
||||
void sub_0808C688(void);
|
||||
|
||||
|
||||
void ItemOnGround();
|
||||
void DeathFx();
|
||||
void ItemForSale();
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
extern void sub_08095C48(struct Entity_*);
|
||||
|
||||
#endif //CUTSCENEMISCOBJECT_H
|
||||
#endif // CUTSCENEMISCOBJECT_H
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
extern bool32 sub_08083734(struct Entity_*, u32);
|
||||
|
||||
#endif //LOCKEDDOOR_H
|
||||
#endif // LOCKEDDOOR_H
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
extern u32 sub_0808288C(struct Entity_*, u32, u32, u32);
|
||||
|
||||
#endif //POT_H
|
||||
#endif // POT_H
|
||||
|
|
|
|||
|
|
@ -78,4 +78,4 @@ typedef struct {
|
|||
} OAMControls;
|
||||
extern OAMControls gOAMControls;
|
||||
|
||||
#endif //VRAM_H
|
||||
#endif // VRAM_H
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ u32 UpdatePlayerCollision(void) {
|
|||
if ((((gPlayerState.flags & (PL_FLAGS10000 | PL_FLAGS2)) != 0) ||
|
||||
((gPlayerState.sword_state & 0x10) != 0)) ||
|
||||
((DoApplicableTransition(gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x,
|
||||
gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y, index, 5) == 0 &&
|
||||
gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y, index, 5) == 0 &&
|
||||
(((gPlayerState.heldObject != 0 || ((gPlayerState.gustJarState & 0xf) != 0)) ||
|
||||
(sub_0807BD14(&gPlayerEntity.base, index) == 0)))))) {
|
||||
return 3;
|
||||
|
|
@ -274,8 +274,9 @@ u32 UpdatePlayerCollision(void) {
|
|||
}
|
||||
|
||||
ptr1 = &gUnk_080B4478[gPlayerEntity.base.animationState & 6];
|
||||
transition = FindApplicableAreaTransition((gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x) + ptr1[0],
|
||||
(gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y) + ptr1[1]);
|
||||
transition =
|
||||
FindApplicableAreaTransition((gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x) + ptr1[0],
|
||||
(gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y) + ptr1[1]);
|
||||
if (transition == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,12 +124,8 @@ void (*const gUnk_080CED74[])(MazaalHeadEntity*) = {
|
|||
sub_08034BA0,
|
||||
};
|
||||
const s8 gUnk_080CED84[] = { 0x0d, 0x10, -0xd, 0x10 };
|
||||
const Transition gUnk_080CED88 = {
|
||||
1, 0, 0, 0x88, 0xf8, 0, AREA_INNER_MAZAAL, ROOM_INNER_MAZAAL_PHASE_1, 1, 0, 0, 0
|
||||
};
|
||||
const Transition gUnk_080CED9C = {
|
||||
1, 0, 0, 0x88, 0xf8, 0, AREA_INNER_MAZAAL, ROOM_INNER_MAZAAL_MAIN, 1, 0, 0, 0
|
||||
};
|
||||
const Transition gUnk_080CED88 = { 1, 0, 0, 0x88, 0xf8, 0, AREA_INNER_MAZAAL, ROOM_INNER_MAZAAL_PHASE_1, 1, 0, 0, 0 };
|
||||
const Transition gUnk_080CED9C = { 1, 0, 0, 0x88, 0xf8, 0, AREA_INNER_MAZAAL, ROOM_INNER_MAZAAL_MAIN, 1, 0, 0, 0 };
|
||||
|
||||
void MazaalHead(MazaalHeadEntity* this) {
|
||||
MazaalHead_Functions[GetNextFunction(super)](this);
|
||||
|
|
|
|||
|
|
@ -192,9 +192,7 @@ const Coords gUnk_080D13D8[] = { { .HALF = { -0x60, 0x80 } }, { .HALF = { 0x60,
|
|||
const u8 gUnk_080D13E0[] = { 0xc, 0xe, 0x10 };
|
||||
const u8 gUnk_080D13E3[] = { 8, 9, 10, 4, 4, 5 };
|
||||
const s8 gUnk_080D13E9[] = { -8, 8 };
|
||||
const Transition gUnk_080D13EC = {
|
||||
1, 0, 0, 0x98, 0xb8, 0, AREA_VAATIS_ARMS, ROOM_VAATIS_ARMS_FIRST, 1, 0, 0, 0
|
||||
};
|
||||
const Transition gUnk_080D13EC = { 1, 0, 0, 0x98, 0xb8, 0, AREA_VAATIS_ARMS, ROOM_VAATIS_ARMS_FIRST, 1, 0, 0, 0 };
|
||||
const u16 gUnk_080D1400[][5] = {
|
||||
{ 0x8000, 0x7000, 0x6000, 0x5000, 0x4000 },
|
||||
{ 0x8000, -0x7000, -0x6000, -0x5000, -0x4000 },
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "room.h"
|
||||
#include "scroll.h"
|
||||
#include "tiles.h"
|
||||
#ifndef EU
|
||||
#ifndef EU
|
||||
#endif
|
||||
|
||||
void DiggingCaveEntranceManager_Main(DiggingCaveEntranceManager*);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ void MinishPortalManager_Main(MinishPortalManager* this) {
|
|||
}
|
||||
if (GetActTileAtRoomCoords(this->unk_38, this->unk_3a, super->timer) == ACT_TILE_61) {
|
||||
CreateMagicSparklesFxAt(this->unk_38 + gRoomControls.origin_x, this->unk_3a + gRoomControls.origin_y,
|
||||
super->timer);
|
||||
super->timer);
|
||||
if (super->subtimer == 0) {
|
||||
super->subtimer = 1;
|
||||
SoundReq(SFX_NEAR_PORTAL);
|
||||
|
|
|
|||
|
|
@ -841,13 +841,13 @@ static void sub_08056FBC(TextRender* ctb) {
|
|||
* @param number number to convert
|
||||
* @param string output string buffer (at least 8 bytes in size)
|
||||
* @return number of character written (NOT including null terminator)
|
||||
*/
|
||||
*/
|
||||
u32 NumberToAscii(u32 number, String8* string) {
|
||||
int j;
|
||||
int i;
|
||||
int length;
|
||||
u8 buffer[8];
|
||||
char * const output = string->s;
|
||||
char* const output = string->s;
|
||||
|
||||
number = EncodeBCD(number) & 0xfffffff;
|
||||
length = 0;
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@ void sub_08085D60(LilypadLargeEntity* this) {
|
|||
if (GetCollisionDataRelativeTo(super, tmpX, tmpY) == COLLISION_DATA_255) {
|
||||
|
||||
if (DoApplicableTransition((super->x.HALF.HI - gRoomControls.origin_x) + tmpX,
|
||||
(super->y.HALF.HI - gRoomControls.origin_y) + tmpY, r4, 5) == 0) {
|
||||
(super->y.HALF.HI - gRoomControls.origin_y) + tmpY, r4, 5) == 0) {
|
||||
if (sub_0807BD14(&gPlayerEntity.base, r4 >> 3) != 0) {
|
||||
super->direction = r4;
|
||||
sub_08085E74(this);
|
||||
|
|
|
|||
|
|
@ -619,8 +619,7 @@ const Transition* FindApplicableAreaTransition(u32 pos_x, u32 pos_y) {
|
|||
const Transition* transition = gArea.pCurrentRoomInfo->exits;
|
||||
u32 warp_types = 0xa;
|
||||
while (transition->warp_type != WARP_TYPE_END_OF_LIST) {
|
||||
if (((1 << transition->warp_type) & warp_types) != 0 &&
|
||||
IsPosInTransitionRect(transition, pos_x, pos_y, 0)) {
|
||||
if (((1 << transition->warp_type) & warp_types) != 0 && IsPosInTransitionRect(transition, pos_x, pos_y, 0)) {
|
||||
return transition;
|
||||
}
|
||||
transition++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue