Merge branch 'master' into tokeidai

This commit is contained in:
Tom Overton
2021-12-06 18:10:54 -08:00
committed by GitHub
369 changed files with 20504 additions and 3219 deletions
+247 -107
View File
@@ -1,7 +1,8 @@
#ifndef _ABI_H_
#define _ABI_H_
#ifndef ULTRA64_ABI_H
#define ULTRA64_ABI_H
/* Audio commands: */
/*
#define A_SPNOOP 0
#define A_ADPCM 1
#define A_CLEARBUFF 2
@@ -18,12 +19,37 @@
#define A_INTERLEAVE 13
#define A_POLEF 14
#define A_SETLOOP 15
*/
#define A_SPNOOP 0
#define A_ADPCM 1
#define A_CLEARBUFF 2
#define A_UNK3 3
#define A_ADDMIXER 4
#define A_RESAMPLE 5
#define A_RESAMPLE_ZOH 6
#define A_FILTER 7
#define A_SETBUFF 8
#define A_DUPLICATE 9
#define A_DMEMMOVE 10
#define A_LOADADPCM 11
#define A_MIXER 12
#define A_INTERLEAVE 13
#define A_HILOGAIN 14
#define A_SETLOOP 15
#define A_INTERL 17
#define A_ENVSETUP1 18
#define A_ENVMIXER 19
#define A_LOADBUFF 20
#define A_SAVEBUFF 21
#define A_ENVSETUP2 22
#define A_S8DEC 23
#define A_UNK19 25
#define ACMD_SIZE 32
/*
* Audio flags
*/
#define A_INIT 0x01
#define A_CONTINUE 0x00
#define A_LOOP 0x02
@@ -254,138 +280,252 @@ typedef short ENVMIX_STATE[40];
* Macros to assemble the audio command list
*/
#define aADPCMdec(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (unsigned int)(s); \
}
#define aADPCMdec(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (unsigned int)(s); \
}
#define aPoleFilter(pkt, f, g, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(g, 0, 16)); \
_a->words.w1 = (unsigned int)(s); \
}
#define aPoleFilter(pkt, f, g, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(g, 0, 16)); \
_a->words.w1 = (unsigned int)(s); \
}
#define aHiLoGain(pkt, gain, count, dmem, a4) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_HILOGAIN, 24, 8) | \
_SHIFTL(gain, 16, 8) | _SHIFTL(count, 0, 16)); \
_a->words.w1 = _SHIFTL(dmem, 16, 16) | _SHIFTL(a4, 0, 16); \
}
#define aUnkCmd3(pkt, a1, a2, a3) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_UNK3, 24, 8) | _SHIFTL(a3, 0, 16); \
_a->words.w1 = _SHIFTL(a1, 16, 16) | _SHIFTL(a2, 0, 16); \
}
#define aUnkCmd19(pkt, a1, a2, a3, a4) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_UNK19, 24, 8) | _SHIFTL(a1, 16, 8) | \
_SHIFTL(a2, 0, 16)); \
_a->words.w1 = _SHIFTL(a3, 16, 16) | _SHIFTL(a4, 0, 16); \
}
#define aS8Dec(pkt, a1, a2) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_S8DEC, 24, 8) | _SHIFTL(a1, 16, 8); \
_a->words.w1 = (unsigned int)(a2); \
}
#define aClearBuffer(pkt, d, c) \
{ \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_CLEARBUFF, 24, 8) | _SHIFTL(d, 0, 24); \
_a->words.w1 = (unsigned int)(c); \
}
}
#define aEnvMixer(pkt, f, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(f, 16, 8); \
_a->words.w1 = (unsigned int)(s); \
}
#define aEnvMixer(pkt, dmemi, count, swapLR, x0, x1, x2, x3, m, bits) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (bits | _SHIFTL(dmemi >> 4, 16, 8) | \
_SHIFTL(count, 8, 8) | _SHIFTL(swapLR, 4, 1) | \
_SHIFTL(x0, 3, 1) | _SHIFTL(x1, 2, 1) | \
_SHIFTL(x2, 1, 1) | _SHIFTL(x3, 0, 1)); \
_a->words.w1 = (unsigned int)(m); \
}
#define aInterleave(pkt, l, r) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8); \
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
}
#define aInterleave(pkt, o, l, r, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_INTERLEAVE, 24, 8) | \
_SHIFTL(c >> 4, 16, 8) | _SHIFTL(o, 0, 16)); \
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
}
#define aLoadBuffer(pkt, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8); \
_a->words.w1 = (unsigned int)(s); \
}
#define aInterl(pkt, dmemi, dmemo, count) \
{ \
Acmd *_a = (Acmd*)pkt; \
\
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | \
_SHIFTL(count, 0, 16)); \
_a->words.w1 = _SHIFTL(dmemi, 16, 16) | _SHIFTL(dmemo, 0, 16); \
}
#define aMix(pkt, f, g, i, o) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(g, 0, 16)); \
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
}
#define aLoadBuffer(pkt, s, d, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_LOADBUFF, 24, 8) | \
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(d, 0, 16); \
_a->words.w1 = (unsigned int)(s); \
}
#define aPan(pkt, f, d, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(d, 0, 16)); \
_a->words.w1 = (unsigned int)(s); \
}
#define aMix(pkt, f, g, i, o) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_MIXER, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(g, 0, 16)); \
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
}
#define aResample(pkt, f, p, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(p, 0, 16)); \
_a->words.w1 = (unsigned int)(s); \
}
#define aPan(pkt, f, d, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_PAN, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(d, 0, 16)); \
_a->words.w1 = (unsigned int)(s); \
}
#define aSaveBuffer(pkt, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8); \
_a->words.w1 = (unsigned int)(s); \
}
#define aResample(pkt, f, p, s) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | \
_SHIFTL(f, 16, 8) | _SHIFTL(p, 0, 16)); \
_a->words.w1 = (unsigned int)(s); \
}
#define aSegment(pkt, s, b) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \
_a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \
}
#define aSaveBuffer(pkt, s, d, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SAVEBUFF, 24, 8) | \
_SHIFTL((c) >> 4, 16, 8) | _SHIFTL(s, 0, 16); \
_a->words.w1 = (unsigned int)(d); \
}
#define aSegment(pkt, s, b) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SEGMENT, 24, 8); \
_a->words.w1 = _SHIFTL(s, 24, 8) | _SHIFTL(b, 0, 24); \
}
#define aSetBuffer(pkt, f, i, o, c) \
{ \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_SETBUFF, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(i, 0, 16)); \
_a->words.w1 = _SHIFTL(c, 0, 16) | _SHIFTL(o, 16, 16); \
}
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
#define aSetVolume(pkt, f, v, t, r) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
_SHIFTL(v, 0, 16)); \
/* had to change this otherwise it doesn't want to match */ \
_a->words.w1 = (unsigned int)(r); /*_SHIFTL(r, 0, 16)|_SHIFTL(t, 16, 16) ;*/ \
}
#define aSetVolume(pkt, f, v, t, r) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
_SHIFTL(v, 0, 16)); \
_a->words.w1 = _SHIFTL(r, 0, 16) | _SHIFTL(t, 16, 16); \
}
#define aSetLoop(pkt, a) \
{ \
Acmd *_a = (Acmd *)pkt; \
_a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \
_a->words.w1 = (unsigned int)(a); \
}
#define aSetVolume32(pkt, f, v, tr) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 16) | \
_SHIFTL(v, 0, 16)); \
_a->words.w1 = (unsigned int)(tr); \
}
#define aDMEMMove(pkt, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
#define aSetLoop(pkt, a) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_SETLOOP, 24, 8); \
_a->words.w1 = (unsigned int)(a); \
}
#define aDMEMMove(pkt, i, o, c) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_DMEMMOVE, 24, 8) | _SHIFTL(i, 0, 24); \
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
}
#define aLoadADPCM(pkt, c, d) \
{ \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \
_a->words.w1 = (unsigned int)d; \
}
}
#endif /* !_ABI_H_ */
#define aEnvSetup1(pkt, a, b, c, d) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_ENVSETUP1, 24, 8) | \
_SHIFTL(a, 16, 8) | _SHIFTL(b, 0, 16)); \
_a->words.w1 = _SHIFTL(c, 16, 16) | _SHIFTL(d, 0, 16); \
}
#define aEnvSetup2(pkt, volLeft, volRight) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
_a->words.w1 = _SHIFTL(volLeft, 16, 16) | \
_SHIFTL(volRight, 0, 16); \
}
#define aFilter(pkt, f, countOrBuf, addr) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = _SHIFTL(A_FILTER, 24, 8) | _SHIFTL(f, 16, 8) | \
_SHIFTL(countOrBuf, 0, 16); \
_a->words.w1 = (unsigned int)(addr); \
}
#define aDuplicate(pkt, count, dmemi, dmemo, a4) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_DUPLICATE, 24, 8) | \
_SHIFTL(count, 16, 8) | _SHIFTL(dmemi, 0, 16)); \
_a->words.w1 = _SHIFTL(dmemo, 16, 16) | _SHIFTL(a4, 0, 16); \
}
#define aAddMixer(pkt, count, dmemi, dmemo, a4) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_ADDMIXER, 24, 8) | \
_SHIFTL(count >> 4, 16, 8) | _SHIFTL(a4, 0, 16)); \
_a->words.w1 = _SHIFTL(dmemi, 16, 16) | _SHIFTL(dmemo, 0, 16); \
}
#define aResampleZoh(pkt, pitch, pitchAccu) \
{ \
Acmd *_a = (Acmd *)pkt; \
\
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
_SHIFTL(pitch, 0, 16)); \
_a->words.w1 = _SHIFTL(pitchAccu, 0, 16); \
}
#endif /* ULTRA64_ABI_H */
+1
View File
@@ -134,6 +134,7 @@ typedef struct {
/* 0x101 */ u8 map[PFS_INODE_DIST_MAP];
} __OSInodeCache; // size = 0x202
s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check);
s32 __osGetId(OSPfs* pfs);
s32 osPfsChecker(OSPfs* pfs);
+38
View File
@@ -0,0 +1,38 @@
#ifndef SCHED_H
#define SCHED_H
#include "PR/ultratypes.h"
#include "ultra64/vi.h"
#include "ultra64/sptask.h"
#define OS_SC_NEEDS_RDP 0x0001
#define OS_SC_NEEDS_RSP 0x0002
#define OS_SC_DRAM_DLIST 0x0004
#define OS_SC_PARALLEL_TASK 0x0010
#define OS_SC_LAST_TASK 0x0020
#define OS_SC_SWAPBUFFER 0x0040
#define OS_SC_RCP_MASK 0x0003
#define OS_SC_TYPE_MASK 0x0007
#define OS_SC_DP 0x0001
#define OS_SC_SP 0x0002
#define OS_SC_YIELD 0x0010
#define OS_SC_YIELDED 0x0020
typedef struct OSScTask {
/* 0x00 */ struct OSScTask* next;
/* 0x04 */ u32 state;
/* 0x08 */ u32 flags;
/* 0x0C */ void* framebuffer;
/* 0x10 */ OSTask list;
/* 0x50 */ OSMesgQueue* msgQ;
/* 0x54 */ OSMesg msg;
} OSScTask; // size = 0x58
typedef struct {
/* 0x0 */ s16 type;
/* 0x2 */ u8 misc[30];
} OSScMsg;
#endif
+130
View File
@@ -3,4 +3,134 @@
#define NA_BGM_STOP 0x100000FF
#define NA_BGM_GENERAL_SFX 0x00 // General Sound Effects
#define NA_BGM_NATURE_AMBIENCE 0x01 // Ambient background noises
#define NA_BGM_TERMINA_FIELD 0x02 // Termina Field
#define NA_BGM_CHASE 0x03 // Forest Chase
#define NA_BGM_MAJORAS_THEME 0x04 // Majora's Theme "STALKID"
#define NA_BGM_CLOCK_TOWER 0x05 // The Clock Tower
#define NA_BGM_STONE_TOWER_TEMPLE 0x06 // Stone Tower Temple
#define NA_BGM_INV_STONE_TOWER_TEMPLE 0x07 // Stone Tower Temple Inverted
#define NA_BGM_FAILURE_0 0x08 // Missed Event 1
#define NA_BGM_FAILURE_1 0x09 // Title
#define NA_BGM_HAPPY_MASK_SALESMAN 0x0A // Mask Salesman "OMENYA"
#define NA_BGM_SONG_OF_HEALING 0x0B // Song of Healing "DEMO_CURE"
#define NA_BGM_SWAMP_REGION 0x0C // Southern Swamp and Woodfall "DAMP_AREA"
#define NA_BGM_ALIEN_INVASION 0x0D // Ghost Attack "UFO"
#define NA_BGM_SWAMP_CRUISE 0x0E // Mini Game "JUNGLE_CREWS"
#define NA_BGM_SHARPS_CURSE 0x0F // Sharp's Curse
#define NA_BGM_GREAT_BAY_REGION 0x10 // Great Bay Coast "SEA_AREA"
#define NA_BGM_IKANA_REGION 0x11 // Ikana Valley
#define NA_BGM_DEKU_KING 0x12 // Court of the Deku King
#define NA_BGM_MOUNTAIN_REGION 0x13 // Mountain Village "SNOW_AREA"
#define NA_BGM_PIRATES_FORTRESS 0x14 // Pirates' Fortress "PIRATE_AREA"
#define NA_BGM_CLOCK_TOWN_DAY_1 0x15 // Clock Town Day 1 This song's filename is dummied out in MM3D "DUMMY_21"
#define NA_BGM_CLOCK_TOWN_DAY_2 0x16 // Clock Town Day 2 his song's filename is dummied out in MM3D "DUMMY_22"
#define NA_BGM_CLOCK_TOWN_DAY_3 0x17 // Clock Town Day 3 This song's filename is dummied out in MM3D "DUMMY_23"
#define NA_BGM_FILE_SELECT 0x18 // This song has no track name, as it's a duplicate of the Fairy's Fountain
#define NA_BGM_CLEAR_EVENT 0x19 // Event Clear
#define NA_BGM_ENEMY 0x1A // Battle
#define NA_BGM_BOSS 0x1B // Boss Battle
#define NA_BGM_WOODFALL_TEMPLE 0x1C // Woodfall Temple "JUNGLE_DUNGEON"
#define NA_BGM_MARKET 0x1D // Clock Town Day 1 Duplicate of #15. Interesting filename in MM3D. ✘
#define NA_BGM_OPENING 0x1E // Forest Ambush
#define NA_BGM_INSIDE_A_HOUSE 0x1F // House "LINK_HOUSE"
#define NA_BGM_GAME_OVER 0x20 // Game Over
#define NA_BGM_CLEAR_BOSS 0x21 // Boss Clear
#define NA_BGM_GET_ITEM 0x22 // Item Catch
#define NA_BGM_GATE_OPEN 0x23 // Clock Town Day 2 Duplicate of #16. In MM3D, it shares its filename with the Door of Time song from OoT
#define NA_BGM_GET_HEART 0x24 // Complete a Heart Piece
#define NA_BGM_MINI_GAME_2 0x25 // Playing Minigame
#define NA_BGM_GORON_RACE 0x26 // Goron Race
#define NA_BGM_MUSIC_BOX_HOUSE 0x27 // Music Box House "ORGEL_HOUSE"
#define NA_BGM_FAIRY_FOUNTAIN 0x28 // Fairy's Fountain In MM3D, it shares its filename with the Door of Time song from OoT "GODESS"
#define NA_BGM_ZELDAS_LULLABY 0x29 // Zelda's Lullaby "HIME"
#define NA_BGM_ROSA_SISTERS 0x2A // Rosa Sisters' Dance "SISTER_DANCER"
#define NA_BGM_OPEN_CHEST 0x2B // Open Chest "OPEN_TRE_BOX"
#define NA_BGM_MARINE_RESEARCH_LAB 0x2C // Marine Research Laboratory "DRUGSTORE"
#define NA_BGM_GIANTS_THEME 0x2D // The Four Giants "KYOJIN_ROOM"
#define NA_BGM_SONG_OF_STORMS 0x2E // Guru-Guru's Song "FUSHA"
#define NA_BGM_ROMANI_RANCH 0x2F // Romani Ranch "RONRON"
#define NA_BGM_GORON_VILLAGE 0x30 // Goron Village
#define NA_BGM_MAYORS_OFFICE 0x31 // Mayor Dotour "MEETING"
#define NA_BGM_OCA_EPONA 0x32 // Ocarina Epona's Song
#define NA_BGM_OCA_SUNS 0x33 // Ocarina Sun's Song
#define NA_BGM_OCA_TIME 0x34 // Ocarina Song of Time "TIME_NORMAL"
#define NA_BGM_OCA_STORM 0x35 // Ocarina Song of Storms
#define NA_BGM_ZORA_HALL 0x36 // Zora Hall
#define NA_BGM_GET_NEW_MASK 0x37 // A New Mask
#define NA_BGM_MINI_BOSS 0x38 // Mini Boss "MIDDLE_BOSS"
#define NA_BGM_GET_SMALL_ITEM 0x39 // Small Item Catch "S_ITEM_GET"
#define NA_BGM_ASTRAL_OBSERVATORY 0x3A // Astral Observatory "TENMONDAI"
#define NA_BGM_CAVERN 0x3B // Clock Town Cavern "NORMAL_DUNGEON"
#define NA_BGM_MILK_BAR 0x3C // Milk Bar Latte
#define NA_BGM_ZELDA_APPEAR 0x3D // Meet Zelda (OoT)
#define NA_BGM_SARIAS_SONG 0x3E // Saria's Theme Song from OoT "MAYOIMORI"
#define NA_BGM_GORON_GOAL 0x3F // Goron Race Goal
#define NA_BGM_HORSE 0x40 // Gorman Race
#define NA_BGM_HORSE_GOAL 0x41 // Race Finish
#define NA_BGM_INGO 0x42 // Gorman Bros. "INGO"
#define NA_BGM_KOTAKE_POTION_SHOP 0x43 // Kotake's Potion Shop "KOTAKE_KOUME"
#define NA_BGM_SHOP 0x44 // Store
#define NA_BGM_OWL 0x45 // Gaebora's Theme
#define NA_BGM_MINI_GAME 0x46 // Target Practice
#define NA_BGM_OCA_SOARING 0x47 // Ocarina Song of Soaring "OCA_BIGWING"
#define NA_BGM_OCA_HEALING 0x48 // Ocarina Song of Healing "OCA_CURE"
#define NA_BGM_INVERTED_SONG_OF_TIME 0x49 // Inverted Song of Time "_SPEED"
#define NA_BGM_SONG_OF_DOUBLE_TIME 0x4A // Song of Double Time "TIME_JUMP"
#define NA_BGM_SONATA_OF_AWAKENING 0x4B // Sonata of Awakening "DEMO_AWAKING"
#define NA_BGM_GORON_LULLABY 0x4C // Goron Lullaby "DEMO_LULLABY"
#define NA_BGM_NEW_WAVE_BOSSA_NOVA 0x4D // New Wave Bossa Nova "DEMO_TIDE"
#define NA_BGM_ELEGY_OF_EMPTINESS 0x4E // Elegy of Emptiness "DEMO_SHELL"
#define NA_BGM_OATH_TO_ORDER 0x4F // Oath to Order "DEMO_PLEDGE"
#define NA_BGM_SWORD_TRAINING_HALL 0x50 // Sword Training "EXERCISE_HALL"
#define NA_BGM_GORON_LULLABY_INTRO 0x51 // Ocarina Goron Lullaby Intro "DEMO_LULLABY_HALF"
#define NA_BGM_OCA_FAIRY 0x52 // New Song "OCA_YOUSEI"
#define NA_BGM_BREMEN_MARCH 0x53 // Bremen March "FACEMASK"
#define NA_BGM_BALLAD_OF_THE_WIND_FISH 0x54 // Quartet performed in on the milk bar stage "QUARTET"
#define NA_BGM_SONG_OF_SOARING 0x55 // Song of Soaring "WING_WARP"
#define NA_BGM_MILK_BAR_DUPLICATE 0x56 // Milk Bar Latte Duplicate. "MILK_BAR_DUMMY"
#define NA_BGM_FINAL_HOURS 0x57 // Final Hours "TIME_LIMIT"
#define NA_BGM_MIKAU_RIFF 0x58 // Mikau's Tale "MIKAU_LIFF"
#define NA_BGM_MIKAU_FINALE 0x59 // A single guitar chord. "MIKAU_FIN"
#define NA_BGM_FROG_SONG 0x5A // Don Gero's Song
#define NA_BGM_OCA_SONATA 0x5B // Ocarina Sonata of Awakening "OCA_AWAKING"
#define NA_BGM_OCA_LULLABY 0x5C // Ocarina Goron Lullaby "OCA_LULLABY"
#define NA_BGM_OCA_NEW_WAVE 0x5D // Ocarina New Wave Bossa Nova "OCA_TIDE"
#define NA_BGM_OCA_ELEGY 0x5E // Ocarina Elegy of Emptiness "OCA_SHELL"
#define NA_BGM_OCA_OATH 0x5F // Ocarina Oath to Order "OCA_PLEDGE"
#define NA_BGM_MAJORAS_LAIR 0x60 // "LAST_DUNGEON"
#define NA_BGM_OCA_LULLABY_INTRO 0x61 // "OCA_LULLABY_HALF"
#define NA_BGM_OCA_GUITAR_BASS_SESSION 0x62 // Bass and Guitar Session "OCA_SESSION"
#define NA_BGM_PIANO_SESSION 0x63 // Piano Solo "DEMO_SESSION"
#define NA_BGM_INDIGO_GO_SESSION 0x64 // The Indigo-Go's Rehearsal "ALLPART_SESSION"
#define NA_BGM_SNOWHEAD_TEMPLE 0x65 // Snowhead Temple "SILVER_DUNGEON"
#define NA_BGM_GREAT_BAY_TEMPLE 0x66 // Great Bay Temple "DEEPBLUE_DUNGEON"
#define NA_BGM_NEW_WAVE_SAXOPHONE 0x67 // "DEMO_TIDE_SAX"
#define NA_BGM_NEW_WAVE_VOCAL 0x68 // "DEMO_TIDE_VOCAL"
#define NA_BGM_MAJORAS_WRATH 0x69 // Majora's Wrath "MUJURA_1"
#define NA_BGM_MAJORAS_INCARNATION 0x6A // Majora's Incarnation "MUJURA_2"
#define NA_BGM_MAJORAS_MASK 0x6B // Majora's Mask Battle "MUJURA_3"
#define NA_BGM_BASS_PLAY 0x6C // Bass Practice "BASS_PLAY"
#define NA_BGM_DRUMS_PLAY 0x6D // Drums Practice "DRUMS_PLAY"
#define NA_BGM_PIANO_PLAY 0x6E // Piano Practice "PIANO_PLAY"
#define NA_BGM_IKANA_CASTLE 0x6F // Ikana Castle
#define NA_BGM_GATHERING_GIANTS 0x70 // Calling the Four Giants
#define NA_BGM_KAMARO_DANCE 0x71 // Kamaro's Dance "CAMARO_DANCE"
#define NA_BGM_CREMIA_CARRIAGE 0x72 // Cremia's Carriage "DONKEY_CART"
#define NA_BGM_KEATON_QUIZ 0x73 // Keaton "QUIZ"
#define NA_BGM_END_CREDITS_1 0x74 // The End/Credits I "END_DEMO"
#define NA_BGM_OPENING_LOOP 0x75 // Forest Ambush (?) Duplicate.
#define NA_BGM_TITLE_THEME 0x76 // Title Screen
#define NA_BGM_DUNGEON_APPEAR 0x77 // Surfacing of Woodfall
#define NA_BGM_WOODFALL_CLEAR 0x78 // Woodfall Clear "PURIFICATION_0"
#define NA_BGM_SNOWHEAD_CLEAR 0x79 // Snowhead Clear "PURIFICATION_1"
#define NA_BGM_INTO_THE_MOON 0x7B // To the Moon
#define NA_BGM_GOODBYE_GIANT 0x7C //
#define NA_BGM_TATL_AND_TAEL 0x7D // Tatl and Tael "CHAT"
#define NA_BGM_MOONS_DESTRUCTION 0x7E // Moon's Destruction "MOON_VANISH"
#define NA_BGM_NO_MUSIC 0x7F //
#define NA_BGM_END_CREDITS_2 0x82 // The End/Credits II "STAFFROLL2"
#define NA_BGM_DISABLED 0xFFFF
#endif
+3
View File
@@ -3,6 +3,9 @@
#include "PR/ultratypes.h"
// For checking the alpha bit in an RGBA16 pixel
#define RGBA16_PIXEL_OPAQUE 1
typedef struct {
/* 0x0 */ u8 r;
/* 0x1 */ u8 g;
+289 -342
View File
@@ -15,9 +15,9 @@ s32 DmaMgr_FindDmaIndex(u32 vromAddr);
const char* func_800809F4(u32 param_1);
void DmaMgr_ProcessMsg(DmaRequest* req);
void DmaMgr_ThreadEntry(void* arg);
s32 DmaMgr_SendRequestImpl(DmaRequest* request, void* vramStart, u32 vromStart, size_t size, UNK_TYPE4 unused,
s32 DmaMgr_SendRequestImpl(DmaRequest* request, void* vramStart, uintptr_t vromStart, size_t size, UNK_TYPE4 unused,
OSMesgQueue* callback, void* callbackMesg);
s32 DmaMgr_SendRequest0(void* vramStart, u32 vromStart, size_t size);
s32 DmaMgr_SendRequest0(void* vramStart, uintptr_t vromStart, size_t size);
void DmaMgr_Start(void);
void DmaMgr_Stop(void);
void* Yaz0_FirstDMA(void);
@@ -71,7 +71,7 @@ void Fault_Wait5Seconds(void);
void Fault_WaitForButtonCombo(void);
void Fault_DrawMemDumpPage(const char* title, u32* addr, u32 param_3);
void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1);
void Fault_FindNextStackCall(u32** sp, u32** pc, u32** ra);
void Fault_FindNextStackCall(uintptr_t* spPtr, uintptr_t* pcPtr, uintptr_t* raPtr);
void Fault_DrawStackTrace(OSThread* t, u32 flags);
void osSyncPrintfStackTrace(OSThread* t, u32 flags);
void Fault_ResumeThread(OSThread* t);
@@ -96,12 +96,12 @@ void FaultDrawer_SetFontColor(u16 color);
void FaultDrawer_SetCharPad(s8 padW, s8 padH);
void FaultDrawer_SetCursor(s32 x, s32 y);
void FaultDrawer_FillScreen(void);
FaultDrawer* FaultDrawer_FormatStringFunc(FaultDrawer* arg, const char* str, s32 count);
void* FaultDrawer_FormatStringFunc(void* arg, const char* str, size_t count);
void FaultDrawer_VPrintf(const char* str, char* args);
void FaultDrawer_Printf(const char* fmt, ...);
void FaultDrawer_DrawText(s32 x, s32 y, const char* fmt, ...);
void FaultDrawer_SetDrawerFB(void* fb, u16 w, u16 h);
void FaultDrawer_SetInputCallback(void* func);
void FaultDrawer_SetInputCallback(FaultDrawerCallback callback);
void FaultDrawer_Init(void);
void func_80084940(void);
void func_80084968(void);
@@ -356,8 +356,8 @@ const char* strchr(const char* __s, s32 __c);
size_t strlen(const char* __s);
void* memcpy(void* __dest, const void* __src, size_t __n);
void osCreateMesgQueue(OSMesgQueue* mq, OSMesg* msq, s32 count);
void osInvalICache(void* vaddr, s32 nbytes);
void osInvalDCache(void* vaddr, s32 nbytes);
void osInvalICache(void* vaddr, size_t nbytes);
void osInvalDCache(void* vaddr, size_t nbytes);
void __osTimerServicesInit(void);
void __osTimerInterrupt(void);
void __osSetTimerIntr(OSTime tim);
@@ -533,7 +533,7 @@ void func_800AE5E4(GlobalContext* globalCtx, Color_RGBA8* arg1, s16 arg2, s16 ar
void func_800AE778(GlobalContext* globalCtx, Color_RGBA8* color, s16 param_3, s16 param_4);
void func_800AE8EC(GlobalContext* globalCtx);
void func_800AE930(CollisionContext* colCtx, s32 param_2, Vec3f* param_3, f32 param_4, s16 param_5, CollisionPoly* param_6, s32 param_7);
void func_800AEF44(s32 arg0);
void func_800AEF44(s32 arg0);
void EffectTireMark_InitParticle(EffTireMarkParticle* particle);
void EffectTireMark_Init(EffTireMarkParams* params, EffTireMarkInit* init);
void EffectTireMark_Destroy(EffTireMarkParams* params);
@@ -912,219 +912,179 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1); // ActorOverlayTable_
void* ActorOverlayTable_FaultAddrConv(void* arg0, void* arg1); // ActorOverlayTable_FaultAddrConv
void ActorOverlayTable_Init(void); // ActorOverlayTable_Init
void ActorOverlayTable_Cleanup(void); // ActorOverlayTable_Cleanup
void BgCheck_PolygonLinkedListNodeInit(SSNode* node, s16* polyIndex, u16 next);
void BgCheck_PolygonLinkedListResetHead(u16* head);
void BgCheck_ScenePolygonListsNodeInsert(SSNodeList* list, u16* head, s16* polyIndex);
void BgCheck_PolygonLinkedListNodeInsert(DynaSSNodeList* list, u16* head, s16* polyIndex);
void BgCheck_PolygonLinkedListInit(GlobalContext* globalCtx, DynaSSNodeList* list);
void BgCheck_PolygonLinkedListAlloc(GlobalContext* globalCtx, DynaSSNodeList* list, u32 numNodes);
void BgCheck_PolygonLinkedListReset(DynaSSNodeList* list);
u16 BgCheck_AllocPolygonLinkedListNode(DynaSSNodeList* list);
void BgCheck_CreateVec3fFromVertex(Vec3s* vertex, Vec3f* vector);
void BgCheck_CreateVertexFromVec3f(Vec3s* vertex, Vec3f* vector);
float func_800BFD84(CollisionPoly* polygon, f32 param_2, f32 param_3);
s32 func_800BFDEC(CollisionPoly* param_1, CollisionPoly* param_2, u32* param_3, u32* param_4);
s32 BgCheck_PolygonGetMinY(CollisionPoly* polygons, Vec3s* vertices);
void BgCheck_PolygonGetNormal(CollisionPoly* polygon, f32* normalX, f32* normalY, f32* normalZ);
void func_800C0094(struct CollisionPoly* param_1, f32 xOffset, f32 yOffset, f32 zOffset, MtxF* matrix);
f32 func_800C01B8(CollisionPoly* param_1, Vec3f* param_2);
void BgCheck_CreateColTriParamsFromPolygon(CollisionPoly* polygon, Vec3s* vertices, TriNorm* tri);
void func_800C02C0(CollisionPoly* poly, s32 index, CollisionContext* colCtx, TriNorm* tri);
// void func_800C0340(CollisionPoly* param_1, Vec3s* param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// UNK_TYPE4 func_800C0474(CollisionPoly* param_1, Vec3s* param_2, UNK_TYPE4 param_3, UNK_TYPE4 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800C0668(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800C06A8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800C074C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800C07F0(void);
void BgCheck_PolygonCollidesWithSphere(CollisionPoly* polygon, Vec3s* verticies, Vec3f* pos, f32 readius);
void BgCheck_ScenePolygonListsInsertSorted(CollisionContext* colCtx, u16* head, CollisionPoly* polygons, Vec3s* vertices, s16 index);
void BgCheck_ScenePolygonListsInsert(StaticLookup* subdivision, CollisionContext* colCtx, CollisionPoly* polygons, Vec3s* vertices, s16 index);
// void func_800C0E74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
// void func_800C10FC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_800C1238(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE1 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_800C12A4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_800C1B68(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
// void func_800C1D7C(void);
// void func_800C2008(void);
// void func_800C20F4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_800C2310(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
// void func_800C2460(void);
// void func_800C2514(void);
// void func_800C25E0(void);
void BgCheck_GetPolyMinSubdivisions(CollisionContext* colCtx, Vec3f* min, s32* xSubdivision, s32* ySubdivision, s32* zSubdivision);
void BgCheck_GetPolyMaxSubdivisions(CollisionContext* colCtx, Vec3f* max, s32* xSubdivision, s32* ySubdivision, s32* zSubdivision);
void BgCheck_GetPolyMinMaxSubdivisions(CollisionContext* colCtx, Vec3s* vertices, CollisionPoly* polygons, s32* minX, s32* minY, s32* minZ, s32* maxX, s32* maxY, s32* maxZ, s16 index);
// UNK_TYPE4 func_800C2BE0(Vec3f* param_1, Vec3f* param_2, CollisionPoly* polygons, Vec3s* vertices, s16 index);
u32 BgCheck_SplitScenePolygonsIntoSubdivisions(CollisionContext* colCtx, GlobalContext* globalCtx, StaticLookup* subdivisions);
s32 BgCheck_GetIsDefaultSpecialScene(GlobalContext* globalCtx);
s32 BgCheck_GetSpecialSceneMaxMemory(s32 sceneId, u32* maxMemory);
void BgCheck_CalcSubdivisionSize(f32 min, s32 subdivisions, f32* max, f32* subdivisionSize, f32* inverseSubdivisionSize);
s32 BgCheck_GetSpecialSceneMaxObjects(GlobalContext* globalCtx, u32* maxNodes, u32* maxPolygons, u32* maxVertices);
void BgCheck_Init(CollisionContext* colCtx, GlobalContext* globalCtx, CollisionHeader* mesh);
void func_800C3C00(CollisionContext* colCtx, u32 param_2);
void func_800C3C14(CollisionContext* colCtx, u32 param_2);
CollisionHeader* BgCheck_GetActorMeshHeader(CollisionContext* colCtx, s32 index);
// void func_800C3C94(void);
f32 func_800C3D50(s32 arg0, CollisionContext* colCtx, s32 arg2, CollisionPoly** arg3, s32* arg4, Vec3f* pos, Actor* actor, s32 arg7, f32 arg8, s32 arg9);
// void func_800C3F40(void);
f32 func_800C3FA0(CollisionContext* colCtx, CollisionPoly** arg1, Vec3f* arg2);
f32 func_800C4000(GlobalContext* globalCtx, CollisionContext* colCtx, s32* arg2, Vec3f* arg3);
// void func_800C4058(void);
f32 func_800C40B4(CollisionContext* colCtx, CollisionPoly** arg1, s32* arg2, Vec3f* pos);
f32 func_800C411C(CollisionContext* colCtx, CollisionPoly** arg1, s32* arg2, Actor* actor, Vec3f* pos);
f32 func_800C4188(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
// void func_800C41E4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800C4240(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800C42A8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800C4314(void);
// void func_800C43CC(void);
// void func_800C4488(void);
// void func_800C44F0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800C455C(void);
s32 func_800C45C4(CollisionContext* colCtx, u32 arg1, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4, f32 arg5, s32* arg6, s32* arg7, DynaPolyActor* arg8, f32 arg9, u8 arg10);
// void func_800C4C74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_800C4CD8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
// void func_800C4D3C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_800C4DA4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_800C4E10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
// void func_800C4F38(void);
// void func_800C4F84(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_800C4FD4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_800C5464(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_800C54AC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
// void func_800C5538(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
s32 func_800C55C4(CollisionContext* colCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3, CollisionPoly** arg4, u32 arg5, u32 arg6, u32 arg7, u32 arg8, u32* arg9);
// void func_800C5650(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_800C56E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12);
s32 func_800C576C(CollisionContext* colCtx, Vec3f* arg1, Vec3f* arg2, Vec3f* arg3, CollisionPoly** arg4, u32 arg5, u32 arg6, u32 arg7, u32 arg8, u32* arg9);
// void func_800C57F8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800C583C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_800C58C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
// void func_800C5954(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE2 param_8);
s32 func_800C5A20(CollisionContext* colCtx, Vec3f* arg1, f32 arg2);
s32 func_800C5A64(CollisionContext* colCtx, Vec3f* arg1, f32 arg2, Actor* actor);
void BgCheck_ScenePolygonListsInit(SSNodeList* arg0);
void BgCheck_ScenePolygonListsAlloc(GlobalContext* globalCtx, SSNodeList* lists, s32 numNodes, u32 numPolygons);
s32 func_800C5B80(u16* arg0);
u16 BgCheck_ScenePolygonListsReserveNode(SSNodeList* lists);
void BgCheck_ActorMeshParamsInit(ScaleRotPos* params);
void BgCheck_SetActorMeshParams(ScaleRotPos* params, Vec3f* scale, Vec3s* rotation, Vec3f* position);
s32 BgCheck_AreActorMeshParamsEqual(ScaleRotPos* arg0, ScaleRotPos* arg1);
void BgCheck_ActorMeshPolyListsHeadsInit(DynaLookup* lists);
void BgCheck_ActorMeshPolyListsInit(DynaLookup* lists);
void BgCheck_ActorMeshVerticesIndexInit(s16* index);
void BgCheck_ActorMeshWaterboxesIndexInit(s16* index);
void BgCheck_ActorMeshInit(GlobalContext* globalCtx, BgActor* mesh);
void BgCheck_ActorMeshInitFromActor(BgActor* actorMesh, DynaPolyActor* actor, CollisionHeader* header);
s32 BgCheck_HasActorMeshChanged(BgActor* mesh);
void BgCheck_PolygonsInit(CollisionPoly** polygons);
void BgCheck_PolygonsAlloc(GlobalContext* globalCtx, CollisionPoly* polygons, u32 numPolygons);
void BgCheck_VerticesInit(Vec3s** vertices);
void BgCheck_VerticesListAlloc(GlobalContext* globalCtx, Vec3s** vertices, u32 numVertices);
void BgCheck_WaterboxListInit(DynaSSWaterboxList* waterboxList);
void BgCheck_WaterboxListAlloc(GlobalContext* globalCtx, DynaSSWaterboxList* waterboxList, u32 numWaterboxes);
void BgCheck_ActorMeshUpdateParams(GlobalContext* globalCtx, BgActor* mesh);
s32 BgCheck_IsActorMeshIndexValid(s32 index);
void BgCheck_DynaInit(GlobalContext* globalCtx, DynaCollisionContext* param_2);
void BgCheck_DynaAlloc(GlobalContext* globalCtx, DynaCollisionContext* dyna);
s32 BgCheck_AddActorMesh(GlobalContext* globalCtx, DynaCollisionContext* dyna, DynaPolyActor* actor, CollisionHeader* header);
DynaPolyActor* BgCheck_GetActorOfMesh(CollisionContext* colCtx, s32 index);
void func_800C62BC(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index);
void func_800C6314(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index);
void func_800C636C(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index);
void func_800C63C4(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index);
void func_800C641C(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index);
void func_800C6474(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index);
void BgCheck_RemoveActorMesh(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index);
// void func_800C6554(void);
void SSNode_SetValue(SSNode* node, s16* polyIndex, u16 next);
void SSList_SetNull(SSList* head);
void SSNodeList_SetSSListHead(SSNodeList* list, SSList* ssList, s16* polyIndex);
void DynaSSNodeList_SetSSListHead(DynaSSNodeList* list, SSList* ssList, s16* polyIndex);
void DynaSSNodeList_Init(GlobalContext* globalCtx, DynaSSNodeList* list);
void DynaSSNodeList_Alloc(GlobalContext* globalCtx, DynaSSNodeList* list, u32 numNodes);
void DynaSSNodeList_ResetCount(DynaSSNodeList* list);
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* list);
void BgCheck_Vec3sToVec3f(Vec3s* vertex, Vec3f* vector);
void BgCheck_Vec3fToVec3s(Vec3s* vertex, Vec3f* vector);
f32 func_800BFD84(CollisionPoly *poly, f32 arg1, f32 arg2);
s32 func_800BFDEC(CollisionPoly* polyA, CollisionPoly* polyB, u32* outVtxId0, u32* outVtxId1);
s16 CollisionPoly_GetMinY(CollisionPoly* poly, Vec3s* vertices);
void CollisionPoly_GetNormalF(CollisionPoly* poly, f32* nx, f32* ny, f32* nz);
void func_800C0094(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest);
f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point);
void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest);
s32 CollisionPoly_SphVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* center, f32 radius);
void StaticLookup_AddPolyToSSList(CollisionContext* colCtx, SSList* ssList, CollisionPoly* polyList, Vec3s* vtxList, s16 polyId);
void StaticLookup_AddPoly(StaticLookup* lookup, CollisionContext* colCtx, CollisionPoly* polyList, Vec3s* vtxList, s16 index);
void BgCheck_GetSubdivisionMinBounds(CollisionContext* colCtx, Vec3f* pos, s32* sx, s32* sy, s32* sz);
void BgCheck_GetSubdivisionMaxBounds(CollisionContext* colCtx, Vec3f* pos, s32* sx, s32* sy, s32* sz);
void BgCheck_GetPolySubdivisionBounds(CollisionContext* colCtx, Vec3s* vtxList, CollisionPoly* polyList, s32* subdivMinX, s32* subdivMinY, s32* subdivMinZ, s32* subdivMaxX, s32* subdivMaxY, s32* subdivMaxZ, s16 polyId);
s32 BgCheck_PolyIntersectsSubdivision(Vec3f* min, Vec3f* max, CollisionPoly* polyList, Vec3s* vtxList, s16 polyId);
u32 BgCheck_InitStaticLookup(CollisionContext* colCtx, GlobalContext* globalCtx, StaticLookup* lookupTbl);
s32 BgCheck_IsSmallMemScene(GlobalContext* globalCtx);
s32 BgCheck_TryGetCustomMemsize(s32 sceneId, u32* memSize);
void BgCheck_SetSubdivisionDimension(f32 min, s32 subdivAmount, f32* max, f32* subdivLength, f32* subdivLengthInv);
s32 BgCheck_GetSpecialSceneMaxObjects(GlobalContext* globalCtx, s32* maxNodes, s32* maxPolygons, s32* maxVertices);
void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, CollisionHeader* colHeader);
void BgCheck_SetContextFlags(CollisionContext* colCtx, u32 flags);
void BgCheck_UnsetContextFlags(CollisionContext* colCtx, u32 flags);
CollisionHeader* BgCheck_GetCollisionHeader(CollisionContext* colCtx, s32 bgId);
f32 BgCheck_RaycastFloorImpl(GlobalContext* globalCtx, CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId, Vec3f* pos, Actor* actor, u32 arg7, f32 chkDist, s32 arg9);
f32 BgCheck_CameraRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor2(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor2_1(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor3(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor5(CollisionContext* colCtx, CollisionPoly** outPoly, s32* outBgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor5_2(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor5_3(GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos, f32 chkDist);
f32 BgCheck_EntityRaycastFloor7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor1(CollisionContext* colCtx, CollisionPoly* outPoly, Vec3f* pos);
f32 BgCheck_AnyRaycastFloor2(CollisionContext* colCtx, CollisionPoly* outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_CameraRaycastFloor2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor8(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Actor* actor, Vec3f* pos);
f32 BgCheck_EntityRaycastFloor9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight, u8 argA);
s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, f32 checkHeight);
s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, f32 checkHeight);
s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius, CollisionPoly** outPoly, s32* outBgId, Actor* actor, f32 checkHeight);
s32 BgCheck_CheckCeilingImpl(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 checkHeight, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight, CollisionPoly** outPoly, s32* outBgId, Actor* actor);
s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, Actor* actor);
s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId, Actor* actor, f32 chkDist);
s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkOneFace);
s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace);
s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
s32 BgCheck_SphVsFirstPolyImpl(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId, Vec3f* center, f32 radius, Actor* actor, u16 bciFlags);
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
s32 BgCheck_SphVsFirstWall(CollisionContext* colCtx, Vec3f* center, f32 radius);
void SSNodeList_Init(SSNodeList* this);
void SSNodeList_Alloc(GlobalContext* globalCtx, SSNodeList* this, s32 tblMax, s32 numPolys);
SSNode* SSNodeList_GetNextNode(SSNodeList* this);
u16 SSNodeList_GetNextNodeIdx(SSNodeList* this);
void ScaleRotPos_Init(ScaleRotPos* srp);
void ScaleRotPos_SetValue(ScaleRotPos* srp, Vec3f* scale, Vec3s* rot, Vec3f* pos);
s32 ScaleRotPos_IsEqual(ScaleRotPos* a, ScaleRotPos* b);
void DynaLookup_ResetLists(DynaLookup* dynaLookup);
void DynaLookup_Reset(DynaLookup* dynaLookup);
void DynaLookup_ResetVtxStartIndex(u16* vtxStartIndex);
void DynaLookup_ResetWaterBoxStartIndex(u16* waterBoxStartIndex);
void BgActor_Init(GlobalContext* globalCtx, BgActor* bgActor);
void BgActor_SetActor(BgActor* bgActor, Actor* actor, CollisionHeader* colHeader);
s32 BgActor_IsTransformUnchanged(BgActor* bgActor);
void DynaPoly_NullPolyList(CollisionPoly** polyList);
void DynaPoly_AllocPolyList(GlobalContext* globalCtx, CollisionPoly** polyList, s32 numPolys);
void DynaPoly_NullVtxList(Vec3s** vtxList);
void DynaPoly_AllocVtxList(GlobalContext* globalCtx, Vec3s** vtxList, s32 numVtx);
void DynaPoly_InitWaterBoxList(DynaWaterBoxList* waterBoxList);
void DynaPoly_AllocWaterBoxList(GlobalContext* globalCtx, DynaWaterBoxList* waterBoxList, s32 numWaterBoxes);
void DynaPoly_SetBgActorPrevTransform(GlobalContext* globalCtx, BgActor* bgActor);
s32 DynaPoly_IsBgIdBgActor(s32 bgId);
void DynaPoly_Init(GlobalContext* globalCtx, DynaCollisionContext* dyna);
void DynaPoly_Alloc(GlobalContext* globalCtx, DynaCollisionContext* dyna);
s32 DynaPoly_SetBgActor(GlobalContext* globalCtx, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader);
DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId);
void func_800C62BC(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_800C6314(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_800C636C(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_800C63C4(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_800C641C(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void func_800C6474(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void DynaPoly_DeleteBgActor(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
void BgCheck_CalcWaterboxDimensions(Vec3f* minPos, Vec3f* maxXPos, Vec3f* maxZPos, Vec3s* minPosOut, s16* xLength, s16* zLength);
void BgCheck_AddActorMeshToLists(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 index, s32* currVertices, s32* currPolygons, s32* currWaterboxes);
void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex, s32* polyStartIndex, s32* waterBoxStartIndex);
void BgCheck_ResetFlagsIfLoadedActor(GlobalContext* globalCtx, DynaCollisionContext* dyna, Actor* actor);
void BgCheck_Update(GlobalContext* globalCtx, DynaCollisionContext* dyna);
void func_800C756C(s32 param_1, s32* param_2, s32* param_3, s32* param_4);
void BgCheck_UpdateAllActorMeshes(GlobalContext* globalCtx, DynaCollisionContext* dyna);
// void func_800C76EC(void);
// void func_800C7974(void);
// void func_800C7E40(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12);
// void func_800C8580(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_800C87D0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_800C8A60(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
// void func_800C8BD0(void);
// void func_800C8DC0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_800C8EEC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_800C90AC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_800C921C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE2 param_7, UNK_TYPE4 param_8);
// void func_800C9380(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE2 param_8);
void BgCheck_RelocateMeshHeaderPointers(CollisionHeader* header);
void BgCheck_RelocateMeshHeader(CollisionHeader* meshSegPtr, CollisionHeader** param_2);
void BgCheck_RelocateAllMeshHeaders(CollisionContext* colCtx, GlobalContext* globalCtx);
// void func_800C9640(void);
u32 BgCheck_GetPolygonAttributes(CollisionContext* colCtx, CollisionPoly* polygon, s32 index, s32 attributeIndex);
u32 func_800C9704(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
// void func_800C9728(void);
// UNK_TYPE4 func_800C9770(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
// void func_800C97F8(void);
// UNK_TYPE4 func_800C9844(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
// void func_800C98CC(void);
// UNK_TYPE4 func_800C9924(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C99AC(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C99D4(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C99FC(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9A24(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9A4C(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9A7C(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9AB0(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9AE4(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9B18(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9B40(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9B68(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9B90(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9BB8(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9BDC(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
// u32 func_800C9C24(CollisionContext* colCtx, CollisionPoly* polygon, s32 index, UNK_TYPE4 param_4);
u32 func_800C9C74(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9C9C(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9CC4(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9CEC(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
// void func_800C9D14(void);
// void func_800C9D50(void);
u32 func_800C9D8C(CollisionContext* param_1, CollisionPoly* param_2, s32 param_3);
// void func_800C9DDC(void);
u32 func_800C9E18(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9E40(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
u32 func_800C9E88(CollisionContext* colCtx, CollisionPoly* polygon, s32 index);
s32 func_800C9EBC(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox, s32* bgId);
s32 func_800CA1AC(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
s32 func_800CA1E8(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
// void func_800CA22C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800CA568(void);
// void func_800CA634(void);
// void func_800CA648(void);
// void func_800CA6B8(void);
// void func_800CA6D8(void);
// void func_800CA6F0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_800CA9D0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_800CAA14(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
void DynaPoly_Setup(GlobalContext* globalCtx, DynaCollisionContext* dyna);
void func_800C756C(DynaCollisionContext* dyna, s32* numPolygons, s32* numVertices, s32* numWaterBoxes);
void DynaPoly_UpdateBgActorTransforms(GlobalContext* globalCtx, DynaCollisionContext* dyna);
void CollisionHeader_SegmentedToVirtual(CollisionHeader* header);
void CollisionHeader_GetVirtual(CollisionHeader* meshSegPtr, CollisionHeader** param_2);
void BgCheck_InitCollisionHeaders(CollisionContext* colCtx, GlobalContext* globalCtx);
u32 SurfaceType_GetData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId, s32 dataIdx);
u32 SurfaceType_GetCamDataIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u16 SurfaceType_GetCameraSType(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u16 SurfaceType_GetNumCameras(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
Vec3s* SurfaceType_GetCamPosData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetSceneExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_800C99D4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_800C99FC(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_800C9A24(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_800C9A4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_800C9A7C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_800C9AB0(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_800C9AE4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_800C9B18(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_800C9B40(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_800C9B68(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 func_800C9BB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u16 SurfaceType_GetSfx(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_800C9C24(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId, s32 arg3);
u32 SurfaceType_GetSlope(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetLightSettingIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 SurfaceType_IsIgnoredByEntities(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 SurfaceType_IsConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 func_800C9DDC(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
u32 SurfaceType_IsWallDamage(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox, s32* bgId);
s32 WaterBox_GetSurface1(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
s32 WaterBox_GetSurface1_2(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist, WaterBox** outWaterBox, s32* bgId);
f32 func_800CA568(CollisionContext* colCtx, s32 waterBoxId, s32 bgId);
u16 WaterBox_GetCameraSType(CollisionContext* colCtx, WaterBox* waterBox, s32 bgId);
void func_800CA6B8(CollisionContext* colCtx, WaterBox* waterBox);
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox);
s32 func_800CA6F0(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox, s32* bgId);
s32 func_800CA9D0(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface, WaterBox** outWaterBox);
s32 func_800CAA14(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint);
void BgCheck2_UpdateActorPosition(CollisionContext* colCtx, s32 index, Actor* actor);
void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 index, Actor* actor);
void BgCheck2_AttachToMesh(CollisionContext* colCtx, Actor* actor, s32 index);
u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 index, Actor* actor);
void BcCheck3_BgActorInit(DynaPolyActor* actor, UNK_TYPE4 param_2);
void BgCheck3_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* actor, CollisionHeader* meshHeader);
void BgCheck3_ResetFlags(DynaPolyActor* actor);
void func_800CAE88(DynaPolyActor* actor);
void func_800CAE9C(DynaPolyActor* actor);
void func_800CAEB0(CollisionContext* colCtx, s32 index);
void func_800CAEE0(DynaPolyActor* actor);
void func_800CAEF4(CollisionContext* colCtx, s32 index);
void func_800CAF24(DynaPolyActor* actor);
void func_800CAF38(DynaPolyActor* actor);
s32 func_800CAF4C(DynaPolyActor* actor);
s32 func_800CAF70(DynaPolyActor* actor);
s32 func_800CAF94(DynaPolyActor* actor);
s32 func_800CAFB8(DynaPolyActor* actor);
s32 func_800CAFDC(DynaPolyActor* actor);
// void func_800CB000(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5);
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags);
void DynaPolyActor_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* dynaActor, CollisionHeader* meshHeader);
void DynaPolyActor_ResetState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingFallingState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingMovingState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingMovingStateByIndex(CollisionContext* colCtx, s32 index);
void DynaPolyActor_SetRidingRotatingState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetRidingRotatingStateByIndex(CollisionContext* colCtx, s32 index);
void DynaPolyActor_SetSwitchPressedState(DynaPolyActor* dynaActor);
void DynaPolyActor_SetHeavySwitchPressedState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInRidingFallingState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInRidingMovingState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInRidingRotatingState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInSwitchPressedState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_IsInHeavySwitchPressedState(DynaPolyActor* dynaActor);
s32 DynaPolyActor_ValidateMove(GlobalContext* globalCtx, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
f32 Camera_fabsf(f32 f);
f32 Camera_LengthVec3f(Vec3f* v);
// void func_800CB270(void);
@@ -1308,7 +1268,7 @@ s16 Camera_ClearFlags(Camera* camera, s16 flags);
// UNK_TYPE4 func_800E0228(void);
// void func_800E0238(void);
void func_800E02AC(Camera* camera, Actor* actor);
// void func_800E0308(void);
void func_800E0308(Camera* camera, Actor* actor);
// void func_800E031C(void);
void func_800E0348(Camera* camera);
DamageTable* DamageTable_Get(s32 index);
@@ -1623,7 +1583,7 @@ void func_800F03C0(GlobalContext* globalCtx);
void func_800F048C(GlobalContext* globalCtx, Vec3f* param_2, u8 param_3, u16 param_4, u8 param_5);
void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* position, s32 param_3, u16 sfxId);
void func_800F0590(GlobalContext* globalCtx, Vec3f* arg1, s32 arg2, s32 arg3);
// void func_800F05C0(void);
u16 ElfMessage_GetFirstCycleHint(GlobalContext* globalCtx);
// void func_800F07C0(void);
// void func_800F0888(void);
// void func_800F0944(void);
@@ -1696,11 +1656,7 @@ void FireObj_Update(GlobalContext* globalCtx, FireObj* fire, Actor* actor);
void func_800F40A0(GlobalContext* globalCtx, s32 param_2);
// void func_800F415C(void);
UNK_TYPE func_800F41E4(GlobalContext* globalCtx, ActorContext* actorCtx);
// void func_800F42A0(void);
// void func_800F43BC(void);
// void func_800F44F4(void);
// void func_800F4540(void);
// s32 func_800F470C(UNK_TYPE4 param_1, UNK_TYPE4 param_2, s32 param_3, u32 param_4);
void func_800F4A10(GlobalContext* globalCtx);
void func_800F4C0C(GlobalContext* globalCtx);
void func_800F4E20(GlobalContext* globalCtx);
@@ -1761,7 +1717,7 @@ void func_800FD654(GlobalContext* globalCtx, Color_RGB8* pzParm2, f32 fParm3);
// u32 get_days_elapsed(void);
// void reset_days_elapsed(void);
// u32 get_current_day(void);
void func_800FD750(UNK_TYPE arg0);
void func_800FD750(u16 seqId);
// void func_800FD768(void);
void func_800FD78C(GlobalContext* globalCtx);
void func_800FD858(GlobalContext* globalCtx);
@@ -1778,7 +1734,7 @@ u32 func_800FE4B8(GlobalContext* globalCtx);
// void func_800FE590(void);
// void func_800FE5D0(void);
// UNK_TYPE4 func_800FE610(void);
s32 func_800FE620(GlobalContext* globalCtx);
u32 func_800FE620(GlobalContext* globalCtx);
void func_800FE658(f32 arg0);
// UNK_TYPE4 func_800FE6F8(UNK_TYPE4 param_1, s16 param_2, s16 param_3);
// void func_800FE778(void);
@@ -2067,7 +2023,7 @@ s32 func_8010BF58(Actor* actor, GlobalContext* globalCtx, s32* param_3, UNK_PTR
void Nmi_Init(void);
void Nmi_SetPrenmiStart(void);
// s32 Nmi_GetPrenmiHasStarted(void);
// void func_8010C1B0(void);
void MsgEvent_SendNullTask(void);
f32 OLib_Vec3fDist(Vec3f* a, Vec3f* b);
f32 OLib_Vec3fDistOutDiff(Vec3f* a, Vec3f* b, Vec3f* dest);
f32 OLib_Vec3fDistXZ(Vec3f* a, Vec3f* b);
@@ -2536,10 +2492,10 @@ void SkelAnime_DrawFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** s
void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor);
void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw, Actor* actor,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor,
Mtx** mtx);
void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw, Actor* actor);
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw, Actor* actor);
void SkelAnime_GetFrameData(AnimationHeader* animationSeg, s32 currentFrame, s32 limbCount, Vec3s* dst);
s16 Animation_GetLength(void* animation);
s16 Animation_GetLastFrame(void* animation);
@@ -2675,60 +2631,60 @@ void func_8013A46C(s32 flag);
u32 func_8013A4C4(s32 flag);
s16 func_8013A504(s16 val);
s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleError);
// void func_8013A7C0(void);
// void func_8013A860(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
Gfx* func_8013AB00(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, void* func1, void* func2, void* func3, Actor* actor, Gfx* gfx);
Actor* func_8013A7C0(GlobalContext* globalCtx, s32 arg1);
Gfx* func_8013A860(GlobalContext* globalCtx, s32 idx, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Mtx** mtx, Gfx* gfx);
Gfx* func_8013AB00(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Gfx* gfx);
s32 func_8013AD6C(GlobalContext* globalCtx);
// void func_8013AD9C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
void func_8013AED4(u16* param_1, u16 param_2, u16 param_3);
void func_8013AF00(UNK_PTR arg0, UNK_TYPE arg1, UNK_TYPE arg2);
// void func_8013B010(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8013B0C8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8013B350(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
s32 func_8013B6B0(Path* path, UNK_PTR arg1, s32* arg2, s32 arg3, s32 arg4, s32* arg5, UNK_PTR arg6, Vec3f* arg7, s16 arg8);
s32 func_8013AD9C(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 arg5);
void func_8013AED4(u16* arg0, u16 arg1, u16 arg2);
void func_8013AF00(f32* arg0, s32 arg1, s32 arg2);
s32 func_8013B010(f32* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, f32* arg6);
void func_8013B0C8(s32 arg0, f32 arg1, s32 arg2, f32* arg3, f32* arg4);
void func_8013B350(Vec3f* arg0, f32* arg1, f32 arg2, s32 arg3, s32 arg4, Vec3s* arg5, f32* arg6);
s32 func_8013B6B0(Path* path, f32* arg1, s32* arg2, s32 arg3, s32 arg4, s32* arg5, f32* arg6, Vec3f* arg7, s32 arg8);
void func_8013B878(GlobalContext* globalCtx, Path* path, s32 arg2, Vec3f* arg3);
Path* func_8013BB34(GlobalContext* globalCtx, u8 arg1, s32 arg2);
Actor* func_8013BB7C(Actor* actor, GlobalContext* globalCtx, s32 actorCategory, s32 actorId);
Actor* func_8013BB7C(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId);
s32 func_8013BC6C(SkelAnime* skelAnime, ActorAnimationEntryS* arg1, s32 arg2);
// void func_8013BD40(void);
s32 func_8013BEDC(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32* arg3);
// void func_8013C068(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8013C624(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8013C8B8(void);
void func_8013C964(Actor* actor, GlobalContext* globalCtx, f32 param_3, f32 param_4, s32 param_5, s16 param_6);
// void func_8013CC2C(void);
// void func_8013CD64(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8013CF04(void);
// void func_8013D0E0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
void func_8013D2E0(Vec3f* arg0, PosRot* arg1, ActorShape* arg2, s16* arg3, s16* arg4, s16* arg5, s16* arg6);
UNK_TYPE func_8013D5E8(s16 arg0, UNK_TYPE arg1, s16 arg2);
Path* func_8013D648(GlobalContext* globalCtx, s16 arg1, s32 arg2);
UNK_TYPE func_8013D68C(Path* path, s16 arg1, UNK_PTR arg2);
// void func_8013D720(void);
UNK_TYPE func_8013D768(Actor* actor, UNK_PTR arg1, s16 arg2);
// void func_8013D83C(void);
s32 func_8013D8DC(s8 arg0, GlobalContext* globalCtx);
s8 func_8013D924(s32 arg0, GlobalContext* globalCtx);
Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, Actor* actorListStart, s32 actorCategory, s32 actorId);
void func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, UNK_TYPE arg3);
u8 func_8013DB90(GlobalContext* globalCtx, UNK_PTR arg1, f32 arg2);
// void func_8013DC40(void);
void func_8013DCE0(GlobalContext* globalCtx, Vec3f* param_2, Actor* actor, EnDno_ActorUnkStruct* param_4, Path* param_5, s32 param_6, s32 param_7, s32 param_8, s32 param_9, s32 param_10);
void func_8013DE04(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1, EnDno_ActorUnkFunc arg2, EnDno_ActorUnkFunc arg3, EnDno_ActorUnkFunc arg4, EnDno_ActorUnkFunc arg5);
s32 func_8013DF3C(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1);
// void func_8013E054(void);
// void func_8013E07C(void);
s32 func_8013E0A4(GlobalContext* globalCtx, EnDno_ActorUnkStruct* arg1);
s32 func_8013BD40(Actor* actor, Path* path, s32 arg2);
Path* func_8013BEDC(GlobalContext* globalCtx, u8 arg1, u8 arg2, s32* arg3);
s32 func_8013C068(Path* path, s32 arg1, Vec3f* arg2, f32 arg3, s32 arg4);
s32 func_8013C624(Actor* actor, Path* path, s32* arg2, f32* arg3, s32 arg4, s32 arg5);
s32 func_8013C8B8(Path* path, s32 arg1, Vec3f* arg2);
s32 func_8013C964(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
void func_8013CC2C(s32 arg0, s32 arg1, u8* arg2, s32 arg3);
void func_8013CD64(Vec3f* arg0, Vec3f* arg1, u8* arg2, f32 arg3, u8 arg4, u8* arg5, s8* arg6);
void func_8013CF04(Actor* actor, GraphicsContext** gfxCtxPtr, u8* arg2);
s16 func_8013D0E0(s16* arg0, s16 arg1, s16 arg2, f32 arg3, f32 arg4, f32 arg5);
s32 func_8013D2E0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3, Vec3s* arg4, Vec3s* arg5, u16* arg6);
s32 func_8013D5E8(s16 arg0, s16 arg1, s16 arg2);
Path* func_8013D648(GlobalContext* globalCtx, s16 arg1, s16 arg2);
s32 func_8013D68C(Path* path, s32 arg1, Vec3f* arg2);
s16 func_8013D720(Vec3f* arg0, Vec3f* arg1, f32* arg2);
s32 func_8013D768(Actor* actor, Vec3f* arg1, s16 arg2);
s16 func_8013D83C(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq);
s8 func_8013D8DC(s8 arg0, GlobalContext* globalCtx);
s8 func_8013D924(s16 arg0, GlobalContext* globalCtx);
Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId);
s32 func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3);
u8 func_8013DB90(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2);
s32 func_8013DC40(Path* arg0, s32 arg1, s32 arg2, Vec3f* arg3);
void func_8013DCE0(GlobalContext* globalCtx, Vec3f* arg1, Actor* arg2, struct_8013DF3C_arg1* arg3, Path* arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, u8 arg9);
s32 func_8013DE04(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1, struct_8013DF3C_arg1_unk_func1 arg2, struct_8013DF3C_arg1_unk_func2 arg3, struct_8013DF3C_arg1_unk_func2 arg4, struct_8013DF3C_arg1_unk_func2 arg5);
void func_8013DF3C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
s32 func_8013E054(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
s32 func_8013E07C(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
s32 func_8013E0A4(GlobalContext* globalCtx, struct_8013DF3C_arg1* arg1);
void func_8013E1C8(SkelAnime* skelAnime, struct_80B8E1A8 animations[], s32 animationIndex, s32* actorAnimationIndex);
s32 func_8013E2D4(Actor* actor, s16 arg1, s32 arg2, s32 arg3);
s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s32 cutsceneArrayLen);
// void func_8013E4B0(void);
s32 func_8013E5CC(Vec3f* param_1, Vec3s* param_2, Vec3f* param_3, Vec3f* param_4, Vec3f* param_5, Vec3f* param_6);
// void func_8013E640(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8013E748(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8013E7C0(void);
// void func_8013E8F8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE2 param_6, UNK_TYPE2 param_7);
s32 func_8013E950(Vec3f* param_1, Vec3f* param_2, s16 param_3, Vec3f* param_4, Vec3f* param_5, s16* param_6, s16* param_7, s16* param_8, s16* param_9, u16 param_10, u16 param_11, u16 param_12, u16 param_13);
s32 func_8013E2D4(Actor* actor, s16 arg1, s16 arg2, s32 arg3);
s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s16 len);
void func_8013E4B0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Plane* plane);
s32 func_8013E5CC(Vec3f* arg0, Vec3s* arg1, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4, Vec3f* arg5);
Actor* func_8013E640(GlobalContext* globalCtx, Actor* arg1, Actor* actorListStart, u8 actorCategory, s16 actorId, void* arg5, func_8013E640_arg6 arg6);
s32 func_8013E748(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, Vec3s* arg5, func_8013E748_arg6 arg6);
s32 func_8013E7C0(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2);
void func_8013E8F8(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, s16 arg5, s16 arg6);
s32 func_8013E950(Vec3f* arg0, Vec3f* arg1, s16 arg2, Vec3f* arg3, Vec3f* arg4, s16* arg5, s16* arg6, s16* arg7, s16* arg8, u16 arg9, u16 arg10, u16 arg11, u16 arg12);
// void func_8013EC10(void);
void func_8013EC44(f32 arg0, u8 arg1, u8 arg2, u8 arg3);
void func_8013ECE0(f32 xyzDistToPlayerSq, u8 arg1, u8 arg2, u8 arg3);
@@ -2798,11 +2754,11 @@ void func_801420C0(void* arg0);
void func_801420F4(void* arg0);
void func_80142100(void* arg0, Gfx** gfx, u32 arg2);
s32 func_80142440(SkyboxContext* skyboxCtx, Vtx* vtx, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7,
s32 arg8);
void func_80143148(SkyboxContext* skyboxCtx, s32 arg1);
void func_801431E8(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyType);
s32 arg8);
void func_80143148(SkyboxContext* skyboxCtx, s32 arg1);
void func_801431E8(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyType);
void func_80143324(GlobalContext* globalCtx, SkyboxContext* skyboxCtx, s16 skyType);
void func_801434E4(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyType);
void func_801434E4(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyType);
// void func_801435A0(void);
// void func_80143624(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5, UNK_TYPE1 param_6, UNK_TYPE1 param_7);
// void func_80143668(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
@@ -3033,7 +2989,7 @@ void func_80169600(GlobalContext* globalCtx, s16 param_2);
Camera* Play_GetCamera(GlobalContext* globalCtx, s16 index);
s32 Play_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye);
void func_8016981C(GlobalContext* globalCtx, s16 arg1, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4);
// void func_80169940(void);
void func_80169940(GlobalContext* globalCtx, s16 camId, f32 arg2);
// void func_80169988(void);
void func_801699D4(GlobalContext* globalCtx, s16 arg1, s16 arg2);
// void func_80169A50(void);
@@ -3236,7 +3192,7 @@ void Sched_Init(SchedContext* sched, void* stack, OSPri pri, UNK_TYPE arg3, UNK_
void func_801773A0(void* arg0);
void func_801773C4(void* arg0);
void SpeedMeter_DrawTimeEntries(void* displayList, GraphicsContext* gfxCtx);
// void func_80177A84(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
// void func_80177A84(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9);
//void func_80177AC8(void);
void SpeedMeter_DrawAllocEntries(void* displayList, GraphicsContext* gfxCtx, GameState* gameState);
void func_801780F0(Mtx* param_1, f32 param_2, f32 param_3, f32 param_4, f32 param_5, f32 param_6, f32 param_7);
@@ -3257,10 +3213,10 @@ s32 func_80178A94(s32 param_1, s32 param_2);
// void func_80178DAC(void);
// void func_80178E3C(void);
// void func_80178E7C(void);
void Check_WriteRGBA16Pixel(u16* buffer, u32 x, u32 y, u16 value);
void Check_WriteI4Pixel(u16* buffer, u32 x, u32 y, u32 value);
void Check_DrawI4Texture(u16* buffer, u32 x, u32 y, u32 width, u32 height, u8* texture);
void Check_ClearRGBA16(s16* buffer);
// void Check_WriteRGBA16Pixel(u16* buffer, u32 x, u32 y, u32 value);
// void Check_WriteI4Pixel(u16* buffer, u32 x, u32 y, u32 value);
// void Check_DrawI4Texture(u16* buffer, u32 x, u32 y, u32 width, u32 height, u8* texture);
// void Check_ClearRGBA16(u16* buffer);
// void Check_DrawExpansionPakErrorMessage(void);
// void Check_DrawRegionLockErrorMessage(void);
void Check_ExpansionPak(void);
@@ -3273,7 +3229,7 @@ f32 cos_rad(f32 rad);
f32 Rand_ZeroFloat(f32 scale);
f32 randPlusMinusPoint5Scaled(f32 scale);
f32 Math3D_Normalize(Vec3f* vec);
// UNK_TYPE4 func_80179678(f32 fParm1, f32 fParm2, f32 fParm5, f32 param_4, f32 param_5, f32 param_6, f32 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* closestPoint);
// UNK_TYPE4 func_80179798(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3, Vec3f* param_4, Vec3f* param_5, Vec3f* param_6);
// void func_80179A44(void);
void func_80179B34(float fParm1, f32 fParm2, f32 fParm5, f32 fParm6, f32 param_5, f32 param_6, f32 param_7, float* param_8, float* param_9);
@@ -3287,7 +3243,7 @@ void func_80179F64(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
s32 Math3D_XZBoundCheck(f32 xMin, f32 xMax, f32 zMin, f32 zMax, f32 x, f32 z);
// void func_8017A09C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8017A1D0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8017A304(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
s32 func_8017A304(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 chkDist);
// UNK_TYPE4 func_8017A438(Vec3f* pfParm1, Vec3f* pfParm2, Vec3f* pfParm3, Vec3f* pfParm4, f32 param_5);
f32 Math3D_XZLengthSquared(f32 x, f32 z);
f32 Math3D_XZLength(f32 x, f32 z);
@@ -3295,46 +3251,46 @@ f32 Math3D_XZDistanceSquared(f32 x1, f32 x2, f32 z1, f32 z2);
f32 Math3D_XZDistance(f32 x1, f32 x2, f32 z1, f32 z2);
f32 Math3D_LengthSquared(Vec3f* vec);
f32 Math3D_Vec3fMagnitude(Vec3f* vec);
f32 Math3D_DistanceSquared(Vec3f* a, Vec3f* b);
f32 Math3D_Vec3fDistSq(Vec3f* a, Vec3f* b);
f32 Math3D_Distance(Vec3f* a, Vec3f* b);
f32 Math3D_DistanceS(Vec3s* s, Vec3f* f);
f32 func_8017A7B8(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
f32 func_8017A7F8(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
f32 func_8017A838(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
void Math3D_CrossProduct(Vec3f* a, Vec3f* b, Vec3f* res);
void Math3D_NormalVector(Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* res);
u32 func_8017A954(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
u32 func_8017AA0C(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
u32 func_8017ABBC(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
// void func_8017AD38(void);
void Math3D_SurfaceNorm(Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* res);
u32 Math3D_PointRelativeToCubeFaces(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
u32 Math3D_PointRelativeToCubeEdges(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
u32 Math3D_PointRelativeToCubeVertices(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b);
// void func_8017B68C(void);
void func_8017B7F8(Vec3f* arg0, s16 arg1, f32* arg2, f32* arg3, f32* arg4);
void Math3D_UnitNormalVector(Vec3f* a, Vec3f* b, Vec3f* c, f32* normX, f32* normY, f32* normZ, f32* param_7);
f32 Math3D_SignedDistanceFromPlane(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
// void func_8017B9D8(void);
f32 Math3D_NormalizedDistanceFromPlane(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
f32 Math3D_NormalizedSignedDistanceFromPlane(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
// void func_8017BAD0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
f32 Math3D_UDistPlaneToPos(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
f32 Math3D_DistPlaneToPos(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
s32 Math3D_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 ny);
// void func_8017BD98(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017BDE0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8017BE30(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_8017BEE0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
s32 Math3D_TriChkPointParaYIntersectDist(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaYIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
// void func_8017BF8C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8017C008(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12);
s32 Math3D_TriChkLineSegParaYIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 y0, f32 y1);
// void func_8017C17C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017C1F0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
// void func_8017C494(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_8017C540(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
s32 Math3D_TriChkPointParaYIntersectInsideTri2(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaXDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 nx);
// void func_8017C808(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017C850(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
s32 Math3D_TriChkPointParaXIntersect(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 y, f32 z, f32* xIntersect);
// void func_8017C904(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8017C980(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12);
s32 Math3D_TriChkLineSegParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y, f32 z, f32* xIntersect, f32 x0, f32 x1);
// void func_8017CB08(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017CB7C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
s32 Math3D_TriChkLineSegParaZDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 nz);
// void func_8017CEA8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017CEF0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
s32 Math3D_TriChkPointParaZIntersect(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 x, f32 y, f32* zIntersect);
// void func_8017CFA4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8017D020(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12);
s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x, f32 y, f32* zIntersect, f32 z0, f32 z1);
// void func_8017D1AC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017D220(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8017D2FC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
@@ -3346,14 +3302,14 @@ u32 Math3D_IsPointInSphere(Sphere16* sphere, Vec3f* point);
// void func_8017D814(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8017D91C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8017DA24(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
s32 Math3D_ColSphereLineSeg(Sphere16* sphere, LineSegment* line);
s32 Math3D_LineVsSph(Sphere16* sphere, LineSegment* line);
void func_8017DD34(Sphere16* sphere, TriNorm* tri, Vec3f* pfParm3);
s32 Math3D_ColSphereTri(Sphere16* sphere, TriNorm* tri, Vec3f* uParm3);
// void func_8017E294(void);
UNK_TYPE func_8017E350(UNK_PTR, Vec3f*, Vec3f*, Vec3f*, Vec3f*);
s32 Math3D_ColCylinderTri(Cylinder16* cylinder, TriNorm* tri, Vec3f* pzParm3);
// void func_8017F1A0(void);
s32 Math3D_ColSphereSphere(Sphere16* sphere1, Sphere16* sphere2);
s32 Math3D_SphVsSph(Sphere16* sphere1, Sphere16* sphere2);
s32 Math3D_ColSphereSphereIntersect(Sphere16* sphere1, Sphere16* sphere2, f32* intersectAmount);
s32 Math3D_ColSphereSphereIntersectAndDistance(Sphere16* sphere1, Sphere16* sphere2, f32* intersectAmount, f32* dist);
s32 Math3D_ColSphereCylinderDistance(Sphere16* sphere, Cylinder16* cylinder, f32* dist);
@@ -3361,9 +3317,9 @@ s32 Math3D_ColSphereCylinderDistanceAndAmount(Sphere16* sphere, Cylinder16* cyli
s32 Math3D_ColCylinderCylinderAmount(Cylinder16* cylinder1, Cylinder16* cylinder2, f32* intersectAmount);
s32 Math3D_ColCylinderCylinderAmountAndDistance(Cylinder16* cylinder1, Cylinder16* cylinder2, f32* intersectAmount, f32* dist);
s32 Math3d_ColTriTri(TriNorm* tri1, TriNorm* tri2, Vec3f* uParm3);
// void func_8017F9C0(void);
// void func_8017FA34(void);
// void func_8017FAA8(void);
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
// void func_8017FB1C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_8017FD44(void);
u16 Math_GetAtan2Tbl(f32 opposite, f32 adjacent);
@@ -3413,10 +3369,12 @@ void func_8018219C(MtxF* pfParm1, Vec3s* psParm2, s32 iParm3);
// void func_801822C4(void);
void Matrix_InsertRotationAroundUnitVector_f(f32 rotation, Vec3f* vector, s32 appendToState);
void Matrix_InsertRotationAroundUnitVector_s(s16 rotation, Vec3f* vector, s32 appendToState);
u64* SysUcode_GetUCodeBoot(void);
u32 SysUcode_GetUCodeBootSize(void);
u64* SysUcode_GetUCode(void);
u64* SysUcode_GetUCodeData(void);
// void func_80182CE0(void);
// void func_80183020(void);
// void func_80183058(void);
@@ -3838,12 +3796,12 @@ void func_8019E014(void);
// void func_8019EB2C(void);
// void func_8019F024(void);
// void func_8019F05C(void);
void func_8019F170(Vec3f* pos, u16 sfxId);
void func_8019F1C0(Vec3f* pos, u16 sfxId);
void play_sound(u16 sfxId);
void func_8019F128(u16 sfxId);
// void func_8019F170(void);
void func_8019F1C0(Vec3f* pos, u16 sfxId);
void func_8019F208(void);
void func_8019F230(void); // Plays "No" sound
void func_8019F208(void); // decide
void func_8019F230(void); // cancel
// void func_8019F258(void);
// void func_8019F300(void);
void func_8019F420(Vec3f* pos, u16 sfxId);
@@ -3865,7 +3823,7 @@ void func_8019FAD8(Vec3f* param_1, u16 param_2, f32 param_3);
// void func_8019FD90(void);
void func_8019FDC8(UNK_PTR arg0, u16 sfxId, UNK_TYPE arg2);
// void func_8019FE1C(void);
// void func_8019FE74(void);
void func_8019FE74(f32* arg0, f32 arg1, s32 arg2);
// void func_8019FEDC(void);
// void func_8019FF38(void);
// void func_8019FF9C(void);
@@ -3874,14 +3832,14 @@ void func_8019FDC8(UNK_PTR arg0, u16 sfxId, UNK_TYPE arg2);
void func_801A0124(Vec3f* pos, u8 arg1);
// void func_801A0184(void);
// void func_801A01C4(void);
void func_801A0204(UNK_TYPE);
void func_801A0204(s8 seqId);
// void func_801A0238(void);
// void func_801A026C(void);
// void func_801A0318(void);
// void func_801A046C(void);
// void func_801A0554(void);
// void func_801A05F0(void);
// void func_801A0654(void);
void func_801A0654(Vec3f* arg0, u16 sfxId, s32 arg2);
// void func_801A0810(void);
// void func_801A0868(void);
// void func_801A09D4(void);
@@ -3895,10 +3853,10 @@ void func_801A0204(UNK_TYPE);
// void func_801A1904(void);
// void func_801A1A10(void);
// void func_801A1A8C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
void func_801A1D44(Vec3f* vec, UNK_TYPE arg1, f32 arg2);
void func_801A1DB8(Vec3f* vec, UNK_TYPE arg1, f32 arg2);
void func_801A1D44(Vec3f* vec, u8 seqId, f32 arg2);
void func_801A1DB8(Vec3f* vec, u8 seqId, f32 arg2);
// void func_801A1E0C(void);
void func_801A1F00(s32 arg0, s32 arg1);
void func_801A1F00(u8 arg0, u16 seqId);
void func_801A1F88(void);
// void func_801A1FB4(void);
// void func_801A2090(void);
@@ -3911,20 +3869,20 @@ void func_801A246C(u8 param_1, u8 param_2);
// void func_801A27E8(void);
// void func_801A281C(void);
void func_801A29D4(UNK_TYPE arg0, f32 arg1, UNK_TYPE arg2);
void func_801A2BB8(s32 arg0);
void func_801A2BB8(s32 seqId);
void func_801A2C20(void);
// void func_801A2C44(void);
// void func_801A2C88(void);
// void func_801A2D54(void);
s32 func_801A2DE0(UNK_TYPE4 arg1);
s32 Audio_IsSequencePlaying(u8 seqId);
void func_801A2E54(s32 param_1);
void func_801A2ED8(void);
// void func_801A2F88(void);
// void func_801A3000(void);
// void func_801A3038(void);
void func_801A3098(u16 arg0);
void func_801A3098(u16 seqId);
// void func_801A312C(void);
void func_801A31EC(UNK_TYPE1 arg1, UNK_TYPE4 arg2, u8 arg3);
void func_801A31EC(u16 seqId, s8 arg1, u8 arg2);
// void func_801A3238(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
// void func_801A32CC(void);
// void func_801A3590(void);
@@ -3959,10 +3917,10 @@ void Audio_PreNMI(void);
// void func_801A44D4(void);
s32 func_801A46F8(void);
// void func_801A4748(void);
// void func_801A479C(void);
void func_801A479C(Vec3f* arg0, u16 sfxId, s32 arg2);
// void func_801A47DC(void);
// void func_801A48E0(void);
// void func_801A4A28(void);
void func_801A4A28(s32 arg0);
// void func_801A4B80(void);
void func_801A4C30(void);
// void func_801A4C54(void);
@@ -3974,8 +3932,8 @@ void func_801A4D00(void);
// void func_801A4EB0(void);
// void func_801A4EB8(void);
// void func_801A4FD8(void);
// void func_801A5080(void);
// void func_801A5100(void);
void func_801A5080(u16 arg0);
u16 func_801A5100(void);
// void func_801A5118(void);
UNK_TYPE func_801A51F0(UNK_TYPE arg0);
// void func_801A5228(void);
@@ -4025,18 +3983,7 @@ s32 func_801A8A50(s32 param1);
// void func_801A982C(void);
// void func_801A99B8(void);
// void func_801A9A74(void);
// void func_801A9B10(void);
// void func_801A9B78(void);
// void func_801A9BFC(void);
// void func_801A9C68(void);
// void func_801A9D10(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
// void func_801A9DCC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE1 param_5);
// void func_801A9EA4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE1 param_6);
// void func_801A9F4C(void);
// void func_801AA020(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_801AA248(void);
// void func_801AA3E4(void);
// void func_801AA520(void);
void GameOver_Init(GlobalContext* globalCtx);
void GameOver_FadeLights(GlobalContext* globalCtx);
void GameOver_Update(GlobalContext* globalCtx);
+27
View File
@@ -0,0 +1,27 @@
#ifndef IRQMGR_H
#define IRQMGR_H
#include "PR/ultratypes.h"
#include "PR/sched.h"
#include "ultra64/message.h"
typedef struct IrqMgrClient {
/* 0x0 */ struct IrqMgrClient* next;
/* 0x4 */ OSMesgQueue* queue;
} IrqMgrClient; // size = 0x8
typedef struct {
/* 0x000 */ OSScMsg verticalRetraceMesg;
/* 0x020 */ OSScMsg prenmiMsg;
/* 0x040 */ OSScMsg nmiMsg;
/* 0x060 */ OSMesgQueue irqQueue;
/* 0x078 */ OSMesg irqBuffer[8];
/* 0x098 */ OSThread thread;
/* 0x248 */ IrqMgrClient* callbacks;
/* 0x24C */ u8 prenmiStage;
/* 0x250 */ OSTime lastPrenmiTime;
/* 0x258 */ OSTimer prenmiTimer;
/* 0x278 */ OSTime lastFrameTime;
} IrqMgr; // size = 0x280
#endif
+7 -1
View File
@@ -5,6 +5,12 @@
#include "convert.h"
#include "z64.h"
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
#define SCREEN_WIDTH_HIGH_RES 576
#define SCREEN_HEIGHT_HIGH_RES 454
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
@@ -124,7 +130,7 @@ extern GraphicsContext* __gfxCtx;
#define SQ(x) ((x) * (x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
#define DECR(x) ((x) == 0 ? 0 : --(x))
#define CLAMP(x, min, max) ((x) < (min) ? (min) : (x) > (max) ? (max) : (x))
#define CLAMP_MAX(x, max) ((x) > (max) ? (max) : (x))
+4 -3
View File
@@ -1,6 +1,7 @@
#ifndef _OS_H_
#define _OS_H_
#include "libc/stdint.h"
#include "libc/stdlib.h"
#include "ultra64/thread.h"
#include "ultra64/message.h"
@@ -53,8 +54,8 @@ typedef struct {
} __OSTranxInfo; // size = 0x60
typedef struct OSPiHandle_s {
/* 0x00 */ struct OSPiHandle_s* next;
typedef struct OSPiHandle {
/* 0x00 */ struct OSPiHandle* next;
/* 0x04 */ u8 type;
/* 0x05 */ u8 latency;
/* 0x06 */ u8 pageSize;
@@ -84,7 +85,7 @@ typedef struct {
typedef struct {
/* 0x00 */ OSIoMesgHdr hdr;
/* 0x08 */ void* dramAddr;
/* 0x0C */ u32 devAddr;
/* 0x0C */ uintptr_t devAddr;
/* 0x10 */ size_t size;
/* 0x14 */ OSPiHandle* piHandle;
} OSIoMesg; // size = 0x88
+47
View File
@@ -0,0 +1,47 @@
#ifndef SCHEDULER_H
#define SCHEDULER_H
#include "PR/ultratypes.h"
#include "PR/sched.h"
#include "ultra64/vi.h"
#include "ultra64/sptask.h"
#include "irqmgr.h"
#define TASK_FRAMEBUFFER(task) ((CfbInfo*)(task)->framebuffer)
typedef struct {
/* 0x00 */ u16* fb1;
/* 0x04 */ u16* swapBuffer;
/* 0x08 */ OSViMode* viMode;
/* 0x0C */ u32 features;
/* 0x10 */ u8 unk_10;
/* 0x11 */ s8 updateRate;
/* 0x12 */ s8 updateRate2;
/* 0x13 */ u8 unk_13;
/* 0x14 */ f32 xScale;
/* 0x18 */ f32 yScale;
} CfbInfo; // size = 0x1C
typedef struct {
/* 0x000 */ OSMesgQueue interruptQ;
/* 0x018 */ OSMesg intBuf[64];
/* 0x118 */ OSMesgQueue cmdQ;
/* 0x130 */ OSMesg cmdMsgBuf[8];
/* 0x150 */ OSThread thread;
/* 0x300 */ OSScTask* audioListHead;
/* 0x304 */ OSScTask* gfxListHead;
/* 0x308 */ OSScTask* audioListTail;
/* 0x30C */ OSScTask* gfxListTail;
/* 0x310 */ OSScTask* curRSPTask;
/* 0x314 */ OSScTask* curRDPTask;
/* 0x318 */ s32 retraceCount;
/* 0x318 */ s32 doAudio;
/* 0x320 */ CfbInfo* curBuf;
/* 0x324 */ CfbInfo* pendingSwapBuf1;
/* 0x328 */ CfbInfo* pendingSwapBuf2;
/* 0x32C */ char unk_32C[0x3];
/* 0x32F */ u8 shouldUpdateVi;
/* 0x330 */ IrqMgrClient irqClient;
} SchedContext; // size = 0x338
#endif
+2
View File
@@ -1161,7 +1161,9 @@ DECLARE_ROM_SEGMENT(scene_texture_07)
DECLARE_ROM_SEGMENT(scene_texture_08)
DECLARE_ROM_SEGMENT(nintendo_rogo_static)
DECLARE_ROM_SEGMENT(title_static)
DECLARE_SEGMENT(memerrmsg)
DECLARE_ROM_SEGMENT(memerrmsg)
DECLARE_SEGMENT(locerrmsg)
DECLARE_ROM_SEGMENT(locerrmsg)
DECLARE_ROM_SEGMENT(parameter_static)
DECLARE_ROM_SEGMENT(week_static)
+1
View File
@@ -11,6 +11,7 @@
#include "ultra64/sptask.h"
#include "ultra64/thread.h"
#include "ultra64/rcp.h"
#include "ultra64/rdp.h"
#include "ultra64/rsp.h"
#include "ultra64/vi.h"
+1
View File
@@ -96,6 +96,7 @@
#define SI_STATUS_INTERRUPT (1 << 12)
#define PIF_RAM_START 0x1FC007C0
#define PIF_RAM_SIZE 0x40
#define MI_INIT_MODE_REG 0x04300000
#define MI_MODE_REG MI_INIT_MODE_REG
+45
View File
@@ -0,0 +1,45 @@
#ifndef ULTRA64_RDP_H
#define ULTRA64_RDP_H
/* DP Command Registers */
#define DPC_START_REG 0x04100000
#define DPC_END_REG 0x04100004
#define DPC_CURRENT_REG 0x04100008
#define DPC_STATUS_REG 0x0410000C
#define DPC_CLOCK_REG 0x04100010
#define DPC_BUFBUSY_REG 0x04100014
#define DPC_PIPEBUSY_REG 0x04100018
#define DPC_TMEM_REG 0x0410001C
/* DP Span Registers */
#define DPS_TBIST_REG 0x04200000
#define DPS_TEST_MODE_REG 0x04200004
#define DPS_BUFTEST_ADDR_REG 0x04200008
#define DPS_BUFTEST_DATA_REG 0x0420000C
/* DP Status Read Flags */
#define DPC_STATUS_XBUS_DMEM_DMA (1 << 0)
#define DPC_STATUS_FREEZE (1 << 1)
#define DPC_STATUS_FLUSH (1 << 2)
#define DPC_STATUS_START_GCLK (1 << 3)
#define DPC_STATUS_TMEM_BUSY (1 << 4)
#define DPC_STATUS_PIPE_BUSY (1 << 5)
#define DPC_STATUS_CMD_BUSY (1 << 6)
#define DPC_STATUS_CBUF_READY (1 << 7)
#define DPC_STATUS_DMA_BUSY (1 << 8)
#define DPC_STATUS_END_VALID (1 << 9)
#define DPC_STATUS_START_VALID (1 << 10)
/* DP Status Write Flags */
#define DPC_CLR_XBUS_DMEM_DMA (1 << 0)
#define DPC_SET_XBUS_DMEM_DMA (1 << 1)
#define DPC_CLR_FREEZE (1 << 2)
#define DPC_SET_FREEZE (1 << 3)
#define DPC_CLR_FLUSH (1 << 4)
#define DPC_SET_FLUSH (1 << 5)
#define DPC_CLR_TMEM_CTR (1 << 6)
#define DPC_CLR_PIPE_CTR (1 << 7)
#define DPC_CLR_CMD_CTR (1 << 8)
#define DPC_CLR_CLOCK_CTR (1 << 9)
#endif
+9 -8
View File
@@ -1,17 +1,18 @@
#ifndef _ULTRA64_VI_H_
#define _ULTRA64_VI_H_
#include "PR/ultratypes.h"
#include "ultra64/message.h"
/* Special Features */
#define OS_VI_GAMMA_ON 0x0001
#define OS_VI_GAMMA_OFF 0x0002
#define OS_VI_GAMMA_DITHER_ON 0x0004
#define OS_VI_GAMMA_DITHER_OFF 0x0008
#define OS_VI_DIVOT_ON 0x0010
#define OS_VI_DIVOT_OFF 0x0020
#define OS_VI_DITHER_FILTER_ON 0x0040
#define OS_VI_DITHER_FILTER_OFF 0x0080
#define OS_VI_GAMMA_ON (1 << 0)
#define OS_VI_GAMMA_OFF (1 << 1)
#define OS_VI_GAMMA_DITHER_ON (1 << 2)
#define OS_VI_GAMMA_DITHER_OFF (1 << 3)
#define OS_VI_DIVOT_ON (1 << 4)
#define OS_VI_DIVOT_OFF (1 << 5)
#define OS_VI_DITHER_FILTER_ON (1 << 6)
#define OS_VI_DITHER_FILTER_OFF (1 << 7)
#define OS_VI_GAMMA 0x08
#define OS_VI_GAMMA_DITHER 0x04
+27 -50
View File
@@ -3,15 +3,16 @@
#include "z64.h"
#include "segment_symbols.h"
#include "macros.h"
// pre-boot variables
extern u32 osTvType;
extern u32 osRomType;
extern u32 osRomBase;
extern uintptr_t osRomBase;
extern u32 osResetType;
extern u32 osCicId;
extern u32 osVersion;
extern u32 osMemSize;
extern size_t osMemSize;
extern s32 osAppNmiBuffer[0x10];
extern u16 gFramebuffer1[SCREEN_HEIGHT][SCREEN_WIDTH]; // at 0x80000500
extern u8 D_80025D00[];
@@ -84,7 +85,7 @@ extern OSViMode osViModeMpalLan1;
// extern __OSViContext D_80098060[2];
extern __OSViContext* __osViCurr;
extern __OSViContext* __osViNext;
// extern UNK_TYPE4 D_800980D0;
// extern UNK_TYPE4 sCartRomNeedsInit;
extern OSViMode osViModeFpalLan1;
// extern u8 ldigs[];
// extern u8 udigs[];
@@ -359,7 +360,7 @@ extern u16 viRetrace;
extern DmaEntry dmadata[1568];
// extern UNK_TYPE1 D_80186028;
// extern UNK_TYPE1 D_801AAAB0;
// extern UNK_TYPE1 D_801AD370;
extern u64 gJpegUCode[];
extern ActorInit En_A_Obj_InitVars;
extern ColliderCylinderInit enAObjCylinderInit;
extern InitChainEntry enAObjInitVar;
@@ -441,14 +442,8 @@ extern Gfx D_801AEFA0[];
// extern UNK_TYPE1 D_801AEFC0;
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX];
extern s32 gMaxActorId;
extern u32 D_801B4620[32];
extern u16 D_801B46A0[16];
extern u8 D_801B46C0[16];
extern s16 bgSpecialSceneParamsDefault[1];
// extern UNK_TYPE1 D_801B46D2;
extern BgSpecialSceneMaxMemory bgSpecialSceneMaxMemory[1];
extern BgSpecialSceneMeshSubdivision bgSpecialSceneMeshSubdivisions[3];
extern BgSpecialSceneMaxObjects bgSpecialSceneMaxObjects[1];
extern BgCheckSceneSubdivisionEntry sSceneSubdivisionList[];
extern BgSpecialSceneMaxObjects sCustomDynapolyMem[];
// extern UNK_TYPE1 D_801B4708;
// extern UNK_TYPE1 D_801B4710;
// extern UNK_TYPE1 D_801B4738;
@@ -917,7 +912,7 @@ extern s32 graphNumGameStates;
// extern UNK_TYPE2 D_801BDA7C;
extern s32 D_801BDA9C;
extern UNK_TYPE4 D_801BDAA0;
// extern UNK_TYPE4 D_801BDAA4;
extern UNK_TYPE4 D_801BDAA4;
// extern UNK_TYPE2 D_801BDAA8;
// extern UNK_TYPE2 D_801BDAAA;
// extern UNK_TYPE2 D_801BDAAC;
@@ -1709,7 +1704,7 @@ extern UNK_PTR D_801D618C;
// extern UNK_TYPE1 D_801D6648;
// extern UNK_TYPE1 D_801D664C;
// extern UNK_TYPE1 D_801D6650;
// extern UNK_TYPE4 D_801D6654;
extern f32 D_801D6654;
// extern UNK_TYPE1 D_801D6658;
// extern UNK_TYPE1 D_801D665C;
// extern UNK_TYPE1 D_801D6660;
@@ -1827,14 +1822,14 @@ extern UNK_PTR D_801D8B24;
// extern UNK_TYPE1 D_801D8E48;
// extern UNK_TYPE1 D_801D8E50;
// extern UNK_TYPE1 D_801D8F70;
// extern UNK_TYPE1 D_801D9090;
// extern UNK_TYPE1 D_801D9C10;
// extern UNK_TYPE1 D_801DA350;
// extern UNK_TYPE1 D_801DA510;
// extern UNK_TYPE1 D_801DAC50;
// extern UNK_TYPE1 D_801DADD0;
// extern UNK_TYPE1 D_801DAE10;
extern UNK_PTR D_801DB450;
// extern SfxParams sEnemyBankParams[];
// extern SfxParams sPlayerBankParams[];
// extern SfxParams sItemBankParams[];
// extern SfxParams sEnvBankParams[];
// extern SfxParams sSystemBankParams[];
// extern SfxParams sOcarinaBankParams[];
// extern SfxParams sVoiceBankParams[];
extern SfxParams* gSfxParams[7];
// extern UNK_TYPE1 D_801DB470;
// extern UNK_TYPE1 D_801DB474;
extern UNK_PTR D_801DB478[7];
@@ -1866,7 +1861,7 @@ extern s8 D_801DB4B8;
// extern UNK_TYPE1 D_801DB8B8;
// extern UNK_TYPE1 D_801DB900;
extern UNK_PTR D_801DB930;
extern s8018CFAC D_801DB958[21];
extern AudioSpec D_801DB958[21];
// rodata
extern f32 D_801DBDF0;
@@ -3106,7 +3101,7 @@ extern UNK_PTR D_801E10B0;
// extern UNK_TYPE1 D_801E1E80;
// extern UNK_TYPE1 D_801E2160;
// extern UNK_TYPE1 D_801E3790;
// extern UNK_TYPE1 D_801E3F40;
extern u64 gJpegUCodeData[];
// extern UNK_TYPE1 D_801E3FA0;
// bss
@@ -3138,28 +3133,15 @@ extern FaultClient D_801ED930;
extern FaultAddrConvClient D_801ED940;
extern char D_801ED950[80];
extern char D_801ED9A0[80];
extern Vec3f D_801ED9F0;
extern Vec3f D_801ED9FC;
extern Vec3f D_801EDA08;
extern Vec3f D_801EDA18;
extern Vec3f D_801EDA24;
extern Vec3f D_801EDA30;
extern Vec3f D_801ED9F0[3];
extern Vec3f D_801EDA18[3];
extern MtxF D_801EDA40;
extern Vec3f D_801EDA80;
extern Vec3f D_801EDA8C;
extern Vec3f D_801EDA98;
extern Vec3f D_801EDA80[3];
extern char D_801EDAA8[80];
extern char D_801EDAF8[80];
extern Vec3f D_801EDB48;
extern Vec3f D_01EDB54;
extern Vec3f D_01EDB60;
extern Vec3f D_01EDB70;
extern Vec3f D_801EDB7C;
extern Vec3f D_801EDB88;
extern f32 D_801EDB98;
extern f32 D_801EDB9C;
extern f32 D_801EDBA0;
// extern UNK_TYPE1 D_801EDBA4;
extern Vec3f D_801EDB48[3];
extern Vec3f D_801EDB70[3];
extern Plane D_801EDB98;
extern Sphere16 D_801EDBA8;
extern TriNorm D_801EDBB0;
// extern UNK_TYPE1 D_801EDBD4;
@@ -3272,7 +3254,7 @@ extern u8 D_801F4E30;
// extern UNK_TYPE1 D_801F4E68;
extern f32 D_801F4E70;
// extern UNK_TYPE1 D_801F4E74;
// extern UNK_TYPE1 D_801F4E78;
extern u16 D_801F4E78;
extern s16 D_801F4E7A;
// extern UNK_TYPE1 D_801F4E80;
// extern UNK_TYPE1 D_801F4EE0;
@@ -3634,7 +3616,7 @@ extern OSMesg D_801FD034;
// extern UNK_TYPE1 D_801FE4C0;
// extern UNK_TYPE1 D_801FE640;
// extern UNK_TYPE1 D_801FE6D0;
extern s801FE7C0 D_801FE7C0[1];
extern SoundRequest D_801FE7C0[1];
// extern UNK_TYPE1 D_801FFBC0;
// extern UNK_TYPE1 D_801FFBC8;
// extern UNK_TYPE1 D_801FFBD0;
@@ -3788,11 +3770,6 @@ extern OSMesg D_80203290[1];
// extern UNK_TYPE4 D_80208E6C;
// extern UNK_TYPE4 D_80208E70;
// extern UNK_TYPE4 D_80208E74;
// extern UNK_TYPE1 D_80208E90;
// extern UNK_TYPE1 D_80208E94;
// extern UNK_TYPE1 D_80208E98;
// extern UNK_TYPE1 D_80208E99;
// extern UNK_TYPE1 D_80208E9C;
// post-code buffers
extern u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE];
+52 -201
View File
@@ -13,15 +13,18 @@
#include "io/controller.h"
#include "osint.h"
#include "os.h"
#include "irqmgr.h"
#include "scheduler.h"
#include "xstdio.h"
#include "bgm.h"
#include "sfx.h"
#include "color.h"
#include "ichain.h"
#include "sfx.h"
#include "z64actor.h"
#include "z64animation.h"
#include "z64audio.h"
#include "z64bgcheck.h"
#include "z64collision_check.h"
#include "z64cutscene.h"
@@ -37,12 +40,6 @@
#include "z64transition.h"
#include "regs.h"
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
#define SCREEN_WIDTH_HIGH_RES 576
#define SCREEN_HEIGHT_HIGH_RES 454
#define Z_THREAD_ID_IDLE 1
#define Z_THREAD_ID_SLOWLY 2
#define Z_THREAD_ID_MAIN 3
@@ -79,13 +76,6 @@ typedef struct {
/* 0xF */ u8 letterboxSize;
} ActorCutscene; // size = 0x10
typedef struct {
/* 0x0 */ s16 polyStartIndex;
/* 0x2 */ s16 ceilingNodeHead;
/* 0x4 */ s16 wallNodeHead;
/* 0x6 */ s16 floorNodeHead;
} ActorMeshPolyLists; // size = 0x8
typedef struct {
/* 0x0 */ s8 segment;
/* 0x2 */ s16 type;
@@ -106,49 +96,6 @@ typedef struct {
/* 0x08 */ void* end;
} PolygonType2; // size = 0xC
typedef struct {
/* 0x0 */ u16 floorHead;
/* 0x2 */ u16 wallHead;
/* 0x4 */ u16 ceilingHead;
} BgMeshSubdivision; // size = 0x6
typedef struct {
/* 0x0 */ u32 attributes[2];
} BgPolygonAttributes; // size = 0x8
typedef struct {
/* 0x0 */ s16 polyIndex;
/* 0x2 */ u16 next;
} BgPolygonLinkedListNode; // size = 0x4
typedef struct {
/* 0x0 */ u16 maxNodes;
/* 0x2 */ u16 reservedNodes;
/* 0x4 */ BgPolygonLinkedListNode* nodes;
/* 0x8 */ u8* unk8;
} BgScenePolygonLists; // size = 0xC
typedef struct {
/* 0x0 */ s16 sceneNumber;
/* 0x2 */ UNK_TYPE1 pad2[0x2];
/* 0x4 */ u32 maxMemory;
} BgSpecialSceneMaxMemory; // size = 0x8
typedef struct {
/* 0x0 */ s16 sceneId;
/* 0x2 */ s16 maxNodes;
/* 0x4 */ s16 maxPolygons;
/* 0x6 */ s16 maxVertices;
} BgSpecialSceneMaxObjects; // size = 0x8
typedef struct {
/* 0x0 */ s16 sceneNumber;
/* 0x2 */ s16 xSubdivisions;
/* 0x4 */ s16 ySubdivisions;
/* 0x6 */ s16 zSubdivisions;
/* 0x8 */ s32 unk8;
} BgSpecialSceneMeshSubdivision; // size = 0xC
typedef struct {
/* 0x0 */ s16 func;
/* 0x2 */ UNK_TYPE1 pad2[0x6];
@@ -249,30 +196,6 @@ typedef struct {
/* 0x14 */ s16 data[REG_GROUPS * REG_PER_GROUP]; // 0xAE0 entries
} GameInfo; // size = 0x15D4
typedef struct IrqMgrClient {
/* 0x0 */ struct IrqMgrClient* next;
/* 0x4 */ OSMesgQueue* queue;
} IrqMgrClient; // size = 0x8
typedef struct {
/* 0x0 */ s16 type;
/* 0x2 */ u8 misc[30];
} OSScMsg;
typedef struct {
/* 0x000 */ OSScMsg verticalRetraceMesg;
/* 0x020 */ OSScMsg prenmiMsg;
/* 0x040 */ OSScMsg nmiMsg;
/* 0x060 */ OSMesgQueue irqQueue;
/* 0x078 */ OSMesg irqBuffer[8];
/* 0x098 */ OSThread thread;
/* 0x248 */ IrqMgrClient* callbacks;
/* 0x24C */ u8 prenmiStage;
/* 0x250 */ OSTime lastPrenmiTime;
/* 0x258 */ OSTimer prenmiTimer;
/* 0x278 */ OSTime lastFrameTime;
} IrqMgr; // size = 0x280
typedef struct {
/* 0x0000 */ u32 size;
/* 0x0004 */ void* bufp;
@@ -316,44 +239,6 @@ typedef struct {
/* 0x20308 */ u16 tailMagic; // 5678
} GfxPool; // size = 0x20310
typedef struct {
/* 0x00 */ u16* fb1;
/* 0x04 */ u16* swapBuffer;
/* 0x08 */ OSViMode* viMode;
/* 0x0C */ u32 features;
/* 0x10 */ u8 unk_10;
/* 0x11 */ s8 updateRate;
/* 0x12 */ s8 updateRate2;
/* 0x13 */ u8 unk_13;
/* 0x14 */ f32 xScale;
/* 0x18 */ f32 yScale;
} CfbInfo; // size = 0x1C
#define OS_SC_NEEDS_RDP 0x0001
#define OS_SC_NEEDS_RSP 0x0002
#define OS_SC_DRAM_DLIST 0x0004
#define OS_SC_PARALLEL_TASK 0x0010
#define OS_SC_LAST_TASK 0x0020
#define OS_SC_SWAPBUFFER 0x0040
#define OS_SC_RCP_MASK 0x0003
#define OS_SC_TYPE_MASK 0x0007
#define OS_SC_DP 0x0001
#define OS_SC_SP 0x0002
#define OS_SC_YIELD 0x0010
#define OS_SC_YIELDED 0x0020
typedef struct OSScTask {
/* 0x00 */ struct OSScTask* next;
/* 0x04 */ u32 state;
/* 0x08 */ u32 flags;
/* 0x0C */ CfbInfo* framebuffer;
/* 0x10 */ OSTask list;
/* 0x50 */ OSMesgQueue* msgQ;
/* 0x54 */ OSMesg msg;
} OSScTask; // size = 0x58
typedef struct GraphicsContext {
/* 0x000 */ Gfx* polyOpaBuffer; // Pointer to "Zelda 0"
/* 0x004 */ Gfx* polyXluBuffer; // Pointer to "Zelda 1"
@@ -392,28 +277,6 @@ typedef struct GraphicsContext {
/* 0x2FC */ GfxMasterList* masterList;
} GraphicsContext; // size = 0x300
typedef struct {
/* 0x000 */ OSMesgQueue interruptQ;
/* 0x018 */ OSMesg intBuf[64];
/* 0x118 */ OSMesgQueue cmdQ;
/* 0x130 */ OSMesg cmdMsgBuf[8];
/* 0x150 */ OSThread thread;
/* 0x300 */ OSScTask* audioListHead;
/* 0x304 */ OSScTask* gfxListHead;
/* 0x308 */ OSScTask* audioListTail;
/* 0x30C */ OSScTask* gfxListTail;
/* 0x310 */ OSScTask* curRSPTask;
/* 0x314 */ OSScTask* curRDPTask;
/* 0x318 */ s32 retraceCount;
/* 0x318 */ s32 doAudio;
/* 0x320 */ CfbInfo* curBuf;
/* 0x324 */ CfbInfo* pendingSwapBuf1;
/* 0x328 */ CfbInfo* pendingSwapBuf2;
/* 0x32C */ char unk_32C[0x3];
/* 0x32F */ u8 shouldUpdateVi;
/* 0x330 */ IrqMgrClient irqClient;
} SchedContext; // size = 0x338
typedef enum IRQ_MSG_TYPE {
IRQ_VERTICAL_RETRACE_MSG = 0x1,
IRQ_PRENMI_2_MSG = 0x3,
@@ -528,29 +391,6 @@ typedef struct {
/* 0x14 */ OSMesgQueue unk14;
} s80185D40; // size = 0x2C
typedef struct {
/* 0x00 */ u32 unk0;
/* 0x04 */ u8 unk4;
/* 0x05 */ u8 unk5;
/* 0x06 */ u8 unk6;
/* 0x07 */ UNK_TYPE1 pad7[0x2];
/* 0x09 */ u8 unk9;
/* 0x0A */ UNK_TYPE1 padA[0x2];
/* 0x0C */ u32 unkC;
/* 0x10 */ u16 unk10;
/* 0x12 */ u16 unk12;
/* 0x14 */ u16 unk14;
/* 0x16 */ UNK_TYPE1 pad16[0x2];
/* 0x18 */ u32 unk18;
/* 0x1C */ u32 unk1C;
/* 0x20 */ u32 unk20;
/* 0x24 */ u32 unk24;
/* 0x28 */ u32 unk28;
/* 0x2C */ u32 unk2C;
/* 0x30 */ u32 unk30;
/* 0x34 */ u32 unk34;
} s8018CFAC; // size = 0x38
typedef struct {
/* 0x0 */ u8 unk0;
/* 0x1 */ u8 unk1;
@@ -562,10 +402,6 @@ typedef struct {
/* 0x7 */ u8 unk7;
} s801AEC84; // size = 0x8
typedef struct {
/* 0x00 */ UNK_TYPE1 pad0[0x14];
} s801FE7C0; // size = 0x14
typedef struct {
/* 0x00 */ Vec3f unk0;
/* 0x0C */ Vec3f unkC;
@@ -573,18 +409,6 @@ typedef struct {
/* 0x1A */ s16 unk1A;
} s80874650; // size = 0x1C
typedef struct {
/* 0x00 */ Vec3f scale;
/* 0x0C */ Vec3s rotation;
/* 0x14 */ Vec3f pos;
} ActorMeshParams; // size = 0x20
typedef struct {
/* 0x0 */ BgPolygonLinkedListNode* nodes;
/* 0x4 */ u32 nextFreeNode;
/* 0x8 */ s32 maxNodes;
} BgPolygonLinkedList; // size = 0xC
typedef struct {
/* 0x00 */ f32 x[4];
/* 0x10 */ f32 y[4];
@@ -592,15 +416,20 @@ typedef struct {
/* 0x30 */ f32 w[4];
} z_Matrix; // size = 0x40
typedef struct {
/* 0x0 */ Vec3s pos;
} BgVertex; // size = 0x6
typedef union {
F3DVertexColor color;
F3DVertexNormal normal;
} F3DVertex; // size = 0x10
// End of RDRAM without the Expansion Pak installed
#define NORMAL_RDRAM_END 0x80400000
// End of RDRAM with the Expansion Pak installed
#define EXPANDED_RDRAM_END 0x80800000
// Address at the end of normal RDRAM after which is room for a screen buffer
#define FAULT_FB_ADDRESS (NORMAL_RDRAM_END - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH]))
typedef void (*FaultDrawerCallback)(void);
typedef struct {
/* 0x00 */ u16* fb;
/* 0x04 */ u16 w;
@@ -613,7 +442,7 @@ typedef struct {
/* 0x12 */ u16 backColor;
/* 0x14 */ u16 cursorX;
/* 0x16 */ u16 cursorY;
/* 0x18 */ u32* font;
/* 0x18 */ const u32* font;
/* 0x1C */ u8 charW;
/* 0x1D */ u8 charH;
/* 0x1E */ s8 charWPad;
@@ -621,7 +450,7 @@ typedef struct {
/* 0x20 */ u16 printColors[10];
/* 0x34 */ u8 escCode;
/* 0x35 */ u8 osSyncPrintfEnabled;
/* 0x38 */ void* inputCallback;
/* 0x38 */ FaultDrawerCallback inputCallback;
} FaultDrawer; // size = 0x3C
typedef struct GfxPrint {
@@ -689,12 +518,6 @@ typedef struct {
typedef void(*fault_update_input_func)(Input* input);
typedef struct {
/* 0x00 */ u8 noteIdx;
/* 0x01 */ u8 state;
/* 0x02 */ u8 pos;
} OcarinaStaff; // size = 0x3;
typedef struct {
/* 0x000 */ View view;
/* 0x168 */ u8* iconItemSegment;
@@ -1029,7 +852,7 @@ typedef struct {
/* 0x11F23 */ UNK_TYPE1 pad11F23[0xFD];
/* 0x12020 */ u8 unk12020;
/* 0x12021 */ u8 choiceIndex;
/* 0x12022 */ UNK_TYPE1 unk12022;
/* 0x12022 */ u8 unk12022;
/* 0x12023 */ u8 unk12023;
/* 0x12024 */ UNK_TYPE1 unk12024[0x6];
/* 0x1202A */ u16 unk1202A;
@@ -1037,7 +860,9 @@ typedef struct {
/* 0x1202E */ u16 unk1202E;
/* 0x12030 */ UNK_TYPE1 pad12030[0x14];
/* 0x12044 */ s16 unk12044;
/* 0x12046 */ UNK_TYPE1 pad12046[0x24];
/* 0x12046 */ UNK_TYPE1 pad12046[0x2];
/* 0x12048 */ u8 unk12048; // EnKakasi
/* 0x12049 */ UNK_TYPE1 pad12049[0x21];
/* 0x1206A */ s16 unk1206A;
/* 0x1206C */ s32 unk1206C;
/* 0x12070 */ UNK_TYPE1 pad12070[0x8];
@@ -1376,12 +1201,6 @@ typedef struct ActorListEntry {
#define OS_SC_NMI_MSG 3 // name is made up, 3 is OS_SC_RDP_DONE_MSG in the original sched.c
#define OS_SC_PRE_NMI_MSG 4
typedef struct {
/* 0x0000 */ OSTask task;
/* 0x0040 */ OSMesgQueue* taskQueue;
/* 0x0044 */ char unk_44[0xC];
} AudioTask; // size = 0x50
typedef struct {
/* 0x000 */ IrqMgr* irqMgr;
/* 0x004 */ SchedContext* sched;
@@ -1456,7 +1275,7 @@ struct TargetContext {
/* 0x50 */ TargetContextEntry unk50[3];
/* 0x8C */ Actor* unk8C;
/* 0x90 */ Actor* unk90;
/* 0x94 */ UNK_TYPE1 pad94[0x4];
/* 0x94 */ Actor* unk_94;
}; // size = 0x98
struct s800B948C {
@@ -1646,6 +1465,38 @@ typedef struct {
/* 0x8 */ s32 unk8;
} struct_80133038_arg2; // size = 0xC
typedef s32 (*func_8013E748_arg6)(struct GlobalContext*, Actor*, Vec3s*);
typedef s32 (*func_8013E640_arg6)(struct GlobalContext*, Actor*, Actor*, void*);
struct struct_8013DF3C_arg1;
typedef void (*struct_8013DF3C_arg1_unk_func1)(struct GlobalContext*, struct struct_8013DF3C_arg1*);
typedef s32 (*struct_8013DF3C_arg1_unk_func2)(struct GlobalContext*, struct struct_8013DF3C_arg1*);
typedef struct struct_8013DF3C_arg1 {
/* 0x00 */ Path* setupPathList;
/* 0x04 */ s32 pathIndex;
/* 0x08 */ Vec3s* points;
/* 0x0C */ s32 count;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ u8 unk_1C;
/* 0x1D */ u8 unk_1D;
/* 0x20 */ Vec3f unk_20;
/* 0x2C */ Vec3f unk_2C;
/* 0x38 */ Vec3f unk_38;
/* 0x44 */ Vec3f* unk_44;
/* 0x48 */ Actor* actor;
/* 0x4C */ f32 unk_4C;
/* 0x50 */ f32 unk_50;
/* 0x54 */ Vec3s unk_54;
/* 0x5C */ struct_8013DF3C_arg1_unk_func1 unk_5C;
/* 0x60 */ struct_8013DF3C_arg1_unk_func2 unk_60;
/* 0x64 */ struct_8013DF3C_arg1_unk_func2 unk_64;
/* 0x68 */ struct_8013DF3C_arg1_unk_func2 unk_68;
} struct_8013DF3C_arg1; // size = 0x6C
typedef struct {
/* 0x00 */ u32 type;
/* 0x04 */ u32 setScissor;
+4 -30
View File
@@ -76,32 +76,6 @@ typedef struct {
/* 0x3A */ s16 unk3A;
} ActorEnTest20C; // size = 0x3C
struct EnDno_ActorUnkStruct;
typedef s32 (*EnDno_ActorUnkFunc)(struct GlobalContext*, struct EnDno_ActorUnkStruct*);
typedef struct EnDno_ActorUnkStruct {
/* 0x00 */ Vec3f unk_00;
/* 0x0C */ UNK_TYPE1 unk_0C[0x4];
/* 0x10 */ s16 unk_10;
/* 0x12 */ UNK_TYPE1 unk_12[0xA];
/* 0x1C */ u8 unk_1C;
/* 0x1D */ u8 unk_1D;
/* 0x20 */ Vec3f unk_20;
/* 0x2C */ Vec3f unk_2C;
/* 0x38 */ Vec3f unk_38;
/* 0x44 */ UNK_TYPE1 unk_44[0x4];
/* 0x48 */ struct Actor* unk_48;
/* 0x4C */ f32 unk_4C;
/* 0x50 */ f32 unk_50;
/* 0x54 */ s16 unk_54;
/* 0x56 */ s16 unk_56;
/* 0x58 */ s32 unk_58;
/* 0x5C */ EnDno_ActorUnkFunc unk_5C;
/* 0x60 */ EnDno_ActorUnkFunc unk_60;
/* 0x64 */ EnDno_ActorUnkFunc unk_64;
/* 0x68 */ EnDno_ActorUnkFunc unk_68;
} EnDno_ActorUnkStruct; // size >= 0x6C
typedef struct {
/* 0x00 */ s16 id;
/* 0x02 */ u8 type;
@@ -228,12 +202,12 @@ typedef enum {
typedef struct {
/* 0x000 */ Actor actor;
/* 0x144 */ s32 bgId;
/* 0x148 */ f32 unk148;
/* 0x148 */ f32 pushForce;
/* 0x14C */ f32 unk14C;
/* 0x150 */ s16 unk150;
/* 0x150 */ s16 yRotation;
/* 0x152 */ u16 unk152;
/* 0x154 */ u32 unk154;
/* 0x158 */ u8 unk_158;
/* 0x154 */ u32 flags;
/* 0x158 */ u8 stateFlags;
/* 0x15A */ s16 pad15A;
} DynaPolyActor; // size = 0x15C
+3 -1
View File
@@ -213,7 +213,9 @@ typedef s32 (*OverrideLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbInd
typedef void (*PostLimbDrawFlex)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList1, Gfx** dList2, Vec3s* rot,
struct Actor* actor);
typedef void (*UnkActorDraw)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* actor);
typedef void (*UnkActorDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* actor);
typedef void (*UnkActorDraw)(struct GlobalContext* globalCtx, s32 limbIndex, struct Actor* actor, Gfx** gfx);
typedef void (*AnimationEntryCallback)(struct GlobalContext*, AnimationEntryData*);
+1186
View File
File diff suppressed because it is too large Load Diff
+174 -73
View File
@@ -1,10 +1,12 @@
#ifndef _Z_BGCHECK_
#define _Z_BGCHECK_
#ifndef Z64_BGCHECK_H
#define Z64_BGCHECK_H
struct GlobalContext;
struct Actor;
struct DynaPolyActor;
#define SS_NULL 0xFFFF
#define COLPOLY_NORMAL_FRAC (1.0f / SHT_MAX)
#define COLPOLY_SNORMAL(x) ((s16)((x) * SHT_MAX))
#define COLPOLY_GET_NORMAL(n) ((n)*COLPOLY_NORMAL_FRAC)
@@ -15,24 +17,54 @@ struct DynaPolyActor;
#define BGACTOR_NEG_ONE -1
#define BG_ACTOR_MAX 50
#define DYNA_WATERBOX_MAX 30
#define BGCHECK_SCENE BG_ACTOR_MAX
#define BGCHECK_Y_MAX 32000.0f
#define BGCHECK_Y_MIN -32000.0f
#define BGCHECK_XYZ_ABSMAX 32760.0f
#define BGCHECK_SUBDIV_OVERLAP 50
#define BGCHECK_SUBDIV_MIN 150.0f
#define FUNC_80041EA4_RESPAWN 5
#define FUNC_80041EA4_MOUNT_WALL 6
#define FUNC_80041EA4_STOP 8
#define FUNC_80041EA4_VOID_OUT 12
#define WATERBOX_ROOM(p) ((((s32)p) >> 13) & 0x3F)
#define WATERBOX_ROOM(p) ((p >> 13) & 0x3F)
// bccFlags (bgcheck check flags)
#define BGCHECK_CHECK_WALL (1 << 0)
#define BGCHECK_CHECK_FLOOR (1 << 1)
#define BGCHECK_CHECK_CEILING (1 << 2)
#define BGCHECK_CHECK_ONE_FACE (1 << 3)
#define BGCHECK_CHECK_DYNA (1 << 4)
#define BGCHECK_CHECK_ALL \
(BGCHECK_CHECK_WALL | BGCHECK_CHECK_FLOOR | BGCHECK_CHECK_CEILING | BGCHECK_CHECK_ONE_FACE | BGCHECK_CHECK_DYNA)
// bciFlags (bgcheck ignore flags)
#define BGCHECK_IGNORE_NONE 0
#define BGCHECK_IGNORE_CEILING (1 << 0)
#define BGCHECK_IGNORE_WALL (1 << 1)
#define BGCHECK_IGNORE_FLOOR (1 << 2)
// xpFlags (poly exclusion flags)
#define COLPOLY_IGNORE_NONE 0
#define COLPOLY_IGNORE_CAMERA (1 << 0)
#define COLPOLY_IGNORE_ENTITY (1 << 1)
#define COLPOLY_IGNORE_PROJECTILES (1 << 2)
// Surface Types
#define COLPOLY_SURFACE_GROUND 0
#define COLPOLY_SURFACE_SAND 1
#define COLPOLY_SURFACE_SNOW 14
// CollisionContext flags
#define BGCHECK_FLAG_REVERSE_CONVEYOR_FLOW 1
typedef struct {
Vec3f scale;
Vec3s rot;
Vec3f pos;
} ScaleRotPos;
/* 0x0 */ Vec3s pos;
} BgVertex; // size = 0x6
typedef struct {
/* 0x00 */ Vec3f scale;
/* 0x0C */ Vec3s rot;
/* 0x14 */ Vec3f pos;
} ScaleRotPos; // size = 0x20
typedef struct CollisionPoly {
/* 0x00 */ u16 type;
@@ -53,30 +85,44 @@ typedef struct CollisionPoly {
typedef struct {
/* 0x00 */ u16 cameraSType;
/* 0x02 */ s16 numCameras;
/* 0x02 */ s16 unk_02;
/* 0x04 */ Vec3s* camPosData;
} CamData;
typedef struct {
/* 0x00 */ s16 xMin;
/* 0x02 */ s16 ySurface;
/* 0x04 */ s16 zMin;
/* 0x06 */ s16 xLength;
/* 0x08 */ s16 zLength;
/* 0x0C */ u32 properties;
/* 0x0 */ Vec3s minPos;
/* 0x6 */ s16 xLength;
/* 0x8 */ s16 zLength;
/* 0xC */ u32 properties;
// 0x0008_0000 = ?
// 0x0007_E000 = Room Index, 0x3F = all rooms
// 0x0000_1F00 = Lighting Settings Index
// 0x0007_E000 = room index, 0x3F = all rooms
// 0x0000_1F00 = lighting setting index
// 0x0000_00FF = CamData index
} WaterBox; // size = 0x10
typedef struct {
u32 data[2];
/* 0x0 */ u32 data[2];
// Type 1
// Word 0
// 0x8000_0000 = horse blocked
// 0x4000_0000 = floor surface recessed by 1 unit
// 0x3C00_0000 = ? (floor property?)
// 0x03E0_0000 = ? (wall property?)
// 0x001C_0000 = ?
// 0x0003_E000 = ?
// 0x0000_1F00 = scene exit index
// 0x0000_00FF = CamData index
// Word 1
// 0x0800_0000 = wall damage
} SurfaceType;
// 0x07E0_0000 = conveyor direction
// 0x001C_0000 = conveyor speed
// 0x0002_0000 = is hookable surface
// 0x0001_F800 = echo/reverb
// 0x0000_07C0 = lighting setting index
// 0x0000_0030 = surface slope
// 0x0000_000F = type
} SurfaceType; // size = 0x8
typedef struct {
/* 0x00 */ Vec3s minBounds; // minimum coordinates of poly bounding box
@@ -89,49 +135,54 @@ typedef struct {
/* 0x20 */ CamData* cameraDataList;
/* 0x24 */ u16 numWaterBoxes;
/* 0x28 */ WaterBox* waterBoxes;
} CollisionHeader; // original name: BGDataInfo
} CollisionHeader; // size = 0x2C
typedef struct {
s16 polyId;
u16 next; // next SSNode index
} SSNode;
/* 0x0 */ s16 polyId;
/* 0x2 */ u16 next; // index of the next SSNode in the list, or SS_NULL if last element
} SSNode; // size = 0x4
typedef struct {
u16 head; // first SSNode index
} SSList;
u16 head; // index of the first SSNode in the list, or SS_NULL if the list is empty
} SSList; // represents a linked list of type SSNode
typedef struct {
/* 0x00 */ u16 max; // original name: short_slist_node_size
/* 0x02 */ u16 count; // original name: short_slist_node_last_index
/* 0x04 */ SSNode* tbl; // original name: short_slist_node_tbl
/* 0x08 */ u8* polyCheckTbl; // points to an array of bytes, one per static poly. Zero initialized when starting a
// bg check, and set to 1 if that poly has already been tested.
} SSNodeList;
/* 0x0 */ u16 max;
/* 0x2 */ u16 count;
/* 0x4 */ SSNode* tbl;
/* 0x8 */ u8* polyCheckTbl;
} SSNodeList; // size = 0xC
typedef struct {
SSNode* tbl;
s32 count;
s32 max;
} DynaSSNodeList;
/* 0x0 */ SSNode* tbl;
/* 0x4 */ u32 count;
/* 0x8 */ s32 maxNodes;
} DynaSSNodeList; // size = 0xC
typedef struct {
SSList floor;
SSList wall;
SSList ceiling;
} StaticLookup;
/* 0x0 */ s32 unk0;
/* 0x4 */ WaterBox* boxes;
} DynaWaterBoxList; // size = 0x8
typedef struct {
u16 polyStartIndex;
SSList ceiling;
SSList wall;
SSList floor;
} DynaLookup;
/* 0x0 */ SSList floor;
/* 0x2 */ SSList wall;
/* 0x4 */ SSList ceiling;
} StaticLookup; // size = 0x6
typedef struct {
/* 0x00 */ struct Actor* actor;
/* 0x0 */ s16 polyStartIndex;
/* 0x2 */ SSList ceiling;
/* 0x4 */ SSList wall;
/* 0x6 */ SSList floor;
} DynaLookup; // size = 0x8
typedef struct {
/* 0x00 */ Actor* actor;
/* 0x04 */ CollisionHeader* colHeader;
/* 0x08 */ DynaLookup dynaLookup;
/* 0x10 */ u16 vtxStartIndex;
/* 0x12 */ u16 waterboxesStartIndex;
/* 0x14 */ ScaleRotPos prevTransform;
/* 0x34 */ ScaleRotPos curTransform;
/* 0x54 */ Sphere16 boundingSphere;
@@ -139,25 +190,20 @@ typedef struct {
/* 0x60 */ f32 maxY;
} BgActor; // size = 0x64
typedef struct {
/* 0x0 */ UNK_TYPE1 pad0[0x4];
/* 0x4 */ WaterBox* boxes;
} DynaSSWaterboxList; // size = 0x8
typedef struct {
/* 0x0000 */ u8 bitFlag;
/* 0x0004 */ BgActor bgActors[BG_ACTOR_MAX];
/* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX]; // & 0x0008 = no dyna ceiling
/* 0x138C */ u16 bgActorFlags[BG_ACTOR_MAX]; // bit 0 - Is mesh active
/* 0x13F0 */ CollisionPoly* polyList;
/* 0x13F4 */ Vec3s* vtxList;
/* 0x13F8 */ DynaSSWaterboxList waterboxes;
/* 0x13F8 */ DynaWaterBoxList waterBoxList;
/* 0x1400 */ DynaSSNodeList polyNodes;
/* 0x140C */ s32 polyNodesMax;
/* 0x1410 */ s32 polyListMax;
/* 0x1414 */ s32 vtxListMax;
} DynaCollisionContext; // size = 0x1418
typedef struct CollisionContext {
typedef struct {
/* 0x00 */ CollisionHeader* colHeader; // scene's static collision
/* 0x04 */ Vec3f minBounds; // minimum coordinates of collision bounding box
/* 0x10 */ Vec3f maxBounds; // maximum coordinates of collision bounding box
@@ -166,28 +212,46 @@ typedef struct CollisionContext {
/* 0x34 */ Vec3f subdivLengthInv; // inverse of subdivision length
/* 0x40 */ StaticLookup* lookupTbl; // 3d array of length subdivAmount
/* 0x44 */ SSNodeList polyNodes;
/* 0x50 */ DynaCollisionContext dyna;
/* 0x1460 */ u32 memSize; // Size of all allocated memory plus CollisionContext
/* 0x146C */ u32 unk146C;
/* 0x0050 */ DynaCollisionContext dyna;
/* 0x1468 */ u32 memSize; // Size of all allocated memory plus CollisionContext
/* 0x146C */ u32 flags; // bit 0 reverses conveyor direction (i.e. water flow in Great Bay Temple)
} CollisionContext; // size = 0x1470
typedef struct {
/* 0x00 */ struct GlobalContext* globalCtx;
/* 0x04 */ struct CollisionContext* colCtx;
/* 0x04 */ CollisionContext* colCtx;
/* 0x08 */ u16 xpFlags;
/* 0x0C */ CollisionPoly** resultPoly;
/* 0x10 */ f32 yIntersect;
/* 0x14 */ Vec3f* pos;
/* 0x18 */ s32* bgId;
/* 0x1C */ struct Actor* actor;
/* 0x20 */ u32 unk_20;
/* 0x24 */ f32 chkDist;
/* 0x28 */ DynaCollisionContext* dyna;
/* 0x2C */ SSList* ssList;
} DynaRaycast;
/* 0x1C */ s32 unk1C;
/* 0x20 */ struct Actor* actor;
/* 0x24 */ u32 unk_24;
/* 0x28 */ f32 checkDist;
/* 0x2C */ DynaCollisionContext* dyna;
/* 0x30 */ SSList* ssList;
} DynaRaycast; // size = 0x34
typedef struct
{
/* 0x00 */ StaticLookup* lookup;
/* 0x04 */ SSList* ssList;
/* 0x08 */ CollisionContext* colCtx;
/* 0x0C */ u16 xpFlags1;
/* 0x0E */ u16 xpFlags2;
/* 0x10 */ Vec3f* posA;
/* 0x14 */ Vec3f* posB;
/* 0x18 */ Vec3f* outPos;
/* 0x1C */ CollisionPoly** outPoly;
/* 0x20 */ f32 outDistSq;
/* 0x24 */ f32 checkDist;
/* 0x28 */ s32 bccFlags;
/* 0x2C */ Actor* actor;
} StaticLineTest; // size = 0x30
typedef struct {
/* 0x00 */ struct CollisionContext* colCtx;
/* 0x00 */ CollisionContext* colCtx;
/* 0x04 */ u16 xpFlags;
/* 0x08 */ DynaCollisionContext* dyna;
/* 0x0C */ SSList* ssList;
@@ -195,9 +259,46 @@ typedef struct {
/* 0x14 */ Vec3f* posB;
/* 0x18 */ Vec3f* posResult;
/* 0x1C */ CollisionPoly** resultPoly;
/* 0x20 */ s32 chkOneFace; // bccFlags & 0x8
/* 0x24 */ f32* distSq; // distance from posA to poly squared
/* 0x28 */ f32 chkDist; // distance from poly
} DynaLineTest;
/* 0x20 */ s32 checkOneFace; // bccFlags & 0x8
/* 0x24 */ f32* distSq; // distance from posA to poly squared
/* 0x28 */ f32 checkDist; // distance from poly
/* 0x2C */ Actor* actor;
/* 0x30 */ s32 bgId;
} DynaLineTest; // size = 0x34
typedef struct {
/* 0x00 */ CollisionPoly* poly;
/* 0x04 */ Vec3s* vtxList;
/* 0x08 */ Vec3f* posA;
/* 0x0C */ Vec3f* posB;
/* 0x10 */ Vec3f* planeIntersect;
/* 0x14 */ s32 checkOneFace;
/* 0x18 */ f32 checkDist;
} BgLineVsPolyTest; // size = 0x1C
typedef struct {
/* 0x0 */ s16 sceneId;
/* 0x4 */ u32 memSize;
} BgSpecialSceneMaxMemory; // size = 0x8
typedef struct {
/* 0x0 */ s16 sceneId;
/* 0x2 */ s16 maxNodes;
/* 0x4 */ s16 maxPolygons;
/* 0x6 */ s16 maxVertices;
} BgSpecialSceneMaxObjects; // size = 0x8
typedef struct {
/* 0x0 */ s16 sceneId;
/* 0x2 */ s16 xSubdivisions;
/* 0x4 */ s16 ySubdivisions;
/* 0x6 */ s16 zSubdivisions;
/* 0x8 */ s32 unk8;
} BgSpecialSceneMeshSubdivision; // size = 0xC
typedef struct {
s16 sceneId;
Vec3s subdivAmount;
s32 nodeListMax; // if -1, dynamically compute max nodes
} BgCheckSceneSubdivisionEntry;
#endif
+1
View File
@@ -327,6 +327,7 @@ typedef enum {
/* 0x8D */ GI_MASK_BLAST,
/* 0x8E */ GI_MASK_SCENTS,
/* 0x8F */ GI_MASK_GIANT,
/* 0x92 */ GI_MILK = 0x92,
/* 0x96 */ GI_MOON_TEAR = 0x96,
/* 0x97 */ GI_DEED_LAND,
/* 0x98 */ GI_DEED_SWAMP,
+99
View File
@@ -0,0 +1,99 @@
#ifndef Z64_JPEG_H
#define Z64_JPEG_H
#include "PR/ultratypes.h"
#include "ultra64/message.h"
#include "PR/sched.h"
typedef struct {
/* 0x00 */ u16 table[8*8];
} JpegQuantizationTable; // size = 0x80
typedef struct {
/* 0x00 */ u8 codeOffs[16];
/* 0x10 */ u16 codesA[16];
/* 0x30 */ u16 codesB[16];
/* 0x50 */ u8* symbols;
} JpegHuffmanTable; // size = 0x54
// this struct might be inaccurate but it's not used outside jpegutils.c
typedef struct {
/* 0x000 */ u8 codeOffs[16];
/* 0x010 */ u16 dcCodes[120];
/* 0x100 */ u16 acCodes[256];
} JpegHuffmanTableOld; // size = 0x300
typedef struct {
/* 0x00 */ void* address;
/* 0x04 */ u32 mbCount;
/* 0x08 */ u32 mode;
/* 0x0C */ void* qTableYPtr;
/* 0x10 */ void* qTableUPtr;
/* 0x14 */ void* qTableVPtr;
/* 0x18 */ char unk_18[0x8];
} JpegTaskData; // size = 0x20
typedef struct {
/* 0x000 */ JpegTaskData taskData;
/* 0x020 */ char yieldData[0x200];
/* 0x220 */ JpegQuantizationTable qTableY;
/* 0x2A0 */ JpegQuantizationTable qTableU;
/* 0x320 */ JpegQuantizationTable qTableV;
/* 0x3A0 */ u8 codesLengths[0x110];
/* 0x4B0 */ u16 codes[0x108];
/* 0x6C0 */ u16 data[4][0x180];
} JpegWork; // size = 0x12C0
typedef struct {
/* 0x00 */ void* imageData;
/* 0x04 */ u8 mode;
/* 0x05 */ u8 unk_05;
/* 0x08 */ JpegHuffmanTable* hTablePtrs[4];
/* 0x18 */ u8 unk_18;
} JpegDecoder; // size = 0x1C
typedef struct {
/* 0x00 */ u8 dqtCount;
/* 0x04 */ u8* dqtPtr[3];
/* 0x10 */ u8 dhtCount;
/* 0x14 */ u8* dhtPtr[4];
/* 0x24 */ void* imageData;
/* 0x28 */ u8 mode; // 0 if Y V0 is 1 and 2 if Y V0 is 2
/* 0x30 */ OSScTask scTask;
/* 0x98 */ OSMesgQueue mq;
/* 0xB0 */ OSMesg msg;
/* 0xB4 */ JpegWork* workBuf;
} JpegContext; // size = 0xB8
typedef struct {
/* 0x00 */ u32 byteIdx;
/* 0x04 */ u8 bitIdx;
/* 0x05 */ u8 dontSkip;
/* 0x08 */ u32 curWord;
/* 0x0C */ s16 unk_0C;
/* 0x0E */ s16 unk_0E;
/* 0x10 */ s16 unk_10;
} JpegDecoderState; // size = 0x14
void Jpeg_ScheduleDecoderTask(JpegContext* jpegCtx);
void Jpeg_CopyToZbuffer(u16* src, u16* zbuffer, s32 x, s32 y);
u16 Jpeg_GetUnalignedU16(u8* ptr);
void Jpeg_ParseMarkers(u8* ptr, JpegContext* jpegCtx);
s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize);
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count);
s32 JpegUtils_ParseHuffmanCodesLengths(u8* ptr, u8* codesLengths);
s32 JpegUtils_GetHuffmanCodes(u8* codesLengths, u16* codes);
s32 JpegUtils_SetHuffmanTable(u8* data, JpegHuffmanTable* ht, u16* codes);
u32 JpegUtils_ProcessHuffmanTableImpl(u8* data, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 isAc);
u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count);
void JpegUtils_SetHuffmanTableOld(u8* data, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes, s16 count, u8 isAc);
u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes);
s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, JpegDecoderState* state);
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
u16 JpegDecoder_ReadBits(u8 len);
#endif