mirror of https://github.com/zeldaret/tmc.git
sort out functions.h
This commit is contained in:
parent
7036ec73af
commit
48fa5b4618
|
|
@ -11,6 +11,7 @@ extern u32 GetTileType(u32 pos, u32 layer);
|
|||
extern void SetTile(u32 index, u32 position, u32 layer);
|
||||
extern void UpdateScrollVram(void);
|
||||
extern u32 sub_080002D0(struct Entity_*);
|
||||
extern u32 sub_080002F0(u32, u32, u32);
|
||||
extern void LoadResourceAsync(const void*, u32, u32);
|
||||
extern void sub_08001242(struct Entity_*);
|
||||
extern void sub_08001290(struct Entity_*, u32);
|
||||
|
|
@ -29,5 +30,8 @@ extern u32 sub_080045B4(struct Entity_*, u32, u32);
|
|||
extern u32 sub_080045D4(u32, u32, u32, u32);
|
||||
extern u32 sub_080045DA(s32, s32);
|
||||
extern u32 sub_080086B4(u32, u32, u8*);
|
||||
extern u32 ResolveCollisionLayer(struct Entity_*);
|
||||
extern void sub_0800417E(struct Entity_*, u32);
|
||||
extern u32 sub_0800442E(struct Entity_*);
|
||||
|
||||
#endif // ASM_H
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
struct Entity_;
|
||||
|
||||
typedef struct {
|
||||
u16 heldKeys;
|
||||
u16 newKeys;
|
||||
|
|
@ -10,11 +12,11 @@ typedef struct {
|
|||
u8 unk6;
|
||||
u8 unk7;
|
||||
} Input;
|
||||
|
||||
extern Input gInput;
|
||||
|
||||
void LoadPalettes(const u8*, s32, s32);
|
||||
void LoadPaletteGroup(u32 group);
|
||||
void LoadGfxGroup(u32 group);
|
||||
void SetColor(u32 colorIndex, u32 color);
|
||||
void SetFillColor(u32 color, u32 arg1);
|
||||
|
||||
|
|
@ -73,7 +75,12 @@ void zFree(void* ptr);
|
|||
void DispReset(bool32 refresh);
|
||||
|
||||
u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
|
||||
u32 CheckKinstoneFused(u32);
|
||||
void sub_0801E1EC(u32, u32, u32);
|
||||
void sub_0801DD58(u32, u32);
|
||||
void sub_0801E1B8(u32, u32);
|
||||
void sub_0801E738(u32);
|
||||
void sub_0801DFB4(struct Entity_*, u32, u32, u32);
|
||||
u32 sub_0801E00C(void);
|
||||
|
||||
#endif // COMMON_H
|
||||
|
|
|
|||
|
|
@ -10,12 +10,21 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "entity.h"
|
||||
#include "projectile.h"
|
||||
|
||||
extern u32 GetNextFunction(Entity*);
|
||||
extern void EnemyFunctionHandler(Entity*, EntityActionArray);
|
||||
extern void sub_08001324(Entity*);
|
||||
extern Entity* CreateDeathFx(Entity*, u32, u32);
|
||||
|
||||
extern Entity* sub_0804A9FC(Entity*, u32);
|
||||
extern void SetChildOffset(Entity*, s32, s32, s32);
|
||||
extern Entity* CreateProjectileWithParent(Entity*, u8, u8);
|
||||
|
||||
extern void sub_0804A7D4(Entity*);
|
||||
extern void sub_08002724(void*, u8*);
|
||||
extern void sub_080026C4(u8*, u8*, u8*, u32);
|
||||
extern void sub_080026F2(u8*, void*, u8*, u32);
|
||||
|
||||
typedef enum {
|
||||
/*0x00*/ OCTOROK,
|
||||
|
|
|
|||
|
|
@ -232,9 +232,12 @@ u32 LoadExtraSpriteData(Entity*, SpriteLoadData*);
|
|||
void SetExtraSpriteFrame(Entity*, u32, u32);
|
||||
void SetSpriteSubEntryOffsetData1(Entity*, u32, u32);
|
||||
void SetSpriteSubEntryOffsetData2(Entity*, u32, u32);
|
||||
u8* GetSpriteSubEntryOffsetDataPointer(u32, u32);
|
||||
|
||||
u32 GetFacingDirection(Entity*, Entity*);
|
||||
|
||||
u32 ProcessMovement(Entity*);
|
||||
|
||||
/**
|
||||
* @brief Delete the entity currently in execution.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ extern void sub_0805F7DC(u32, struct_02036540*);
|
|||
extern void sub_0805F300(struct_02036540*);
|
||||
extern void sub_08050A64(u32);
|
||||
extern void sub_08050AFC(u32);
|
||||
extern void sub_08050384();
|
||||
|
||||
extern const struct_080FC844 gUnk_080FC844;
|
||||
extern const u16 gUnk_080FC85C[][3];
|
||||
|
|
|
|||
|
|
@ -12,32 +12,11 @@
|
|||
#include "script.h"
|
||||
|
||||
// Identified - to be sorted into header files
|
||||
extern u32 CheckKinstoneFused(u32);
|
||||
extern void ForceEquipItem(u32, u32);
|
||||
extern void LoadRoomEntityList(EntityData* listPtr);
|
||||
extern void SetChildOffset(Entity*, s32, s32, s32);
|
||||
extern Entity* CreatePlayerItem(u32, u32, u32, u32);
|
||||
extern void SetDirtTile(u32);
|
||||
extern Entity* CreateDeathFx(Entity*, u32, u32);
|
||||
extern u8* GetSpriteSubEntryOffsetDataPointer(u32, u32);
|
||||
extern bool32 LoadFixedGFX(Entity*, u32);
|
||||
extern void CreateItemEntity(u32, u32, u32);
|
||||
extern u32 ProcessMovement(Entity*);
|
||||
extern void MenuFadeIn(u32, u32);
|
||||
extern void LoadPaletteGroup(u32);
|
||||
extern void TryLoadPrologueHyruleTown(void);
|
||||
extern void LoadGfxGroup(u32);
|
||||
extern Entity* CreateProjectileWithParent(Entity*, u8, u8);
|
||||
extern u32 GetSaleItemConfirmMessageID(u32);
|
||||
extern void FlushSprites(void);
|
||||
extern Entity* CreateProjectile(u32);
|
||||
extern s32 GetItemPrice();
|
||||
extern void DoExitTransition(ScreenTransitionData*);
|
||||
extern void CreateDustAt(s32, s32, u32);
|
||||
extern void PutItemOnSlot(u32 itemID);
|
||||
extern Entity* CreateSpeechBubbleQuestionMark(Entity*, s32, s32);
|
||||
extern Entity* CreateSpeechBubbleExclamationMark(Entity*, s32, s32);
|
||||
extern Entity* CreateSpeechBubbleSleep(Entity*, s32, s32);
|
||||
|
||||
// Unidentified
|
||||
extern void sub_0805EC9C();
|
||||
|
|
@ -78,86 +57,42 @@ extern void sub_08059278(void);
|
|||
extern void sub_0804C128(u32);
|
||||
extern void sub_08058324(u32);
|
||||
extern void sub_0801AFE4(void);
|
||||
extern u32 sub_08060354(void);
|
||||
extern void sub_08057E64(void);
|
||||
extern void sub_0809F814(u32);
|
||||
extern void sub_080300E8(void);
|
||||
extern void sub_08058D34(void);
|
||||
extern void sub_0807AABC(Entity*);
|
||||
extern void sub_0805B4D0(u32);
|
||||
extern void sub_0804D0B4(void);
|
||||
extern void sub_080534AC();
|
||||
extern void sub_0807BA8C(u32, u32);
|
||||
extern void sub_0804D9B0();
|
||||
extern void sub_0807BB98(u32, u32, u32, u32);
|
||||
extern void sub_0801D000(u32);
|
||||
extern void sub_08018C58(u32);
|
||||
extern void sub_080AF284(void);
|
||||
extern void sub_080A71C4(u32, u32, u32, u32);
|
||||
extern void sub_08054564();
|
||||
extern void sub_0801DD58(u32, u32);
|
||||
extern void sub_0804ED18();
|
||||
extern void sub_080AF2E4(void);
|
||||
extern void sub_0804F578(void);
|
||||
extern void sub_08059994(void);
|
||||
extern void DrawDirect(u32, u32); // trampoline to sub_080B27F4
|
||||
extern void sub_0801E1B8(u32, u32);
|
||||
extern void sub_080A3B74(void);
|
||||
extern void sub_080A4054(void);
|
||||
extern void sub_0801C1D4(void);
|
||||
extern void DrawOAMCmd(void);
|
||||
extern void sub_080A4D34(void);
|
||||
extern u32 sub_080A4494(void);
|
||||
extern void sub_080A4528(void);
|
||||
extern void sub_080A4398(void);
|
||||
extern void sub_0801E738(u32);
|
||||
extern void sub_080A7114(u32);
|
||||
extern u32 sub_0807953C(void);
|
||||
extern void sub_080AE068(Entity*);
|
||||
extern u32 sub_0800445C(Entity*);
|
||||
extern u32 sub_0801766C(Entity*);
|
||||
extern void sub_08004168(Entity*);
|
||||
extern void sub_08056208(void);
|
||||
extern void sub_08050384();
|
||||
extern u32 sub_0806F520();
|
||||
extern void sub_0806F4E8(Entity*);
|
||||
extern void sub_0804A7D4(Entity*);
|
||||
extern void sub_08033744(Entity*);
|
||||
extern void sub_0800417E(Entity*, u32);
|
||||
extern void sub_080784C8();
|
||||
extern u32 sub_0808288C(Entity*, u32, u32, u32);
|
||||
extern void sub_0806FDA0(Entity*);
|
||||
extern bool32 LoadSwapGFX(Entity*, u16, u32);
|
||||
extern u32 ResolveCollisionLayer(Entity*);
|
||||
extern void sub_08077728();
|
||||
extern void sub_0807921C();
|
||||
extern void sub_0807ACCC(Entity*);
|
||||
extern void sub_080A2BE4(Entity*, u32);
|
||||
extern u32 sub_08097ADC(Entity*);
|
||||
extern u32 sub_08079F8C(void);
|
||||
extern void sub_080787CC(Entity*);
|
||||
extern u32 sub_080044EC(Entity*, u32);
|
||||
extern u32 sub_080002B8(Entity*);
|
||||
extern u32 sub_08049F84(Entity*, u32);
|
||||
extern void sub_0802F45C(Entity*);
|
||||
extern u32 sub_0800419C(Entity*, Entity*, u32, u32);
|
||||
extern void sub_08004542(Entity*);
|
||||
extern void sub_08077B20();
|
||||
extern u32 sub_08017850(Entity*);
|
||||
extern void sub_080809D4(void);
|
||||
extern void sub_08080CB4(Entity*);
|
||||
extern u32 sub_0800442E(Entity*);
|
||||
extern void sub_08081404(Entity*, u32);
|
||||
extern void sub_0807B7D8(u32, u32, u32);
|
||||
extern void sub_0800451C(Entity*);
|
||||
extern u32 sub_080002F0(u32, u32, u32);
|
||||
extern u32 sub_080040D8(Entity*, u8*, s32, s32);
|
||||
extern void LoadGfxGroups();
|
||||
extern void SetColor(u32, u32);
|
||||
extern u32 sub_0805F8F8(u32);
|
||||
extern void sub_08002724(void*, u8*);
|
||||
extern void sub_080026C4(u8*, u8*, u8*, u32);
|
||||
extern void sub_080026F2(u8*, void*, u8*, u32);
|
||||
extern u32 sub_0805F7A0(u32);
|
||||
extern u32* sub_0805F25C(u32);
|
||||
u32 sub_0806FCB8(Entity*, u32, u32, u32);
|
||||
|
|
@ -165,8 +100,6 @@ extern void sub_080A1D70(Entity*, u32);
|
|||
extern void sub_0806F62C(Entity*, u32, u32);
|
||||
extern void sub_080A1ED0(u32, u32, u32);
|
||||
extern u32 sub_0806F5B0(u32);
|
||||
extern void sub_0801DFB4(Entity*, u32, u32, u32);
|
||||
extern u32 sub_0801E00C(void);
|
||||
extern void sub_08078790(Entity*, u32);
|
||||
extern void sub_080788E0(Entity*);
|
||||
extern void sub_08078B48(void);
|
||||
|
|
@ -174,13 +107,9 @@ extern void sub_0807919C();
|
|||
extern void sub_0807CAA0(u32, u32);
|
||||
extern void sub_080085B0(Entity*);
|
||||
extern u32 sub_08079D48();
|
||||
extern u32 sub_08008B22();
|
||||
extern void MessageClose();
|
||||
extern u32 sub_080542AC(u32);
|
||||
extern u32 sub_08079FC4(u32);
|
||||
extern u32* sub_08008790(Entity*, u32);
|
||||
extern void sub_0805F8E4(u32 r0, WStruct* r1);
|
||||
|
||||
extern Entity* sub_08077C94(ItemBehavior*, u32);
|
||||
extern Entity* sub_08077C0C(ItemBehavior*, u32);
|
||||
extern void sub_08077D38(ItemBehavior*, u32);
|
||||
|
|
@ -190,10 +119,8 @@ extern u32 sub_0806F948(Entity*);
|
|||
extern void sub_08077DF4(ItemBehavior*, u32);
|
||||
extern void sub_08077BB8(ItemBehavior*);
|
||||
extern bool32 sub_08077EFC(ItemBehavior*);
|
||||
|
||||
extern void sub_08078E84(Entity*, Entity*);
|
||||
extern void sub_080042D0(Entity*, u32, u16);
|
||||
|
||||
extern u32 sub_080002A8(u32, u32, u32);
|
||||
extern void sub_080806BC(u32, u32, u32, u32);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,13 +32,17 @@ bool32 HasDungeonSmallKey(void);
|
|||
bool32 ItemIsSword(u32 item);
|
||||
bool32 ItemIsShield(u32 item);
|
||||
u32 GetBottleContaining(u32 item);
|
||||
void PutItemOnSlot(u32 item);
|
||||
s32 GetItemPrice(u32 item);
|
||||
u32 GetSaleItemConfirmMessageID(u32 item);
|
||||
void ForceEquipItem(u32 item, u32 slot);
|
||||
|
||||
void LoadGfxGroups(void);
|
||||
void LoadCutsceneRoom(u32 room, u32 area);
|
||||
void InitRoom(void);
|
||||
void InitParachuteRoom(void);
|
||||
|
||||
void RegisterTransitionManager(void* mgr, void (*onEnter)(void), void (*onExit)(void));
|
||||
void RegisterTransitionManager(void* mgr, void (*onEnter)(void*), void (*onExit)(void*));
|
||||
void RoomExitCallback(void);
|
||||
|
||||
void RestoreGameTask(u32 a1);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@
|
|||
#include "entity.h"
|
||||
#include "player.h"
|
||||
|
||||
void CreateItemEntity(u32, u32, u32);
|
||||
void sub_08081404(Entity*, u32);
|
||||
|
||||
extern void ItemDebug(ItemBehavior*, u32);
|
||||
extern void ItemSword(ItemBehavior*, u32);
|
||||
extern void ItemBomb(ItemBehavior*, u32);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
extern void sub_08018C58(u32);
|
||||
|
||||
typedef struct {
|
||||
u8 unk[4];
|
||||
u32 unk2;
|
||||
|
|
|
|||
|
|
@ -97,5 +97,6 @@ extern void VBlankInterruptWait(void);
|
|||
extern void DisableInterruptsAndDMA(void);
|
||||
extern void EnableVBlankIntr(void);
|
||||
extern void sub_08056250(void);
|
||||
extern void sub_08056208(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -126,6 +126,11 @@ void MessageFromTarget(u32 index);
|
|||
*/
|
||||
void MessageAtHeight(u32 index, u32 y);
|
||||
|
||||
/**
|
||||
* @brief Close message.
|
||||
*/
|
||||
void MessageClose(void);
|
||||
|
||||
void DispMessageFrame(u16*, s32, s32, u32);
|
||||
|
||||
#endif // MESSAGE_H
|
||||
|
|
|
|||
|
|
@ -20,9 +20,14 @@ extern void sub_080787B4(Entity*);
|
|||
extern void sub_0808C650(Entity*, u32);
|
||||
extern u32 sub_0808C67C(void);
|
||||
extern void sub_0808C688(void);
|
||||
extern void sub_080A2BE4(Entity*, u32);
|
||||
|
||||
void CreateDust(Entity* parent);
|
||||
void CreateDustAt(s32, s32, u32);
|
||||
void CreateDustSmall(Entity* parent);
|
||||
Entity* CreateSpeechBubbleQuestionMark(Entity*, s32, s32);
|
||||
Entity* CreateSpeechBubbleExclamationMark(Entity*, s32, s32);
|
||||
Entity* CreateSpeechBubbleSleep(Entity*, s32, s32);
|
||||
|
||||
typedef enum {
|
||||
GROUND_ITEM,
|
||||
|
|
|
|||
|
|
@ -288,6 +288,8 @@ void ResetPlayerAnimationAndAction(void);
|
|||
void SetPlayerActionNormal(void);
|
||||
void RespawnAsMinish(void);
|
||||
|
||||
Entity* CreatePlayerItem(u32, u32, u32, u32);
|
||||
|
||||
void ResolvePlayerAnimation(void);
|
||||
void RegisterPlayerHitbox(void);
|
||||
void UpdateFloorType(void);
|
||||
|
|
@ -299,6 +301,11 @@ s32 ModHealth(s32 delta);
|
|||
void ModRupees(s32 delta);
|
||||
void DeleteClones(void);
|
||||
|
||||
void sub_08077728();
|
||||
extern void sub_08077B20();
|
||||
extern u32 sub_08008B22();
|
||||
extern u32* sub_08008790(Entity*, u32);
|
||||
|
||||
#define COPY_FLAG_FROM_TO(base, src, dest) (base) = ((base) & ~(dest)) | (((dest) * ((base) & (src))) / src)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef PROJECTILE_H
|
||||
#define PROJECTILE_H
|
||||
|
||||
extern Entity* CreateProjectile(u32);
|
||||
|
||||
typedef enum {
|
||||
/*00*/ DARK_NUT_SWORD_SLASH,
|
||||
/*01*/ ROCK_PROJECTILE,
|
||||
|
|
|
|||
|
|
@ -160,6 +160,20 @@ typedef struct {
|
|||
static_assert(sizeof(RoomTransition) == 0xB0);
|
||||
extern RoomTransition gRoomTransition;
|
||||
|
||||
typedef struct {
|
||||
u16 type;
|
||||
u8 field_0x2[4];
|
||||
s16 playerXPos;
|
||||
s16 playerYPos;
|
||||
u8 field_0xa;
|
||||
u8 area;
|
||||
u8 room;
|
||||
u8 playerLayer;
|
||||
u8 field_0xe;
|
||||
u8 playerState;
|
||||
u16 transitionSFX;
|
||||
} ScreenTransitionData;
|
||||
|
||||
typedef struct {
|
||||
u8 type;
|
||||
u8 _1;
|
||||
|
|
@ -188,16 +202,19 @@ typedef enum {
|
|||
TILE_ENTITY_D,
|
||||
} TileEntityType;
|
||||
|
||||
extern void SetTileType(u32, u32, u32);
|
||||
extern void InitScreenShake(u32 time, u32 magnitude);
|
||||
void SetTileType(u32, u32, u32);
|
||||
void InitScreenShake(u32 time, u32 magnitude);
|
||||
|
||||
void CallRoomProp5And7(void);
|
||||
void LoadRoom(void);
|
||||
void SetCurrentRoomPropertyList(u32 area, u32 room);
|
||||
extern void* GetCurrentRoomProperty(u32);
|
||||
extern void LoadRoomTileEntities();
|
||||
void* GetCurrentRoomProperty(u32);
|
||||
void LoadRoomTileEntities();
|
||||
void LoadRoomEntityList(EntityData* listPtr);
|
||||
|
||||
void sub_0804B3C4(void*);
|
||||
void sub_0804B0B0(u32 arg0, u32 arg1);
|
||||
|
||||
void DoExitTransition(ScreenTransitionData* data);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -38,20 +38,6 @@ static_assert(sizeof(struct_02000010) == 0x20);
|
|||
|
||||
extern struct_02000010 gUnk_02000010;
|
||||
|
||||
typedef struct {
|
||||
u16 type;
|
||||
u8 field_0x2[4];
|
||||
s16 playerXPos;
|
||||
s16 playerYPos;
|
||||
u8 field_0xa;
|
||||
u8 area;
|
||||
u8 room;
|
||||
u8 playerLayer;
|
||||
u8 field_0xe;
|
||||
u8 playerState;
|
||||
u16 transitionSFX;
|
||||
} ScreenTransitionData;
|
||||
|
||||
typedef struct {
|
||||
u8 active;
|
||||
u8 field_0x1;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef SUBTASK_H
|
||||
#define SUBTASK_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
// todo: separate headers for each subtask?
|
||||
|
||||
extern void sub_080A4528(void);
|
||||
extern void sub_080A4398(void);
|
||||
extern void sub_080A7114(u32);
|
||||
extern void sub_080A3B74(void);
|
||||
extern void sub_080A4054(void);
|
||||
extern void sub_080A4D34(void);
|
||||
extern u32 sub_080A4494(void);
|
||||
|
||||
#endif // SUBTASK_H
|
||||
|
|
@ -5,7 +5,7 @@ extern u32 gRoomMemory;
|
|||
|
||||
extern void MemFill32(u32, void*, u32);
|
||||
|
||||
void ClearRoomMemory() {
|
||||
void ClearRoomMemory(void) {
|
||||
MemFill32(0xFFFFFFFF, &gRoomMemory, 0x40);
|
||||
gUnk_020354B0 = &gRoomMemory;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ extern u8 gUnk_0200AF14;
|
|||
extern u32 gUnk_080015BC;
|
||||
extern u8 gUnk_080FE1C6[];
|
||||
extern u32 gUnk_02034398;
|
||||
extern void (*const gUnk_080FE2A0[])();
|
||||
extern void (*const gUnk_080FE2A0[])(void);
|
||||
|
||||
void ForceEquipItem(u32, u8);
|
||||
extern void sub_0807CAA0(u32, u32);
|
||||
|
|
|
|||
|
|
@ -6,10 +6,11 @@
|
|||
#include "menu.h"
|
||||
#include "screen.h"
|
||||
#include "message.h"
|
||||
#include "game.h"
|
||||
|
||||
extern void (*const gUnk_08109A30[])();
|
||||
extern void (*const gUnk_08109A30[])(void);
|
||||
|
||||
void DebugTask() {
|
||||
void DebugTask(void) {
|
||||
gUnk_08109A30[gMain.state]();
|
||||
}
|
||||
|
||||
|
|
@ -90,6 +91,6 @@ void sub_0805FA98(void) {
|
|||
gScreen.bg3.updated = 1;
|
||||
}
|
||||
|
||||
void sub_0805FBC4() {
|
||||
void sub_0805FBC4(void) {
|
||||
SetTask(TASK_TITLE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@
|
|||
#include "message.h"
|
||||
#include "fileselect.h"
|
||||
#include "screen.h"
|
||||
#include "game.h"
|
||||
|
||||
extern void (*const demoFunctions[])(void);
|
||||
void sub_080A30AC();
|
||||
void sub_080A30AC(void);
|
||||
|
||||
extern u8 gUnk_02000004;
|
||||
void sub_080A3198(u32, u32);
|
||||
|
|
|
|||
10
src/enemy.c
10
src/enemy.c
|
|
@ -419,11 +419,11 @@ const EnemyDefinition gEnemyDefinition_46[] = {
|
|||
{ 72, 384, &gUnk_080FD258, SPRITE_BOWMOBLIN_1, { 1, 1, 1, 2 }, 8, 256, 138, 139 },
|
||||
};
|
||||
|
||||
extern void sub_08049E18();
|
||||
extern void sub_08049E4C();
|
||||
extern void sub_08049E80();
|
||||
extern void sub_08049EB0();
|
||||
void (*const gUnk_080D3BE8[])() = {
|
||||
extern Entity* sub_08049E18(void);
|
||||
extern Entity* sub_08049E4C(void);
|
||||
extern Entity* sub_08049E80(void);
|
||||
extern Entity* sub_08049EB0(void);
|
||||
Entity* (*const gUnk_080D3BE8[])(void) = {
|
||||
sub_08049E18,
|
||||
sub_08049E4C,
|
||||
sub_08049E80,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
extern u32 PlayerInRange(Entity*, u32, u32);
|
||||
|
||||
u32 sub_08021D00();
|
||||
u32 sub_08021D00(Entity*);
|
||||
void sub_08021D44(Entity* this, u32 direction);
|
||||
|
||||
extern void (*const gUnk_080CB590[])(Entity*);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "room.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_080A2CC0();
|
||||
extern void sub_080A2CC0(Entity*, void*, void*);
|
||||
|
||||
void BladeTrap(Entity* this) {
|
||||
if (this->action == 0) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "game.h"
|
||||
#include "item.h"
|
||||
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
extern bool32 sub_08056338(void);
|
||||
|
|
|
|||
|
|
@ -6,23 +6,23 @@ typedef struct {
|
|||
u8 field_0x1;
|
||||
} PACKED stuct_080CAB14;
|
||||
|
||||
void sub_08021218();
|
||||
void sub_08021588();
|
||||
void sub_080213D0();
|
||||
void sub_08021390();
|
||||
void sub_0802159C();
|
||||
void sub_0804AA1C();
|
||||
void sub_080213F0();
|
||||
u32 sub_080214FC();
|
||||
void sub_08021540();
|
||||
void sub_08021600();
|
||||
void sub_080213B0();
|
||||
u32 PlayerInRange();
|
||||
u32 sub_0802169C();
|
||||
void sub_0802124C();
|
||||
void sub_08021644();
|
||||
void sub_08021414();
|
||||
void sub_08021400();
|
||||
void sub_08021218(Entity*, u32, u32);
|
||||
void sub_08021588(Entity*);
|
||||
void sub_080213D0(Entity*, u32);
|
||||
void sub_08021390(Entity*);
|
||||
void sub_0802159C(Entity*);
|
||||
void sub_0804AA1C(Entity*);
|
||||
void sub_080213F0(Entity*);
|
||||
u32 sub_080214FC(Entity*);
|
||||
void sub_08021540(Entity*);
|
||||
void sub_08021600(Entity*);
|
||||
void sub_080213B0(Entity*);
|
||||
u32 PlayerInRange(Entity*, u32, u32);
|
||||
u32 sub_0802169C(Entity*, Entity*);
|
||||
void sub_0802124C(Entity*);
|
||||
void sub_08021644(Entity*);
|
||||
void sub_08021414(Entity*);
|
||||
void sub_08021400(Entity*);
|
||||
u32 sub_08021274(u32, u32);
|
||||
u32 sub_08021664(Entity*, Entity*);
|
||||
u32 sub_0804A044(Entity*, Entity*, u32);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
#include "functions.h"
|
||||
|
||||
extern s16 sub_080001DA(u32, u32); // ?
|
||||
extern void sub_08049CF4();
|
||||
void sub_080221C0();
|
||||
extern void sub_08049CF4(Entity*);
|
||||
void sub_080221C0(Entity*);
|
||||
|
||||
typedef struct {
|
||||
s8 h;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ void sub_0803EB34(Entity* this) {
|
|||
CreateDeathFx(this, 0xff, 0x57);
|
||||
}
|
||||
|
||||
void nullsub_21() {
|
||||
void nullsub_21(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803EB44(Entity* this) {
|
||||
|
|
|
|||
|
|
@ -2,21 +2,22 @@
|
|||
#include "enemy.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
// Gibudo
|
||||
void sub_08037794();
|
||||
void sub_08037B10();
|
||||
void sub_0803797C();
|
||||
void sub_080379BC();
|
||||
void sub_08037C0C();
|
||||
u32 sub_08037810();
|
||||
void sub_080377B0();
|
||||
u32 sub_080378B0();
|
||||
u32 sub_08037914();
|
||||
u32 sub_080379EC();
|
||||
void sub_08037A58();
|
||||
void sub_08037ACC();
|
||||
void sub_08037B48();
|
||||
void sub_08037A14();
|
||||
void sub_08037794(Entity*);
|
||||
void sub_08037B10(Entity*);
|
||||
void sub_0803797C(Entity*);
|
||||
void sub_080379BC(Entity*);
|
||||
void sub_08037C0C(Entity*, Entity*);
|
||||
u32 sub_08037810(Entity*);
|
||||
void sub_080377B0(Entity*);
|
||||
u32 sub_080378B0(Entity*);
|
||||
u32 sub_08037914(Entity*);
|
||||
u32 sub_080379EC(Entity*);
|
||||
void sub_08037A58(Entity*);
|
||||
void sub_08037ACC(Entity*);
|
||||
void sub_08037B48(Entity*);
|
||||
void sub_08037A14(Entity*);
|
||||
|
||||
extern void sub_0804A4E4(Entity*, Entity*);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
|
|
@ -75,7 +76,7 @@ NONMATCH("asm/non_matching/gibdo/sub_080374A4.inc", void sub_080374A4(Entity* th
|
|||
}
|
||||
END_NONMATCH
|
||||
|
||||
void nullsub_162() {
|
||||
void nullsub_162(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08037558(Entity* this) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "player.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
#include "enemy.h"
|
||||
|
||||
extern u32 GetNextFunction(Entity*);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "save.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
|
||||
extern bool32 ItemIsShield(u32);
|
||||
|
||||
|
|
|
|||
|
|
@ -810,8 +810,8 @@ void sub_08034BC8(Entity* this) {
|
|||
|
||||
void sub_08034C00(Entity* this) {
|
||||
if (((gPlayerState.flags & PL_MINISH) != 0) &&
|
||||
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.origin_x,
|
||||
this->y.HALF.HI - gRoomControls.origin_y + 0xd, 3, 3) != 0) {
|
||||
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.origin_x, this->y.HALF.HI - gRoomControls.origin_y + 0xd, 3,
|
||||
3) != 0) {
|
||||
if (gRoomTransition.field_0x39 >= 0x3d) {
|
||||
DoExitTransition((ScreenTransitionData*)&gUnk_080CED88);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
void sub_08045374(Entity*);
|
||||
|
||||
extern void sub_080452E4();
|
||||
extern void sub_080452E4(Entity*);
|
||||
extern void ReplaceMonitoredEntity(Entity*, Entity*);
|
||||
|
||||
extern void (*const gUnk_080D17C0[])(Entity*);
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
|
||||
void Octorok_Pause();
|
||||
bool32 Octorok_FacesPlayer();
|
||||
void Octorok_Turn();
|
||||
void Octorok_Pause(Entity*);
|
||||
bool32 Octorok_FacesPlayer(Entity*);
|
||||
void Octorok_Turn(Entity*);
|
||||
|
||||
extern void (*const gOctorok[6])(Entity*);
|
||||
extern void (*const gOctorokActions[4])(Entity*);
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ void sub_08020A7C(Entity*);
|
|||
bool32 Rollobite_TryToHoleUp(Entity*);
|
||||
bool32 Rollobite_IsRolledUp(Entity*);
|
||||
|
||||
extern void sub_080AE58C();
|
||||
extern void sub_080AE7E8();
|
||||
extern void sub_08078930();
|
||||
extern void sub_080AE58C(Entity*, u32, u32);
|
||||
extern void sub_080AE7E8(Entity*, u32, u32, u32);
|
||||
extern void sub_08078930(Entity*);
|
||||
|
||||
void Rollobite(Entity* this) {
|
||||
EnemyFunctionHandler(this, gRollobiteFunctions);
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ extern void (*const gRope[6])(Entity*);
|
|||
extern void (*const gUnk_080CE460[4])(Entity*);
|
||||
extern void (*const gUnk_080CE470[3])(Entity*);
|
||||
extern Entity* gUnk_020000B0;
|
||||
extern u32 sub_0804A044();
|
||||
extern u32 sub_0804A044(Entity*, Entity*, u32);
|
||||
|
||||
void sub_08031600();
|
||||
u32 sub_0803163C();
|
||||
void sub_08031600(Entity*);
|
||||
u32 sub_0803163C(Entity*);
|
||||
|
||||
void Rope(Entity* this) {
|
||||
EnemyFunctionHandler(this, gRope);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void sub_080293B4(Entity* this) {
|
|||
CreateDeathFx(this, 0xff, gUnk_080CCC34[this->cutsceneBeh.HALF.LO * 3 + this->type]);
|
||||
}
|
||||
|
||||
void nullsub_141() {
|
||||
void nullsub_141(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080293DC(Entity* this) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ void sub_08044F88(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void nullsub_171() {
|
||||
void nullsub_171(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08044FC8(Entity* this) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ void sub_08031680(Entity* this) {
|
|||
gUnk_080CE548[this->action](this);
|
||||
}
|
||||
|
||||
void nullsub_152() {
|
||||
void nullsub_152(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803169C(Entity* this) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "enemy.h"
|
||||
#include "functions.h"
|
||||
|
||||
static void sub_0802F45C(Entity* this);
|
||||
|
||||
extern void (*const gUnk_080CDED0[])(Entity*);
|
||||
extern void (*const gUnk_080CDEE8[])(Entity*);
|
||||
|
||||
|
|
@ -175,7 +177,7 @@ void sub_0802F3F4(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0802F45C(Entity* this) {
|
||||
static void sub_0802F45C(Entity* this) {
|
||||
u32 temp;
|
||||
|
||||
if (sub_08049FA0(this) == 0) {
|
||||
|
|
|
|||
|
|
@ -546,8 +546,7 @@ void sub_08042C34(Entity* this) {
|
|||
y = gRoomControls.origin_y + gRoomControls.height + -0x40;
|
||||
}
|
||||
#endif
|
||||
if (((u32)((x - gRoomControls.origin_x) - 0x90) < 0x41) &&
|
||||
((u32)((y - gRoomControls.origin_y) - 8) < 0x41)) {
|
||||
if (((u32)((x - gRoomControls.origin_x) - 0x90) < 0x41) && ((u32)((y - gRoomControls.origin_y) - 8) < 0x41)) {
|
||||
x = gRoomControls.origin_x + 0xb0;
|
||||
y = gRoomControls.origin_y + 0x40;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ void sub_080447E0(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
extern void sub_08044DEC();
|
||||
extern void sub_08044DEC(Entity*);
|
||||
|
||||
void sub_08044868(Entity* this) {
|
||||
Entity* vaati = this->parent;
|
||||
|
|
|
|||
|
|
@ -389,8 +389,7 @@ void VaatiWrathType0Action8(Entity* this) {
|
|||
sub_08042004(this);
|
||||
UpdateAnimationSingleFrame(this);
|
||||
LinearMoveUpdate(this);
|
||||
if (((gRoomControls.origin_x + 0x20) > this->x.HALF.HI) ||
|
||||
((gRoomControls.origin_x + 0x140) < this->x.HALF.HI)) {
|
||||
if (((gRoomControls.origin_x + 0x20) > this->x.HALF.HI) || ((gRoomControls.origin_x + 0x140) < this->x.HALF.HI)) {
|
||||
if (0x3f < this->speed) {
|
||||
this->direction ^= 0x10;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
static void sub_08033744(Entity* this);
|
||||
|
||||
extern void (*const gUnk_080CEB74[])(Entity*);
|
||||
extern void (*const gUnk_080CEB8C[])(Entity*);
|
||||
extern void (*const gUnk_080CEB98[])(Entity*);
|
||||
|
|
@ -120,7 +122,7 @@ void sub_080336DC(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08033744(Entity* this) {
|
||||
static void sub_08033744(Entity* this) {
|
||||
u32 temp;
|
||||
u32 rand = (u32)Random() % 256;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ typedef struct {
|
|||
u32 unk;
|
||||
} struct_02018EB0;
|
||||
|
||||
extern void (*const gUnk_080D4120[])();
|
||||
extern void (*const gUnk_080D412C[])();
|
||||
extern void (*const gUnk_080D4120[])(void);
|
||||
extern void (*const gUnk_080D412C[])(void);
|
||||
|
||||
extern struct_02018EB0 gUnk_02018EB0;
|
||||
|
||||
|
|
|
|||
32
src/entity.c
32
src/entity.c
|
|
@ -15,19 +15,19 @@ void sub_0805EE88(void);
|
|||
void ClearAllDeletedEntities(void);
|
||||
void DeleteAllEntities(void);
|
||||
void sub_0805E98C(void);
|
||||
extern void sub_0806FE84();
|
||||
extern void sub_08078954();
|
||||
extern void sub_0806FE84(Entity*);
|
||||
extern void sub_08078954(Entity*);
|
||||
extern void sub_08017744(Entity*);
|
||||
extern void UnloadHitbox();
|
||||
extern void sub_0804AA1C();
|
||||
extern void UnloadHitbox(Entity*);
|
||||
extern void sub_0804AA1C(Entity*);
|
||||
|
||||
void ClearDeletedEntity(Entity*);
|
||||
extern void _ClearAndUpdateEntities();
|
||||
extern void _ClearAndUpdateEntities(void);
|
||||
extern void UpdateEntities_arm(u32);
|
||||
|
||||
static void UpdatePriorityTimer(void);
|
||||
static void ReleaseTransitionManager();
|
||||
static void UnlinkEntity();
|
||||
static void ReleaseTransitionManager(void*);
|
||||
static void UnlinkEntity(Entity*);
|
||||
|
||||
typedef struct {
|
||||
void* table;
|
||||
|
|
@ -106,7 +106,7 @@ bool32 AnyPrioritySet(void) {
|
|||
return prio != PRIO_MIN;
|
||||
}
|
||||
|
||||
static void UpdatePriority() {
|
||||
static void UpdatePriority(void) {
|
||||
UpdatePriorityTimer();
|
||||
if (gPriorityHandler.queued_priority) {
|
||||
gPriorityHandler.ent_priority = gPriorityHandler.queued_priority;
|
||||
|
|
@ -175,7 +175,7 @@ void SetPlayerEventPriority(void) {
|
|||
gPlayerEntity.updatePriority = PRIO_PLAYER_EVENT;
|
||||
}
|
||||
|
||||
void ResetPlayerEventPriority() {
|
||||
void ResetPlayerEventPriority(void) {
|
||||
gPriorityHandler.sys_priority = PRIO_MIN;
|
||||
gPlayerEntity.updatePriority = PRIO_PLAYER;
|
||||
}
|
||||
|
|
@ -185,19 +185,19 @@ void RevokePriority(Entity* e) {
|
|||
ResetEntityPriority();
|
||||
}
|
||||
|
||||
void SetRoomReloadPriority() {
|
||||
void SetRoomReloadPriority(void) {
|
||||
gPriorityHandler.sys_priority = PRIO_PLAYER_EVENT;
|
||||
}
|
||||
|
||||
void SetInitializationPriority() {
|
||||
void SetInitializationPriority(void) {
|
||||
gPriorityHandler.sys_priority = PRIO_HIGHEST;
|
||||
}
|
||||
|
||||
void ResetSystemPriority() {
|
||||
void ResetSystemPriority(void) {
|
||||
gPriorityHandler.sys_priority = PRIO_MIN;
|
||||
}
|
||||
|
||||
void UpdateEntities() {
|
||||
void UpdateEntities(void) {
|
||||
void (*f)(u32);
|
||||
|
||||
gRoomVars.filler1[0] = gRoomVars.field_0x4;
|
||||
|
|
@ -212,14 +212,14 @@ void UpdateEntities() {
|
|||
sub_0805EE88();
|
||||
}
|
||||
|
||||
void UpdateManagers() {
|
||||
void UpdateManagers(void) {
|
||||
void (*f)(u32);
|
||||
f = UpdateEntities_arm;
|
||||
f(1);
|
||||
ClearAllDeletedEntities();
|
||||
}
|
||||
|
||||
void EraseAllEntities() {
|
||||
void EraseAllEntities(void) {
|
||||
DeleteAllEntities();
|
||||
MemClear(&gPriorityHandler, 12);
|
||||
MemClear(&gPlayerEntity, 10880);
|
||||
|
|
@ -424,7 +424,7 @@ void DeleteManager(void* ent) {
|
|||
return;
|
||||
|
||||
ReleaseTransitionManager(manager);
|
||||
UnlinkEntity(manager);
|
||||
UnlinkEntity((Entity*)manager);
|
||||
MemClear(manager, sizeof(Temp));
|
||||
gManagerCount--;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "message.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "subtask.h"
|
||||
|
||||
// copy, erase, start
|
||||
#define NUM_FILE_OPERATIONS 3
|
||||
|
|
@ -92,7 +93,7 @@ static void sub_08050624(u32);
|
|||
static void sub_0805066C(void);
|
||||
static void HideButtonR(void);
|
||||
static void ShowButtonR(void);
|
||||
void sub_08051458();
|
||||
void sub_08051458(void);
|
||||
|
||||
void CreateDialogBox(u32 arg0, u32 arg1) {
|
||||
u32 sfx;
|
||||
|
|
|
|||
90
src/game.c
90
src/game.c
|
|
@ -16,6 +16,7 @@
|
|||
#include "message.h"
|
||||
#include "game.h"
|
||||
#include "item.h"
|
||||
#include "subtask.h"
|
||||
|
||||
// Game task
|
||||
|
||||
|
|
@ -71,49 +72,50 @@ extern void* gUnk_080B755C[];
|
|||
extern void** gExitLists[];
|
||||
extern void** gAreaTable[];
|
||||
|
||||
void FinalizeSave(void);
|
||||
void ClearArmosData(void);
|
||||
void ClearRoomMemory(void);
|
||||
void ClearMenuSavestate(void);
|
||||
void ResetUI(void);
|
||||
void sub_0806FD8C(void);
|
||||
void sub_080300C4(void);
|
||||
u32 sub_0805BC04(void);
|
||||
void DeleteSleepingEntities(void);
|
||||
u32 UpdateLightLevel(void);
|
||||
void sub_080185F8(void);
|
||||
void UpdateDoorTransition(void);
|
||||
u32 IsEnterPortal(void);
|
||||
void UpdateCarriedObject(void);
|
||||
void DrawUI();
|
||||
u32 CheckPlayerInactive();
|
||||
void CollisionMain();
|
||||
void sub_0805BB74();
|
||||
void CreateZeldaFollower(void);
|
||||
void LoadRoomGfx();
|
||||
void RecycleEntities();
|
||||
void sub_0804AF90();
|
||||
void CallRoomProp6();
|
||||
void UpdateScroll();
|
||||
void UpdateBgAnim();
|
||||
void CleanUpGFXSlots();
|
||||
void sub_080ADE24();
|
||||
void InitUI(u32);
|
||||
void sub_0801AE44(u32);
|
||||
void GenerateAreaHint(void);
|
||||
void ForceSetPlayerState(u32);
|
||||
void UpdateRoomTracker(void);
|
||||
void InitScriptData(void);
|
||||
void sub_08054524(void);
|
||||
void sub_080186D4(void);
|
||||
void sub_0806F364(void);
|
||||
void sub_08052FF4(u32 area, u32 room);
|
||||
void sub_0807C860(void);
|
||||
void sub_0807C740(void);
|
||||
void SetBGDefaults(void);
|
||||
void LoadItemGfx(void);
|
||||
extern void CreateDialogBox(u32, u32);
|
||||
extern void FinalizeSave(void);
|
||||
extern void ClearArmosData(void);
|
||||
extern void ClearRoomMemory(void);
|
||||
extern void ClearMenuSavestate(void);
|
||||
extern void ResetUI(void);
|
||||
extern void sub_0806FD8C(void);
|
||||
extern void sub_080300C4(void);
|
||||
extern u32 sub_0805BC04(void);
|
||||
extern void DeleteSleepingEntities(void);
|
||||
extern u32 UpdateLightLevel(void);
|
||||
extern void sub_080185F8(void);
|
||||
extern void UpdateDoorTransition(void);
|
||||
extern u32 IsEnterPortal(void);
|
||||
extern void UpdateCarriedObject(void);
|
||||
extern void DrawUI(void);
|
||||
extern u32 CheckPlayerInactive(void);
|
||||
extern void CollisionMain(void);
|
||||
extern void sub_0805BB74(u32);
|
||||
extern void CreateZeldaFollower(void);
|
||||
extern void LoadRoomGfx(void);
|
||||
extern void RecycleEntities(void);
|
||||
extern void sub_0804AF90(void);
|
||||
extern void CallRoomProp6(void);
|
||||
extern void UpdateScroll(void);
|
||||
extern void UpdateBgAnim(void);
|
||||
extern void CleanUpGFXSlots(void);
|
||||
extern void sub_080ADE24(void);
|
||||
extern void InitUI(u32);
|
||||
extern void sub_0801AE44(u32);
|
||||
extern void GenerateAreaHint(void);
|
||||
extern void ForceSetPlayerState(u32);
|
||||
extern void UpdateRoomTracker(void);
|
||||
extern void InitScriptData(void);
|
||||
extern void sub_08054524(void);
|
||||
extern void sub_080186D4(void);
|
||||
extern void sub_0806F364(void);
|
||||
extern void sub_08052FF4(u32 area, u32 room);
|
||||
extern void sub_0807C860(void);
|
||||
extern void sub_0807C740(void);
|
||||
extern void SetBGDefaults(void);
|
||||
extern void LoadItemGfx(void);
|
||||
|
||||
static void LoadRoomBgm();
|
||||
static void LoadRoomBgm(void);
|
||||
static void sub_08052010(void);
|
||||
static void ResetTmpFlags(void);
|
||||
static void InitializeEntities(void);
|
||||
|
|
@ -133,7 +135,7 @@ static void sub_0805329C(void);
|
|||
static void InitializePlayer(void);
|
||||
/* static */ void sub_08051F9C(u32 a1, u32 a2, u32 a3, u32 a4);
|
||||
static void DrawGameOverText(void);
|
||||
static u32 StairsAreValid();
|
||||
static u32 StairsAreValid(void);
|
||||
static void ClearFlagArray(const u16*);
|
||||
static void DummyHandler(u32* a1);
|
||||
static void sub_08053434(u32* a1);
|
||||
|
|
@ -178,8 +180,6 @@ typedef struct {
|
|||
u16 _a;
|
||||
} PopupOption;
|
||||
|
||||
extern void CreateDialogBox();
|
||||
|
||||
typedef struct {
|
||||
u8 area;
|
||||
u8 room;
|
||||
|
|
|
|||
|
|
@ -21,18 +21,18 @@ extern Entity gUnk_03003BE0;
|
|||
extern Entity* gPlayerClones[3];
|
||||
extern u16 gUnk_080B2CD8[];
|
||||
|
||||
extern void sub_080ADD70();
|
||||
extern void sub_0801C25C();
|
||||
extern void UpdateDisplayControls();
|
||||
extern void LoadResources();
|
||||
extern void HandlePlayerLife();
|
||||
extern void DoPlayerAction();
|
||||
extern void sub_080171F0();
|
||||
extern void sub_08078FB0();
|
||||
extern void sub_0807A050();
|
||||
extern u32 sub_08079B24();
|
||||
extern void sub_08079708();
|
||||
extern void CreateSparkle();
|
||||
extern void sub_080ADD70(void);
|
||||
extern void sub_0801C25C(void);
|
||||
extern void UpdateDisplayControls(void);
|
||||
extern void LoadResources(void);
|
||||
extern void HandlePlayerLife(Entity*);
|
||||
extern void DoPlayerAction(Entity*);
|
||||
extern void sub_080171F0(void);
|
||||
extern void sub_08078FB0(Entity*);
|
||||
extern void sub_0807A050(void);
|
||||
extern u32 sub_08079B24(void);
|
||||
extern void sub_08079708(Entity*);
|
||||
extern void CreateSparkle(Entity*);
|
||||
extern void sub_080028E0(Entity*);
|
||||
extern void sub_08078180(void);
|
||||
extern void sub_0807B0C8(void);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "functions.h"
|
||||
#include "sound.h"
|
||||
#include "object.h"
|
||||
#include "game.h"
|
||||
|
||||
extern void (*const gUnk_0811BD68[])(ItemBehavior*, u32);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ s32 sub_080774A0(void);
|
|||
extern u8 gUnk_0811BE14[];
|
||||
extern s32 sub_0800875A(Entity*, u32, ItemBehavior*);
|
||||
|
||||
extern void UpdatePlayerMovement();
|
||||
extern void UpdatePlayerMovement(void);
|
||||
|
||||
void ItemMoleMitts(ItemBehavior* this, u32 arg1) {
|
||||
gUnk_0811BE04[this->stateID](this, arg1);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
extern void sub_08077E78(ItemBehavior*, u32);
|
||||
extern void SoundReq(u32);
|
||||
extern void UpdateItemAnim(ItemBehavior*);
|
||||
extern u32 sub_08077EFC();
|
||||
extern u32 sub_08077EFC(ItemBehavior*);
|
||||
extern void sub_08077BB8(ItemBehavior*);
|
||||
extern void sub_08077D38(ItemBehavior*, u32);
|
||||
extern void sub_0806F948(Entity*);
|
||||
|
|
@ -26,7 +26,7 @@ void sub_08076D04(ItemBehavior* beh, u32 arg1) {
|
|||
}
|
||||
|
||||
void sub_08076D34(ItemBehavior* beh, u32 arg1) {
|
||||
if (sub_08077EFC() != 0) {
|
||||
if (sub_08077EFC(beh) != 0) {
|
||||
gPlayerState.field_0x3[0] |= 1;
|
||||
UpdateItemAnim(beh);
|
||||
if (beh->field_0x5[9] != 0) {
|
||||
|
|
|
|||
16
src/main.c
16
src/main.c
|
|
@ -29,10 +29,8 @@ void (*const sTaskHandlers[])(void) = {
|
|||
[TASK_FILE_SELECT] = FileSelectTask,
|
||||
#endif
|
||||
|
||||
[TASK_GAME] = GameTask,
|
||||
[TASK_GAMEOVER] = GameOverTask,
|
||||
[TASK_STAFFROLL] = StaffrollTask,
|
||||
[TASK_DEBUG] = DebugTask,
|
||||
[TASK_GAME] = GameTask, [TASK_GAMEOVER] = GameOverTask,
|
||||
[TASK_STAFFROLL] = StaffrollTask, [TASK_DEBUG] = DebugTask,
|
||||
};
|
||||
|
||||
static void sub_080560B8(void);
|
||||
|
|
@ -225,7 +223,7 @@ static u32 CheckHeaderValid(void) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void InitDMA() {
|
||||
void InitDMA(void) {
|
||||
SoundReq(SONG_VSYNC_OFF);
|
||||
gScreen._6d = gScreen._6c;
|
||||
gScreen._6c = 0;
|
||||
|
|
@ -238,7 +236,7 @@ void InitDMA() {
|
|||
DmaWait(3);
|
||||
}
|
||||
|
||||
void sub_08056208() {
|
||||
void sub_08056208(void) {
|
||||
SoundReq(SONG_VSYNC_ON);
|
||||
gScreen._6c = gScreen._6d;
|
||||
gScreen._6d = 0;
|
||||
|
|
@ -252,7 +250,7 @@ void sub_0805622C(void* a1, u32 a2, u32 a3) {
|
|||
gUnk_03003DE4 ^= 1;
|
||||
}
|
||||
|
||||
void sub_08056250() {
|
||||
void sub_08056250(void) {
|
||||
gScreen._6c = 0;
|
||||
}
|
||||
|
||||
|
|
@ -299,10 +297,10 @@ u16 CheckRegionsOnScreen(u16* arr) {
|
|||
return 0xff;
|
||||
}
|
||||
|
||||
void PlayerItemNulled2() {
|
||||
void PlayerItemNulled2(void) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void PlayerItemNulled() {
|
||||
void PlayerItemNulled(void) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "entity.h"
|
||||
#include "screen.h"
|
||||
#include "functions.h"
|
||||
#include "common.h"
|
||||
|
||||
extern void sub_08056250(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -148,11 +148,11 @@ void sub_080596E0(Manager10* this) {
|
|||
}
|
||||
}
|
||||
|
||||
u32 sub_08059844() {
|
||||
u32 sub_08059844(void) {
|
||||
return gPlayerEntity.x.HALF.HI - gRoomControls.origin_x > gRoomControls.width >> 1;
|
||||
}
|
||||
|
||||
u32 sub_0805986C() {
|
||||
u32 sub_0805986C(void) {
|
||||
return gPlayerEntity.x.HALF.HI - gRoomControls.origin_x > 0x200;
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ void sub_08059960(const u16* unk1, const u16* unk2, u16* unk3, u8 unk4) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08059994() {
|
||||
void sub_08059994(void) {
|
||||
if (sub_0805986C()) {
|
||||
LoadPaletteGroup(0x5B);
|
||||
gArea.queued_bgm = 0x1E;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ extern u16 gUnk_081083AE;
|
|||
extern u16 gUnk_081083C4;
|
||||
|
||||
void sub_08059CC0(u32, u32);
|
||||
void sub_08059B18();
|
||||
void sub_08059B18(void);
|
||||
|
||||
bool32 sub_08059C8C(Manager12*, u32, u8*, u16*);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ void sub_0805A098(Manager14*);
|
|||
void sub_0805A0C0(Manager14*);
|
||||
void sub_0805A114(u32, u32);
|
||||
void sub_0805A1D8(Manager14*);
|
||||
void nullsub_495();
|
||||
void sub_0805A25C();
|
||||
void nullsub_495(void*);
|
||||
void sub_0805A25C(void*);
|
||||
|
||||
void Manager14_Main(Manager14* this) {
|
||||
static void (*const gUnk_081085A4[])(Manager14*) = {
|
||||
|
|
@ -186,10 +186,10 @@ void sub_0805A1D8(Manager14* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void nullsub_495() {
|
||||
void nullsub_495(void* this) {
|
||||
}
|
||||
|
||||
void sub_0805A25C() {
|
||||
void sub_0805A25C(void* this) {
|
||||
gScreen.controls.layerFXControl = 0;
|
||||
gScreen.lcd.displayControl &= ~DISPCNT_BG3_ON;
|
||||
sub_08056250();
|
||||
|
|
|
|||
|
|
@ -165,10 +165,8 @@ void sub_0805B210(Manager1A* this) {
|
|||
gRoomTransition.player_status.start_pos_y = tmp->unk_06;
|
||||
break;
|
||||
case 1:
|
||||
gRoomTransition.player_status.start_pos_x =
|
||||
gPlayerEntity.x.HALF.HI - gRoomControls.origin_x + tmp->unk_04;
|
||||
gRoomTransition.player_status.start_pos_y =
|
||||
gPlayerEntity.y.HALF.HI - gRoomControls.origin_y + tmp->unk_06;
|
||||
gRoomTransition.player_status.start_pos_x = gPlayerEntity.x.HALF.HI - gRoomControls.origin_x + tmp->unk_04;
|
||||
gRoomTransition.player_status.start_pos_y = gPlayerEntity.y.HALF.HI - gRoomControls.origin_y + tmp->unk_06;
|
||||
break;
|
||||
case 2:
|
||||
gRoomTransition.player_status.start_pos_x = tmp->unk_04;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "manager.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
Manager manager;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "global.h"
|
||||
#include "screen.h"
|
||||
#include "functions.h"
|
||||
#include "game.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
Manager manager;
|
||||
|
|
@ -9,7 +11,7 @@ typedef struct {
|
|||
void* field_0x3c;
|
||||
} Manager2;
|
||||
|
||||
extern void sub_080576A0();
|
||||
extern void sub_080576A0(void*);
|
||||
extern void sub_0805754C(Manager2*);
|
||||
|
||||
extern u8 gMapDataTopSpecial[];
|
||||
|
|
@ -81,9 +83,9 @@ void sub_08057688(void) {
|
|||
gScreen.bg1.control = BGCNT_SCREENBASE(30) | BGCNT_CHARBASE(2) | BGCNT_MOSAIC;
|
||||
}
|
||||
|
||||
void sub_080576A0(Manager2* this) {
|
||||
void sub_080576A0(void* this) {
|
||||
LoadGfxGroup(gRoomVars.unk_10[0]);
|
||||
this->field_0x38 = NULL;
|
||||
this->field_0x3c = NULL;
|
||||
sub_0805754C(this);
|
||||
((Manager2*)this)->field_0x38 = NULL;
|
||||
((Manager2*)this)->field_0x3c = NULL;
|
||||
sub_0805754C((Manager2*)this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "common.h"
|
||||
|
||||
extern u32 sub_0805C920(Entity*);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "functions.h"
|
||||
#include "common.h"
|
||||
|
||||
void sub_0805D470(Manager*);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ u32 sub_0805795C(Manager* this, DiggingCaveEntrance* entr) {
|
|||
}
|
||||
}
|
||||
|
||||
extern void sub_08080930();
|
||||
extern void sub_08080930(u32);
|
||||
|
||||
#ifdef EU
|
||||
ASM_FUNC("asm/non_matching/eu/sub_08057A18.inc", void sub_08057A18(Manager* this, DiggingCaveEntrance* entr))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "manager.h"
|
||||
#include "asm.h"
|
||||
#include "functions.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
Manager manager;
|
||||
|
|
@ -8,8 +9,8 @@ typedef struct {
|
|||
u8 unk_21[0x1F];
|
||||
} Manager7;
|
||||
|
||||
void sub_08057E30();
|
||||
u32 sub_08057E40();
|
||||
void sub_08057E30(void*);
|
||||
u32 sub_08057E40(Manager7*);
|
||||
void sub_08057E7C(u32);
|
||||
|
||||
extern u32 CheckRegionsOnScreen(const u16*);
|
||||
|
|
@ -106,7 +107,7 @@ void Manager7_Main(Manager7* this) {
|
|||
}
|
||||
#endif
|
||||
|
||||
void sub_08057E30(Manager7* this) {
|
||||
void sub_08057E30(void* this) {
|
||||
sub_08057E7C(gRoomVars.unk_10[0]);
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +121,7 @@ u32 sub_08057E40(Manager7* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08057E64() {
|
||||
void sub_08057E64(void) {
|
||||
u32 tmp;
|
||||
tmp = CheckRegionsOnScreen(gUnk_08108050);
|
||||
if (tmp != 0xFF) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "manager.h"
|
||||
#include "screen.h"
|
||||
#include "functions.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
Manager manager;
|
||||
|
|
@ -11,7 +12,7 @@ typedef struct {
|
|||
} Manager8;
|
||||
|
||||
void sub_08057F20(Manager8*);
|
||||
void sub_08057EFC();
|
||||
void sub_08057EFC(void*);
|
||||
void sub_08058034(void);
|
||||
void sub_08058084(u16*, u16*);
|
||||
|
||||
|
|
@ -27,12 +28,12 @@ void Manager8_Main(Manager8* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08057EFC(Manager8* this) {
|
||||
void sub_08057EFC(void* this) {
|
||||
LoadGfxGroup((u32)gRoomVars.unk_10[0]);
|
||||
sub_08058034();
|
||||
this->unk_3c = 0;
|
||||
this->unk_38 = 0;
|
||||
sub_08057F20(this);
|
||||
((Manager8*)this)->unk_3c = 0;
|
||||
((Manager8*)this)->unk_38 = 0;
|
||||
sub_08057F20(((Manager8*)this));
|
||||
}
|
||||
|
||||
void sub_08058004(u32, void*, void*);
|
||||
|
|
@ -75,7 +76,7 @@ void sub_08058004(u32 unk1, void* unk2, void* unk3) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08058034() {
|
||||
void sub_08058034(void) {
|
||||
u32 tmp;
|
||||
u16 *tmp2, *tmp3;
|
||||
tmp2 = gMapDataTopSpecial;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "room.h"
|
||||
#include "screen.h"
|
||||
#include "functions.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
Manager manager;
|
||||
|
|
@ -66,7 +67,7 @@ void sub_080582A0(u32 unk, u32* unk2, u16* unk3) {
|
|||
|
||||
extern u8 gMapDataTopSpecial[];
|
||||
|
||||
void sub_080582D0() {
|
||||
void sub_080582D0(void) {
|
||||
u8* tmp = gMapDataTopSpecial;
|
||||
u8* tmp2 = tmp + 0x4000;
|
||||
sub_080582F8(tmp, tmp2);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ typedef struct {
|
|||
u16 unk_6;
|
||||
} struct_08108228;
|
||||
|
||||
void sub_08058D34(void);
|
||||
|
||||
void (*const gUnk_0810821C[])(ManagerC*);
|
||||
const struct_08108228 gUnk_08108228[6];
|
||||
const struct_08108228 gUnk_08108258[6];
|
||||
|
|
@ -267,7 +269,7 @@ void sub_08058CB0(ManagerC* this) {
|
|||
this->unk_24.HALF.HI = this->unk_20 = gUnk_08108300[tmp3];
|
||||
}
|
||||
|
||||
void sub_08058CFC() {
|
||||
void sub_08058CFC(void) {
|
||||
u32 tmp = gPlayerEntity.y.HALF.HI - gRoomControls.scroll_y;
|
||||
if (tmp < 0x4C) {
|
||||
sub_080044AE(&gPlayerEntity, 0xC0, 0x10);
|
||||
|
|
@ -277,7 +279,7 @@ void sub_08058CFC() {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08058D34() {
|
||||
void sub_08058D34(void) {
|
||||
u16 tmp;
|
||||
u32 tmp2;
|
||||
LoadPaletteGroup(0x28);
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ void sub_08059220(ManagerF* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_08059278() {
|
||||
void sub_08059278(void) {
|
||||
ManagerF* tmp;
|
||||
tmp = (ManagerF*)FindEntityByID(0x9, 0xF, 0x6);
|
||||
if (tmp) {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "script.h"
|
||||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "game.h"
|
||||
|
||||
extern void (*gUnk_081115C0[])(Entity*);
|
||||
extern void (*gUnk_081115D0[])(Entity*);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "message.h"
|
||||
#include "npc.h"
|
||||
|
||||
extern void sub_08067C44();
|
||||
extern void sub_08067C44(Entity*);
|
||||
|
||||
extern void (*gCat[9])(Entity*);
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ extern Dialog gUnk_08110EF8;
|
|||
extern Hitbox gUnk_08110EF0;
|
||||
extern void sub_08067B08(Entity*);
|
||||
|
||||
extern u32 sub_08067D20();
|
||||
extern u32 sub_08067D20(Entity*);
|
||||
extern void sub_08067AAC(Entity*);
|
||||
extern void sub_08067B34(Entity*);
|
||||
extern void sub_08067B80(Entity*, u32);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
|
|||
MessageNoOverlap(gUnk_0811334A[msgIndex], this);
|
||||
}
|
||||
|
||||
void sub_0806BEFC() {
|
||||
void sub_0806BEFC(void) {
|
||||
SetTileType(0x17E, 0x58E, 1);
|
||||
SetTileType(0x17F, 0x58F, 1);
|
||||
SetTileType(0x180, 0x5CE, 1);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
extern void (*gUnk_08111D88[])(Entity*);
|
||||
void sub_08069FE8(Entity*);
|
||||
u32 sub_08069EF0();
|
||||
u32 sub_08069EF0(Entity*);
|
||||
|
||||
extern u8 gUnk_08111DA8[];
|
||||
u32 sub_08069F90(Entity*);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include "script.h"
|
||||
#include "functions.h"
|
||||
#include "npc.h"
|
||||
#include "projectile.h"
|
||||
|
||||
typedef struct {
|
||||
u32 unk;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "effects.h"
|
||||
#include "npc.h"
|
||||
|
||||
extern void sub_08063280();
|
||||
extern void sub_08063280(Entity*, u32);
|
||||
|
||||
extern void (*gMailboxBehaviors[4])(Entity*);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "flags.h"
|
||||
#include "npc.h"
|
||||
|
||||
extern void sub_08078850();
|
||||
extern void sub_08078850(Entity*, u32, u32, u32*);
|
||||
extern u32 gUnk_08113F44;
|
||||
extern Dialog gUnk_08113F48[];
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "flags.h"
|
||||
#include "object.h"
|
||||
#include "npc.h"
|
||||
#include "game.h"
|
||||
|
||||
extern Hitbox gHitbox_2;
|
||||
typedef struct {
|
||||
|
|
@ -184,7 +185,7 @@ void sub_0806DC58(Entity* this) {
|
|||
ForceEquipItem(sub_0806DBF4(this->field_0x68.HALF.HI), 1);
|
||||
}
|
||||
|
||||
void sub_0806DC7C() {
|
||||
void sub_0806DC7C(void) {
|
||||
const u16* tiles = gUnk_081141F4;
|
||||
while (*tiles != 0) {
|
||||
u32 tile = *tiles;
|
||||
|
|
@ -193,7 +194,7 @@ void sub_0806DC7C() {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0806DCA0() {
|
||||
void sub_0806DCA0(void) {
|
||||
const u16* tiles = gUnk_081141F4;
|
||||
while (*tiles != 0) {
|
||||
u32 tile = *tiles;
|
||||
|
|
@ -202,7 +203,7 @@ void sub_0806DCA0() {
|
|||
}
|
||||
}
|
||||
|
||||
void sub_0806DCC0() {
|
||||
void sub_0806DCC0(void) {
|
||||
gRoomTransition.player_status.overworld_map_x = 0x7c8;
|
||||
gRoomTransition.player_status.overworld_map_y = 0xf8;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -822,7 +822,7 @@ bool32 sub_08061A74(Entity* this, s32 x, s32 y, s32 param) {
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_08061AA0() {
|
||||
void sub_08061AA0(void) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "message.h"
|
||||
#include "save.h"
|
||||
#include "npc.h"
|
||||
#include "object.h"
|
||||
|
||||
void sub_08063B68(Entity* this);
|
||||
void sub_08063A80(Entity* this);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "effects.h"
|
||||
#include "npc.h"
|
||||
|
||||
extern void sub_08062CA4();
|
||||
extern void sub_08062CA4(Entity*);
|
||||
|
||||
extern void (*gStampBehaviors1[4])(Entity*);
|
||||
extern void (*gStampBehaviors2[2])(Entity*);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "message.h"
|
||||
#include "functions.h"
|
||||
#include "npc.h"
|
||||
#include "object.h"
|
||||
#include "item.h"
|
||||
|
||||
extern void (*const gUnk_0810FDC8[])(Entity*);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern u32 sub_080002C0();
|
||||
extern u32 sub_080002C0(u32, u32, u32);
|
||||
extern void sub_0806ACC4(Entity*);
|
||||
extern void sub_0806AEA8();
|
||||
extern void sub_0806AEA8(Entity*);
|
||||
extern void sub_0806AEE4(Entity*);
|
||||
extern void sub_0806AFE8(Entity*, ScriptExecutionContext*);
|
||||
extern void sub_08078850(Entity*, u32, u32, u32*);
|
||||
|
|
@ -14,7 +14,7 @@ extern u8 gUnk_081125F4[12];
|
|||
extern SpriteLoadData gUnk_08112674[];
|
||||
extern u32 gUnk_081126D4[4];
|
||||
extern u8 gUnk_081126E4[4];
|
||||
extern void (*gUnk_081126E8[])();
|
||||
extern void (*gUnk_081126E8[])(Entity*);
|
||||
extern Dialog gUnk_081126F0[0x10];
|
||||
extern void (*gUnk_08112BF0[])(Entity*, ScriptExecutionContext*);
|
||||
extern u16 gUnk_08112C40[5];
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
extern const NPCDefinition gNPCDefinitions[];
|
||||
|
||||
extern Hitbox* gNPCHitboxes[];
|
||||
extern u32 (*gUnk_08114EFC[])();
|
||||
extern u32 (*gUnk_08114EFC[])(Entity*);
|
||||
extern u32 (*gUnk_08114F0C[])(Entity*, u8*);
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "save.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
|
||||
extern void (*const gUnk_08123EC0[])(Entity*);
|
||||
extern void (*const gUnk_08123EEC[])(Entity*);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "message.h"
|
||||
#include "item.h"
|
||||
|
||||
extern void (*const BookActionFuncs[])(Entity*);
|
||||
extern s8 const gUnk_08123D94[];
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
|
||||
void sub_0809F814(u32 r0);
|
||||
|
||||
extern void sub_0809F7BC(Entity*);
|
||||
extern void sub_0809F7F4(Entity*);
|
||||
extern void (*gUnk_08124798[])(Entity*);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
void GreatFairy_InitializeAnimation(Entity*);
|
||||
Entity* GreatFairy_CreateForm(Entity*, u32, u32);
|
||||
void sub_080873D0();
|
||||
void sub_080873D0(Entity*);
|
||||
extern void (*const GreatFairy_Main[])(Entity*);
|
||||
extern void (*const GreatFairy_Behaviors[])(Entity*);
|
||||
extern void (*const GreatFairy_WingsBehaviors[])(Entity*);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
|
||||
static void sub_0808E6A0(Entity*);
|
||||
static void sub_0808E6E4(Entity*);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ extern void sub_080A2CC0(Entity*, Entity**, u16*);
|
|||
extern u16 gUnk_08123318[];
|
||||
|
||||
static void sub_08097B24(Entity* this);
|
||||
static u32 sub_08097ADC(Entity* this);
|
||||
|
||||
void LilypadSmall(Entity* this) {
|
||||
u32 rand;
|
||||
|
|
@ -30,7 +31,7 @@ void LilypadSmall(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
u32 sub_08097ADC(Entity* this) {
|
||||
static u32 sub_08097ADC(Entity* this) {
|
||||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
return 0;
|
||||
} else if (EntityInRectRadius(this, &gPlayerEntity, 8, 8) == 0) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_08086A6C();
|
||||
extern void sub_08086A6C(Entity*);
|
||||
|
||||
extern void (*gUnk_081206C4[99])(Entity*);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "message.h"
|
||||
#include "functions.h"
|
||||
#include "screen.h"
|
||||
#include "item.h"
|
||||
|
||||
extern u8 gUnk_08114F30[];
|
||||
extern u8 gUnk_08114F34[];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "entity.h"
|
||||
#include "player.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
|
||||
extern void (*gUnk_08124824[])(Entity*);
|
||||
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ void sub_0809F2A0(Entity* this) {
|
|||
SetTile(0x4069, COORD_TO_TILE(this), this->collisionLayer);
|
||||
}
|
||||
|
||||
void nullsub_537() {
|
||||
void nullsub_537(Entity* this) {
|
||||
}
|
||||
|
|
|
|||
67
src/player.c
67
src/player.c
|
|
@ -241,7 +241,7 @@ static EntityAction sub_0807518C;
|
|||
static EntityAction sub_080751B4;
|
||||
|
||||
static void sub_080717F8(Entity*);
|
||||
static void reset_priority();
|
||||
static void reset_priority(void);
|
||||
static void break_out(Entity* this);
|
||||
static void sub_08073AD4(Entity* this);
|
||||
static void sub_08073B60(Entity*);
|
||||
|
|
@ -257,44 +257,41 @@ void SurfaceAction_Ladder(Entity*);
|
|||
void SurfaceAction_AutoLadder(Entity*);
|
||||
|
||||
extern void sub_080A4D88(void);
|
||||
extern void RespawnPlayer();
|
||||
extern void sub_080797EC();
|
||||
extern void UpdatePlayerMovement();
|
||||
extern void sub_08077698();
|
||||
extern void sub_08079258();
|
||||
extern void EnablePlayerDraw();
|
||||
extern u32 sub_08079B24();
|
||||
extern void sub_08079708();
|
||||
extern void sub_080792D8();
|
||||
extern Entity* CreatePlayerBomb();
|
||||
extern u32 sub_0806F854();
|
||||
extern u32 UpdatePlayerCollision();
|
||||
extern void sub_08079744();
|
||||
extern void sub_0807AE20();
|
||||
extern u32 sub_0807A894();
|
||||
extern u32 sub_080797C4();
|
||||
extern u32 sub_0807AC54();
|
||||
extern void sub_0800892E();
|
||||
extern void sub_08078F24();
|
||||
extern void sub_0807B068();
|
||||
extern u32 sub_080001DA();
|
||||
extern u32 sub_0807A2F8();
|
||||
extern u32 sub_0806F730();
|
||||
extern u32 sub_08007DD6();
|
||||
extern u32 GetSurfaceCalcType();
|
||||
extern void RespawnPlayer(void);
|
||||
extern void sub_080797EC(void);
|
||||
extern void UpdatePlayerMovement(void);
|
||||
extern void sub_08079258(void);
|
||||
extern void EnablePlayerDraw(Entity*);
|
||||
extern u32 sub_08079B24(void);
|
||||
extern void sub_08079708(Entity*);
|
||||
extern Entity* CreatePlayerBomb(Entity*, u32);
|
||||
extern u32 sub_0806F854(Entity*, s32, s32);
|
||||
extern u32 UpdatePlayerCollision(void);
|
||||
extern void sub_08079744(Entity*);
|
||||
extern void sub_0807AE20(Entity*);
|
||||
extern u32 sub_0807A894(Entity*);
|
||||
extern u32 sub_080797C4(void);
|
||||
extern void sub_0800892E(Entity*);
|
||||
extern void sub_08078F24(void);
|
||||
extern void sub_0807B068(Entity*);
|
||||
extern u32 sub_080001DA(u32, u32);
|
||||
extern u32 sub_0807A2F8(u32);
|
||||
extern u32 sub_0806F730(Entity*);
|
||||
extern u32 sub_08007DD6(u32, const u16*);
|
||||
extern u32 GetSurfaceCalcType(Entity*, u32, u32);
|
||||
extern void sub_08074808(Entity* this);
|
||||
extern void DoJump(Entity*);
|
||||
extern void SetZeldaFollowTarget(Entity*);
|
||||
u32 ItemIsSword(u32 item);
|
||||
extern u32 sub_0807A2B8();
|
||||
extern u32 sub_08079550();
|
||||
extern u32 sub_080782C0();
|
||||
extern u32 sub_0807A2B8(void);
|
||||
extern u32 sub_08079550(void);
|
||||
extern u32 sub_080782C0(void);
|
||||
extern u32 sub_080793E4(u32);
|
||||
extern void sub_08008AC6(Entity*);
|
||||
extern u32 sub_08079C30(Entity*);
|
||||
extern void sub_08077AEC();
|
||||
extern u32 RunQueuedAction();
|
||||
extern void UpdatePlayerSkills();
|
||||
extern void sub_08077AEC(void);
|
||||
extern u32 RunQueuedAction(void);
|
||||
extern void UpdatePlayerSkills(void);
|
||||
|
||||
void sub_08077698(Entity*);
|
||||
u32 sub_080782C0(void);
|
||||
|
|
@ -3294,7 +3291,7 @@ static NONMATCH("asm/non_matching/player/sub_080740D8.inc", void sub_080740D8(En
|
|||
}
|
||||
END_NONMATCH
|
||||
|
||||
u32 sub_080741C4() {
|
||||
u32 sub_080741C4(void) {
|
||||
if ((gPlayerState.jump_status && (gPlayerState.jump_status & 7) != 3) || gPlayerEntity.z.WORD != 0) {
|
||||
gPlayerState.field_0x11 = 0;
|
||||
gPlayerState.field_0x37 = 0;
|
||||
|
|
@ -3529,7 +3526,7 @@ void SurfaceAction_Water(Entity* this) {
|
|||
}
|
||||
|
||||
void sub_08074808(Entity* this) {
|
||||
sub_08077AEC(this);
|
||||
sub_08077AEC();
|
||||
if (GetInventoryValue(ITEM_FLIPPERS) == 1) {
|
||||
if (!gPlayerState.swim_state) {
|
||||
if ((gPlayerState.flags & 0x10000) != 0)
|
||||
|
|
@ -3559,7 +3556,7 @@ void SurfaceAction_Button(Entity* this) {
|
|||
gPlayerState.field_0x3f -= 2;
|
||||
}
|
||||
|
||||
void sub_080748D4() {
|
||||
void sub_080748D4(void) {
|
||||
sub_080741C4();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,29 @@
|
|||
#include "global.h"
|
||||
#include "functions.h"
|
||||
#include "player.h"
|
||||
|
||||
extern void PlayerItemSword();
|
||||
extern void PlayerItemBomb();
|
||||
extern void PlayerItem3();
|
||||
extern void PlayerItemBow();
|
||||
extern void PlayerItemShield();
|
||||
extern void PlayerItemLantern();
|
||||
extern void PlayerItemNulled();
|
||||
extern void PlayerItemGustJar();
|
||||
extern void PlayerItemPacciCane();
|
||||
extern void PlayerItemC();
|
||||
extern void PlayerItemCellOverwriteSet();
|
||||
extern void PlayerItemSwordSpin();
|
||||
extern void PlayerItemSwordBeam();
|
||||
extern void PlayerItem10();
|
||||
extern void PlayerItem11();
|
||||
extern void PlayerItem12();
|
||||
extern void PlayerItem13();
|
||||
extern void PlayerItem14();
|
||||
extern void PlayerItem15();
|
||||
extern void PlayerItemNulled2();
|
||||
typedef void(PlayerItemFunc)(Entity*);
|
||||
|
||||
PlayerItemFunc PlayerItemSword;
|
||||
PlayerItemFunc PlayerItemBomb;
|
||||
PlayerItemFunc PlayerItem3;
|
||||
PlayerItemFunc PlayerItemBow;
|
||||
PlayerItemFunc PlayerItemShield;
|
||||
PlayerItemFunc PlayerItemLantern;
|
||||
PlayerItemFunc PlayerItemNulled;
|
||||
PlayerItemFunc PlayerItemGustJar;
|
||||
PlayerItemFunc PlayerItemPacciCane;
|
||||
PlayerItemFunc PlayerItemC;
|
||||
PlayerItemFunc PlayerItemCellOverwriteSet;
|
||||
PlayerItemFunc PlayerItemSwordSpin;
|
||||
PlayerItemFunc PlayerItemSwordBeam;
|
||||
PlayerItemFunc PlayerItem10;
|
||||
PlayerItemFunc PlayerItem11;
|
||||
PlayerItemFunc PlayerItem12;
|
||||
PlayerItemFunc PlayerItem13;
|
||||
PlayerItemFunc PlayerItem14;
|
||||
PlayerItemFunc PlayerItem15;
|
||||
PlayerItemFunc PlayerItemNulled2;
|
||||
|
||||
typedef struct {
|
||||
u8 bitfield;
|
||||
|
|
@ -34,7 +37,7 @@ typedef struct {
|
|||
extern const PlayerItemDefinition gPlayerItemDefinitions[];
|
||||
extern const PlayerItemDefinition* gAdditionalPlayerItemDefinitions[3];
|
||||
|
||||
void (*const gPlayerItemFunctions[])() = {
|
||||
PlayerItemFunc* const gPlayerItemFunctions[] = {
|
||||
DeleteEntity,
|
||||
PlayerItemSword,
|
||||
PlayerItemBomb,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
#include "asm.h"
|
||||
|
||||
extern void (*const gUnk_08109AC8[])(Entity*);
|
||||
extern Hitbox gUnk_08109AD0;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ void sub_080704D4(Entity* this) {
|
|||
|
||||
ASM_FUNC("asm/non_matching/playerItemPacciCane/sub_080704FC.inc", void sub_080704FC(Entity* this))
|
||||
|
||||
void ClearMenuSavestate() {
|
||||
void ClearMenuSavestate(void) {
|
||||
MemClear(gUnk_02034490, sizeof(gUnk_02034490));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "sound.h"
|
||||
#include "effects.h"
|
||||
#include "common.h"
|
||||
#include "asm.h"
|
||||
|
||||
extern void (*const gUnk_080B43F4[])(Entity*);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "projectile.h"
|
||||
|
||||
bool32 sub_080AB12C(Entity* this);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "asm.h"
|
||||
#include "coord.h"
|
||||
#include "functions.h"
|
||||
#include "projectile.h"
|
||||
|
||||
extern u32 sub_080644C8(Entity*);
|
||||
extern bool32 sub_080AE4CC(Entity*, u32, u32, u32);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include "coord.h"
|
||||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
#include "projectile.h"
|
||||
|
||||
extern u8 gEntCount;
|
||||
extern Hitbox gHitbox_21;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue