mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-11 14:18:39 -04:00
Merge branch 'tokeidai' of github.com:tom-overton/mm into tokeidai
This commit is contained in:
@@ -156,10 +156,17 @@ build/src/libultra/rmon/%.o: OPTFLAGS := -O2
|
||||
build/src/libultra/flash/%.o: OPTFLAGS := -g
|
||||
build/src/libultra/flash/%.o: MIPS_VERSION := -mips1
|
||||
|
||||
build/src/code/audio/%.o: OPTFLAGS := -O2
|
||||
|
||||
# file flags
|
||||
build/src/boot_O2_g3/fault.o: CFLAGS += -trapuv
|
||||
build/src/boot_O2_g3/fault_drawer.o: CFLAGS += -trapuv
|
||||
|
||||
build/src/code/jpegutils.o: OPTFLAGS := -O2
|
||||
build/src/code/jpegdecoder.o: OPTFLAGS := -O2
|
||||
build/src/code/jpegutils.o: CC := $(CC_OLD)
|
||||
build/src/code/jpegdecoder.o: CC := $(CC_OLD)
|
||||
|
||||
build/src/libultra/libc/ll.o: OPTFLAGS := -O1
|
||||
build/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 -32
|
||||
build/src/libultra/libc/llcvt.o: OPTFLAGS := -O1
|
||||
@@ -172,6 +179,7 @@ build/src/boot_O2_g3/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(
|
||||
build/src/libultra/%.o: CC := python3 tools/asm-processor/build.py $(CC_OLD) -- $(AS) $(ASFLAGS) --
|
||||
|
||||
build/src/code/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
build/src/code/audio/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
|
||||
build/src/overlays/actors/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
build/src/overlays/effects/%.o: CC := python3 tools/asm-processor/build.py $(CC) -- $(AS) $(ASFLAGS) --
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<Root>
|
||||
<File Name="locerrmsg" Segment="1">
|
||||
<Texture Name="gNotDesignedForSystemErrorTex" OutName="not_designed_for_system_error" Format="i4" Width="208" Height="16" Offset="0x0"/>
|
||||
</File>
|
||||
</Root>
|
||||
@@ -0,0 +1,6 @@
|
||||
<Root>
|
||||
<File Name="memerrmsg" Segment="1">
|
||||
<Texture Name="gExpansionPakNotInstalledErrorTex" OutName="expansion_pak_not_installed_error" Format="i4" Width="128" Height="37" Offset="0x0"/>
|
||||
<Texture Name="gSeeInstructionBookletErrorTex" OutName="see_instruction_booklet_error" Format="i4" Width="128" Height="37" Offset="0x940"/>
|
||||
</File>
|
||||
</Root>
|
||||
+247
-107
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
@@ -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,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
@@ -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);
|
||||
|
||||
@@ -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
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
@@ -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
@@ -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
@@ -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
|
||||
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
+174
-73
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
@@ -27,7 +27,6 @@ beginseg
|
||||
include "build/src/boot_O2_g3/fault.o"
|
||||
include "build/data/boot/fault.bss.o"
|
||||
include "build/src/boot_O2_g3/fault_drawer.o"
|
||||
include "build/data/boot/fault_drawer.bss.o"
|
||||
include "build/src/boot_O2/boot_80084940.o"
|
||||
include "build/src/boot_O2/loadfragment.o"
|
||||
include "build/data/boot/loadfragment.data.o"
|
||||
@@ -170,7 +169,7 @@ beginseg
|
||||
include "build/src/libultra/voice/voicecontwrite20.o"
|
||||
include "build/src/libultra/io/crc.o"
|
||||
include "build/src/libultra/os/getactivequeue.o"
|
||||
include "build/src/libultra/gu/normalize.o"
|
||||
include "build/asm/boot/normalize.text.o"
|
||||
include "build/asm/boot/setcompare.text.o"
|
||||
include "build/asm/boot/getcompare.text.o"
|
||||
include "build/src/libultra/io/dpgetstat.o"
|
||||
@@ -195,8 +194,6 @@ beginseg
|
||||
include "build/src/libultra/io/pfsisplug.o"
|
||||
include "build/src/libultra/voice/voicegetstatus.o"
|
||||
include "build/src/libultra/io/cartrominit.o"
|
||||
include "build/data/boot/cartrominit.data.o"
|
||||
include "build/data/boot/cartrominit.bss.o"
|
||||
include "build/src/libultra/gu/guS2DInitBg.o"
|
||||
include "build/data/boot/guS2DInitBg.data.o"
|
||||
include "build/src/libultra/io/pfsselectbank.o"
|
||||
@@ -428,7 +425,7 @@ beginseg
|
||||
compress
|
||||
after "dmadata"
|
||||
include "build/src/code/z_en_a_keep.o"
|
||||
include "build/data/code/z_en_a_keep.data.o"
|
||||
include "build/data/code/rsp.data.o"
|
||||
include "build/data/code/code_801ADE60.data.o"
|
||||
include "build/data/code/code_801E3FA0.bss.o"
|
||||
include "build/src/code/z_en_item00.o"
|
||||
@@ -453,11 +450,8 @@ beginseg
|
||||
include "build/data/code/z_actor.bss.o"
|
||||
include "build/src/code/z_actor_dlftbls.o"
|
||||
include "build/src/code/z_bgcheck.o"
|
||||
include "build/data/code/z_bgcheck.data.o"
|
||||
include "build/data/code/z_bgcheck.bss.o"
|
||||
include "build/src/code/z_bg_collect.o"
|
||||
include "build/src/code/z_bg_item.o"
|
||||
include "build/src/code/code_800CB000.o"
|
||||
include "build/src/code/z_camera.o"
|
||||
include "build/data/code/z_camera.data.o"
|
||||
include "build/data/code/z_camera.bss.o"
|
||||
@@ -493,8 +487,8 @@ beginseg
|
||||
include "build/src/code/z_horse.o"
|
||||
include "build/data/code/z_horse.data.o"
|
||||
include "build/src/code/z_jpeg.o"
|
||||
include "build/data/code/z_jpeg.data.o"
|
||||
include "build/src/code/z_kaleido_setup.o"
|
||||
include "build/data/code/z_kaleido_setup.data.o"
|
||||
include "build/src/code/z_kanfont.o"
|
||||
include "build/src/code/z_kankyo.o"
|
||||
include "build/data/code/z_kankyo.data.o"
|
||||
@@ -640,38 +634,50 @@ beginseg
|
||||
pad_text
|
||||
pad_text
|
||||
pad_text
|
||||
include "build/src/code/audio_synthesis.o"
|
||||
include "build/src/code/audio_heap.o"
|
||||
include "build/data/code/code_801D2E80.data.o"
|
||||
include "build/data/code/audio_data.data.o"
|
||||
include "build/src/code/audio/audio_synthesis.o"
|
||||
include "build/data/code/audio_synthesis.data.o"
|
||||
include "build/src/code/audio/audio_heap.o"
|
||||
include "build/data/code/audio_heap.bss.o"
|
||||
include "build/data/code/code_801D3D90.data.o"
|
||||
include "build/src/code/audio_load.o"
|
||||
include "build/src/code/audio/audio_load.o"
|
||||
include "build/data/code/audio_load.data.o"
|
||||
include "build/data/code/audio_load.bss.o"
|
||||
include "build/src/code/code_80192BE0.o"
|
||||
include "build/src/code/code_80194710.o"
|
||||
include "build/src/code/audio_playback.o"
|
||||
include "build/src/code/audio_effects.o"
|
||||
include "build/src/code/audio_seqplayer.o"
|
||||
include "build/src/code/audio/code_80192BE0.o"
|
||||
include "build/data/code/code_80192BE0.data.o"
|
||||
include "build/src/code/audio/code_80194710.o"
|
||||
include "build/src/code/audio/code_80194790.o"
|
||||
include "build/data/code/code_80194790.data.o"
|
||||
include "build/src/code/audio/audio_playback.o"
|
||||
include "build/src/code/audio/audio_effects.o"
|
||||
include "build/data/code/audio_effects.data.o"
|
||||
include "build/src/code/audio/audio_seqplayer.o"
|
||||
include "build/data/code/audio_seqplayer.data.o"
|
||||
include "build/data/code/audio_dramStack.data.o"
|
||||
include "build/asm/code/code_8019AE40.text.o" // handwritten
|
||||
pad_text
|
||||
include "build/asm/code/code_8019AEC0.text.o" // handwritten
|
||||
include "build/src/code/code_8019AF00.o"
|
||||
include "build/src/code/audio/code_8019AF00.o"
|
||||
include "build/data/code/code_8019AF00.data.o"
|
||||
include "build/data/code/code_8019AF00.bss.o"
|
||||
include "build/data/code/code_801D55B0.data.o"
|
||||
include "build/src/code/code_801A51F0.o"
|
||||
include "build/src/code/audio/code_801A4EB0.o"
|
||||
include "build/data/code/code_801A4EB0.data.o"
|
||||
include "build/src/code/audio/code_801A51F0.o"
|
||||
include "build/data/code/code_801A51F0.data.o"
|
||||
include "build/data/code/code_801A51F0.bss.o"
|
||||
pad_text
|
||||
include "build/src/code/code_801A5BD0.o"
|
||||
include "build/src/code/audio/audio_sfx_params.o"
|
||||
include "build/src/code/audio/code_801A5BD0.o"
|
||||
include "build/data/code/code_801A5BD0.data.o"
|
||||
include "build/data/code/code_801A5BD0.bss.o"
|
||||
include "build/src/code/code_801A7B10.o"
|
||||
include "build/src/code/audio/code_801A7B10.o"
|
||||
include "build/data/code/code_801A7B10.data.o"
|
||||
include "build/data/code/code_801A7B10.bss.o"
|
||||
include "build/src/code/code_801AA020.o"
|
||||
include "build/data/code/code_801AA020.bss.o"
|
||||
include "build/data/code/audio_init_params.rodata.o"
|
||||
include "build/src/code/jpegutils.o"
|
||||
include "build/src/code/jpegdecoder.o"
|
||||
include_readonly "build/src/code/z_game_over.o"
|
||||
include "build/src/code/z_construct.o"
|
||||
include "build/data/code/code_801D9090.data.o"
|
||||
include "build/data/code/code_801E1180.rodata.o"
|
||||
include "build/data/code/rsp.rodata.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1181,8 +1187,7 @@ beginseg
|
||||
name "ovl_Obj_Mure"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.o"
|
||||
include "build/data/ovl_Obj_Mure/ovl_Obj_Mure.data.o"
|
||||
include "build/data/ovl_Obj_Mure/ovl_Obj_Mure.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Mure/ovl_Obj_Mure_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1315,16 +1320,14 @@ beginseg
|
||||
name "ovl_En_Rr"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Rr/z_en_rr.o"
|
||||
include "build/data/ovl_En_Rr/ovl_En_Rr.data.o"
|
||||
include "build/data/ovl_En_Rr/ovl_En_Rr.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Rr/ovl_En_Rr_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "ovl_En_Fr"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Fr/z_en_fr.o"
|
||||
include "build/data/ovl_En_Fr/ovl_En_Fr.data.o"
|
||||
include "build/data/ovl_En_Fr/ovl_En_Fr.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Fr/ovl_En_Fr_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1619,8 +1622,7 @@ beginseg
|
||||
name "ovl_En_Gm"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Gm/z_en_gm.o"
|
||||
include "build/data/ovl_En_Gm/ovl_En_Gm.data.o"
|
||||
include "build/data/ovl_En_Gm/ovl_En_Gm.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Gm/ovl_En_Gm_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1719,16 +1721,14 @@ beginseg
|
||||
name "ovl_En_Stream"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Stream/z_en_stream.o"
|
||||
include "build/data/ovl_En_Stream/ovl_En_Stream.data.o"
|
||||
include "build/data/ovl_En_Stream/ovl_En_Stream.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Stream/ovl_En_Stream_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "ovl_En_Mm"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Mm/z_en_mm.o"
|
||||
include "build/data/ovl_En_Mm/ovl_En_Mm.data.o"
|
||||
include "build/data/ovl_En_Mm/ovl_En_Mm.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Mm/ovl_En_Mm_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -1790,8 +1790,7 @@ beginseg
|
||||
name "ovl_En_Kakasi"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.o"
|
||||
include "build/data/ovl_En_Kakasi/ovl_En_Kakasi.data.o"
|
||||
include "build/data/ovl_En_Kakasi/ovl_En_Kakasi.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Kakasi/ovl_En_Kakasi_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -2224,8 +2223,7 @@ beginseg
|
||||
name "ovl_En_Cow"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Cow/z_en_cow.o"
|
||||
include "build/data/ovl_En_Cow/ovl_En_Cow.data.o"
|
||||
include "build/data/ovl_En_Cow/ovl_En_Cow.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Cow/ovl_En_Cow_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3285,8 +3283,7 @@ beginseg
|
||||
name "ovl_Dm_Stk"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.o"
|
||||
include "build/data/ovl_Dm_Stk/ovl_Dm_Stk.data.o"
|
||||
include "build/data/ovl_Dm_Stk/ovl_Dm_Stk.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Dm_Stk/ovl_Dm_Stk_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3747,9 +3744,7 @@ beginseg
|
||||
name "ovl_En_Tk"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Tk/z_en_tk.o"
|
||||
include "build/data/ovl_En_Tk/ovl_En_Tk.data.o"
|
||||
include "build/data/ovl_En_Tk/ovl_En_Tk.bss.o"
|
||||
include "build/data/ovl_En_Tk/ovl_En_Tk.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Tk/ovl_En_Tk_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -3827,8 +3822,7 @@ beginseg
|
||||
name "ovl_En_Pm"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Pm/z_en_pm.o"
|
||||
include "build/data/ovl_En_Pm/ovl_En_Pm.data.o"
|
||||
include "build/data/ovl_En_Pm/ovl_En_Pm.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Pm/ovl_En_Pm_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -4939,8 +4933,7 @@ beginseg
|
||||
name "ovl_En_Hit_Tag"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Hit_Tag/z_en_hit_tag.o"
|
||||
include "build/data/ovl_En_Hit_Tag/ovl_En_Hit_Tag.data.o"
|
||||
include "build/data/ovl_En_Hit_Tag/ovl_En_Hit_Tag.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Hit_Tag/ovl_En_Hit_Tag_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
@@ -8861,14 +8854,16 @@ beginseg
|
||||
name "memerrmsg"
|
||||
compress
|
||||
romalign 0x1000
|
||||
include "build/baserom/memerrmsg.o"
|
||||
include "build/assets/misc/memerrmsg/memerrmsg.o"
|
||||
number 1
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
name "locerrmsg"
|
||||
compress
|
||||
romalign 0x1000
|
||||
include "build/baserom/locerrmsg.o"
|
||||
include "build/assets/misc/locerrmsg/locerrmsg.o"
|
||||
number 1
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "prevent_bss_reordering.h"
|
||||
|
||||
UNK_TYPE4 D_8009BE30;
|
||||
UNK_TYPE4 D_8009BE34;
|
||||
|
||||
+52
-58
@@ -575,66 +575,59 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
||||
sFaultContext->faultActive = 1;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// This function still needs a bit of work
|
||||
void Fault_FindNextStackCall(u32** sp, u32** pc, u32** ra) {
|
||||
u32* currentSp;
|
||||
u32* currentPc;
|
||||
u32* currentRa;
|
||||
u32 lastInst;
|
||||
u32 currInst;
|
||||
void Fault_FindNextStackCall(uintptr_t* spPtr, uintptr_t* pcPtr, uintptr_t* raPtr) {
|
||||
uintptr_t sp = *spPtr;
|
||||
uintptr_t pc = *pcPtr;
|
||||
uintptr_t ra = *raPtr;
|
||||
u32 lastOpc;
|
||||
u16 opcHi;
|
||||
s16 opcLo;
|
||||
u32 imm;
|
||||
|
||||
currentSp = *sp;
|
||||
currentPc = *pc;
|
||||
currentRa = *ra;
|
||||
|
||||
if ((((u32)currentSp & 3) != 0) || (currentSp < (u32*)0x80000000) || (currentSp >= (u32*)0xC0000000) ||
|
||||
(((u32)currentRa & 3) != 0) || (currentRa < (u32*)0x80000000) || (currentRa >= (u32*)0xC0000000)) {
|
||||
*sp = NULL;
|
||||
*pc = NULL;
|
||||
*ra = NULL;
|
||||
if (sp & 3 || sp < 0x80000000 || sp >= 0xC0000000 || ra & 3 || ra < 0x80000000 || ra >= 0xC0000000) {
|
||||
*spPtr = 0;
|
||||
*pcPtr = 0;
|
||||
*raPtr = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((((u32)currentPc & 3) != 0) || (currentPc < (u32*)0x80000000) || (currentPc >= (u32*)0xC0000000)) {
|
||||
*pc = currentRa;
|
||||
if (pc & 3 || pc < 0x80000000 || pc >= 0xC0000000) {
|
||||
*pcPtr = ra;
|
||||
return;
|
||||
}
|
||||
|
||||
lastInst = 0;
|
||||
while (1) {
|
||||
currInst = *currentPc;
|
||||
if (((currInst >> 0x10) & 0xFFFF) == 0x8FBF) {
|
||||
currentRa = *(u32**)((u32)currentSp + (s16)currInst);
|
||||
} else if (((currInst >> 0x10) & 0xFFFF) == 0x27BD) {
|
||||
currentSp = (u32*)((u32)currentSp + (s16)currInst);
|
||||
} else if (currInst == 0x42000018) {
|
||||
currentSp = NULL;
|
||||
currentPc = NULL;
|
||||
currentRa = NULL;
|
||||
break;
|
||||
}
|
||||
lastOpc = 0;
|
||||
while (true) {
|
||||
opcHi = *(uintptr_t*)pc >> 16;
|
||||
opcLo = *(uintptr_t*)pc & 0xFFFF;
|
||||
imm = opcLo;
|
||||
|
||||
if (lastInst == 0x03E00008) {
|
||||
break;
|
||||
if (opcHi == 0x8FBF) {
|
||||
ra = *(uintptr_t*)(sp + imm);
|
||||
} else if (opcHi == 0x27BD) {
|
||||
sp += imm;
|
||||
} else if (*(uintptr_t*)pc == 0x42000018) {
|
||||
sp = 0;
|
||||
pc = 0;
|
||||
ra = 0;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((lastInst >> 0x1A) == 2) {
|
||||
currentPc = (u32*)((((u32)currentPc >> 0x1C) << 0x1C) | ((lastInst << 6) >> 4));
|
||||
break;
|
||||
if (lastOpc == 0x3E00008) {
|
||||
pc = ra;
|
||||
goto end;
|
||||
} else if ((lastOpc >> 26) == 2) {
|
||||
pc = pc >> 28 << 28 | lastOpc << 6 >> 4;
|
||||
goto end;
|
||||
}
|
||||
|
||||
lastInst = currInst;
|
||||
currentPc++;
|
||||
lastOpc = *(uintptr_t*)pc;
|
||||
pc += 4;
|
||||
}
|
||||
|
||||
*sp = currentSp;
|
||||
*pc = currentPc;
|
||||
*ra = currentRa;
|
||||
end:
|
||||
*spPtr = sp;
|
||||
*pcPtr = pc;
|
||||
*raPtr = ra;
|
||||
}
|
||||
#else
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/fault/Fault_FindNextStackCall.s")
|
||||
#endif
|
||||
|
||||
void Fault_DrawStackTrace(OSThread* t, u32 flags) {
|
||||
s32 y;
|
||||
@@ -664,7 +657,7 @@ void Fault_DrawStackTrace(OSThread* t, u32 flags) {
|
||||
FaultDrawer_Printf(" -> ????????");
|
||||
}
|
||||
|
||||
Fault_FindNextStackCall((u32**)&sp, (u32**)&pc, (u32**)&ra);
|
||||
Fault_FindNextStackCall(&sp, &pc, &ra);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,7 +688,7 @@ void osSyncPrintfStackTrace(OSThread* t, u32 flags) {
|
||||
}
|
||||
osSyncPrintf("\n");
|
||||
|
||||
Fault_FindNextStackCall((u32**)&sp, (u32**)&pc, (u32**)&ra);
|
||||
Fault_FindNextStackCall(&sp, &pc, &ra);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -714,7 +707,7 @@ void Fault_CommitFB() {
|
||||
osViSetYScale(1.0f);
|
||||
osViSetMode(&osViModeNtscLan1);
|
||||
osViSetSpecialFeatures(0x42); // gama_disable|dither_fliter_enable_aa_mode3_disable
|
||||
osViBlack(0);
|
||||
osViBlack(false);
|
||||
|
||||
if (sFaultContext->fb) {
|
||||
fb = sFaultContext->fb;
|
||||
@@ -751,32 +744,33 @@ void Fault_ProcessClients(void) {
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// regalloc and ordering differences around the two bool variables (faultCustomOptions and faultCopyToLog)
|
||||
// needs in-function static bss
|
||||
void Fault_SetOptionsFromController3(void) {
|
||||
Input* input3;
|
||||
static u32 faultCustomOptions;
|
||||
Input* input3 = &sFaultContext->padInput[3];
|
||||
u32 pad;
|
||||
u32 graphPC;
|
||||
u32 graphRA;
|
||||
u32 graphSP;
|
||||
|
||||
input3 = &sFaultContext->padInput[3];
|
||||
|
||||
if (CHECK_BTN_ALL(input3->press.button, 0x80)) {
|
||||
faultCustomOptions = faultCustomOptions == 0;
|
||||
faultCustomOptions = !faultCustomOptions;
|
||||
}
|
||||
|
||||
if (faultCustomOptions) {
|
||||
graphPC = sGraphThread.context.pc;
|
||||
graphRA = sGraphThread.context.ra;
|
||||
graphSP = sGraphThread.context.sp;
|
||||
if (CHECK_BTN_ALL(input3->press.button, BTN_R)) {
|
||||
if (CHECK_BTN_ALL(input3->cur.button, BTN_R)) {
|
||||
static u32 faultCopyToLog;
|
||||
|
||||
faultCopyToLog = !faultCopyToLog;
|
||||
FaultDrawer_SetOsSyncPrintfEnabled(faultCopyToLog);
|
||||
}
|
||||
if (CHECK_BTN_ALL(input3->press.button, BTN_A)) {
|
||||
if (CHECK_BTN_ALL(input3->cur.button, BTN_A)) {
|
||||
osSyncPrintf("GRAPH PC=%08x RA=%08x STACK=%08x\n", graphPC, graphRA, graphSP);
|
||||
}
|
||||
if (CHECK_BTN_ALL(input3->press.button, BTN_B)) {
|
||||
if (CHECK_BTN_ALL(input3->cur.button, BTN_B)) {
|
||||
FaultDrawer_SetDrawerFB(osViGetNextFramebuffer(), 0x140, 0xF0);
|
||||
Fault_DrawRec(0, 0xD7, 0x140, 9, 1);
|
||||
FaultDrawer_SetCharPad(-2, 0);
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
|
||||
extern const u32 sFaultDrawerFont[];
|
||||
|
||||
FaultDrawer sFaultDrawerStruct;
|
||||
|
||||
FaultDrawer* sFaultDrawContext = &sFaultDrawerStruct;
|
||||
FaultDrawer sFaultDrawerDefault = {
|
||||
(u16*)0x803DA800, // fb - TODO map out buffers in this region and avoid hard-coded pointer
|
||||
FAULT_FB_ADDRESS, // fb
|
||||
SCREEN_WIDTH, // w
|
||||
SCREEN_HEIGHT, // h
|
||||
16, // yStart
|
||||
@@ -16,23 +18,23 @@ FaultDrawer sFaultDrawerDefault = {
|
||||
GPACK_RGBA5551(0, 0, 0, 0), // backColor
|
||||
22, // cursorX
|
||||
16, // cursorY
|
||||
(u32*)sFaultDrawerFont, // font
|
||||
sFaultDrawerFont, // font
|
||||
8, // charW
|
||||
8, // charH
|
||||
0, // charWPad
|
||||
0, // charHPad
|
||||
0, // charHPad
|
||||
{
|
||||
// printColors
|
||||
GPACK_RGBA5551(0, 0, 0, 1),
|
||||
GPACK_RGBA5551(255, 0, 0, 1),
|
||||
GPACK_RGBA5551(0, 255, 0, 1),
|
||||
GPACK_RGBA5551(255, 255, 0, 1),
|
||||
GPACK_RGBA5551(0, 0, 255, 1),
|
||||
GPACK_RGBA5551(255, 0, 255, 1),
|
||||
GPACK_RGBA5551(0, 255, 255, 1),
|
||||
GPACK_RGBA5551(255, 255, 255, 1),
|
||||
GPACK_RGBA5551(120, 120, 120, 1),
|
||||
GPACK_RGBA5551(176, 176, 176, 1),
|
||||
GPACK_RGBA5551(0, 0, 0, 1), // BLACK
|
||||
GPACK_RGBA5551(255, 0, 0, 1), // RED
|
||||
GPACK_RGBA5551(0, 255, 0, 1), // GREEN
|
||||
GPACK_RGBA5551(255, 255, 0, 1), // YELLOW
|
||||
GPACK_RGBA5551(0, 0, 255, 1), // BLUE
|
||||
GPACK_RGBA5551(255, 0, 255, 1), // MAGENTA
|
||||
GPACK_RGBA5551(0, 255, 255, 1), // CYAN
|
||||
GPACK_RGBA5551(255, 255, 255, 1), // WHITE
|
||||
GPACK_RGBA5551(120, 120, 120, 1), // DARK GRAY
|
||||
GPACK_RGBA5551(176, 176, 176, 1), // LIGHT GRAY
|
||||
},
|
||||
0, // escCode
|
||||
0, // osSyncPrintfEnabled
|
||||
@@ -47,7 +49,8 @@ void FaultDrawer_SetOsSyncPrintfEnabled(u32 enabled) {
|
||||
|
||||
void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 color) {
|
||||
u16* fb;
|
||||
s32 x, y;
|
||||
s32 x;
|
||||
s32 y;
|
||||
s32 xDiff = sFaultDrawContext->w - xStart;
|
||||
s32 yDiff = sFaultDrawContext->h - yStart;
|
||||
s32 xSize = xEnd - xStart + 1;
|
||||
@@ -74,7 +77,37 @@ void FaultDrawer_DrawRecImpl(s32 xStart, s32 yStart, s32 xEnd, s32 yEnd, u16 col
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/fault_drawer/FaultDrawer_DrawChar.s")
|
||||
void FaultDrawer_DrawChar(char c) {
|
||||
s32 x;
|
||||
s32 y;
|
||||
u32 data;
|
||||
s32 cursorX = sFaultDrawContext->cursorX;
|
||||
s32 cursorY = sFaultDrawContext->cursorY;
|
||||
s32 shift = c % 4;
|
||||
const u32* dataPtr = &sFaultDrawContext->font[(((c / 8) * 16) + ((c & 4) >> 2))];
|
||||
u16* fb = sFaultDrawContext->fb + (sFaultDrawContext->w * cursorY) + cursorX;
|
||||
|
||||
if ((sFaultDrawContext->xStart <= cursorX) &&
|
||||
((sFaultDrawContext->charW + cursorX - 1) <= sFaultDrawContext->xEnd) &&
|
||||
(sFaultDrawContext->yStart <= cursorY) &&
|
||||
((sFaultDrawContext->charH + cursorY - 1) <= sFaultDrawContext->yEnd)) {
|
||||
for (y = 0; y < sFaultDrawContext->charH; y++) {
|
||||
u32 mask = 0x10000000 << shift;
|
||||
|
||||
data = *dataPtr;
|
||||
for (x = 0; x < sFaultDrawContext->charW; x++) {
|
||||
if (mask & data) {
|
||||
fb[x] = sFaultDrawContext->foreColor;
|
||||
} else if (sFaultDrawContext->backColor & 1) {
|
||||
fb[x] = sFaultDrawContext->backColor;
|
||||
}
|
||||
mask >>= 4;
|
||||
}
|
||||
fb += sFaultDrawContext->w;
|
||||
dataPtr += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 FaultDrawer_ColorToPrintColor(u16 color) {
|
||||
s32 i;
|
||||
@@ -142,12 +175,57 @@ void FaultDrawer_FillScreen() {
|
||||
FaultDrawer_SetCursor(sFaultDrawContext->xStart, sFaultDrawContext->yStart);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/fault_drawer/FaultDrawer_FormatStringFunc.s")
|
||||
void* FaultDrawer_FormatStringFunc(void* arg, const char* str, size_t count) {
|
||||
for (; count != 0; count--, str++) {
|
||||
if (sFaultDrawContext->escCode) {
|
||||
sFaultDrawContext->escCode = false;
|
||||
if (*str >= '1' && *str <= '9') {
|
||||
FaultDrawer_SetForeColor(sFaultDrawContext->printColors[*str - '0']);
|
||||
}
|
||||
} else {
|
||||
switch (*str) {
|
||||
case '\n':
|
||||
if (sFaultDrawContext->osSyncPrintfEnabled) {
|
||||
osSyncPrintf("\n");
|
||||
}
|
||||
|
||||
sFaultDrawContext->cursorX = sFaultDrawContext->w;
|
||||
break;
|
||||
case '\x1A':
|
||||
sFaultDrawContext->escCode = true;
|
||||
break;
|
||||
default:
|
||||
if (sFaultDrawContext->osSyncPrintfEnabled) {
|
||||
osSyncPrintf("%c", *str);
|
||||
}
|
||||
|
||||
FaultDrawer_DrawChar(*str);
|
||||
sFaultDrawContext->cursorX += sFaultDrawContext->charW + sFaultDrawContext->charWPad;
|
||||
}
|
||||
}
|
||||
|
||||
if (sFaultDrawContext->cursorX >= (sFaultDrawContext->xEnd - sFaultDrawContext->charW)) {
|
||||
sFaultDrawContext->cursorX = sFaultDrawContext->xStart;
|
||||
sFaultDrawContext->cursorY += sFaultDrawContext->charH + sFaultDrawContext->charHPad;
|
||||
if (sFaultDrawContext->yEnd - sFaultDrawContext->charH <= sFaultDrawContext->cursorY) {
|
||||
if (sFaultDrawContext->inputCallback != NULL) {
|
||||
sFaultDrawContext->inputCallback();
|
||||
FaultDrawer_FillScreen();
|
||||
}
|
||||
sFaultDrawContext->cursorY = sFaultDrawContext->yStart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
osWritebackDCacheAll();
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
||||
const char D_80099080[] = "(null)";
|
||||
|
||||
void FaultDrawer_VPrintf(const char* str, char* args) { // va_list
|
||||
_Printf((PrintCallback)FaultDrawer_FormatStringFunc, sFaultDrawContext, str, args);
|
||||
void FaultDrawer_VPrintf(const char* fmt, va_list ap) {
|
||||
_Printf(FaultDrawer_FormatStringFunc, sFaultDrawContext, fmt, ap);
|
||||
}
|
||||
|
||||
void FaultDrawer_Printf(const char* fmt, ...) {
|
||||
@@ -175,7 +253,7 @@ void FaultDrawer_SetDrawerFB(void* fb, u16 w, u16 h) {
|
||||
sFaultDrawContext->h = h;
|
||||
}
|
||||
|
||||
void FaultDrawer_SetInputCallback(void* callback) {
|
||||
void FaultDrawer_SetInputCallback(FaultDrawerCallback callback) {
|
||||
sFaultDrawContext->inputCallback = callback;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ OSMesgQueue gPiMgrCmdQ;
|
||||
|
||||
void Idle_ClearMemory(void* begin, void* end) {
|
||||
if (begin < end) {
|
||||
bzero(begin, (u32)end - (u32)begin);
|
||||
bzero(begin, (uintptr_t)end - (uintptr_t)begin);
|
||||
}
|
||||
}
|
||||
|
||||
void Idle_InitFramebuffer(u32* ptr, u32 numBytes, u32 value) {
|
||||
void Idle_InitFramebuffer(u32* ptr, size_t numBytes, u32 value) {
|
||||
s32 temp = sizeof(u32);
|
||||
|
||||
while (numBytes) {
|
||||
@@ -36,7 +36,7 @@ void Idle_InitScreen(void) {
|
||||
Idle_InitFramebuffer((u32*)gFramebuffer1, 0x25800, 0x00010001);
|
||||
ViConfig_UpdateVi(0);
|
||||
osViSwapBuffer(gFramebuffer1);
|
||||
osViBlack(0);
|
||||
osViBlack(false);
|
||||
}
|
||||
|
||||
void Idle_InitMemory(void) {
|
||||
@@ -52,7 +52,7 @@ void Idle_InitCodeAndMemory(void) {
|
||||
DmaRequest dmaReq;
|
||||
OSMesgQueue queue;
|
||||
OSMesg mesg;
|
||||
u32 oldSize;
|
||||
size_t oldSize;
|
||||
|
||||
osCreateMesgQueue(&queue, &mesg, 1);
|
||||
|
||||
@@ -71,7 +71,7 @@ void Idle_InitCodeAndMemory(void) {
|
||||
}
|
||||
|
||||
void Main_ThreadEntry(void* arg) {
|
||||
StackCheck_Init(&sIrqMgrStackInfo, sIrqMgrStack, sIrqMgrStack + sizeof(sIrqMgrStack), 0, 256, "irqmgr");
|
||||
StackCheck_Init(&sIrqMgrStackInfo, sIrqMgrStack, sIrqMgrStack + sizeof(sIrqMgrStack), 0, 0x100, "irqmgr");
|
||||
IrqMgr_Init(&gIrqMgr, &sIrqMgrStackInfo, Z_PRIORITY_IRQMGR, 1);
|
||||
DmaMgr_Start();
|
||||
Idle_InitCodeAndMemory();
|
||||
@@ -87,15 +87,15 @@ void Idle_InitVideo(void) {
|
||||
gViConfigYScale = 1.0;
|
||||
|
||||
switch (osTvType) {
|
||||
case 1:
|
||||
case OS_TV_NTSC:
|
||||
D_8009B290 = 2;
|
||||
gViConfigMode = osViModeNtscLan1;
|
||||
break;
|
||||
case 2:
|
||||
case OS_TV_MPAL:
|
||||
D_8009B290 = 30;
|
||||
gViConfigMode = osViModeMpalLan1;
|
||||
break;
|
||||
case 0:
|
||||
case OS_TV_PAL:
|
||||
D_8009B290 = 44;
|
||||
gViConfigMode = osViModeFpalLan1;
|
||||
gViConfigYScale = 0.833f;
|
||||
@@ -108,7 +108,7 @@ void Idle_InitVideo(void) {
|
||||
void Idle_ThreadEntry(void* arg) {
|
||||
Idle_InitVideo();
|
||||
osCreatePiManager(150, &gPiMgrCmdQ, sPiMgrCmdBuff, ARRAY_COUNT(sPiMgrCmdBuff));
|
||||
StackCheck_Init(&sMainStackInfo, sMainStack, sMainStack + sizeof(sMainStack), 0, 1024, "main");
|
||||
StackCheck_Init(&sMainStackInfo, sMainStack, sMainStack + sizeof(sMainStack), 0, 0x400, "main");
|
||||
osCreateThread(&gMainThread, Z_THREAD_ID_MAIN, Main_ThreadEntry, arg, sMainStack + sizeof(sMainStack),
|
||||
Z_PRIORITY_MAIN);
|
||||
osStartThread(&gMainThread);
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
void ViConfig_UpdateVi(u32 mode) {
|
||||
if (mode != 0) {
|
||||
switch (osTvType) {
|
||||
case 2:
|
||||
case OS_TV_MPAL:
|
||||
osViSetMode(&osViModeMpalLan1);
|
||||
break;
|
||||
case 0:
|
||||
case OS_TV_PAL:
|
||||
osViSetMode(&osViModePalLan1);
|
||||
break;
|
||||
case 1:
|
||||
case OS_TV_NTSC:
|
||||
default:
|
||||
osViSetMode(&osViModeNtscLan1);
|
||||
break;
|
||||
@@ -47,8 +47,8 @@ void ViConfig_UpdateVi(u32 mode) {
|
||||
|
||||
void ViConfig_UpdateBlack(void) {
|
||||
if (gViConfigUseDefault != 0) {
|
||||
osViBlack(1);
|
||||
osViBlack(true);
|
||||
} else {
|
||||
osViBlack(0);
|
||||
osViBlack(false);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -9,12 +9,12 @@ OSMesg sDmaMgrMsgs[32];
|
||||
OSThread sDmaMgrThread;
|
||||
u8 sDmaMgrStack[0x500];
|
||||
|
||||
s32 DmaMgr_DMARomToRam(u32 rom, void* ram, size_t size) {
|
||||
s32 DmaMgr_DMARomToRam(uintptr_t rom, void* ram, size_t size) {
|
||||
OSIoMesg ioMsg;
|
||||
OSMesgQueue queue;
|
||||
OSMesg msg[1];
|
||||
s32 ret;
|
||||
u32 buffSize = sDmaMgrDmaBuffSize;
|
||||
size_t buffSize = sDmaMgrDmaBuffSize;
|
||||
|
||||
osInvalDCache(ram, size);
|
||||
osCreateMesgQueue(&queue, msg, ARRAY_COUNT(msg));
|
||||
@@ -23,7 +23,7 @@ s32 DmaMgr_DMARomToRam(u32 rom, void* ram, size_t size) {
|
||||
while (buffSize < size) {
|
||||
ioMsg.hdr.pri = 0;
|
||||
ioMsg.hdr.retQueue = &queue;
|
||||
ioMsg.devAddr = (u32)rom;
|
||||
ioMsg.devAddr = rom;
|
||||
ioMsg.dramAddr = ram;
|
||||
ioMsg.size = buffSize;
|
||||
ret = osEPiStartDma(gCartHandle, &ioMsg, 0);
|
||||
@@ -39,9 +39,9 @@ s32 DmaMgr_DMARomToRam(u32 rom, void* ram, size_t size) {
|
||||
}
|
||||
ioMsg.hdr.pri = 0;
|
||||
ioMsg.hdr.retQueue = &queue;
|
||||
ioMsg.devAddr = (u32)rom;
|
||||
ioMsg.devAddr = rom;
|
||||
ioMsg.dramAddr = ram;
|
||||
ioMsg.size = (u32)size;
|
||||
ioMsg.size = size;
|
||||
ret = osEPiStartDma(gCartHandle, &ioMsg, 0);
|
||||
if (ret) {
|
||||
goto END;
|
||||
@@ -109,11 +109,11 @@ const char* func_800809F4(u32 a0) {
|
||||
}
|
||||
|
||||
void DmaMgr_ProcessMsg(DmaRequest* req) {
|
||||
u32 vrom;
|
||||
uintptr_t vrom;
|
||||
void* ram;
|
||||
size_t size;
|
||||
u32 romStart;
|
||||
u32 romSize;
|
||||
uintptr_t romStart;
|
||||
size_t romSize;
|
||||
DmaEntry* dmaEntry;
|
||||
s32 index;
|
||||
|
||||
@@ -172,7 +172,7 @@ void DmaMgr_ThreadEntry(void* a0) {
|
||||
}
|
||||
}
|
||||
|
||||
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* queue, OSMesg msg) {
|
||||
if (gIrqMgrResetStatus >= 2) {
|
||||
return -2;
|
||||
@@ -190,7 +190,7 @@ s32 DmaMgr_SendRequestImpl(DmaRequest* request, void* vramStart, u32 vromStart,
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 DmaMgr_SendRequest0(void* vramStart, u32 vromStart, size_t size) {
|
||||
s32 DmaMgr_SendRequest0(void* vramStart, uintptr_t vromStart, size_t size) {
|
||||
DmaRequest req;
|
||||
OSMesgQueue queue;
|
||||
OSMesg msg[1];
|
||||
|
||||
@@ -0,0 +1,497 @@
|
||||
#include "global.h"
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
* the number of #efined sfx's we have for each bank does not seem to line up with the
|
||||
* number of SfxParam entries for each bank. So at some point either through hacking or
|
||||
* decompilation/documentation of sequence 0, the sfxs should be verified, especially
|
||||
* the ones that come at the end of the list (all the earlier sfxs in each bank seem fine).
|
||||
*
|
||||
* After that, defines should be paired with sfxparams to make it easier to look up
|
||||
* specific sfxsparams for a a certain sfx i.e.:
|
||||
* { 0x18, 0, 0x1 }, // NA_SE_EN_DODO_J_WALK
|
||||
* { 0x30, 0, 0x1 }, // NA_SE_EN_DODO_J_CRY
|
||||
* { 0x30, 0, 0x1 }, // NA_SE_EN_DODO_J_FIRE
|
||||
*/
|
||||
|
||||
SfxParams sEnemyBankParams[] = {
|
||||
{ 0x18, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x38, 0, 0x1 }, { 0x40, 0, 0x1 },
|
||||
{ 0x30, 0, 0x3 }, { 0x36, 0, 0 }, { 0x38, 0, 0 }, { 0x40, 0, 0x3 }, { 0x58, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x68, 0, 0x1003 }, { 0x40, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x40, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x54, 0, 0xB }, { 0x54, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x40, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x30, 0, 0x2003 },
|
||||
{ 0x50, 0, 0x3 }, { 0x58, 0, 0x3 }, { 0x38, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x38, 0, 0 }, { 0x48, 0, 0 }, { 0x30, 0, 0 }, { 0x40, 0, 0x1 }, { 0x18, 0, 0 },
|
||||
{ 0x14, 0, 0 }, { 0x14, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x28, 0, 0x4000 },
|
||||
{ 0x28, 0, 0 }, { 0x30, 0, 0x2 }, { 0x32, 0, 0x2 }, { 0x38, 0, 0x1 }, { 0x20, 0, 0 },
|
||||
{ 0x40, 0, 0x1 }, { 0x18, 0, 0 }, { 0x28, 0, 0 }, { 0x18, 0, 0x40 }, { 0x30, 0, 0 },
|
||||
{ 0x38, 0, 0x1 }, { 0x40, 0, 0x1 }, { 0x14, 0, 0 }, { 0x18, 0, 0x80 }, { 0x38, 0, 0x2 },
|
||||
{ 0x34, 0, 0 }, { 0x28, 0, 0x1 }, { 0x30, 0, 0 }, { 0x38, 0, 0x1 }, { 0x40, 0, 0x1 },
|
||||
{ 0x30, 0, 0 }, { 0x18, 0, 0 }, { 0x20, 0, 0 }, { 0x30, 0, 0 }, { 0x32, 0, 0 },
|
||||
{ 0x20, 0, 0x1 }, { 0x37, 0, 0x1 }, { 0x38, 0, 0x1 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x40, 0, 0x2 }, { 0x38, 0, 0x2 }, { 0x20, 0, 0 }, { 0x18, 0, 0 }, { 0x40, 0, 0x4007 },
|
||||
{ 0x40, 0, 0x1 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x40, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x34, 0, 0 },
|
||||
{ 0x34, 0, 0 }, { 0x36, 0, 0 }, { 0x30, 0, 0x3 }, { 0x28, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x18, 0, 0 }, { 0x30, 0, 0 }, { 0x28, 0, 0xC0 }, { 0x30, 0, 0x40 }, { 0x38, 0, 0x41 },
|
||||
{ 0x40, 0, 0x41 }, { 0x30, 0, 0 }, { 0x36, 0, 0 }, { 0x40, 0, 0x1 }, { 0x14, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x20, 0, 0 }, { 0x40, 0, 0x1 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x4 },
|
||||
{ 0x30, 0, 0x4 }, { 0x20, 0, 0x4 }, { 0x38, 0, 0x4 }, { 0x20, 0, 0x3 }, { 0x38, 0, 0x1 },
|
||||
{ 0x40, 0, 0x1 }, { 0x14, 0, 0 }, { 0x30, 0, 0x3 }, { 0x20, 0, 0x1 }, { 0x20, 0, 0x1 },
|
||||
{ 0x30, 0, 0x2 }, { 0x35, 0, 0x2 }, { 0x38, 0, 0x2 }, { 0x48, 0, 0x2 }, { 0x40, 0, 0x2 },
|
||||
{ 0x45, 0, 0x81 }, { 0x34, 0, 0 }, { 0x40, 0, 0 }, { 0x20, 0, 0x2 }, { 0x28, 0, 0 },
|
||||
{ 0x28, 0, 0 }, { 0x30, 0, 0 }, { 0x20, 0, 0x84 }, { 0x38, 0, 0x1 }, { 0x40, 0, 0x1 },
|
||||
{ 0x20, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x4 }, { 0x40, 0, 0x4 }, { 0x40, 0, 0x3 },
|
||||
{ 0x40, 0, 0x1 }, { 0x28, 0, 0x1 }, { 0x30, 0, 0x3 }, { 0x20, 0, 0 }, { 0x38, 0, 0x1 },
|
||||
{ 0x30, 0, 0x4 }, { 0x30, 0, 0 }, { 0x20, 0, 0 }, { 0x20, 0, 0 }, { 0x38, 0, 0x2000 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x14, 0, 0 }, { 0x38, 0, 0x1 },
|
||||
{ 0x40, 0, 0x1 }, { 0x14, 0, 0 }, { 0x20, 0, 0 }, { 0x20, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x40, 0, 0x1 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 }, { 0x37, 0, 0x1 }, { 0x40, 0, 0x1 },
|
||||
{ 0x28, 0, 0x5 }, { 0x36, 0, 0x5 }, { 0x38, 0, 0x5 }, { 0x48, 0, 0x5 }, { 0x30, 0, 0x3 },
|
||||
{ 0x28, 0, 0x2 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x34, 0, 0x3 }, { 0x38, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x3 }, { 0x38, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x403 }, { 0x38, 0, 0x1 },
|
||||
{ 0x30, 0, 0x43 }, { 0x30, 0, 0x3 }, { 0x20, 0, 0 }, { 0x34, 0, 0 }, { 0x18, 0, 0x80 },
|
||||
{ 0x30, 0, 0 }, { 0x38, 0, 0 }, { 0x30, 0, 0 }, { 0x14, 0, 0 }, { 0x34, 0, 0 },
|
||||
{ 0x40, 0, 0 }, { 0x30, 0, 0x3 }, { 0x20, 0, 0 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x28, 0, 0 }, { 0x30, 0, 0x80 }, { 0x40, 0, 0x1 }, { 0x40, 0, 0x1 },
|
||||
{ 0x20, 0, 0 }, { 0x20, 0, 0 }, { 0x14, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x40, 0, 0x1 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x38, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x48, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x34, 0, 0x3 }, { 0x48, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x34, 0, 0x3 }, { 0x30, 0, 0x4083 }, { 0x30, 0, 0x4083 }, { 0x40, 0, 0x3 },
|
||||
{ 0x38, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x28, 0, 0x3 }, { 0x28, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x2003 }, { 0x38, 0, 0x1 }, { 0x20, 0, 0 }, { 0x34, 0, 0 },
|
||||
{ 0x38, 0, 0x1 }, { 0x40, 0, 0x1 }, { 0x34, 0, 0x2000 }, { 0x20, 0, 0 }, { 0x38, 0, 0x42 },
|
||||
{ 0x40, 0, 0x1 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x2 }, { 0x38, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x34, 0, 0 }, { 0x34, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x24, 0, 0x40 }, { 0x30, 0, 0x3 }, { 0x28, 0, 0x82 }, { 0x40, 0, 0x3 }, { 0x40, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x34, 0, 0x3 }, { 0x20, 0, 0x83 }, { 0x20, 0, 0 }, { 0x30, 0, 0x3 },
|
||||
{ 0x20, 0, 0x80 }, { 0x30, 0, 0x83 }, { 0x18, 0, 0x83 }, { 0x34, 0, 0x83 }, { 0x30, 0, 0x83 },
|
||||
{ 0x38, 0, 0x3 }, { 0x18, 0, 0x3 }, { 0x30, 0, 0x2000 }, { 0x38, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x40, 0, 0x2004 }, { 0x38, 0, 0x5 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x80 }, { 0x30, 0, 0x5 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x82 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x5 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x84 }, { 0x38, 0, 0x80 }, { 0x38, 0, 0x6083 },
|
||||
{ 0x38, 0, 0x6083 }, { 0x38, 0, 0x6083 }, { 0x38, 0, 0x6083 }, { 0x40, 0, 0x4082 }, { 0x18, 0, 0x83 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x20, 0, 0x3 }, { 0x24, 0, 0x5 }, { 0x28, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x5 }, { 0x30, 0, 0x5 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x3 }, { 0x18, 0, 0x1 }, { 0x34, 0, 0x3 }, { 0x30, 0, 0x5 }, { 0x34, 0, 0x3 },
|
||||
{ 0x34, 0, 0x3 }, { 0x34, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x1 },
|
||||
{ 0x14, 0, 0 }, { 0x40, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x20, 0, 0x1 },
|
||||
{ 0x38, 0, 0x3 }, { 0x30, 0, 0 }, { 0x40, 0, 0x4003 }, { 0x30, 0, 0x4003 }, { 0x38, 0, 0x3 },
|
||||
{ 0x38, 0, 0x3 }, { 0x40, 0, 0x3 }, { 0x40, 0, 0x83 }, { 0x40, 0, 0x83 }, { 0x40, 0, 0x3 },
|
||||
{ 0x21, 0, 0x4003 }, { 0x54, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x34, 0, 0x2 },
|
||||
{ 0x58, 0, 0x3 }, { 0x68, 0, 0x3 }, { 0x50, 0, 0x40C3 }, { 0x14, 0, 0 }, { 0x20, 0, 0x1 },
|
||||
{ 0x48, 0, 0x4080 }, { 0x30, 0, 0x4080 }, { 0x50, 0, 0x1 }, { 0x50, 0, 0x1 }, { 0x50, 0, 0 },
|
||||
{ 0x50, 0, 0 }, { 0x68, 0, 0x3 }, { 0x58, 0, 0x3 }, { 0x90, 0, 0x3 }, { 0x48, 0, 0x3 },
|
||||
{ 0x28, 0, 0x2 }, { 0x30, 0, 0 }, { 0x38, 0, 0x1 }, { 0x28, 0, 0x2 }, { 0x50, 0, 0x3 },
|
||||
{ 0x50, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x40, 0, 0x4083 }, { 0x40, 0, 0x3 }, { 0x40, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x40, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x40, 0, 0x3 }, { 0x40, 0, 0x3 },
|
||||
{ 0x48, 0, 0x3 }, { 0x48, 0, 0x3 }, { 0x48, 0, 0x3 }, { 0x40, 0, 0x3 }, { 0x34, 0, 0x2 },
|
||||
{ 0x34, 0, 0x2002 }, { 0x28, 0, 0x2 }, { 0x28, 0, 0x2 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x2 },
|
||||
{ 0x38, 0, 0x2 }, { 0x38, 0, 0x2 }, { 0x48, 0, 0x2 }, { 0x10, 0, 0 }, { 0x34, 0, 0 },
|
||||
{ 0x18, 0, 0 }, { 0x30, 0, 0 }, { 0x14, 0, 0 }, { 0x34, 0, 0 }, { 0x28, 0, 0x1 },
|
||||
{ 0x38, 0, 0x1 }, { 0x40, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x38, 0, 0x1 }, { 0x36, 0, 0x1 },
|
||||
{ 0x34, 0, 0x1 }, { 0x38, 0, 0x1 }, { 0x48, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x38, 0, 0x83 },
|
||||
{ 0x30, 0, 0x3 }, { 0x20, 0, 0x2000 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x40, 0, 0x1 },
|
||||
{ 0x30, 0, 0 }, { 0x20, 0, 0 }, { 0x38, 0, 0x1 }, { 0x40, 0, 0x1 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x2000 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x18, 0, 0 }, { 0x28, 0, 0 }, { 0x34, 0, 0x2 }, { 0x34, 0, 0x2 }, { 0x34, 0, 0 },
|
||||
{ 0x38, 0, 0x1 }, { 0x40, 0, 0x1 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x2 }, { 0x38, 0, 0 },
|
||||
{ 0x48, 0, 0 }, { 0x28, 0, 0x4004 }, { 0x48, 0, 0x4 }, { 0x20, 0, 0x4 }, { 0x25, 0, 0x3 },
|
||||
{ 0x40, 0, 0x2 }, { 0x18, 0, 0x80 }, { 0x44, 0, 0x3 }, { 0x44, 0, 0 }, { 0x18, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x38, 0, 0x1 }, { 0x40, 0, 0x1 }, { 0x18, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x38, 0, 0x43 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x36, 0, 0x3 },
|
||||
{ 0x34, 0, 0x3 }, { 0x34, 0, 0x82 }, { 0x58, 0, 0x3 }, { 0x68, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x34, 0, 0x2 }, { 0x34, 0, 0x3 }, { 0x40, 0, 0 }, { 0x30, 0, 0x3 },
|
||||
{ 0x40, 0, 0x2000 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0xC0 }, { 0x30, 0, 0xC0 }, { 0x40, 0, 0 },
|
||||
{ 0x30, 0, 0x3 }, { 0x28, 0, 0x3 }, { 0x40, 0, 0x3 }, { 0x40, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x38, 0, 0x3 }, { 0x48, 0, 0x3 },
|
||||
{ 0x20, 0, 0x3 }, { 0x48, 0, 0x3 }, { 0x36, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x38, 0, 0x3 }, { 0x38, 0, 0x3 }, { 0x20, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x44, 0, 0x3 },
|
||||
{ 0x30, 0, 0x83 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x34, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x20, 0, 0x2 }, { 0x34, 0, 0x3 }, { 0x20, 0, 0x83 }, { 0x30, 0, 0x4 },
|
||||
{ 0x30, 0, 0x4042 }, { 0x40, 0, 0x4042 }, { 0x40, 0, 0x83 }, { 0x30, 0, 0x4042 }, { 0x30, 0, 0x4042 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x1 }, { 0x32, 0, 0x4082 }, { 0x32, 0, 0x3 },
|
||||
{ 0x54, 0, 0x1 }, { 0x52, 0, 0 }, { 0x54, 0, 0x3 }, { 0x30, 0, 0 }, { 0x08, 0, 0x1 },
|
||||
{ 0x30, 0, 0x1 }, { 0x30, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x54, 0, 0x2000 }, { 0x34, 0, 0x3 },
|
||||
{ 0x54, 0, 0x2000 }, { 0x08, 0, 0 }, { 0x54, 0, 0 }, { 0x34, 0, 0 }, { 0x15, 0, 0 },
|
||||
{ 0x35, 0, 0 }, { 0x48, 0, 0 }, { 0x38, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0xC2 },
|
||||
{ 0x38, 0, 0x2 }, { 0x38, 0, 0x2 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0x1, 0x80 }, { 0x30, 0xB4, 0x6 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x6 }, { 0x30, 0, 0x83 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x2 },
|
||||
{ 0x30, 0, 0x2 }, { 0x48, 0, 0x2 }, { 0x28, 0, 0x1 }, { 0x36, 0, 0 }, { 0x38, 0, 0 },
|
||||
{ 0x48, 0, 0 }, { 0x68, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x38, 0, 0x3 },
|
||||
{ 0x48, 0, 0x3 }, { 0x58, 0, 0x3 }, { 0x68, 0, 0x3 }, { 0x29, 0, 0x3 }, { 0x54, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 },
|
||||
{ 0x30, 0, 0 }, { 0x68, 0, 0x3 }, { 0x30, 0, 0 }, { 0x45, 0, 0x2 }, { 0x40, 0, 0x4043 },
|
||||
{ 0x40, 0, 0x4043 }, { 0x30, 0, 0x4043 }, { 0x30, 0, 0x4043 }, { 0x30, 0, 0x4043 }, { 0x30, 0, 0x4043 },
|
||||
{ 0x30, 0, 0x4083 }, { 0x30, 0, 0x4083 }, { 0x30, 0, 0x4083 }, { 0x50, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x10, 0, 0 }, { 0x54, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x50, 0, 0x3 },
|
||||
{ 0x54, 0, 0x43 }, { 0x50, 0, 0x43 }, { 0x50, 0, 0x43 }, { 0x50, 0, 0x43 }, { 0x36, 0, 0x43 },
|
||||
{ 0x34, 0, 0x43 }, { 0x34, 0, 0x83 }, { 0x36, 0, 0x43 }, { 0x35, 0, 0x43 }, { 0x34, 0, 0x83 },
|
||||
{ 0x58, 0, 0x43 }, { 0x68, 0, 0x43 }, { 0x38, 0, 0x43 }, { 0x48, 0, 0x43 }, { 0x38, 0, 0x43 },
|
||||
{ 0x48, 0, 0x43 }, { 0x34, 0, 0x83 }, { 0x34, 0, 0x4043 }, { 0x34, 0, 0x4043 }, { 0x34, 0, 0x83 },
|
||||
{ 0x34, 0, 0x4043 }, { 0x50, 0, 0x43 }, { 0x34, 0, 0x43 }, { 0x50, 0, 0x43 }, { 0x36, 0, 0x43 },
|
||||
{ 0x36, 0, 0x43 }, { 0x34, 0, 0x43 }, { 0x37, 0, 0x3 }, { 0x54, 0, 0x43 }, { 0x40, 0, 0x3 },
|
||||
{ 0x40, 0, 0x3 }, { 0x57, 0, 0x3 }, { 0x34, 0, 0x2 }, { 0x40, 0, 0 }, { 0x32, 0, 0 },
|
||||
{ 0x50, 0, 0x83 }, { 0x50, 0, 0x83 }, { 0x50, 0, 0x83 }, { 0x50, 0, 0x83 }, { 0x50, 0, 0x83 },
|
||||
{ 0x58, 0, 0x83 }, { 0x58, 0, 0x83 }, { 0x68, 0, 0x3 }, { 0x68, 0, 0x3 }, { 0x48, 0, 0x3 },
|
||||
{ 0x48, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x28, 0, 0x4 }, { 0x34, 0, 0x2 },
|
||||
{ 0x30, 0, 0x4080 }, { 0x30, 0, 0x4080 }, { 0x30, 0, 0x4080 }, { 0x30, 0, 0x4080 }, { 0x30, 0, 0x1 },
|
||||
{ 0x30, 0, 0x84 }, { 0x50, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x50, 0, 0x3 },
|
||||
{ 0x58, 0, 0x3 }, { 0x58, 0, 0x3 }, { 0x68, 0, 0x3 }, { 0x50, 0, 0x3 }, { 0x50, 0, 0x3 },
|
||||
{ 0x30, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x30, 0, 0x1 }, { 0x34, 0, 0x80 },
|
||||
{ 0x34, 0, 0 }, { 0x34, 0, 0 }, { 0x34, 0, 0 }, { 0x34, 0, 0 }, { 0x34, 0, 0 },
|
||||
{ 0x34, 0, 0 }, { 0x34, 0, 0 }, { 0x34, 0, 0 }, { 0x34, 0, 0 }, { 0x54, 0, 0 },
|
||||
{ 0x34, 0, 0 }, { 0x34, 0, 0x2000 }, { 0x34, 0, 0x2000 }, { 0x34, 0, 0 }, { 0x30, 0, 0x5 },
|
||||
{ 0x30, 0, 0x1 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x34, 0, 0x4083 }, { 0x34, 0, 0x4083 },
|
||||
{ 0x30, 0, 0x4083 }, { 0x30, 0, 0x4083 }, { 0x34, 0, 0 }, { 0x30, 0, 0 }, { 0x34, 0, 0x1083 },
|
||||
{ 0x30, 0, 0x1005 }, { 0x30, 0, 0x4080 }, { 0x34, 0, 0 }, { 0x34, 0, 0 }, { 0x30, 0, 0x6 },
|
||||
{ 0x30, 0, 0x6 }, { 0x30, 0, 0x5 }, { 0x30, 0, 0x6 }, { 0x34, 0, 0 }, { 0x38, 0, 0 },
|
||||
{ 0x48, 0, 0 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x85 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x80 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x40, 0, 0x2 }, { 0x32, 0, 0x80 },
|
||||
{ 0x50, 0, 0x2 }, { 0x50, 0, 0x2 }, { 0x58, 0, 0x2 }, { 0x68, 0, 0x2 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x50, 0, 0x2 }, { 0x50, 0, 0x2 }, { 0x30, 0, 0x3 }, { 0x54, 0, 0x5 },
|
||||
{ 0x28, 0, 0x5 }, { 0x78, 0, 0x2000 }, { 0x78, 0, 0x2000 }, { 0x50, 0, 0x3 }, { 0x58, 0, 0x3 },
|
||||
{ 0x68, 0, 0x3 }, { 0x54, 0, 0x3 }, { 0x40, 0, 0x3 }, { 0x78, 0, 0x3 }, { 0x48, 0, 0 },
|
||||
{ 0x30, 0, 0x83 }, { 0x30, 0, 0x83 }, { 0x30, 0, 0x83 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0xC3 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 },
|
||||
{ 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x45 }, { 0x60, 0, 0x2 },
|
||||
{ 0x70, 0, 0x2000 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x80 },
|
||||
{ 0x30, 0, 0x80 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x80 },
|
||||
{ 0x30, 0, 0x80 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x7 }, { 0x30, 0, 0x44 },
|
||||
{ 0x30, 0, 0x44 }, { 0x30, 0, 0x83 }, { 0x48, 0, 0x3 }, { 0x58, 0, 0x3 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x3 }, { 0x36, 0, 0 }, { 0x40, 0, 0x2 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 },
|
||||
};
|
||||
|
||||
SfxParams sPlayerBankParams[] = {
|
||||
{ 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x440 },
|
||||
{ 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x440 },
|
||||
{ 0x20, 0, 0x480 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 },
|
||||
{ 0x20, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x40, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x40 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 },
|
||||
{ 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 },
|
||||
{ 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x80, 0, 0 },
|
||||
{ 0x80, 0, 0 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x1 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0xC00 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x20, 0, 0x80 }, { 0x20, 0, 0x80 },
|
||||
{ 0x20, 0, 0x80 }, { 0x20, 0, 0x80 }, { 0x20, 0, 0x40 }, { 0x20, 0, 0x40 }, { 0x20, 0, 0x40 },
|
||||
{ 0x20, 0, 0x40 }, { 0x20, 0, 0x80 }, { 0x20, 0, 0x80 }, { 0x20, 0, 0x80 }, { 0x20, 0, 0 },
|
||||
{ 0x20, 0, 0 }, { 0x20, 0, 0 }, { 0x20, 0, 0 }, { 0x20, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 },
|
||||
{ 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 },
|
||||
{ 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 }, { 0x40, 0, 0 },
|
||||
{ 0x40, 0, 0 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 },
|
||||
{ 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 },
|
||||
{ 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0x440 },
|
||||
{ 0x30, 0, 0x440 }, { 0x30, 0, 0x440 }, { 0x30, 0, 0xC00 }, { 0x30, 0, 0x4080 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x60, 0, 0x2 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x800 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x403 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x400 },
|
||||
{ 0x60, 0, 0x40 }, { 0x40, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x50, 0, 0x43 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x440 },
|
||||
{ 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x440 },
|
||||
{ 0x20, 0, 0x480 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 },
|
||||
{ 0x20, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 },
|
||||
{ 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x440 },
|
||||
{ 0x20, 0, 0x440 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x400 },
|
||||
{ 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x480 },
|
||||
{ 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x440 }, { 0x20, 0, 0x480 },
|
||||
{ 0x20, 0, 0x440 }, { 0x20, 0, 0x480 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x20, 0, 0x400 },
|
||||
{ 0x20, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 },
|
||||
{ 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x40, 0, 0x440 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x50, 0, 0x400 }, { 0x50, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x60, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x4080 }, { 0x40, 0, 0x403 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x2400 }, { 0x30, 0, 0x2400 },
|
||||
{ 0x30, 0, 0x2400 }, { 0x30, 0, 0x2400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x43 },
|
||||
{ 0x30, 0, 0x43 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x400 },
|
||||
};
|
||||
|
||||
SfxParams sItemBankParams[] = {
|
||||
{ 0x30, 0, 0x8040 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x40, 0, 0x440 },
|
||||
{ 0x30, 0, 0x440 }, { 0x60, 0, 0x83 }, { 0x30, 0, 0x440 }, { 0x80, 0, 0x43 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x40 }, { 0x38, 0, 0x400 }, { 0x30, 0, 0x401 }, { 0x50, 0, 0x100 }, { 0x90, 0, 0x2 },
|
||||
{ 0x50, 0, 0x2 }, { 0x30, 0, 0x400 }, { 0x40, 0, 0x2 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x34, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x80 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x400 }, { 0x20, 0, 0x400 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x400 },
|
||||
{ 0x30, 0, 0x400 }, { 0x60, 0, 0x43 }, { 0x30, 0, 0x1 }, { 0x30, 0, 0x401 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0xA0, 0, 0x2 }, { 0xA0, 0, 0x2 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0x100 },
|
||||
{ 0x60, 0, 0 }, { 0x60, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0x400 }, { 0x30, 0, 0 },
|
||||
{ 0x60, 0, 0x81 }, { 0x30, 0, 0 }, { 0x30, 0, 0x400 }, { 0x60, 0, 0x8003 }, { 0x60, 0, 0x8003 },
|
||||
{ 0x60, 0, 0x8003 }, { 0x30, 0, 0x4000 }, { 0x30, 0, 0x4000 }, { 0x30, 0, 0x40 }, { 0x80, 0, 0x3 },
|
||||
{ 0x80, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x80, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x80, 0, 0 }, { 0x80, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x40, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x60, 0, 0x100 }, { 0x70, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0x483 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0x2000 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
};
|
||||
|
||||
SfxParams sEnvBankParams[] = {
|
||||
{ 0x70, 0, 0x640 }, { 0x80, 0, 0x40 }, { 0x30, 0, 0 }, { 0x60, 0, 0x40 }, { 0x60, 0, 0x40 },
|
||||
{ 0x70, 0, 0x40 }, { 0x30, 0, 0x480 }, { 0x70, 0, 0x2 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 },
|
||||
{ 0x80, 0, 0x2 }, { 0xA0, 0, 0x3 }, { 0x30, 0, 0x103 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x40 }, { 0x50, 0, 0 },
|
||||
{ 0x60, 0, 0x2 }, { 0x30, 0, 0x3 }, { 0x60, 0, 0 }, { 0x30, 0, 0x82 }, { 0x30, 0, 0 },
|
||||
{ 0x40, 0, 0 }, { 0x68, 0, 0 }, { 0x58, 0, 0x40 }, { 0x60, 0, 0 }, { 0x70, 0, 0x3 },
|
||||
{ 0x30, 0, 0x43 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0xA0, 0, 0x2008 }, { 0x20, 0, 0x2 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x800 }, { 0x30, 0, 0x8800 }, { 0x30, 0, 0x8000 }, { 0x30, 0, 0x2 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0 }, { 0x60, 0, 0x400 },
|
||||
{ 0x30, 0, 0 }, { 0x80, 0, 0 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x40 }, { 0x10, 0, 0 },
|
||||
{ 0xA0, 0, 0x3 }, { 0x30, 0, 0x100 }, { 0x30, 0, 0x10 }, { 0x30, 0, 0x3 }, { 0x60, 0x40, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0 }, { 0xA0, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x70, 0, 0 }, { 0x60, 0, 0x8000 },
|
||||
{ 0x30, 0, 0x8000 }, { 0x60, 0, 0 }, { 0x60, 0, 0 }, { 0x60, 0, 0 }, { 0x60, 0, 0 },
|
||||
{ 0x30, 0, 0x2003 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2010 }, { 0x30, 0, 0x40 },
|
||||
{ 0x60, 0, 0 }, { 0x60, 0, 0x3 }, { 0x30, 0, 0 }, { 0x58, 0, 0x1 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x40, 0, 0 }, { 0x30, 0, 0xC3 }, { 0x70, 0, 0x2 }, { 0x60, 0, 0x2 },
|
||||
{ 0x30, 0, 0 }, { 0x60, 0, 0x41 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0 }, { 0x90, 0, 0x3 },
|
||||
{ 0x90, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x3800 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x803 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x80 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0x60, 0, 0 },
|
||||
{ 0x30, 0, 0x640 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x2 }, { 0x80, 0, 0x2 }, { 0x40, 0, 0 },
|
||||
{ 0x1C, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0x4 }, { 0x30, 0, 0x800 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0 }, { 0x60, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x80, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x80 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x800 }, { 0x30, 0, 0x800 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x20, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x8000 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x70, 0, 0x2 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x50, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2003 }, { 0x20, 0, 0 },
|
||||
{ 0x30, 0, 0xC0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x6 }, { 0xA0, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0xC0 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x2 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0x4083 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0x83 },
|
||||
{ 0x80, 0, 0x2000 }, { 0x50, 0, 0 }, { 0x60, 0, 0 }, { 0x90, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0xA0, 0, 0x800 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x20, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x2 }, { 0x30, 0, 0x5 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x40, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x5 }, { 0x30, 0, 0xC2 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x68, 0, 0x2 },
|
||||
{ 0x30, 0, 0x2 }, { 0x30, 0, 0x4040 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 },
|
||||
{ 0x30, 0, 0x2 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0xC0 }, { 0x80, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0xA0, 0, 0xA003 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x85 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x60, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0x40 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x2000 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0x40 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0x80 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0xC0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x80, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x43 },
|
||||
{ 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x3 }, { 0xA0, 0, 0x4000 }, { 0x30, 0, 0x43 }, { 0x30, 0, 0x40 }, { 0x60, 0, 0x2 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2080 }, { 0x30, 0, 0x2080 }, { 0x30, 0, 0x2000 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0 },
|
||||
{ 0x30, 0, 0x2 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2 }, { 0x30, 0, 0x80 }, { 0x60, 0, 0x42 },
|
||||
{ 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x80, 0, 0 },
|
||||
{ 0x80, 0, 0x3 }, { 0x80, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x80, 0, 0x2 }, { 0x80, 0, 0x2 },
|
||||
{ 0x30, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x42 }, { 0x30, 0, 0x42 },
|
||||
{ 0x30, 0, 0x43 }, { 0x60, 0x80, 0x2000 }, { 0x60, 0x80, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0x2000 }, { 0x80, 0, 0x2000 }, { 0x80, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2000 },
|
||||
{ 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x80, 0, 0x3 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0x43 },
|
||||
{ 0x30, 0, 0x3 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x10, 0, 0x7 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 },
|
||||
{ 0x58, 0, 0x60 }, { 0x60, 0, 0x3 }, { 0x60, 0, 0x3 }, { 0x60, 0, 0x3 }, { 0x70, 0, 0x3 },
|
||||
{ 0x70, 0, 0x3 }, { 0x30, 0, 0 }, { 0x70, 0, 0x3 }, { 0x30, 0, 0x4 }, { 0x30, 0, 0x3 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0x80, 0 }, { 0x30, 0x80, 0x40 }, { 0x30, 0x80, 0x40 }, { 0x60, 0, 0x2000 }, { 0x70, 0, 0x2000 },
|
||||
{ 0x30, 0, 0x80 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x3 }, { 0x30, 0, 0 }, { 0x60, 0, 0x3 },
|
||||
{ 0x70, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x40, 0, 0 }, { 0x58, 0, 0x40 }, { 0x58, 0, 0x40 },
|
||||
{ 0x30, 0, 0x40 }, { 0x30, 0, 0x41 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
};
|
||||
|
||||
SfxParams sSystemBankParams[] = {
|
||||
{ 0xC0, 0, 0 }, { 0xC0, 0, 0 }, { 0xB0, 0, 0x20 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x50, 0, 0 }, { 0x30, 0, 0x20 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x20, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x28, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x18, 0, 0 }, { 0x2C, 0, 0 }, { 0x2C, 0, 0 }, { 0x20, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x20, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x60, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0x20 }, { 0x60, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0xA0, 0, 0x8 }, { 0xA0, 0, 0x8 }, { 0x30, 0, 0 },
|
||||
};
|
||||
|
||||
SfxParams sOcarinaBankParams[] = {
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0x20 }, { 0x30, 0, 0x642 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x2000 }, { 0x30, 0, 0x2000 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
};
|
||||
|
||||
SfxParams sVoiceBankParams[] = {
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x20, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x50, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x482 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x80, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x20, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x50, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x481 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0 }, { 0x60, 0, 0x20 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0 },
|
||||
{ 0x30, 0, 0 }, { 0x30, 0, 0 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8000 }, { 0x30, 0, 0x8000 },
|
||||
{ 0x30, 0, 0x8000 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8001 }, { 0x30, 0, 0x8043 }, { 0x30, 0, 0x8043 }, { 0x30, 0, 0x8043 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 },
|
||||
{ 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x8041 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x20, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x50, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x481 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x20, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x50, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x482 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x80, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x20, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x50, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x482 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x80, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x20, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x50, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x482 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x30, 0, 0x442 }, { 0x80, 0, 0x442 }, { 0x30, 0, 0x442 },
|
||||
{ 0x30, 0x80, 0x442 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
{ 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 }, { 0x30, 0, 0x402 },
|
||||
};
|
||||
|
||||
SfxParams* gSfxParams[7] = {
|
||||
sPlayerBankParams, sItemBankParams, sEnvBankParams, sEnemyBankParams,
|
||||
sSystemBankParams, sOcarinaBankParams, sVoiceBankParams,
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194710.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194750.s")
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194790/func_80194790.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194790/func_80194804.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194790/func_80194840.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194790/func_801948B0.s")
|
||||
@@ -296,7 +296,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A2D54.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A2DE0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_IsSequencePlaying.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A2E54.s")
|
||||
|
||||
@@ -411,19 +411,3 @@
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4DF4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4E64.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4EB0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4EB8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4FD8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A5080.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A50C0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A5100.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A510C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A5118.s")
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A4EB0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A4EB8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A4FD8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A5080.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A50C0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A5100.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A510C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A4EB0/func_801A5118.s")
|
||||
@@ -29,19 +29,3 @@
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A99B8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9A74.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9B10.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9B78.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9BFC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9C68.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9D10.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9DCC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9EA4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A9F4C.s")
|
||||
@@ -1,3 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_800CB000/func_800CB000.s")
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
|
||||
// Blocks the current thread until all currently queued scheduler tasks have been completed
|
||||
void func_8010C1B0(void) {
|
||||
void MsgEvent_SendNullTask(void) {
|
||||
OSScTask task;
|
||||
OSMesgQueue queue;
|
||||
OSMesg msg;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194710.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194750.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194790.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194804.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_80194840.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_80194710/func_801948B0.s")
|
||||
@@ -1,11 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801AA020/D_801E1100.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801AA020/func_801AA020.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801AA020/func_801AA248.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801AA020/func_801AA3E4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/code_801AA020/func_801AA520.s")
|
||||
@@ -0,0 +1,193 @@
|
||||
#include "z64jpeg.h"
|
||||
#include "libc/stdbool.h"
|
||||
#include "macros.h"
|
||||
|
||||
u8* sJpegBitStreamPtr;
|
||||
u32 sJpegBitStreamByteIdx;
|
||||
u8 sJpegBitStreamBitIdx;
|
||||
u8 sJpegBitStreamDontSkip;
|
||||
u32 sJpegBitStreamCurWord;
|
||||
|
||||
s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, JpegDecoderState* state) {
|
||||
s16 pad;
|
||||
s16 unk0;
|
||||
s16 unk1;
|
||||
s16 unk2;
|
||||
u32 idx;
|
||||
s32 inc;
|
||||
u16 unkCount;
|
||||
|
||||
JpegHuffmanTable* hTable0;
|
||||
JpegHuffmanTable* hTable1;
|
||||
JpegHuffmanTable* hTable2;
|
||||
JpegHuffmanTable* hTable3;
|
||||
|
||||
inc = 0;
|
||||
sJpegBitStreamPtr = decoder->imageData;
|
||||
if (decoder->mode == 0) {
|
||||
unkCount = 2;
|
||||
} else {
|
||||
unkCount = 4;
|
||||
if (decoder->unk_05 == 1) {
|
||||
inc = 8 * 8 * 2;
|
||||
}
|
||||
}
|
||||
|
||||
hTable0 = decoder->hTablePtrs[0];
|
||||
hTable1 = decoder->hTablePtrs[1];
|
||||
hTable2 = decoder->hTablePtrs[2];
|
||||
hTable3 = decoder->hTablePtrs[3];
|
||||
|
||||
if (!isFollowing) {
|
||||
sJpegBitStreamByteIdx = 0;
|
||||
sJpegBitStreamBitIdx = 32;
|
||||
sJpegBitStreamCurWord = 0;
|
||||
sJpegBitStreamDontSkip = 0;
|
||||
unk0 = 0;
|
||||
unk1 = 0;
|
||||
unk2 = 0;
|
||||
} else {
|
||||
sJpegBitStreamByteIdx = state->byteIdx;
|
||||
sJpegBitStreamBitIdx = state->bitIdx;
|
||||
sJpegBitStreamCurWord = state->curWord;
|
||||
sJpegBitStreamDontSkip = state->dontSkip;
|
||||
unk0 = state->unk_0C;
|
||||
unk1 = state->unk_0E;
|
||||
unk2 = state->unk_10;
|
||||
}
|
||||
|
||||
while (count != 0) {
|
||||
for (idx = 0; idx < unkCount; idx++) {
|
||||
if (JpegDecoder_ProcessMcu(hTable0, hTable1, mcuBuff, &unk0)) {
|
||||
return 2;
|
||||
}
|
||||
mcuBuff += 8 * 8;
|
||||
}
|
||||
|
||||
if (JpegDecoder_ProcessMcu(hTable2, hTable3, mcuBuff, &unk1)) {
|
||||
return 2;
|
||||
}
|
||||
mcuBuff += 8 * 8;
|
||||
|
||||
if (JpegDecoder_ProcessMcu(hTable2, hTable3, mcuBuff, &unk2)) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
count--;
|
||||
mcuBuff += 8 * 8;
|
||||
mcuBuff += inc;
|
||||
}
|
||||
|
||||
state->byteIdx = sJpegBitStreamByteIdx;
|
||||
state->bitIdx = sJpegBitStreamBitIdx;
|
||||
state->curWord = sJpegBitStreamCurWord;
|
||||
state->dontSkip = sJpegBitStreamDontSkip;
|
||||
state->unk_0C = unk0;
|
||||
state->unk_0E = unk1;
|
||||
state->unk_10 = unk2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk) {
|
||||
s8 i = 0;
|
||||
s8 zeroCount;
|
||||
s16 coeff;
|
||||
|
||||
if (JpegDecoder_ParseNextSymbol(hTable0, &coeff, &zeroCount)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
*unk += coeff;
|
||||
mcu[i++] = *unk;
|
||||
while (i < 8 * 8) {
|
||||
if (JpegDecoder_ParseNextSymbol(hTable1, &coeff, &zeroCount)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (coeff == 0) {
|
||||
if (zeroCount == 0xF) {
|
||||
while (zeroCount-- >= 0) {
|
||||
mcu[i++] = 0;
|
||||
}
|
||||
} else {
|
||||
while (i < 8 * 8) {
|
||||
mcu[i++] = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
while (0 < zeroCount--) {
|
||||
mcu[i++] = 0;
|
||||
}
|
||||
mcu[i++] = coeff;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount) {
|
||||
u8 codeIdx;
|
||||
u8 sym;
|
||||
u16 codeOff = 0;
|
||||
u16 buff = JpegDecoder_ReadBits(16);
|
||||
|
||||
for (codeIdx = 0; codeIdx < ARRAY_COUNT(hTable->codesB); codeIdx++) {
|
||||
if (hTable->codesB[codeIdx] == 0xFFFF) {
|
||||
continue;
|
||||
}
|
||||
|
||||
codeOff = buff >> (15 - codeIdx);
|
||||
if (codeOff <= hTable->codesB[codeIdx]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (codeIdx >= ARRAY_COUNT(hTable->codesB)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
sym = hTable->symbols[hTable->codeOffs[codeIdx] + codeOff - hTable->codesA[codeIdx]];
|
||||
*outZeroCount = sym >> 4;
|
||||
sym &= 0xF;
|
||||
|
||||
sJpegBitStreamBitIdx += codeIdx - 15;
|
||||
*outCoeff = 0;
|
||||
if (sym) {
|
||||
*outCoeff = JpegDecoder_ReadBits(sym);
|
||||
if (*outCoeff < (1 << (sym - 1))) {
|
||||
*outCoeff += (-1 << sym) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
u16 JpegDecoder_ReadBits(u8 len) {
|
||||
u8 byteCount;
|
||||
u8 data;
|
||||
s32 ret;
|
||||
u32 temp;
|
||||
ret = 0; // this is required for some reason
|
||||
|
||||
for (byteCount = sJpegBitStreamBitIdx >> 3; byteCount > 0; byteCount--) {
|
||||
data = sJpegBitStreamPtr[sJpegBitStreamByteIdx++];
|
||||
if (sJpegBitStreamDontSkip) {
|
||||
if (data == 0) {
|
||||
data = sJpegBitStreamPtr[sJpegBitStreamByteIdx++];
|
||||
}
|
||||
}
|
||||
|
||||
sJpegBitStreamDontSkip = (data == 0xFF) ? true : false;
|
||||
|
||||
sJpegBitStreamCurWord <<= 8;
|
||||
sJpegBitStreamCurWord |= data;
|
||||
sJpegBitStreamBitIdx -= 8;
|
||||
}
|
||||
|
||||
ret = (sJpegBitStreamCurWord << (sJpegBitStreamBitIdx));
|
||||
temp = ret;
|
||||
ret = temp >> -len;
|
||||
sJpegBitStreamBitIdx += len;
|
||||
return ret;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
#include "z64jpeg.h"
|
||||
#include "libc/stdbool.h"
|
||||
#include "macros.h"
|
||||
|
||||
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count) {
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
u8 j;
|
||||
|
||||
dqt++;
|
||||
for (j = 0; j < ARRAY_COUNT(qt[i].table); j++) {
|
||||
qt[i].table[j] = *dqt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 JpegUtils_ParseHuffmanCodesLengths(u8* ptr, u8* codesLengths) {
|
||||
u8 off = 1;
|
||||
s16 count = 0;
|
||||
s16 idx = 1;
|
||||
|
||||
while (off <= 16) {
|
||||
while (idx <= ptr[off - 1]) {
|
||||
codesLengths[count++] = off;
|
||||
idx++;
|
||||
}
|
||||
idx = 1;
|
||||
off++;
|
||||
}
|
||||
|
||||
codesLengths[count] = 0;
|
||||
return count;
|
||||
}
|
||||
|
||||
s32 JpegUtils_GetHuffmanCodes(u8* codesLengths, u16* codes) {
|
||||
s16 idx = 0;
|
||||
u16 code = 0;
|
||||
u8 lastLen = codesLengths[0];
|
||||
|
||||
while (true) {
|
||||
while (true) {
|
||||
codes[idx++] = code++;
|
||||
|
||||
if (codesLengths[idx] != lastLen) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (codesLengths[idx] == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (code <<= 1, codesLengths[idx] == ++lastLen) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
s32 JpegUtils_SetHuffmanTable(u8* data, JpegHuffmanTable* ht, u16* codes) {
|
||||
u8 idx;
|
||||
u16 codeOff = 0;
|
||||
|
||||
for (idx = 0; idx < 16; idx++) {
|
||||
if (data[idx]) {
|
||||
ht->codeOffs[idx] = codeOff;
|
||||
ht->codesA[idx] = codes[codeOff];
|
||||
codeOff += data[idx] - 1;
|
||||
ht->codesB[idx] = codes[codeOff];
|
||||
codeOff++;
|
||||
} else {
|
||||
ht->codesB[idx] = 0xFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
return codeOff;
|
||||
}
|
||||
|
||||
u32 JpegUtils_ProcessHuffmanTableImpl(u8* data, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 isAc) {
|
||||
s16 ret;
|
||||
s32 count = JpegUtils_ParseHuffmanCodesLengths(data, codesLengths);
|
||||
s32 temp;
|
||||
|
||||
ret = count;
|
||||
if (count == 0 || (isAc && count > 0x100) || (!isAc && count > 0x10)) {
|
||||
return 0;
|
||||
}
|
||||
if (ret != JpegUtils_GetHuffmanCodes(codesLengths, codes)) {
|
||||
return 0;
|
||||
}
|
||||
if (temp = JpegUtils_SetHuffmanTable(data, ht, codes), temp != ret) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count) {
|
||||
u8 idx;
|
||||
u32 codeCount;
|
||||
|
||||
for (idx = 0; idx < count; idx++) {
|
||||
u32 ac = (*dht++ >> 4);
|
||||
|
||||
codeCount = JpegUtils_ProcessHuffmanTableImpl(dht, &ht[idx], codesLengths, codes, ac);
|
||||
if (codeCount == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
dht += 16;
|
||||
ht[idx].symbols = dht;
|
||||
dht += codeCount;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void JpegUtils_SetHuffmanTableOld(u8* data, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes, s16 count, u8 isAc) {
|
||||
s16 idx;
|
||||
u8 a;
|
||||
|
||||
for (idx = 0; idx < count; idx++) {
|
||||
a = data[idx];
|
||||
if (isAc) {
|
||||
ht->acCodes[a] = codes[idx];
|
||||
ht->codeOffs[a] = codesLengths[idx];
|
||||
} else {
|
||||
ht->dcCodes[a] = codes[idx];
|
||||
ht->codeOffs[a] = codesLengths[idx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes) {
|
||||
u8 isAc = *dht++ >> 4;
|
||||
s16 count2;
|
||||
s32 count;
|
||||
|
||||
count2 = count = JpegUtils_ParseHuffmanCodesLengths(dht, codesLengths);
|
||||
|
||||
if (count == 0 || (isAc && count > 0x100) || (!isAc && count > 0x10)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (JpegUtils_GetHuffmanCodes(codesLengths, codes) != count2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
JpegUtils_SetHuffmanTableOld(dht + 0x10, ht, codesLengths, codes, count2, isAc);
|
||||
|
||||
return false;
|
||||
}
|
||||
+3
-3
@@ -225,7 +225,7 @@ s32 Sched_TaskCheckFramebuffers(SchedContext* sched, OSScTask* task) {
|
||||
void* nextFB = osViGetNextFramebuffer();
|
||||
void* curFB = osViGetCurrentFramebuffer();
|
||||
|
||||
if (task == NULL || sched->pendingSwapBuf1 != NULL || (curFB == task->framebuffer->fb1 && curFB != nextFB)) {
|
||||
if (task == NULL || sched->pendingSwapBuf1 != NULL || (curFB == TASK_FRAMEBUFFER(task)->fb1 && curFB != nextFB)) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -257,7 +257,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
|
||||
}
|
||||
}
|
||||
} else if (ret == (OS_SC_SP | OS_SC_DP)) {
|
||||
if (gfxTask->framebuffer == NULL || Sched_TaskCheckFramebuffers(sched, gfxTask)) {
|
||||
if (TASK_FRAMEBUFFER(gfxTask) == NULL || Sched_TaskCheckFramebuffers(sched, gfxTask)) {
|
||||
*spTask = *dpTask = gfxTask;
|
||||
ret &= ~(OS_SC_SP | OS_SC_DP);
|
||||
sched->gfxListHead = sched->gfxListHead->next;
|
||||
@@ -271,7 +271,7 @@ s32 Sched_Schedule(SchedContext* sched, OSScTask** spTask, OSScTask** dpTask, s3
|
||||
}
|
||||
|
||||
void Sched_TaskUpdateFramebuffer(SchedContext* sched, OSScTask* task) {
|
||||
sched->pendingSwapBuf1 = task->framebuffer;
|
||||
sched->pendingSwapBuf1 = TASK_FRAMEBUFFER(task);
|
||||
|
||||
if (sched->curBuf != NULL && sched->curBuf->updateRate2 > 0) {
|
||||
return;
|
||||
|
||||
@@ -1,17 +1,116 @@
|
||||
/**
|
||||
* File: sys_initial_check.c
|
||||
* Description: Functions for checking for the presence of the Expansion Pak and the correct TV type (PAL/NTSC/MPAL),
|
||||
* and functions for printing error messages directly to screen if not found or incorrect.
|
||||
*
|
||||
* These checks are some of the first functions run in Main, before even setting up the system heap, and any image files
|
||||
* are DMA'd directly to fixed RAM addresses.
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "misc/locerrmsg/locerrmsg.h"
|
||||
#include "misc/memerrmsg/memerrmsg.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_WriteRGBA16Pixel.s")
|
||||
#define SIZEOF_LOCERRMSG (sizeof(gNotDesignedForSystemErrorTex))
|
||||
#define SIZEOF_MEMERRMSG (sizeof(gExpansionPakNotInstalledErrorTex) + sizeof(gSeeInstructionBookletErrorTex))
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_WriteI4Pixel.s")
|
||||
// Address with enough room after to load either of the error message image files before the fault screen buffer at the
|
||||
// end of RDRAM
|
||||
#define CHECK_ERRMSG_STATIC_SEGMENT (u8*)(FAULT_FB_ADDRESS - MAX(SIZEOF_LOCERRMSG, SIZEOF_MEMERRMSG))
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_DrawI4Texture.s")
|
||||
void Check_WriteRGBA16Pixel(u16* buffer, u32 x, u32 y, u32 value) {
|
||||
if (value & RGBA16_PIXEL_OPAQUE) {
|
||||
(&buffer[x])[y * SCREEN_WIDTH] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_ClearRGBA16.s")
|
||||
void Check_WriteI4Pixel(u16* buffer, u32 x, u32 y, u32 value) {
|
||||
Check_WriteRGBA16Pixel(buffer, x, y, value * GPACK_RGBA5551(16, 16, 16, 0) + GPACK_RGBA5551(12, 12, 12, 1));
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_DrawExpansionPakErrorMessage.s")
|
||||
/**
|
||||
* x and y are the coordinates of the bottom-left corner.
|
||||
*/
|
||||
void Check_DrawI4Texture(u16* buffer, s32 x, s32 y, s32 width, s32 height, u8* texture) {
|
||||
s32 v;
|
||||
s32 u;
|
||||
u8 pixelPair;
|
||||
u8* pixelPairPtr = texture;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_DrawRegionLockErrorMessage.s")
|
||||
// I4 textures are bitpacked 2 pixels per byte, so this writes a pair of pixels in each iteration using bitmasking.
|
||||
for (v = 0; v < height; v++) {
|
||||
for (u = 0; u < width; u += 2, pixelPairPtr++) {
|
||||
pixelPair = *pixelPairPtr;
|
||||
Check_WriteI4Pixel(buffer, x + u, y + v, pixelPair >> 4);
|
||||
pixelPair = *pixelPairPtr;
|
||||
Check_WriteI4Pixel(buffer, x + u + 1, y + v, pixelPair & 0xF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_ExpansionPak.s")
|
||||
void Check_ClearRGBA16(u16* buffer) {
|
||||
u32 x;
|
||||
u32 y;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_initial_check/Check_RegionIsSupported.s")
|
||||
for (y = 0; y < SCREEN_HEIGHT; y++) {
|
||||
for (x = 0; x < SCREEN_WIDTH; x++) {
|
||||
Check_WriteRGBA16Pixel(buffer, x, y, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw error message textures directly to a screen buffer at the end of normal RDRAM
|
||||
*/
|
||||
void Check_DrawExpansionPakErrorMessage(void) {
|
||||
DmaMgr_SendRequest0(CHECK_ERRMSG_STATIC_SEGMENT, SEGMENT_ROM_START(memerrmsg), SEGMENT_SIZE(memerrmsg));
|
||||
Check_ClearRGBA16((u16*)FAULT_FB_ADDRESS);
|
||||
Check_DrawI4Texture((u16*)FAULT_FB_ADDRESS, 96, 71, 128, 37, CHECK_ERRMSG_STATIC_SEGMENT);
|
||||
Check_DrawI4Texture((u16*)FAULT_FB_ADDRESS, 96, 127, 128, 37,
|
||||
CHECK_ERRMSG_STATIC_SEGMENT + sizeof(gExpansionPakNotInstalledErrorTex));
|
||||
osWritebackDCacheAll();
|
||||
osViSwapBuffer((u16*)FAULT_FB_ADDRESS);
|
||||
osViBlack(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw error message texture directly to a screen buffer at the end of normal RDRAM
|
||||
*/
|
||||
void Check_DrawRegionLockErrorMessage(void) {
|
||||
DmaMgr_SendRequest0(CHECK_ERRMSG_STATIC_SEGMENT, SEGMENT_ROM_START(locerrmsg), SEGMENT_SIZE(locerrmsg));
|
||||
Check_ClearRGBA16((u16*)FAULT_FB_ADDRESS);
|
||||
Check_DrawI4Texture((u16*)FAULT_FB_ADDRESS, 56, 112, 208, 16, CHECK_ERRMSG_STATIC_SEGMENT);
|
||||
osWritebackDCacheAll();
|
||||
osViSwapBuffer((u16*)FAULT_FB_ADDRESS);
|
||||
osViBlack(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* If Expansion pak is not installed, display error message until console is turned off
|
||||
*/
|
||||
void Check_ExpansionPak(void) {
|
||||
// Expansion pak installed
|
||||
if (osMemSize >= 0x800000) {
|
||||
return;
|
||||
}
|
||||
|
||||
Check_DrawExpansionPakErrorMessage();
|
||||
osDestroyThread(NULL);
|
||||
while (true) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* If region is not NTSC or MPAL, display error message until console is turned off
|
||||
*/
|
||||
void Check_RegionIsSupported(void) {
|
||||
s32 regionSupported = false;
|
||||
|
||||
if ((osTvType == OS_TV_NTSC) || (osTvType == OS_TV_MPAL)) {
|
||||
regionSupported = true;
|
||||
}
|
||||
|
||||
if (!regionSupported) {
|
||||
Check_DrawRegionLockErrorMessage();
|
||||
osDestroyThread(NULL);
|
||||
while (true) {}
|
||||
}
|
||||
}
|
||||
|
||||
+25
-25
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_Normalize.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_80179678.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PlaneVsLineSegClosestPoint.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_80179798.s")
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_Vec3fMagnitude.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_DistanceSquared.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_Vec3fDistSq.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_Distance.s")
|
||||
|
||||
@@ -60,15 +60,15 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_CrossProduct.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_NormalVector.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_SurfaceNorm.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017A954.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeFaces.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017AA0C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeEdges.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017ABBC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeVertices.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017AD38.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_LineVsCube.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017B68C.s")
|
||||
|
||||
@@ -80,51 +80,51 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017B9D8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_NormalizedDistanceFromPlane.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_UDistPlaneToPos.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_NormalizedSignedDistanceFromPlane.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_DistPlaneToPos.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017BAD0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYDist.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017BD98.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017BDE0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017BE30.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectDist.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017BEE0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectInsideTri.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017BF8C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C008.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaYIntersect.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C17C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C1F0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C494.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectInsideTri2.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C540.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXDist.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C808.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C850.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXIntersect.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C904.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017C980.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaXIntersect.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017CB08.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017CB7C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZDist.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017CEA8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017CEF0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZIntersect.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017CFA4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D020.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZIntersect.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017D1AC.s")
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017DA24.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_ColSphereLineSeg.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_LineVsSph.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017DD34.s")
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017F1A0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphere.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_SphVsSph.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphereIntersect.s")
|
||||
|
||||
@@ -178,11 +178,11 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3d_ColTriTri.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017F9C0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_XZInSphere.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017FA34.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_XYInSphere.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017FAA8.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_YZInSphere.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017FB1C.s")
|
||||
|
||||
|
||||
+2
-2
@@ -509,8 +509,8 @@ f32 Actor_YDistance(Actor* actor1, Actor* actor2) {
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800B72E0.s")
|
||||
|
||||
void func_800B72F8(DynaPolyActor* dpactor, f32 a1, s16 a2) {
|
||||
dpactor->unk150 = a2;
|
||||
dpactor->unk148 += a1;
|
||||
dpactor->yRotation = a2;
|
||||
dpactor->pushForce += a1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/Actor_IsLinkFacingActor.s")
|
||||
|
||||
+29
-29
@@ -1,33 +1,33 @@
|
||||
#include "global.h"
|
||||
|
||||
void BgCheck2_UpdateActorPosition(CollisionContext* colCtx, s32 index, Actor* actor) {
|
||||
void BgCheck2_UpdateActorPosition(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
||||
MtxF prevMatrix;
|
||||
MtxF prevMatrixInv;
|
||||
MtxF currMatrix;
|
||||
Vec3f newPos;
|
||||
Vec3f posWithInv;
|
||||
|
||||
if (BgCheck_IsActorMeshIndexValid(index) == 0) {
|
||||
if (!DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SkinMatrix_SetScaleRotateYRPTranslate(
|
||||
&prevMatrix, colCtx->dyna.bgActors[index].prevTransform.scale.x,
|
||||
colCtx->dyna.bgActors[index].prevTransform.scale.y, colCtx->dyna.bgActors[index].prevTransform.scale.z,
|
||||
colCtx->dyna.bgActors[index].prevTransform.rot.x, colCtx->dyna.bgActors[index].prevTransform.rot.y,
|
||||
colCtx->dyna.bgActors[index].prevTransform.rot.z, colCtx->dyna.bgActors[index].prevTransform.pos.x,
|
||||
colCtx->dyna.bgActors[index].prevTransform.pos.y, colCtx->dyna.bgActors[index].prevTransform.pos.z);
|
||||
&prevMatrix, colCtx->dyna.bgActors[bgId].prevTransform.scale.x,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.scale.y, colCtx->dyna.bgActors[bgId].prevTransform.scale.z,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.rot.x, colCtx->dyna.bgActors[bgId].prevTransform.rot.y,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.rot.z, colCtx->dyna.bgActors[bgId].prevTransform.pos.x,
|
||||
colCtx->dyna.bgActors[bgId].prevTransform.pos.y, colCtx->dyna.bgActors[bgId].prevTransform.pos.z);
|
||||
|
||||
if (SkinMatrix_Invert(&prevMatrix, &prevMatrixInv) == 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
SkinMatrix_SetScaleRotateYRPTranslate(
|
||||
&currMatrix, colCtx->dyna.bgActors[index].curTransform.scale.x,
|
||||
colCtx->dyna.bgActors[index].curTransform.scale.y, colCtx->dyna.bgActors[index].curTransform.scale.z,
|
||||
colCtx->dyna.bgActors[index].curTransform.rot.x, colCtx->dyna.bgActors[index].curTransform.rot.y,
|
||||
colCtx->dyna.bgActors[index].curTransform.rot.z, colCtx->dyna.bgActors[index].curTransform.pos.x,
|
||||
colCtx->dyna.bgActors[index].curTransform.pos.y, colCtx->dyna.bgActors[index].curTransform.pos.z);
|
||||
&currMatrix, colCtx->dyna.bgActors[bgId].curTransform.scale.x, colCtx->dyna.bgActors[bgId].curTransform.scale.y,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.scale.z, colCtx->dyna.bgActors[bgId].curTransform.rot.x,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.rot.y, colCtx->dyna.bgActors[bgId].curTransform.rot.z,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.pos.x, colCtx->dyna.bgActors[bgId].curTransform.pos.y,
|
||||
colCtx->dyna.bgActors[bgId].curTransform.pos.z);
|
||||
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&prevMatrixInv, &actor->world.pos, &posWithInv);
|
||||
SkinMatrix_Vec3fMtxFMultXYZ(&currMatrix, &posWithInv, &newPos);
|
||||
@@ -35,14 +35,14 @@ void BgCheck2_UpdateActorPosition(CollisionContext* colCtx, s32 index, Actor* ac
|
||||
actor->world.pos = newPos;
|
||||
}
|
||||
|
||||
void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 index, Actor* actor) {
|
||||
void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
||||
s16 angleChange;
|
||||
|
||||
if (BgCheck_IsActorMeshIndexValid(index) == 0) {
|
||||
if (!DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
angleChange = colCtx->dyna.bgActors[index].curTransform.rot.y - colCtx->dyna.bgActors[index].prevTransform.rot.y;
|
||||
angleChange = colCtx->dyna.bgActors[bgId].curTransform.rot.y - colCtx->dyna.bgActors[bgId].prevTransform.rot.y;
|
||||
|
||||
if (actor->id == 0) {
|
||||
((Player*)actor)->currentYaw += angleChange;
|
||||
@@ -52,51 +52,51 @@ void BgCheck2_UpdateActorYRotation(CollisionContext* colCtx, s32 index, Actor* a
|
||||
actor->world.rot.y += angleChange;
|
||||
}
|
||||
|
||||
void BgCheck2_AttachToMesh(CollisionContext* colCtx, Actor* actor, s32 index) {
|
||||
void BgCheck2_AttachToMesh(CollisionContext* colCtx, Actor* actor, s32 bgId) {
|
||||
DynaPolyActor* meshActor;
|
||||
|
||||
if (BgCheck_IsActorMeshIndexValid(index) == 0) {
|
||||
if (!DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
meshActor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
meshActor = DynaPoly_GetActor(colCtx, bgId);
|
||||
if (meshActor != NULL) {
|
||||
func_800CAE88(meshActor);
|
||||
DynaPolyActor_SetRidingFallingState(meshActor);
|
||||
|
||||
if ((actor->flags & 0x4000000) == 0x4000000) {
|
||||
func_800CAF24(meshActor);
|
||||
DynaPolyActor_SetSwitchPressedState(meshActor);
|
||||
}
|
||||
if ((actor->flags & 0x20000) == 0x20000) {
|
||||
func_800CAF38(meshActor);
|
||||
DynaPolyActor_SetHeavySwitchPressedState(meshActor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 index, Actor* actor) {
|
||||
u32 BgCheck2_UpdateActorAttachedToMesh(CollisionContext* colCtx, s32 bgId, Actor* actor) {
|
||||
u32 wasUpdated = 0;
|
||||
DynaPolyActor* meshActor;
|
||||
|
||||
if (BgCheck_IsActorMeshIndexValid(index) == 0) {
|
||||
if (!DynaPoly_IsBgIdBgActor(bgId)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (((colCtx->dyna.bgActorFlags[index] & 2) != 0) || ((colCtx->dyna.bgActorFlags[index] & 1) == 0)) {
|
||||
if (colCtx->dyna.bgActorFlags[bgId] & 2 || !(colCtx->dyna.bgActorFlags[bgId] & 1)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
meshActor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
meshActor = DynaPoly_GetActor(colCtx, bgId);
|
||||
|
||||
if (meshActor == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((meshActor->unk154 & 1) != 0) {
|
||||
BgCheck2_UpdateActorPosition(colCtx, index, actor);
|
||||
if (meshActor->flags & 1) {
|
||||
BgCheck2_UpdateActorPosition(colCtx, bgId, actor);
|
||||
wasUpdated = 1;
|
||||
}
|
||||
|
||||
if ((meshActor->unk154 & 2) != 0) {
|
||||
BgCheck2_UpdateActorYRotation(colCtx, index, actor);
|
||||
if (meshActor->flags & 2) {
|
||||
BgCheck2_UpdateActorYRotation(colCtx, bgId, actor);
|
||||
wasUpdated = 1;
|
||||
}
|
||||
|
||||
|
||||
+95
-53
@@ -1,99 +1,141 @@
|
||||
#include "global.h"
|
||||
|
||||
void BcCheck3_BgActorInit(DynaPolyActor* actor, UNK_TYPE4 param_2) {
|
||||
actor->bgId = -1;
|
||||
actor->unk148 = 0;
|
||||
actor->unk14C = 0;
|
||||
actor->unk154 = param_2;
|
||||
actor->unk_158 = 0;
|
||||
#define DYNAPOLY_STATE_NONE 0
|
||||
#define DYNAPOLY_STATE_RIDING_FALLING (1 << 0)
|
||||
#define DYNAPOLY_STATE_RIDING_MOVING (1 << 1)
|
||||
#define DYNAPOLY_STATE_RIDING_ROTATING (1 << 2)
|
||||
#define DYNAPOLY_STATE_SWITCH_PRESSED (1 << 3)
|
||||
#define DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED (1 << 4)
|
||||
|
||||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags) {
|
||||
dynaActor->bgId = -1;
|
||||
dynaActor->pushForce = 0.0f;
|
||||
dynaActor->unk14C = 0.0f;
|
||||
dynaActor->flags = flags;
|
||||
dynaActor->stateFlags = DYNAPOLY_STATE_NONE;
|
||||
}
|
||||
|
||||
void BgCheck3_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* actor, CollisionHeader* meshHeader) {
|
||||
CollisionHeader* header;
|
||||
void DynaPolyActor_LoadMesh(GlobalContext* globalCtx, DynaPolyActor* dynaActor, CollisionHeader* meshHeader) {
|
||||
CollisionHeader* header = NULL;
|
||||
|
||||
header = NULL;
|
||||
BgCheck_RelocateMeshHeader(meshHeader, &header);
|
||||
actor->bgId = BgCheck_AddActorMesh(globalCtx, &globalCtx->colCtx.dyna, actor, header);
|
||||
CollisionHeader_GetVirtual(meshHeader, &header);
|
||||
dynaActor->bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &dynaActor->actor, header);
|
||||
}
|
||||
|
||||
void BgCheck3_ResetFlags(DynaPolyActor* actor) {
|
||||
actor->unk_158 = 0;
|
||||
void DynaPolyActor_ResetState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags = DYNAPOLY_STATE_NONE;
|
||||
}
|
||||
|
||||
void func_800CAE88(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 1;
|
||||
void DynaPolyActor_SetRidingFallingState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_FALLING;
|
||||
}
|
||||
|
||||
void func_800CAE9C(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 2;
|
||||
void DynaPolyActor_SetRidingMovingState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_MOVING;
|
||||
}
|
||||
|
||||
void func_800CAEB0(CollisionContext* colCtx, s32 index) {
|
||||
DynaPolyActor* actor;
|
||||
void DynaPolyActor_SetRidingMovingStateByIndex(CollisionContext* colCtx, s32 bgId) {
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, bgId);
|
||||
|
||||
actor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
if (actor != (DynaPolyActor*)0x0) {
|
||||
func_800CAE9C(actor);
|
||||
if (dynaActor != NULL) {
|
||||
DynaPolyActor_SetRidingMovingState(dynaActor);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800CAEE0(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 4;
|
||||
void DynaPolyActor_SetRidingRotatingState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_RIDING_ROTATING;
|
||||
}
|
||||
|
||||
void func_800CAEF4(CollisionContext* colCtx, s32 index) {
|
||||
DynaPolyActor* actor;
|
||||
void DynaPolyActor_SetRidingRotatingStateByIndex(CollisionContext* colCtx, s32 bgId) {
|
||||
DynaPolyActor* dynaActor = DynaPoly_GetActor(colCtx, bgId);
|
||||
|
||||
actor = BgCheck_GetActorOfMesh(colCtx, index);
|
||||
if (actor != (DynaPolyActor*)0x0) {
|
||||
func_800CAEE0(actor);
|
||||
if (dynaActor != NULL) {
|
||||
DynaPolyActor_SetRidingRotatingState(dynaActor);
|
||||
}
|
||||
}
|
||||
|
||||
void func_800CAF24(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 8;
|
||||
void DynaPolyActor_SetSwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_SWITCH_PRESSED;
|
||||
}
|
||||
|
||||
void func_800CAF38(DynaPolyActor* actor) {
|
||||
actor->unk_158 |= 0x10;
|
||||
void DynaPolyActor_SetHeavySwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
dynaActor->stateFlags |= DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED;
|
||||
}
|
||||
|
||||
s32 func_800CAF4C(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 1) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInRidingFallingState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_FALLING) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAF70(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 2) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInRidingMovingState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_MOVING) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAF94(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 4) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInRidingRotatingState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_RIDING_ROTATING) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAFB8(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 8) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInSwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_SWITCH_PRESSED) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CAFDC(DynaPolyActor* actor) {
|
||||
if (actor->unk_158 & 0x10) {
|
||||
return 1;
|
||||
s32 DynaPolyActor_IsInHeavySwitchPressedState(DynaPolyActor* dynaActor) {
|
||||
if (dynaActor->stateFlags & DYNAPOLY_STATE_HEAVY_SWITCH_PRESSED) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s32 DynaPolyActor_ValidateMove(GlobalContext* globalCtx, DynaPolyActor* dynaActor, s16 startRadius, s16 endRadius,
|
||||
s16 startHeight) {
|
||||
Vec3f startPos;
|
||||
Vec3f endPos;
|
||||
Vec3f intersectionPos;
|
||||
f32 sin = Math_SinS(dynaActor->yRotation);
|
||||
f32 cos = Math_CosS(dynaActor->yRotation);
|
||||
s32 bgId;
|
||||
CollisionPoly* poly;
|
||||
f32 adjustedStartRadius;
|
||||
f32 adjustedEndRadius;
|
||||
f32 sign = (0.0f <= dynaActor->pushForce) ? 1.0f : -1.0f;
|
||||
|
||||
adjustedStartRadius = (f32)startRadius - 0.1f;
|
||||
startPos.x = dynaActor->actor.world.pos.x + (adjustedStartRadius * cos);
|
||||
startPos.y = dynaActor->actor.world.pos.y + startHeight;
|
||||
startPos.z = dynaActor->actor.world.pos.z - (adjustedStartRadius * sin);
|
||||
|
||||
adjustedEndRadius = (f32)endRadius - 0.1f;
|
||||
endPos.x = sign * adjustedEndRadius * sin + startPos.x;
|
||||
endPos.y = startPos.y;
|
||||
endPos.z = sign * adjustedEndRadius * cos + startPos.z;
|
||||
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &startPos, &endPos, &intersectionPos, &poly, true, false, false,
|
||||
true, &bgId, &dynaActor->actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
startPos.x = (dynaActor->actor.world.pos.x * 2.0f) - startPos.x;
|
||||
startPos.z = (dynaActor->actor.world.pos.z * 2.0f) - startPos.z;
|
||||
endPos.x = sign * adjustedEndRadius * sin + startPos.x;
|
||||
endPos.z = sign * adjustedEndRadius * cos + startPos.z;
|
||||
if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &startPos, &endPos, &intersectionPos, &poly, true, false, false,
|
||||
true, &bgId, &dynaActor->actor, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+4680
-391
File diff suppressed because it is too large
Load Diff
@@ -941,7 +941,7 @@ s32 Collider_QuadSetNearestAC(GlobalContext* globalCtx, ColliderQuad* quad, Vec3
|
||||
return 1;
|
||||
}
|
||||
Math_Vec3s_ToVec3f(&dcMid, &quad->dim.dcMid);
|
||||
acDist = Math3D_DistanceSquared(&dcMid, hitPos);
|
||||
acDist = Math3D_Vec3fDistSq(&dcMid, hitPos);
|
||||
|
||||
if (acDist < quad->dim.acDist) {
|
||||
quad->dim.acDist = acDist;
|
||||
@@ -3510,7 +3510,7 @@ s32 CollisionCheck_LineOC_JntSph(GlobalContext* globalCtx, CollisionCheckContext
|
||||
|
||||
D_801EDEB0.a = *a;
|
||||
D_801EDEB0.b = *b;
|
||||
if (Math3D_ColSphereLineSeg(&element->dim.worldSphere, &D_801EDEB0) != 0) {
|
||||
if (Math3D_LineVsSph(&element->dim.worldSphere, &D_801EDEB0) != 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -3548,7 +3548,7 @@ s32 CollisionCheck_LineOC_Sphere(GlobalContext* globalCtx, CollisionCheckContext
|
||||
|
||||
D_801EDFC8.a = *a;
|
||||
D_801EDFC8.b = *b;
|
||||
if (Math3D_ColSphereLineSeg(&sphere->dim.worldSphere, &D_801EDFC8) != 0) {
|
||||
if (Math3D_LineVsSph(&sphere->dim.worldSphere, &D_801EDFC8) != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ SaveContext gSaveContext;
|
||||
void SaveContext_Init(void) {
|
||||
bzero(&gSaveContext, sizeof(gSaveContext));
|
||||
gSaveContext.playerForm = 0;
|
||||
gSaveContext.seqIndex = 0xFF;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.unk_3F46 = 0;
|
||||
gSaveContext.unk_3F46 = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.unk_3F4D = 0;
|
||||
|
||||
@@ -1,3 +1,62 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_elf_message/func_800F05C0.s")
|
||||
u16 ElfMessage_GetFirstCycleHint(GlobalContext* globalCtx) {
|
||||
if (INV_CONTENT(ITEM_OCARINA) == ITEM_OCARINA) {
|
||||
return 0;
|
||||
}
|
||||
if (CURRENT_DAY <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if (gSaveContext.weekEventReg[88] & 0x20) {
|
||||
return 0;
|
||||
}
|
||||
if (gSaveContext.weekEventReg[79] & 0x10) {
|
||||
if (gSaveContext.weekEventReg[8] & 0x40) {
|
||||
return 0;
|
||||
}
|
||||
return 0x224;
|
||||
}
|
||||
if (!(gSaveContext.weekEventReg[8] & 0x80)) {
|
||||
if (gSaveContext.weekEventReg[9] & 1) {
|
||||
return 0x21E;
|
||||
}
|
||||
if (globalCtx->sceneNum == SCENE_YOUSEI_IZUMI) {
|
||||
return 0;
|
||||
}
|
||||
return 0x21D;
|
||||
}
|
||||
if (gSaveContext.magicAcquired != true) {
|
||||
return 0x21F;
|
||||
}
|
||||
if (INV_CONTENT(ITEM_DEED_LAND) == ITEM_DEED_LAND) {
|
||||
if (globalCtx->sceneNum != SCENE_OKUJOU) {
|
||||
return 0x244;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (INV_CONTENT(ITEM_MOON_TEAR) == ITEM_MOON_TEAR) {
|
||||
if (gSaveContext.weekEventReg[86] & 4) {
|
||||
return 0x242;
|
||||
}
|
||||
return 0x243;
|
||||
}
|
||||
if (gSaveContext.weekEventReg[74] & 0x20) {
|
||||
return 0x223;
|
||||
}
|
||||
if (gSaveContext.weekEventReg[73] & 0x80) {
|
||||
return 0x222;
|
||||
}
|
||||
if (gSaveContext.weekEventReg[73] & 0x20) {
|
||||
return 0x221;
|
||||
}
|
||||
if (gSaveContext.weekEventReg[77] & 2) {
|
||||
if (gSaveContext.weekEventReg[73] & 0x10) {
|
||||
return 0x240;
|
||||
}
|
||||
return 0x241;
|
||||
}
|
||||
if ((gSaveContext.weekEventReg[86] & 2) || (gSaveContext.weekEventReg[73] & 0x40)) {
|
||||
return 0x23F;
|
||||
}
|
||||
return 0x220;
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 15.0f, 15.0f, 0x1D);
|
||||
|
||||
if (this->actor.floorHeight <= -32000.0f) {
|
||||
if (this->actor.floorHeight <= BGCHECK_Y_MIN) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void FireObj_StepSize(FireObj* fire) {
|
||||
void FireObj_UpdateStateTransitions(GlobalContext* globalCtx, FireObj* fire) {
|
||||
Player* player = GET_PLAYER(globalCtx);
|
||||
WaterBox* waterBox;
|
||||
f32 sp44;
|
||||
f32 waterY;
|
||||
s32 sp40 = 0;
|
||||
u8 nextState;
|
||||
Vec3f dist;
|
||||
@@ -113,8 +113,8 @@ void FireObj_UpdateStateTransitions(GlobalContext* globalCtx, FireObj* fire) {
|
||||
FireObj_SetState(fire, fire->dynamicSizeStep, nextState);
|
||||
}
|
||||
if ((fire->flags & 1) && (fire->state != FIRE_STATE_3) &&
|
||||
(func_800CA1E8(globalCtx, &globalCtx->colCtx, fire->position.x, fire->position.z, &sp44, &waterBox) != 0) &&
|
||||
((fire->yScale * ((void)0, 6500.0f)) < (sp44 - fire->position.y))) { // Fake but IDK what else
|
||||
WaterBox_GetSurface1_2(globalCtx, &globalCtx->colCtx, fire->position.x, fire->position.z, &waterY, &waterBox) &&
|
||||
((fire->yScale * ((void)0, 6500.0f)) < (waterY - fire->position.y))) { // Fake but IDK what else
|
||||
FireObj_SetState(fire, fire->dynamicSizeStep, FIRE_STATE_3);
|
||||
}
|
||||
if ((fire->flags & 2) && (player->itemActionParam == PLAYER_AP_STICK)) {
|
||||
|
||||
@@ -45,7 +45,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
||||
|
||||
gSaveContext.unk_3DC0 = 2000;
|
||||
gSaveContext.naviTimer = 0;
|
||||
gSaveContext.seqIndex = 0xFF;
|
||||
gSaveContext.seqIndex = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.nightSeqIndex = 0xFF;
|
||||
gSaveContext.eventInf[0] = 0;
|
||||
gSaveContext.eventInf[1] = 0;
|
||||
@@ -66,7 +66,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
||||
gameOverCtx->state = GAMEOVER_DEATH_WAIT_GROUND;
|
||||
break;
|
||||
case GAMEOVER_DEATH_FADE_OUT:
|
||||
if (func_801A8A50(1) != 32) {
|
||||
if (func_801A8A50(1) != NA_BGM_GAME_OVER) {
|
||||
func_80169F78(globalCtx);
|
||||
if (gSaveContext.respawnFlag != -7) {
|
||||
gSaveContext.respawnFlag = -6;
|
||||
|
||||
+299
-6
@@ -1,11 +1,304 @@
|
||||
#include "global.h"
|
||||
#include "z64jpeg.h"
|
||||
#include "libc/stdbool.h"
|
||||
#include "variables.h"
|
||||
#include "functions.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_jpeg/func_800F42A0.s")
|
||||
#define MARKER_ESCAPE 0x00
|
||||
#define MARKER_SOI 0xD8
|
||||
#define MARKER_SOF 0xC0
|
||||
#define MARKER_DHT 0xC4
|
||||
#define MARKER_DQT 0xDB
|
||||
#define MARKER_DRI 0xDD
|
||||
#define MARKER_SOS 0xDA
|
||||
#define MARKER_APP0 0xE0
|
||||
#define MARKER_APP1 0xE1
|
||||
#define MARKER_APP2 0xE2
|
||||
#define MARKER_COM 0xFE
|
||||
#define MARKER_EOI 0xD9
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_jpeg/func_800F43BC.s")
|
||||
/**
|
||||
* Configures and schedules a JPEG decoder task and waits for it to finish.
|
||||
*/
|
||||
void Jpeg_ScheduleDecoderTask(JpegContext* jpegCtx) {
|
||||
static OSTask_t sJpegTask = {
|
||||
M_NJPEGTASK, // type
|
||||
0, // flags
|
||||
NULL, // ucode_boot
|
||||
0, // ucode_boot_size
|
||||
gJpegUCode, // ucode
|
||||
0x1000, // ucode_size
|
||||
gJpegUCodeData, // ucode_data
|
||||
0x800, // ucode_data_size
|
||||
NULL, // dram_stack
|
||||
0, // dram_stack_size
|
||||
NULL, // output_buff
|
||||
NULL, // output_buff_size
|
||||
NULL, // data_ptr
|
||||
sizeof(JpegTaskData), // data_size
|
||||
NULL, // yield_data_ptr
|
||||
0x200, // yield_data_size
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_jpeg/func_800F44F4.s")
|
||||
JpegWork* workBuf = jpegCtx->workBuf;
|
||||
s32 pad[2];
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_jpeg/func_800F4540.s")
|
||||
workBuf->taskData.address = &workBuf->data;
|
||||
workBuf->taskData.mode = jpegCtx->mode;
|
||||
workBuf->taskData.mbCount = 4;
|
||||
workBuf->taskData.qTableYPtr = &workBuf->qTableY;
|
||||
workBuf->taskData.qTableUPtr = &workBuf->qTableU;
|
||||
workBuf->taskData.qTableVPtr = &workBuf->qTableV;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_jpeg/func_800F470C.s")
|
||||
sJpegTask.flags = 0;
|
||||
sJpegTask.ucodeBoot = SysUcode_GetUCodeBoot();
|
||||
sJpegTask.ucodeBootSize = SysUcode_GetUCodeBootSize();
|
||||
sJpegTask.yieldDataPtr = (u64*)&workBuf->yieldData;
|
||||
sJpegTask.dataPtr = (u64*)&workBuf->taskData;
|
||||
|
||||
jpegCtx->scTask.next = NULL;
|
||||
jpegCtx->scTask.flags = OS_SC_NEEDS_RSP;
|
||||
jpegCtx->scTask.msgQ = &jpegCtx->mq;
|
||||
jpegCtx->scTask.msg = NULL;
|
||||
jpegCtx->scTask.framebuffer = NULL;
|
||||
jpegCtx->scTask.list.t = sJpegTask;
|
||||
|
||||
osSendMesg(&gSchedContext.cmdQ, (OSMesg)&jpegCtx->scTask, OS_MESG_BLOCK);
|
||||
Sched_SendEntryMsg(&gSchedContext); // osScKickEntryMsg
|
||||
osRecvMesg(&jpegCtx->mq, NULL, OS_MESG_BLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies a 16x16 block of decoded image data to the Z-buffer.
|
||||
*/
|
||||
void Jpeg_CopyToZbuffer(u16* src, u16* zbuffer, s32 x, s32 y) {
|
||||
u16* dst = zbuffer + (((y * SCREEN_WIDTH) + x) * 16);
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
dst[0] = src[0];
|
||||
dst[1] = src[1];
|
||||
dst[2] = src[2];
|
||||
dst[3] = src[3];
|
||||
dst[4] = src[4];
|
||||
dst[5] = src[5];
|
||||
dst[6] = src[6];
|
||||
dst[7] = src[7];
|
||||
dst[8] = src[8];
|
||||
dst[9] = src[9];
|
||||
dst[10] = src[10];
|
||||
dst[11] = src[11];
|
||||
dst[12] = src[12];
|
||||
dst[13] = src[13];
|
||||
dst[14] = src[14];
|
||||
dst[15] = src[15];
|
||||
|
||||
src += 16;
|
||||
dst += SCREEN_WIDTH;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads an u16 from a possibly unaligned address in memory.
|
||||
*
|
||||
* Replaces unaligned 16-bit reads with a pair of aligned reads, allowing for reading the possibly
|
||||
* unaligned values in JPEG header files.
|
||||
*/
|
||||
u16 Jpeg_GetUnalignedU16(u8* ptr) {
|
||||
if (((u32)ptr & 1) == 0) {
|
||||
// Read the value normally if it's aligned to a 16-bit address.
|
||||
return *(u16*)ptr;
|
||||
} else {
|
||||
// Read unaligned values using two separate aligned memory accesses when it's not.
|
||||
return *(u16*)(ptr - 1) << 8 | (*(u16*)(ptr + 1) >> 8);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the markers in the JPEG file, storing information such as the pointer to the image data
|
||||
* in `jpegCtx` for later processing.
|
||||
*/
|
||||
void Jpeg_ParseMarkers(u8* ptr, JpegContext* jpegCtx) {
|
||||
u32 exit = false;
|
||||
|
||||
jpegCtx->dqtCount = 0;
|
||||
jpegCtx->dhtCount = 0;
|
||||
|
||||
while (true) {
|
||||
if (exit) {
|
||||
break;
|
||||
}
|
||||
|
||||
// 0xFF indicates the start of a JPEG marker, so look for the next.
|
||||
if (*ptr++ == 0xFF) {
|
||||
switch (*ptr++) {
|
||||
case MARKER_ESCAPE: {
|
||||
// Compressed value 0xFF is stored as 0xFF00 to escape it, so ignore it.
|
||||
break;
|
||||
}
|
||||
case MARKER_SOI: {
|
||||
// Start of Image
|
||||
break;
|
||||
}
|
||||
case MARKER_APP0: {
|
||||
// Application marker for JFIF
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
case MARKER_APP1: {
|
||||
// Application marker for EXIF
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
case MARKER_APP2: {
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
case MARKER_DQT: {
|
||||
// Define Quantization Table, stored for later processing
|
||||
jpegCtx->dqtPtr[jpegCtx->dqtCount++] = ptr + 2;
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
case MARKER_DHT: {
|
||||
// Define Huffman Table, stored for later processing
|
||||
jpegCtx->dhtPtr[jpegCtx->dhtCount++] = ptr + 2;
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
case MARKER_DRI: {
|
||||
// Define Restart Interval
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
case MARKER_SOF: {
|
||||
// Start of Frame, stores important metadata of the image.
|
||||
// Only used for extracting the sampling factors (jpegCtx->mode).
|
||||
|
||||
if (ptr[9] == 0x21) {
|
||||
// component Y : V0 == 1
|
||||
jpegCtx->mode = 0;
|
||||
} else if (ptr[9] == 0x22) {
|
||||
// component Y : V0 == 2
|
||||
jpegCtx->mode = 2;
|
||||
}
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
case MARKER_SOS: {
|
||||
// Start of Scan marker, indicates the start of the image data.
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
jpegCtx->imageData = ptr;
|
||||
break;
|
||||
}
|
||||
case MARKER_EOI: {
|
||||
// End of Image
|
||||
exit = true;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
ptr += Jpeg_GetUnalignedU16(ptr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize) {
|
||||
s32 y;
|
||||
s32 x;
|
||||
s32 j;
|
||||
s32 i;
|
||||
JpegContext jpegCtx;
|
||||
JpegHuffmanTable hTables[4];
|
||||
JpegDecoder decoder;
|
||||
JpegDecoderState state;
|
||||
JpegWork* workBuff = work;
|
||||
|
||||
if (workSize < sizeof(JpegWork)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
osCreateMesgQueue(&jpegCtx.mq, &jpegCtx.msg, 1);
|
||||
MsgEvent_SendNullTask();
|
||||
|
||||
jpegCtx.workBuf = workBuff;
|
||||
|
||||
Jpeg_ParseMarkers(data, &jpegCtx);
|
||||
|
||||
switch (jpegCtx.dqtCount) {
|
||||
case 1:
|
||||
JpegUtils_ProcessQuantizationTable(jpegCtx.dqtPtr[0], &workBuff->qTableY, 3);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
JpegUtils_ProcessQuantizationTable(jpegCtx.dqtPtr[0], &workBuff->qTableY, 1);
|
||||
JpegUtils_ProcessQuantizationTable(jpegCtx.dqtPtr[1], &workBuff->qTableU, 1);
|
||||
JpegUtils_ProcessQuantizationTable(jpegCtx.dqtPtr[1], &workBuff->qTableV, 1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
JpegUtils_ProcessQuantizationTable(jpegCtx.dqtPtr[0], &workBuff->qTableY, 1);
|
||||
JpegUtils_ProcessQuantizationTable(jpegCtx.dqtPtr[1], &workBuff->qTableU, 1);
|
||||
JpegUtils_ProcessQuantizationTable(jpegCtx.dqtPtr[2], &workBuff->qTableV, 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (jpegCtx.dhtCount) {
|
||||
case 1:
|
||||
if (JpegUtils_ProcessHuffmanTable(jpegCtx.dhtPtr[0], &hTables[0], workBuff->codesLengths, workBuff->codes,
|
||||
4)) {
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// This chained if-else has printfs inside it on debug
|
||||
if (JpegUtils_ProcessHuffmanTable(jpegCtx.dhtPtr[0], &hTables[0], workBuff->codesLengths, workBuff->codes,
|
||||
1)) {
|
||||
} else if (JpegUtils_ProcessHuffmanTable(jpegCtx.dhtPtr[1], &hTables[1], workBuff->codesLengths,
|
||||
workBuff->codes, 1)) {
|
||||
} else if (JpegUtils_ProcessHuffmanTable(jpegCtx.dhtPtr[2], &hTables[2], workBuff->codesLengths,
|
||||
workBuff->codes, 1)) {
|
||||
} else if (!JpegUtils_ProcessHuffmanTable(jpegCtx.dhtPtr[3], &hTables[3], workBuff->codesLengths,
|
||||
workBuff->codes, 1)) {
|
||||
break;
|
||||
}
|
||||
return -1;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
decoder.imageData = jpegCtx.imageData;
|
||||
decoder.mode = jpegCtx.mode;
|
||||
decoder.unk_05 = 2;
|
||||
|
||||
decoder.hTablePtrs[0] = &hTables[0];
|
||||
decoder.hTablePtrs[1] = &hTables[1];
|
||||
decoder.hTablePtrs[2] = &hTables[2];
|
||||
decoder.hTablePtrs[3] = &hTables[3];
|
||||
decoder.unk_18 = 0;
|
||||
|
||||
x = y = 0;
|
||||
for (i = 0; i < 300; i += 4) {
|
||||
if (!JpegDecoder_Decode(&decoder, (u16*)workBuff->data, 4, (i != 0), &state)) {
|
||||
Jpeg_ScheduleDecoderTask(&jpegCtx);
|
||||
|
||||
for (j = 0; j < 4; j++) {
|
||||
Jpeg_CopyToZbuffer(workBuff->data[j], zbuffer, x, y);
|
||||
x++;
|
||||
|
||||
if (x >= 20) {
|
||||
x = 0;
|
||||
y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+3
-2
@@ -416,8 +416,9 @@ void Quake2_ClearType(s32 type) {
|
||||
}
|
||||
|
||||
s32 Quake2_GetFloorQuake(Player* player) {
|
||||
if (func_800C9D8C(&sQuake2Context.globalCtx->colCtx, player->actor.floorPoly, player->actor.floorBgId) == 0) {
|
||||
return func_800C9E18(&sQuake2Context.globalCtx->colCtx, player->actor.floorPoly, player->actor.floorBgId);
|
||||
if (!SurfaceType_IsConveyor(&sQuake2Context.globalCtx->colCtx, player->actor.floorPoly, player->actor.floorBgId)) {
|
||||
return SurfaceType_GetConveyorSpeed(&sQuake2Context.globalCtx->colCtx, player->actor.floorPoly,
|
||||
player->actor.floorBgId);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -204,7 +204,7 @@ void Scene_HeaderCmdColHeader(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
colHeader->waterBoxes = (WaterBox*)Lib_SegmentedToVirtual(colHeader->waterBoxes);
|
||||
}
|
||||
|
||||
BgCheck_Init(&globalCtx->colCtx, globalCtx, colHeader);
|
||||
BgCheck_Allocate(&globalCtx->colCtx, globalCtx, colHeader);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x04: Room List
|
||||
@@ -449,7 +449,7 @@ void Scene_HeaderCmdSoundSettings(GlobalContext* globalCtx, SceneCmd* cmd) {
|
||||
globalCtx->soundCtx.seqIndex = cmd->soundSettings.musicSeq;
|
||||
globalCtx->soundCtx.nightSeqIndex = cmd->soundSettings.nighttimeSFX;
|
||||
|
||||
if (gSaveContext.seqIndex == 0xFF || func_801A8A50(0) == 0x57) {
|
||||
if (gSaveContext.seqIndex == (u8)NA_BGM_DISABLED || func_801A8A50(0) == NA_BGM_FINAL_HOURS) {
|
||||
audio_setBGM(cmd->soundSettings.bgmId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,9 +722,9 @@ void Scene_DrawConfigGreatBayTemple(GlobalContext* globalCtx) {
|
||||
|
||||
if (Flags_GetSwitch(globalCtx, 0x33) && Flags_GetSwitch(globalCtx, 0x34) && Flags_GetSwitch(globalCtx, 0x35) &&
|
||||
Flags_GetSwitch(globalCtx, 0x36)) {
|
||||
func_800C3C00(&globalCtx->colCtx, 1);
|
||||
BgCheck_SetContextFlags(&globalCtx->colCtx, BGCHECK_FLAG_REVERSE_CONVEYOR_FLOW);
|
||||
} else {
|
||||
func_800C3C14(&globalCtx->colCtx, 1);
|
||||
BgCheck_UnsetContextFlags(&globalCtx->colCtx, BGCHECK_FLAG_REVERSE_CONVEYOR_FLOW);
|
||||
}
|
||||
|
||||
dList = (Gfx*)GRAPH_ALLOC(globalCtx->state.gfxCtx, sizeof(Gfx) * 18);
|
||||
|
||||
@@ -474,7 +474,7 @@ void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
|
||||
}
|
||||
|
||||
void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw,
|
||||
Actor* actor, Mtx** mtx) {
|
||||
StandardLimb* limb;
|
||||
Gfx* newDList;
|
||||
@@ -538,7 +538,7 @@ void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec
|
||||
}
|
||||
|
||||
void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDraw unkDraw,
|
||||
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw,
|
||||
Actor* actor) {
|
||||
StandardLimb* rootLimb;
|
||||
s32 pad;
|
||||
|
||||
+4
-3
@@ -113,11 +113,11 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
|
||||
s16 x;
|
||||
s16 y;
|
||||
f32 distance;
|
||||
CollisionPoly* unk1;
|
||||
CollisionPoly* poly;
|
||||
Camera* camera;
|
||||
Actor* actors[2];
|
||||
s32 ret = 0;
|
||||
u32 unk2;
|
||||
s32 bgId;
|
||||
|
||||
camera = GET_ACTIVE_CAM(globalCtx);
|
||||
|
||||
@@ -142,7 +142,8 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
|
||||
ret |= 0x3d;
|
||||
}
|
||||
|
||||
if (func_800C576C(&globalCtx->colCtx, pos, &camera->eye, &screenSpace, &unk1, 1, 1, 1, 1, &unk2) != 0) {
|
||||
if (BgCheck_ProjectileLineTest(&globalCtx->colCtx, pos, &camera->eye, &screenSpace, &poly, true, true, true, true,
|
||||
&bgId)) {
|
||||
func_8013A41C(0x3c);
|
||||
ret |= 0x3c;
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/normalize/guNormalize.s")
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
u32 osAiGetLength(void) {
|
||||
return *(u32*)0xA4500004;
|
||||
return HW_REG(AI_LEN_REG, u32);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/aisetfreq/osAiSetFrequency.s")
|
||||
s32 osAiSetFrequency(u32 frequency) {
|
||||
u8 bitrate;
|
||||
f32 dacRateF = ((f32)osViClock / frequency) + 0.5f;
|
||||
u32 dacRate = dacRateF;
|
||||
|
||||
if (dacRate < 132) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
bitrate = (dacRate / 66);
|
||||
if (bitrate > 16) {
|
||||
bitrate = 16;
|
||||
}
|
||||
|
||||
HW_REG(AI_DACRATE_REG, u32) = dacRate - 1;
|
||||
HW_REG(AI_BITRATE_REG, u32) = bitrate - 1;
|
||||
return osViClock / (s32)dacRate;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,63 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/cartrominit/osCartRomInit.s")
|
||||
OSPiHandle CartRomHandle;
|
||||
|
||||
OSPiHandle* osCartRomInit(void) {
|
||||
register u32 initialConfig;
|
||||
register s32 status;
|
||||
register u32 prevInt;
|
||||
register u32 lastLatency;
|
||||
register u32 lastPageSize;
|
||||
register u32 lastRelDuration;
|
||||
register u32 lastPulse;
|
||||
|
||||
static s32 sCartRomNeedsInit = true;
|
||||
|
||||
__osPiGetAccess();
|
||||
|
||||
if (!sCartRomNeedsInit) {
|
||||
__osPiRelAccess();
|
||||
return &CartRomHandle;
|
||||
}
|
||||
|
||||
sCartRomNeedsInit = false;
|
||||
CartRomHandle.type = DEVICE_TYPE_CART;
|
||||
CartRomHandle.baseAddress = 0xB0000000;
|
||||
CartRomHandle.domain = 0;
|
||||
CartRomHandle.speed = 0;
|
||||
bzero(&CartRomHandle.transferInfo, sizeof(__OSTranxInfo));
|
||||
|
||||
/* Uses `status & PI_STATUS_ERROR` in OoT */
|
||||
while (status = HW_REG(PI_STATUS_REG, u32), status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY)) {
|
||||
;
|
||||
}
|
||||
|
||||
lastLatency = HW_REG(PI_BSD_DOM1_LAT_REG, u32);
|
||||
lastPageSize = HW_REG(PI_BSD_DOM1_PGS_REG, u32);
|
||||
lastRelDuration = HW_REG(PI_BSD_DOM1_RLS_REG, u32);
|
||||
lastPulse = HW_REG(PI_BSD_DOM1_PWD_REG, u32);
|
||||
|
||||
HW_REG(PI_BSD_DOM1_LAT_REG, u32) = 0xFF;
|
||||
HW_REG(PI_BSD_DOM1_PGS_REG, u32) = 0;
|
||||
HW_REG(PI_BSD_DOM1_RLS_REG, u32) = 3;
|
||||
HW_REG(PI_BSD_DOM1_PWD_REG, u32) = 0xFF;
|
||||
|
||||
initialConfig = HW_REG(CartRomHandle.baseAddress, u32);
|
||||
CartRomHandle.latency = initialConfig & 0xFF;
|
||||
CartRomHandle.pageSize = (initialConfig >> 0x10) & 0xF;
|
||||
CartRomHandle.relDuration = (initialConfig >> 0x14) & 0xF;
|
||||
CartRomHandle.pulse = (initialConfig >> 8) & 0xFF;
|
||||
|
||||
HW_REG(PI_BSD_DOM1_LAT_REG, u32) = lastLatency;
|
||||
HW_REG(PI_BSD_DOM1_PGS_REG, u32) = lastPageSize;
|
||||
HW_REG(PI_BSD_DOM1_RLS_REG, u32) = lastRelDuration;
|
||||
HW_REG(PI_BSD_DOM1_PWD_REG, u32) = lastPulse;
|
||||
|
||||
prevInt = __osDisableInt();
|
||||
CartRomHandle.next = __osPiTable;
|
||||
__osPiTable = &CartRomHandle;
|
||||
__osRestoreInt(prevInt);
|
||||
__osPiRelAccess();
|
||||
|
||||
return &CartRomHandle;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
* \f[ m(X) X^n = Q(X) p(X) + R(X) \f]
|
||||
* (\f$ R(X) \f$ is the *remainder after dividing by \f$ p(X) \f$*).
|
||||
* - Therefore, \f$ m(X) X^n - R(X) \f$ is divisible by the generator polynomial. This means that if we append the
|
||||
* binary number corresponding to \f$ R(X) \f$ to the message and rerun the algorithm, we will get 0 if now errors have
|
||||
* binary number corresponding to \f$ R(X) \f$ to the message and rerun the algorithm, we will get 0 if no errors have
|
||||
* been introduced.
|
||||
*
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
u32 osDpGetStatus(void) {
|
||||
return *(u32*)0xA410000C;
|
||||
return HW_REG(DPC_STATUS_REG, u32);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
void osDpSetStatus(u32 data) {
|
||||
*(u32*)0xA410000C = data;
|
||||
HW_REG(DPC_STATUS_REG, u32) = data;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "global.h"
|
||||
|
||||
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data) {
|
||||
s32 __osEPiRawReadIo(OSPiHandle* handle, uintptr_t devAddr, u32* data) {
|
||||
s32 status;
|
||||
OSPiHandle* curHandle;
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include "global.h"
|
||||
|
||||
s32 __osEPiRawWriteIo(OSPiHandle* handle, u32 devAddr, u32 data) {
|
||||
s32 __osEPiRawWriteIo(OSPiHandle* handle, uintptr_t devAddr, u32 data) {
|
||||
s32 status;
|
||||
OSPiHandle* curHandle;
|
||||
|
||||
while (status = HW_REG(PI_STATUS_REG, u32), status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY)) {
|
||||
;
|
||||
}
|
||||
while (status = HW_REG(PI_STATUS_REG, u32), status & (PI_STATUS_BUSY | PI_STATUS_IOBUSY)) {}
|
||||
|
||||
if (__osCurrentHandle[handle->domain]->type != handle->type) {
|
||||
curHandle = __osCurrentHandle[handle->domain];
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/epiread/osEPiReadIo.s")
|
||||
s32 osEPiReadIo(OSPiHandle* handle, uintptr_t devAddr, u32* data) {
|
||||
register s32 ret;
|
||||
|
||||
__osPiGetAccess();
|
||||
ret = __osEPiRawReadIo(handle, devAddr, data);
|
||||
__osPiRelAccess();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/epiwrite/osEPiWriteIo.s")
|
||||
s32 osEPiWriteIo(OSPiHandle* handle, uintptr_t devAddr, u32 data) {
|
||||
register s32 ret;
|
||||
|
||||
__osPiGetAccess();
|
||||
ret = __osEPiRawWriteIo(handle, devAddr, data);
|
||||
__osPiRelAccess();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,124 @@
|
||||
#include "PR/pfs.h"
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsinitpak/osPfsInitPak.s")
|
||||
s32 __osPfsCheckRamArea(OSPfs* pfs);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsinitpak/__osPfsCheckRamArea.s")
|
||||
s32 osPfsInitPak(OSMesgQueue* queue, OSPfs* pfs, s32 channel) {
|
||||
s32 ret;
|
||||
u16 sum;
|
||||
u16 isum;
|
||||
u8 buf[BLOCKSIZE];
|
||||
__OSPackId* id;
|
||||
__OSPackId newid;
|
||||
|
||||
__osSiGetAccess();
|
||||
|
||||
ret = __osPfsGetStatus(queue, channel);
|
||||
|
||||
__osSiRelAccess();
|
||||
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
pfs->queue = queue;
|
||||
pfs->channel = channel;
|
||||
pfs->status = 0;
|
||||
|
||||
ret = __osPfsCheckRamArea(pfs);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = __osPfsSelectBank(pfs, PFS_ID_BANK_256K);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = __osContRamRead(pfs->queue, pfs->channel, PFS_ID_0AREA, buf);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
__osIdCheckSum((u16*)buf, &sum, &isum);
|
||||
id = (__OSPackId*)buf;
|
||||
if ((id->checksum != sum) || (id->invertedChecksum != isum)) {
|
||||
ret = __osCheckPackId(pfs, id);
|
||||
if (ret != 0) {
|
||||
pfs->status |= PFS_ID_BROKEN;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(id->deviceid & 1)) {
|
||||
ret = __osRepairPackId(pfs, id, &newid);
|
||||
if (ret != 0) {
|
||||
if (ret == PFS_ERR_ID_FATAL) {
|
||||
pfs->status |= PFS_ID_BROKEN;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
id = &newid;
|
||||
if (!(id->deviceid & 1)) {
|
||||
return PFS_ERR_DEVICE;
|
||||
}
|
||||
}
|
||||
|
||||
bcopy(id, pfs->id, BLOCKSIZE);
|
||||
|
||||
pfs->version = id->version;
|
||||
pfs->banks = id->banks;
|
||||
pfs->inodeStartPage = 1 + DEF_DIR_PAGES + (2 * pfs->banks);
|
||||
pfs->dir_size = DEF_DIR_PAGES * PFS_ONE_PAGE;
|
||||
pfs->inode_table = 1 * PFS_ONE_PAGE;
|
||||
pfs->minode_table = (1 + pfs->banks) * PFS_ONE_PAGE;
|
||||
pfs->dir_table = pfs->minode_table + (pfs->banks * PFS_ONE_PAGE);
|
||||
|
||||
ret = __osContRamRead(pfs->queue, pfs->channel, PFS_LABEL_AREA, pfs->label);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = osPfsChecker(pfs);
|
||||
pfs->status |= PFS_INITIALIZED;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 __osPfsCheckRamArea(OSPfs* pfs) {
|
||||
s32 i = 0;
|
||||
s32 ret = 0;
|
||||
u8 writeBuf[BLOCKSIZE];
|
||||
u8 readBuf[BLOCKSIZE];
|
||||
u8 saveReg[BLOCKSIZE];
|
||||
|
||||
ret = __osPfsSelectBank(pfs, PFS_ID_BANK_256K);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = __osContRamRead(pfs->queue, pfs->channel, 0, saveReg);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = 0; i < BLOCKSIZE; i++) {
|
||||
writeBuf[i] = i;
|
||||
}
|
||||
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, 0, writeBuf, 0);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = __osContRamRead(pfs->queue, pfs->channel, 0, readBuf);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (bcmp(writeBuf, readBuf, BLOCKSIZE) != 0) {
|
||||
return PFS_ERR_DEVICE;
|
||||
}
|
||||
|
||||
return __osContRamWrite(pfs->queue, pfs->channel, 0, saveReg, 0);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
#include "PR/pfs.h"
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/pfsselectbank/__osPfsSelectBank.s")
|
||||
s32 __osPfsSelectBank(OSPfs* pfs, u8 bank) {
|
||||
u8 buf[BLOCKSIZE];
|
||||
s32 i;
|
||||
s32 ret = 0;
|
||||
|
||||
for (i = 0; i < BLOCKSIZE; i++) {
|
||||
buf[i] = bank;
|
||||
}
|
||||
|
||||
ret = __osContRamWrite(pfs->queue, pfs->channel, 0x8000 / BLOCKSIZE, buf, 0);
|
||||
if (ret == 0) {
|
||||
pfs->activebank = bank;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
+10
-11
@@ -1,23 +1,22 @@
|
||||
#include "global.h"
|
||||
|
||||
s32 __osPiRawStartDma(s32 direction, u32 devAddr, void* dramAddr, size_t size) {
|
||||
register int stat;
|
||||
s32 __osPiRawStartDma(s32 direction, uintptr_t devAddr, void* dramAddr, size_t size) {
|
||||
register int status = HW_REG(PI_STATUS_REG, u32);
|
||||
|
||||
stat = *(vu32*)0xA4600010;
|
||||
while (stat & (2 | 1)) {
|
||||
stat = *(vu32*)0xA4600010;
|
||||
while (status & (PI_STATUS_IOBUSY | PI_STATUS_BUSY)) {
|
||||
status = HW_REG(PI_STATUS_REG, u32);
|
||||
}
|
||||
|
||||
*(u32*)0xA4600000 = osVirtualToPhysical(dramAddr);
|
||||
HW_REG(PI_DRAM_ADDR_REG, u32) = osVirtualToPhysical(dramAddr);
|
||||
|
||||
*(u32*)0xA4600004 = ((osRomBase | devAddr) & 0x1fffffff);
|
||||
HW_REG(PI_CART_ADDR_REG, u32) = ((osRomBase | devAddr) & 0x1FFFFFFF);
|
||||
|
||||
switch (direction) {
|
||||
case 0:
|
||||
*(u32*)0xA460000C = size - 1;
|
||||
case OS_READ:
|
||||
HW_REG(PI_WR_LEN_REG, u32) = size - 1;
|
||||
break;
|
||||
case 1:
|
||||
*(u32*)0xA4600008 = size - 1;
|
||||
case OS_WRITE:
|
||||
HW_REG(PI_RD_LEN_REG, u32) = size - 1;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "global.h"
|
||||
|
||||
int __osSiDeviceBusy() {
|
||||
register u32 status;
|
||||
status = *(u32*)0xA4800018;
|
||||
if (status & 3) {
|
||||
return 1;
|
||||
s32 __osSiDeviceBusy() {
|
||||
register u32 status = HW_REG(SI_STATUS_REG, u32);
|
||||
|
||||
if (status & (SI_STATUS_DMA_BUSY | SI_STATUS_IO_READ_BUSY)) {
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
#include "global.h"
|
||||
|
||||
s32 __osSiRawStartDma(s32 direction, void* dramAddr) {
|
||||
if ((*(u32*)0xA4800018 & 0x3) != 0) {
|
||||
if (HW_REG(SI_STATUS_REG, u32) & (SI_STATUS_DMA_BUSY | SI_STATUS_IO_READ_BUSY)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (direction == 1) {
|
||||
osWritebackDCache(dramAddr, 64);
|
||||
if (direction == OS_WRITE) {
|
||||
osWritebackDCache(dramAddr, PIF_RAM_SIZE);
|
||||
}
|
||||
|
||||
*(u32*)0xA4800000 = osVirtualToPhysical(dramAddr);
|
||||
HW_REG(SI_DRAM_ADDR_REG, u32) = osVirtualToPhysical(dramAddr);
|
||||
|
||||
if (direction == 0) {
|
||||
*(u32*)0xA4800004 = 0x1FC007C0;
|
||||
if (direction == OS_READ) {
|
||||
HW_REG(SI_PIF_ADDR_RD64B_REG, void*) = (void*)PIF_RAM_START;
|
||||
} else {
|
||||
*(u32*)0xA4800010 = 0x1FC007C0;
|
||||
HW_REG(SI_PIF_ADDR_WR64B_REG, void*) = (void*)PIF_RAM_START;
|
||||
}
|
||||
|
||||
if (direction == 0) {
|
||||
osInvalDCache(dramAddr, 64);
|
||||
if (direction == OS_READ) {
|
||||
osInvalDCache(dramAddr, PIF_RAM_SIZE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ s32 __osSpDeviceBusy(void) {
|
||||
|
||||
if (status & (SP_STATUS_DMA_BUSY | SP_STATUS_DMA_FULL | SP_STATUS_IO_FULL)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
u32 __osSpGetStatus() {
|
||||
return *(vu32*)0xA4040010;
|
||||
return HW_REG(SP_STATUS_REG, u32);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#include "global.h"
|
||||
|
||||
s32 __osSpRawStartDma(s32 direction, void* devAddr, void* dramAddr, size_t size) {
|
||||
if (__osSpDeviceBusy() != 0) {
|
||||
if (__osSpDeviceBusy()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
*(vu32*)0xA4040000 = devAddr;
|
||||
*(vu32*)0xA4040004 = osVirtualToPhysical(dramAddr);
|
||||
HW_REG(SP_MEM_ADDR_REG, u32) = devAddr;
|
||||
HW_REG(SP_DRAM_ADDR_REG, u32) = osVirtualToPhysical(dramAddr);
|
||||
|
||||
if (direction == 0) {
|
||||
*(vu32*)0xA404000C = size - 1;
|
||||
if (direction == OS_READ) {
|
||||
HW_REG(SP_WR_LEN_REG, u32) = size - 1;
|
||||
} else {
|
||||
*(vu32*)0xA4040008 = size - 1;
|
||||
HW_REG(SP_RD_LEN_REG, u32) = size - 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
void __osSpSetStatus(u32 data) {
|
||||
*(vu32*)0xA4040010 = data;
|
||||
HW_REG(SP_STATUS_REG, u32) = data;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ void __osViInit(void) {
|
||||
__osViNext->modep = &osViModePalLan1;
|
||||
} else if (osTvType == OS_TV_MPAL) {
|
||||
__osViNext->modep = &osViModeMpalLan1;
|
||||
} else {
|
||||
} else { // OS_TV_NTSC or OS_TV_UNK28
|
||||
__osViNext->modep = &osViModeNtscLan1;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ void osViBlack(u8 active) {
|
||||
if (active) {
|
||||
__osViNext->state |= 0x20;
|
||||
} else {
|
||||
__osViNext->state &= 0xffdf;
|
||||
__osViNext->state &= ~0x20;
|
||||
}
|
||||
|
||||
__osRestoreInt(saveMask);
|
||||
|
||||
@@ -3,34 +3,33 @@
|
||||
void osViSetSpecialFeatures(u32 func) {
|
||||
register u32 saveMask = __osDisableInt();
|
||||
|
||||
if (func & 1) {
|
||||
__osViNext->features |= 8;
|
||||
if (func & OS_VI_GAMMA_ON) {
|
||||
__osViNext->features |= OS_VI_GAMMA;
|
||||
}
|
||||
if (func & 2) {
|
||||
__osViNext->features &= ~8;
|
||||
if (func & OS_VI_GAMMA_OFF) {
|
||||
__osViNext->features &= ~OS_VI_GAMMA;
|
||||
}
|
||||
if (func & 4) {
|
||||
__osViNext->features |= 4;
|
||||
if (func & OS_VI_GAMMA_DITHER_ON) {
|
||||
__osViNext->features |= OS_VI_GAMMA_DITHER;
|
||||
}
|
||||
if (func & 8) {
|
||||
if (func & OS_VI_GAMMA_DITHER_OFF) {
|
||||
__osViNext->features &= ~OS_VI_GAMMA_DITHER;
|
||||
}
|
||||
if (func & OS_VI_DIVOT_ON) {
|
||||
|
||||
__osViNext->features &= ~4;
|
||||
__osViNext->features |= OS_VI_DIVOT;
|
||||
}
|
||||
if (func & 0x10) {
|
||||
if (func & OS_VI_DIVOT_OFF) {
|
||||
|
||||
__osViNext->features |= 0x10;
|
||||
__osViNext->features &= ~OS_VI_DIVOT;
|
||||
}
|
||||
if (func & 0x20) {
|
||||
|
||||
__osViNext->features &= ~0x10;
|
||||
if (func & OS_VI_DITHER_FILTER_ON) {
|
||||
__osViNext->features |= OS_VI_DITHER_FILTER;
|
||||
__osViNext->features &= ~(OS_VI_UNK100 | OS_VI_UNK200);
|
||||
}
|
||||
if (func & 0x40) {
|
||||
__osViNext->features |= 0x10000;
|
||||
__osViNext->features &= ~0x300;
|
||||
}
|
||||
if (func & 0x80) {
|
||||
__osViNext->features &= ~0x10000;
|
||||
__osViNext->features |= __osViNext->modep->comRegs.ctrl & 0x300;
|
||||
if (func & OS_VI_DITHER_FILTER_OFF) {
|
||||
__osViNext->features &= ~OS_VI_DITHER_FILTER;
|
||||
__osViNext->features |= __osViNext->modep->comRegs.ctrl & (OS_VI_UNK100 | OS_VI_UNK200);
|
||||
}
|
||||
__osViNext->state |= 8;
|
||||
|
||||
|
||||
+271
-3
@@ -1,7 +1,275 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/xldtob/_Ldtob.s")
|
||||
#define BUFF_LEN 0x20
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/xldtob/_Ldunscale.s")
|
||||
s16 _Ldunscale(s16*, _Pft*);
|
||||
void _Genld(_Pft*, u8, u8*, s16, s16);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/boot/xldtob/_Genld.s")
|
||||
const f64 digs[] = { 10e0L, 10e1L, 10e3L, 10e7L, 10e15L, 10e31L, 10e63L, 10e127L, 10e255L };
|
||||
|
||||
/* float properties */
|
||||
#define _D0 0
|
||||
#define _DBIAS 0x3ff
|
||||
#define _DLONG 1
|
||||
#define _DOFF 4
|
||||
#define _FBIAS 0x7e
|
||||
#define _FOFF 7
|
||||
#define _FRND 1
|
||||
#define _LBIAS 0x3ffe
|
||||
#define _LOFF 15
|
||||
/* integer properties */
|
||||
#define _C2 1
|
||||
#define _CSIGN 1
|
||||
#define _ILONG 0
|
||||
#define _MBMAX 8
|
||||
#define NAN 2
|
||||
#define INF 1
|
||||
#define FINITE -1
|
||||
#define _DFRAC ((1 << _DOFF) - 1)
|
||||
#define _DMASK (0x7fff & ~_DFRAC)
|
||||
#define _DMAX ((1 << (15 - _DOFF)) - 1)
|
||||
#define _DNAN (0x8000 | _DMAX << _DOFF | 1 << (_DOFF - 1))
|
||||
#define _DSIGN 0x8000
|
||||
#if _D0 == 3
|
||||
#define _D1 2 /* little-endian order */
|
||||
#define _D2 1
|
||||
#define _D3 0
|
||||
#else
|
||||
#define _D1 1 /* big-endian order */
|
||||
#define _D2 2
|
||||
#define _D3 3
|
||||
#endif
|
||||
|
||||
void _Ldtob(_Pft* args, u8 type) {
|
||||
u8 buff[BUFF_LEN];
|
||||
u8* ptr = buff;
|
||||
u32 sp70;
|
||||
f64 val = args->v.ld;
|
||||
/* maybe struct? */
|
||||
s16 err;
|
||||
s16 nsig;
|
||||
s16 exp;
|
||||
s32 i;
|
||||
s32 n;
|
||||
f64 factor;
|
||||
s32 gen;
|
||||
s32 j;
|
||||
s32 lo;
|
||||
ldiv_t qr;
|
||||
u8 drop;
|
||||
s32 n2;
|
||||
|
||||
if (args->prec < 0) {
|
||||
args->prec = 6;
|
||||
} else if (args->prec == 0 && (type == 'g' || type == 'G')) {
|
||||
args->prec = 1;
|
||||
}
|
||||
err = _Ldunscale(&exp, (_Pft*)args);
|
||||
if (err > 0) {
|
||||
memcpy(args->s, err == 2 ? "NaN" : "Inf", args->n1 = 3);
|
||||
return;
|
||||
}
|
||||
if (err == 0) {
|
||||
nsig = 0;
|
||||
exp = 0;
|
||||
} else {
|
||||
if (val < 0) {
|
||||
val = -val;
|
||||
}
|
||||
exp = exp * 30103 / 0x000186A0 - 4;
|
||||
if (exp < 0) {
|
||||
n = (3 - exp) & ~3;
|
||||
exp = -n;
|
||||
for (i = 0; n > 0; n >>= 1, i++) {
|
||||
if ((n & 1) != 0) {
|
||||
val *= digs[i];
|
||||
}
|
||||
}
|
||||
} else if (exp > 0) {
|
||||
factor = 1;
|
||||
exp &= ~3;
|
||||
|
||||
for (n = exp, i = 0; n > 0; n >>= 1, i++) {
|
||||
if ((n & 1) != 0) {
|
||||
factor *= digs[i];
|
||||
}
|
||||
}
|
||||
val /= factor;
|
||||
}
|
||||
gen = ((type == 'f') ? exp + 10 : 6) + args->prec;
|
||||
if (gen > 0x13) {
|
||||
gen = 0x13;
|
||||
}
|
||||
*ptr++ = '0';
|
||||
while (gen > 0 && 0 < val) {
|
||||
lo = val;
|
||||
if ((gen -= 8) > 0) {
|
||||
val = (val - lo) * 1.0e8;
|
||||
}
|
||||
ptr = ptr + 8;
|
||||
for (j = 8; lo > 0 && --j >= 0;) {
|
||||
qr = ldiv(lo, 10);
|
||||
*--ptr = qr.rem + '0';
|
||||
lo = qr.quot;
|
||||
}
|
||||
while (--j >= 0) {
|
||||
ptr--;
|
||||
*ptr = '0';
|
||||
}
|
||||
ptr += 8;
|
||||
}
|
||||
|
||||
gen = ptr - &buff[1];
|
||||
for (ptr = &buff[1], exp += 7; *ptr == '0'; ptr++) {
|
||||
--gen, --exp;
|
||||
}
|
||||
|
||||
nsig = ((type == 'f') ? exp + 1 : ((type == 'e' || type == 'E') ? 1 : 0)) + args->prec;
|
||||
if (gen < nsig) {
|
||||
nsig = gen;
|
||||
}
|
||||
if (nsig > 0) {
|
||||
if (nsig < gen && ptr[nsig] > '4') {
|
||||
drop = '9';
|
||||
} else {
|
||||
drop = '0';
|
||||
}
|
||||
|
||||
for (n2 = nsig; ptr[--n2] == drop;) {
|
||||
nsig--;
|
||||
}
|
||||
if (drop == '9') {
|
||||
ptr[n2]++;
|
||||
}
|
||||
if (n2 < 0) {
|
||||
--ptr, ++nsig, ++exp;
|
||||
}
|
||||
}
|
||||
}
|
||||
_Genld((_Pft*)args, type, ptr, nsig, exp);
|
||||
}
|
||||
|
||||
s16 _Ldunscale(s16* pex, _Pft* px) {
|
||||
u16* ps = (u16*)px;
|
||||
s16 xchar = (ps[_D0] & _DMASK) >> _DOFF;
|
||||
|
||||
if (xchar == _DMAX) { /* NaN or INF */
|
||||
*pex = 0;
|
||||
return (s16)(ps[_D0] & _DFRAC || ps[_D1] || ps[_D2] || ps[_D3] ? NAN : INF);
|
||||
} else if (0 < xchar) {
|
||||
ps[_D0] = (ps[_D0] & ~_DMASK) | (_DBIAS << _DOFF);
|
||||
*pex = xchar - (_DBIAS - 1);
|
||||
return FINITE;
|
||||
}
|
||||
if (0 > xchar) {
|
||||
return NAN;
|
||||
} else {
|
||||
*pex = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void _Genld(_Pft* px, u8 code, u8* p, s16 nsig, s16 xexp) {
|
||||
u8 point = '.';
|
||||
|
||||
if (nsig <= 0) {
|
||||
nsig = 1,
|
||||
|
||||
p = (u8*)"0";
|
||||
}
|
||||
|
||||
if (code == 'f' || ((code == 'g' || code == 'G') && (-4 <= xexp) && (xexp < px->prec))) { /* 'f' format */
|
||||
++xexp; /* change to leading digit count */
|
||||
if (code != 'f') { /* fixup for 'g' */
|
||||
if (!(px->flags & FLAGS_HASH) && nsig < px->prec) {
|
||||
px->prec = nsig;
|
||||
}
|
||||
if ((px->prec -= xexp) < 0) {
|
||||
px->prec = 0;
|
||||
}
|
||||
}
|
||||
if (xexp <= 0) { /* digits only to right of point */
|
||||
px->s[px->n1++] = '0';
|
||||
if (0 < px->prec || px->flags & FLAGS_HASH) {
|
||||
px->s[px->n1++] = point;
|
||||
}
|
||||
if (px->prec < -xexp) {
|
||||
xexp = -px->prec;
|
||||
}
|
||||
px->nz1 = -xexp;
|
||||
px->prec += xexp;
|
||||
if (px->prec < nsig) {
|
||||
nsig = px->prec;
|
||||
}
|
||||
memcpy(&px->s[px->n1], p, px->n2 = nsig);
|
||||
px->nz2 = px->prec - nsig;
|
||||
} else if (nsig < xexp) { /* zeros before point */
|
||||
memcpy(&px->s[px->n1], p, nsig);
|
||||
px->n1 += nsig;
|
||||
px->nz1 = xexp - nsig;
|
||||
if (0 < px->prec || px->flags & FLAGS_HASH) {
|
||||
px->s[px->n1] = point, ++px->n2;
|
||||
}
|
||||
px->nz2 = px->prec;
|
||||
} else { /* enough digits before point */
|
||||
memcpy(&px->s[px->n1], p, xexp);
|
||||
px->n1 += xexp;
|
||||
nsig -= xexp;
|
||||
if (0 < px->prec || px->flags & FLAGS_HASH) {
|
||||
px->s[px->n1++] = point;
|
||||
}
|
||||
if (px->prec < nsig) {
|
||||
nsig = px->prec;
|
||||
}
|
||||
memcpy(&px->s[px->n1], p + xexp, nsig);
|
||||
px->n1 += nsig;
|
||||
px->nz1 = px->prec - nsig;
|
||||
}
|
||||
} else { /* 'e' format */
|
||||
if (code == 'g' || code == 'G') { /* fixup for 'g' */
|
||||
if (nsig < px->prec) {
|
||||
px->prec = nsig;
|
||||
}
|
||||
if (--px->prec < 0) {
|
||||
px->prec = 0;
|
||||
}
|
||||
code = code == 'g' ? 'e' : 'E';
|
||||
}
|
||||
px->s[px->n1++] = *p++;
|
||||
if (0 < px->prec || px->flags & FLAGS_HASH) {
|
||||
px->s[px->n1++] = point;
|
||||
}
|
||||
if (0 < px->prec) { /* put fraction digits */
|
||||
if (px->prec < --nsig) {
|
||||
nsig = px->prec;
|
||||
}
|
||||
memcpy(&px->s[px->n1], p, nsig);
|
||||
px->n1 += nsig;
|
||||
px->nz1 = px->prec - nsig;
|
||||
}
|
||||
p = (u8*)&px->s[px->n1]; /* put exponent */
|
||||
*p++ = code;
|
||||
if (0 <= xexp) {
|
||||
*p++ = '+';
|
||||
} else { /* negative exponent */
|
||||
*p++ = '-';
|
||||
xexp = -xexp;
|
||||
}
|
||||
if (100 <= xexp) { /* put oversize exponent */
|
||||
if (1000 <= xexp) {
|
||||
*p++ = xexp / 1000 + '0', xexp %= 1000;
|
||||
}
|
||||
*p++ = xexp / 100 + '0', xexp %= 100;
|
||||
}
|
||||
*p++ = xexp / 10 + '0', xexp %= 10;
|
||||
*p++ = xexp + '0';
|
||||
px->n2 = p - (u8*)&px->s[px->n1];
|
||||
}
|
||||
if ((px->flags & (FLAGS_ZERO | FLAGS_MINUS)) == FLAGS_ZERO) { /* pad with leading zeros */
|
||||
s32 n = px->n0 + px->n1 + px->nz1 + px->n2 + px->nz2;
|
||||
|
||||
if (n < px->width) {
|
||||
px->nz0 = px->width - n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#define _PROUT(fmt, _size) \
|
||||
if (_size > 0) { \
|
||||
arg = (void*)pfn(arg, fmt, _size); \
|
||||
if (arg != 0) \
|
||||
if (arg != NULL) \
|
||||
x.nchar += _size; \
|
||||
else \
|
||||
return x.nchar; \
|
||||
|
||||
@@ -232,8 +232,8 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
} else {
|
||||
CollisionPoly* poly;
|
||||
u32 bgId;
|
||||
Vec3f sp78;
|
||||
s32 bgId;
|
||||
Vec3f posResult;
|
||||
Vec3f prevFrameDiff;
|
||||
Vec3f sp60;
|
||||
|
||||
@@ -244,20 +244,23 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
|
||||
sp60.x = this->unk1EC.x - (this->unk1E0.x - this->unk1EC.x);
|
||||
sp60.y = this->unk1EC.y - (this->unk1E0.y - this->unk1EC.y);
|
||||
sp60.z = this->unk1EC.z - (this->unk1E0.z - this->unk1EC.z);
|
||||
if (func_800C55C4(&globalCtx->colCtx, &sp60, &this->unk1E0, &sp78, &poly, 1, 1, 1, 1, &bgId) != 0 &&
|
||||
(func_800B90AC(globalCtx, &this->actor, poly, bgId, &sp78) == 0 ||
|
||||
func_800C576C(&globalCtx->colCtx, &sp60, &this->unk1E0, &sp78, &poly, 1, 1, 1, 1, &bgId) != 0)) {
|
||||
f32 sp5C = poly->normal.x * (1 / SHT_MAX);
|
||||
f32 sp58 = poly->normal.z * (1 / SHT_MAX);
|
||||
if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp60, &this->unk1E0, &posResult, &poly, true, true, true, true,
|
||||
&bgId) &&
|
||||
(func_800B90AC(globalCtx, &this->actor, poly, bgId, &posResult) == 0 ||
|
||||
BgCheck_ProjectileLineTest(&globalCtx->colCtx, &sp60, &this->unk1E0, &posResult, &poly, true, true, true,
|
||||
true, &bgId))) {
|
||||
f32 nx = COLPOLY_GET_NORMAL(poly->normal.x);
|
||||
f32 nz = COLPOLY_GET_NORMAL(poly->normal.z);
|
||||
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp78);
|
||||
this->actor.world.pos.x += 10.0f * sp5C;
|
||||
this->actor.world.pos.z += 10.0f * sp58;
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &posResult);
|
||||
this->actor.world.pos.x += 10.0f * nx;
|
||||
this->actor.world.pos.z += 10.0f * nz;
|
||||
this->timer = 1;
|
||||
if (func_800C9CEC(&globalCtx->colCtx, poly, bgId)) {
|
||||
if (SurfaceType_IsHookshotSurface(&globalCtx->colCtx, poly, bgId)) {
|
||||
{
|
||||
DynaPolyActor* dynaPolyActor;
|
||||
if (bgId != 0x32 && (dynaPolyActor = BgCheck_GetActorOfMesh(&globalCtx->colCtx, bgId)) != NULL) {
|
||||
if (bgId != BGCHECK_SCENE &&
|
||||
(dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, bgId)) != NULL) {
|
||||
ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,11 +143,11 @@ void BgCtowerGear_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
}
|
||||
if (type == WATER_WHEEL) {
|
||||
BcCheck3_BgActorInit(&this->dyna, 3);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06018588);
|
||||
DynaPolyActor_Init(&this->dyna, 3);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06018588);
|
||||
} else if (type == ORGAN) {
|
||||
BcCheck3_BgActorInit(&this->dyna, 0);
|
||||
BgCheck3_LoadMesh(globalCtx, &this->dyna, &D_06016E70);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &D_06016E70);
|
||||
func_800C62BC(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ void BgCtowerGear_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
||||
type = BGCTOWERGEAR_GET_TYPE(this);
|
||||
if ((type == WATER_WHEEL) || (type == ORGAN)) {
|
||||
BgCheck_RemoveActorMesh(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user