You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Refresh 14
This commit is contained in:
229
include/PR/abi.h
229
include/PR/abi.h
@@ -56,13 +56,14 @@
|
||||
|
||||
#define A_ADDMIXER 4
|
||||
#define A_RESAMPLE_ZOH 6
|
||||
#define A_INTERL 17
|
||||
#define A_DMEMMOVE2 16
|
||||
#define A_DOWNSAMPLE_HALF 17
|
||||
#define A_ENVSETUP1 18
|
||||
#define A_ENVMIXER 19
|
||||
#define A_LOADBUFF 20
|
||||
#define A_SAVEBUFF 21
|
||||
#define A_ENVSETUP2 22
|
||||
#define A_UNK_23 23
|
||||
#define A_S8DEC 23
|
||||
#define A_HILOGAIN 24
|
||||
#define A_UNK_25 25
|
||||
#define A_DUPLICATE 26
|
||||
@@ -306,6 +307,8 @@ typedef short ENVMIX_STATE[40];
|
||||
* address is later used as parameter, the 8 high bits will be an index
|
||||
* to the segment table and the lower 24 bits are added to the base address
|
||||
* stored in the segment table for this entry. The result is the physical address.
|
||||
* With the newer rsp audio code, this segment table is not used. The address is
|
||||
* used directly instead.
|
||||
*
|
||||
* Transfers to/from DRAM are executed using DMA and hence follow these restrictions:
|
||||
* All DRAM addresses should be aligned by 8 bytes, or they will be
|
||||
@@ -349,14 +352,6 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
#define aADPCM_23(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_UNK_23, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Not used in SM64.
|
||||
*/
|
||||
@@ -570,15 +565,6 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
#define aInterl(pkt, f, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_INTERL, 24, 8) | _SHIFTL(f, 16, 8) | \
|
||||
_SHIFTL(i, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets internal volume parameters.
|
||||
* See aEnvMixer for more info.
|
||||
@@ -663,12 +649,50 @@ typedef short ENVMIX_STATE[40];
|
||||
#undef aEnvMixer
|
||||
#undef aInterleave
|
||||
|
||||
// New or modified operations in the new audio microcode below
|
||||
|
||||
/**
|
||||
* Decompresses S8 data.
|
||||
* Possible flags: A_INIT and A_LOOP.
|
||||
*
|
||||
* First set up internal data in DMEM:
|
||||
* aSetLoop(cmd++, physicalAddressOfLoopState) (if A_LOOP is set)
|
||||
*
|
||||
* Then before this command, call:
|
||||
* aSetBuffer(cmd++, 0, in, out, count)
|
||||
*
|
||||
* Note: count will be rounded up to the nearest multiple of 32 bytes.
|
||||
*
|
||||
* S8 decompression works by expanding s8 bytes into s16 numbers,
|
||||
* by performing a left shift of 8 steps.
|
||||
*
|
||||
* Before the algorithm starts, the previous 16 samples are loaded according to flag:
|
||||
* A_INIT: all zeros
|
||||
* A_LOOP: the address set by aSetLoop
|
||||
* no flags: the DRAM address in the s parameter
|
||||
* These 16 samples are immediately copied to the destination address.
|
||||
*
|
||||
* The result of "count" bytes will be written after these 16 initial samples.
|
||||
* The last 16 samples written to the destination will also be written to
|
||||
* the state address in DRAM.
|
||||
*/
|
||||
#define aS8Dec(pkt, f, s) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_S8DEC, 24, 8) | _SHIFTL(f, 16, 8); \
|
||||
_a->words.w1 = (uintptr_t)(s); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Mix two tracks by simple clamped addition.
|
||||
*
|
||||
* s: DMEM source track 1
|
||||
* d: DMEM source track 2 and destination
|
||||
* c: number of bytes to write (rounded down to 16 byte alignment)
|
||||
* c: number of bytes to write
|
||||
*
|
||||
* Note: count is first rounded down to the nearest multiple of 16 bytes
|
||||
* and then rounded up to the nearest multiple of 64 bytes.
|
||||
*/
|
||||
#define aAddMixer(pkt, s, d, c) \
|
||||
{ \
|
||||
@@ -726,6 +750,28 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (_SHIFTL(d, 16, 16) | _SHIFTL(0x80, 0, 16)); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Copies memory in DMEM, second version.
|
||||
*
|
||||
* Copies t * c bytes from address i to address o.
|
||||
*
|
||||
* Note: count is first rounded up to the nearest multiple of 32 bytes,
|
||||
* before the multiplication by t.
|
||||
*
|
||||
* Note: This acts as memcpy where 32 bytes are moved at a time, therefore
|
||||
* if input and output overlap, output address should be less than input address.
|
||||
*
|
||||
* Not used in SM64.
|
||||
*/
|
||||
#define aDMEMMove2(pkt, t, i, o, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_DMEMMOVE2, 24, 8) | \
|
||||
_SHIFTL(t, 16, 8) | _SHIFTL(i, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(o, 16, 16) | _SHIFTL(c, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Fast resample.
|
||||
*
|
||||
@@ -734,14 +780,37 @@ typedef short ENVMIX_STATE[40];
|
||||
*
|
||||
* This works like the other resample command but just takes the "nearest" sample,
|
||||
* instead of a function of the four nearest samples.
|
||||
*
|
||||
* Initially the current position is calculated as (in << 16) + startFract.
|
||||
* For every sample to create, the value is simply taken from the sample
|
||||
* at address ((position >> 17) << 1). Then the current position is incremented
|
||||
* by (pitch << 2).
|
||||
*
|
||||
* Note: count represents the number of output bytes to create, and is
|
||||
* rounded up to the nearest multiple of 8 bytes.
|
||||
*/
|
||||
#define aResampleZoh(pkt, pitch, start_fract) \
|
||||
#define aResampleZoh(pkt, pitch, startFract) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_RESAMPLE_ZOH, 24, 8) | \
|
||||
_SHIFTL(pitch, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(start_fract, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(startFract, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Fast downsampling by taking every other sample, discarding others.
|
||||
*
|
||||
* Note: nSamples refers to the number of output samples to create, and
|
||||
* is first rounded up to the nearest multiple of 8.
|
||||
*/
|
||||
#define aDownsampleHalf(pkt, nSamples, i, o) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_DOWNSAMPLE_HALF, 24, 8) | \
|
||||
_SHIFTL(nSamples, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -764,39 +833,87 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(i, 16, 16) | _SHIFTL(o, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvSetup1(pkt, a, b, c, d) \
|
||||
/*
|
||||
* See aEnvMixer for more info.
|
||||
*/
|
||||
#define aEnvSetup1(pkt, initialVolReverb, rampReverb, rampLeft, rampRight) \
|
||||
{ \
|
||||
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); \
|
||||
_SHIFTL(initialVolReverb, 16, 8) | \
|
||||
_SHIFTL(rampReverb, 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL(rampLeft, 16, 16) | \
|
||||
_SHIFTL(rampRight, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvSetup2(pkt, volLeft, volRight) \
|
||||
/*
|
||||
* See aEnvMixer for more info.
|
||||
*/
|
||||
#define aEnvSetup2(pkt, initialVolLeft, initialVolRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_ENVSETUP2, 24, 8); \
|
||||
_a->words.w1 = _SHIFTL(volLeft, 16, 16) | \
|
||||
_SHIFTL(volRight, 0, 16); \
|
||||
_a->words.w1 = _SHIFTL(initialVolLeft, 16, 16) | \
|
||||
_SHIFTL(initialVolRight, 0, 16); \
|
||||
}
|
||||
|
||||
#define aEnvMixer(pkt, inBuf, nSamples, bit1, bit2, bit3, dryLeft, dryRight, wetLeft, wetRight) \
|
||||
/*
|
||||
* Mixes an envelope with mono sound into 4 channels.
|
||||
*
|
||||
* To allow for many parameters, a sequence of aEnvSetup1, aEnvSetup2,
|
||||
* aEnvMixer shall always be called.
|
||||
*
|
||||
* The function works in blocks of 8 samples.
|
||||
* However, nSamples is rounded up to the nearest multiple of 16 samples.
|
||||
*
|
||||
* For each sample in a block:
|
||||
* 1. sampleLeft = in * volLeft * (negLeft ? -1 : 1)
|
||||
* 2. sampleRight = in * volRight * (negRight ? -1 : 1)
|
||||
* 3. dryLeft += sampleLeft
|
||||
* 4. dryRight += sampleRight
|
||||
* 5. if swapReverb: swap sampleLeft and sampleRight
|
||||
* 6. wetLeft += sampleLeft * volReverb
|
||||
* 7. wetRight += sampleRight * volReverb
|
||||
*
|
||||
* After each block, all vol variables are added by their corresponding
|
||||
* ramp value.
|
||||
*
|
||||
* Each volume variable is treated as a UQ0.16 number. Make sure
|
||||
* the ramp additions don't overflow, or wrapping will occur.
|
||||
* The initialVolReverb parameter is only 8 bits, but will be left
|
||||
* shifted 8 bits by the rsp.
|
||||
*/
|
||||
#define aEnvMixer(pkt, inBuf, nSamples, swapReverb, negLeft, negRight, \
|
||||
dryLeft, dryRight, wetLeft, wetRight) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | \
|
||||
_SHIFTL((inBuf) >> 4, 16, 8) | \
|
||||
_SHIFTL(nSamples, 8, 8)) | \
|
||||
_SHIFTL(bit1, 2, 1) | _SHIFTL(bit2, 1, 1) | \
|
||||
_SHIFTL(bit3, 0, 1); \
|
||||
_SHIFTL(swapReverb, 2, 1) | _SHIFTL(negLeft, 1, 1) |\
|
||||
_SHIFTL(negRight, 0, 1); \
|
||||
_a->words.w1 = _SHIFTL((dryLeft) >> 4, 24, 8) | \
|
||||
_SHIFTL((dryRight) >> 4, 16, 8) | \
|
||||
_SHIFTL((wetLeft) >> 4, 8, 8) | \
|
||||
_SHIFTL((wetRight) >> 4, 0, 8); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Interleaves two mono channels into stereo.
|
||||
*
|
||||
* The count refers to the size of each input. Hence 2 * count bytes
|
||||
* will be written out.
|
||||
*
|
||||
* A left sample will be placed before the right sample.
|
||||
* All addresses (output, left, right) are DMEM addresses.
|
||||
*
|
||||
* Note: count will be rounded up to the nearest multiple of 8 bytes.
|
||||
* The previous version of this function rounded up to the nearest
|
||||
* multiple of 16 bytes.
|
||||
*/
|
||||
#define aInterleave(pkt, o, l, r, c) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
@@ -806,7 +923,26 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = _SHIFTL(l, 16, 16) | _SHIFTL(r, 0, 16); \
|
||||
}
|
||||
|
||||
// countOrBuf meaning depends on flag
|
||||
/*
|
||||
* Linear filter function.
|
||||
*
|
||||
* Calculates out[i] = sum all elements in the vector in[i..i-7] * filter[0..7],
|
||||
* where "*" represents dot multiplication. The input/output contains s16
|
||||
* samples and filter contains Q1.15 signed fixed point numbers.
|
||||
* Every result sample is rounded and clamped.
|
||||
*
|
||||
* First initiate by calling with the flag f set to 2, countOrBuf contains
|
||||
* the length in bytes that shall be processed in the next call. The addr
|
||||
* parameter shall contain the DRAM address to the filter table (16 bytes).
|
||||
* The count will be rounded up to the nearest multiple of 16 bytes.
|
||||
*
|
||||
* The aFilter function shall then be called in direct succession, with flag
|
||||
* set to either 0 or 1. The countOrBuf parameter shall contain the DMEM
|
||||
* address for the input/output. The addr parameter shall contain the DRAM
|
||||
* address for the state, containing the last previous 8 input samples.
|
||||
* The state is always written to upon exit, but is only read at entry if
|
||||
* the flag is 0 (otherwise all-zero samples are used instead).
|
||||
*/
|
||||
#define aFilter(pkt, f, countOrBuf, addr) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
@@ -816,22 +952,41 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (uintptr_t)(addr); \
|
||||
}
|
||||
|
||||
#define aHilogain(pkt, id, buflen, i) \
|
||||
/*
|
||||
* Modifies the volume of samples using a simple UQ4.4 gain multiplier.
|
||||
*
|
||||
* Performs the following:
|
||||
*
|
||||
* 1. Count c is rounded up to 32 byte alignment
|
||||
* 2. g is a u8 that contains a UQ4.4 number
|
||||
* 3. Modify each sample s, so that s = clamp_s16(s * g >> 4)
|
||||
*/
|
||||
#define aHiLoGain(pkt, g, buflen, i) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = _SHIFTL(A_HILOGAIN, 24, 8) | \
|
||||
_SHIFTL((id), 16, 8) | _SHIFTL((buflen), 0, 16); \
|
||||
_SHIFTL((g), 16, 8) | _SHIFTL((buflen), 0, 16); \
|
||||
_a->words.w1 = _SHIFTL((i), 16, 16); \
|
||||
}
|
||||
|
||||
#define aUnknown25(pkt, f, g, i, o) \
|
||||
/*
|
||||
* Performs the following:
|
||||
*
|
||||
* 1. Count c is rounded up to 64 byte alignment
|
||||
* 2. f is added to i
|
||||
* 3. i and o are from now treated as s16 pointers
|
||||
* 4. 32 s16 samples are loaded from i to tbl
|
||||
* 5. for (u32 idx = 0; idx * sizeof(s16) < c; idx++)
|
||||
* o[idx] = clamp_s16((s32)o[idx] * (s32)tbl[idx % 32]);
|
||||
*/
|
||||
#define aUnknown25(pkt, f, c, o, i) \
|
||||
{ \
|
||||
Acmd *_a = (Acmd *)pkt; \
|
||||
\
|
||||
_a->words.w0 = (_SHIFTL(A_UNK_25, 24, 8) | \
|
||||
_SHIFTL((f), 16, 8) | _SHIFTL((g), 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL((i), 16, 16) | _SHIFTL((o), 0, 16); \
|
||||
_SHIFTL((f), 16, 8) | _SHIFTL((c), 0, 16)); \
|
||||
_a->words.w1 = _SHIFTL((o), 16, 16) | _SHIFTL((i), 0, 16); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,8 @@ typedef struct
|
||||
u8 *offset;
|
||||
s32 len;
|
||||
#ifdef VERSION_SH
|
||||
s8 magic[2]; // tbl: 0x0204, otherwise: 0x0203
|
||||
s8 medium;
|
||||
s8 magic; // tbl: 0x04, otherwise: 0x03
|
||||
|
||||
// for ctl (else zeros):
|
||||
union {
|
||||
@@ -38,7 +39,9 @@ typedef struct
|
||||
#ifdef VERSION_SH
|
||||
s16 unk2;
|
||||
u8 *data;
|
||||
#if !IS_64_BIT
|
||||
s32 pad[2];
|
||||
#endif
|
||||
#endif
|
||||
ALSeqData seqArray[1];
|
||||
} ALSeqFile;
|
||||
|
||||
800
include/PR/os.h
Normal file
800
include/PR/os.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -261,7 +261,7 @@ extern const BehaviorScript bhvBoo[];
|
||||
extern const BehaviorScript bhvMerryGoRoundBoo[];
|
||||
extern const BehaviorScript bhvGhostHuntBoo[];
|
||||
extern const BehaviorScript bhvHiddenStaircaseStep[];
|
||||
extern const BehaviorScript bhvBooBossSpawnedBridge[];
|
||||
extern const BehaviorScript bhvBooStaircase[];
|
||||
extern const BehaviorScript bhvBbhTiltingTrapPlatform[];
|
||||
extern const BehaviorScript bhvHauntedBookshelf[];
|
||||
extern const BehaviorScript bhvMeshElevator[];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// Bug Fixes
|
||||
// --| US Version Nintendo Bug Fixes
|
||||
// --| Post-JP Version Nintendo Bug Fixes
|
||||
/// Fixes bug where obtaining over 999 coins sets the number of lives to 999 (or -25)
|
||||
#define BUGFIX_MAX_LIVES (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug where the Boss music won't fade out after defeating King Bob-omb
|
||||
@@ -22,6 +22,17 @@
|
||||
#define BUGFIX_PIRANHA_PLANT_SLEEP_DAMAGE (0 || VERSION_US || VERSION_SH)
|
||||
/// Fixes bug where it shows a star when you grab a key in bowser battle stages
|
||||
#define BUGFIX_STAR_BOWSER_KEY (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug that enables Mario in time stop even if is not ready to speak
|
||||
#define BUGFIX_DIALOG_TIME_STOP (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug that causes Mario to still collide with Bowser in BITS after his defeat
|
||||
#define BUGFIX_BOWSER_COLLIDE_BITS_DEAD (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug where Bowser wouldn't reset his speed when fallen off (and adds missing checks)
|
||||
#define BUGFIX_BOWSER_FALLEN_OFF_STAGE (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug where Bowser would look weird while fading out
|
||||
#define BUGFIX_BOWSER_FADING_OUT (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
|
||||
// Support Rumble Pak
|
||||
#define ENABLE_RUMBLE (0 || VERSION_SH)
|
||||
|
||||
// Screen Size Defines
|
||||
#define SCREEN_WIDTH 320
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define DIALOG_IDS_H
|
||||
|
||||
enum DialogId {
|
||||
DIALOG_NONE = -1,
|
||||
DIALOG_000,
|
||||
DIALOG_001,
|
||||
DIALOG_002,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Assembly Macros
|
||||
// Assembly Macros
|
||||
|
||||
.set K0BASE, 0x80000000
|
||||
.set K1BASE, 0xA0000000
|
||||
|
||||
@@ -410,12 +410,12 @@
|
||||
|
||||
// second set of actor bins, (0x64-0x73)
|
||||
// group 12
|
||||
#define MODEL_BOWSER 0x64 // bowser_geo - 2nd geo loaded is bowser_geo_000424, starts with shadow command
|
||||
#define MODEL_BOWSER 0x64 // bowser_geo
|
||||
#define MODEL_BOWSER_BOMB_CHILD_OBJ 0x65 // bowser_bomb_geo - Spawns as a chill object in bowser's behavior command, causing an explosion if it touches a bomb
|
||||
#define MODEL_BOWSER_SMOKE 0x66 // bowser_impact_smoke_geo
|
||||
#define MODEL_BOWSER_FLAMES 0x67 // bowser_flames_geo
|
||||
#define MODEL_BOWSER_WAVE 0x68 // invisible_bowser_accessory_geo
|
||||
#define MODEL_BOWSER2 0x69 // bowser2_geo - 2nd geo loaded is bowser_geo_000770, starts with node command, only difference
|
||||
#define MODEL_BOWSER_NO_SHADOW 0x69 // bowser_geo_no_shadow
|
||||
|
||||
// group 13
|
||||
#define MODEL_BUB 0x64 // cheep_cheep_geo
|
||||
@@ -531,7 +531,7 @@
|
||||
#define MODEL_KOOPA_WITHOUT_SHELL 0xBF // koopa_without_shell_geo
|
||||
#define MODEL_GOOMBA 0xC0 // goomba_geo
|
||||
#define MODEL_SEAWEED 0xC1 // seaweed_geo
|
||||
#define MODEL_AMP 0xC2 // amp_geo
|
||||
#define MODEL_AMP 0xC2 // dAmpGeo
|
||||
#define MODEL_BOBOMB_BUDDY 0xC3 // bobomb_buddy_geo
|
||||
// find me
|
||||
// find me
|
||||
|
||||
@@ -53,23 +53,18 @@
|
||||
#define HELD_DROPPED 3
|
||||
|
||||
/* oDialogState */
|
||||
#define DIALOG_UNK1_ENABLE_TIME_STOP 0
|
||||
#define DIALOG_UNK1_INTERRUPT_MARIO_ACTION 1
|
||||
#define DIALOG_UNK1_BEGIN_DIALOG 2
|
||||
#define DIALOG_UNK1_AWAIT_DIALOG 3
|
||||
#define DIALOG_UNK1_DISABLE_TIME_STOP 4
|
||||
#define DIALOG_STATUS_ENABLE_TIME_STOP 0
|
||||
#define DIALOG_STATUS_INTERRUPT 1
|
||||
#define DIALOG_STATUS_START_DIALOG 2
|
||||
#define DIALOG_STATUS_STOP_DIALOG 3
|
||||
#define DIALOG_STATUS_DISABLE_TIME_STOP 4
|
||||
|
||||
#define DIALOG_UNK1_FLAG_DEFAULT (1 << 1) // 0x02
|
||||
#define DIALOG_UNK1_FLAG_RESPONSE (1 << 2) // 0x04
|
||||
#define DIALOG_UNK1_FLAG_4 (1 << 4) // 0x10
|
||||
|
||||
#define DIALOG_UNK2_ENABLE_TIME_STOP 0
|
||||
#define DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION 1
|
||||
#define DIALOG_UNK2_AWAIT_DIALOG 2
|
||||
#define DIALOG_UNK2_END_DIALOG 3
|
||||
|
||||
#define DIALOG_UNK2_FLAG_0 (1 << 0) // 0x01
|
||||
#define DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED (1 << 4) // 0x10
|
||||
#define DIALOG_FLAG_NONE 0
|
||||
#define DIALOG_FLAG_TURN_TO_MARIO (1 << 0) // 0x01 // cutscene only
|
||||
#define DIALOG_FLAG_TEXT_DEFAULT (1 << 1) // 0x02
|
||||
#define DIALOG_FLAG_TEXT_RESPONSE (1 << 2) // 0x04 // non-cutscene only
|
||||
#define DIALOG_FLAG_UNK_CAPSWITCH (1 << 3) // 0x08 // not defined
|
||||
#define DIALOG_FLAG_TIME_STOP_ENABLED (1 << 4) // 0x10
|
||||
|
||||
/* oMoveFlags */
|
||||
#define OBJ_MOVE_LANDED (1 << 0) // 0x0001
|
||||
@@ -191,6 +186,112 @@
|
||||
#define BOBOMB_BUDDY_HAS_NOT_TALKED 0
|
||||
#define BOBOMB_BUDDY_HAS_TALKED 2
|
||||
|
||||
/* Bowser */
|
||||
/* Tail oAction */
|
||||
#define BOWSER_ACT_TAIL_DEFAULT 0
|
||||
#define BOWSER_ACT_TAIL_THROWN 1
|
||||
#define BOWSER_ACT_TAIL_TOUCHED_MARIO 2
|
||||
/* oAction */
|
||||
#define BOWSER_ACT_DEFAULT 0
|
||||
#define BOWSER_ACT_THROWN 1
|
||||
#define BOWSER_ACT_JUMP_ONTO_STAGE 2
|
||||
#define BOWSER_ACT_DANCE 3
|
||||
#define BOWSER_ACT_DEAD 4
|
||||
#define BOWSER_ACT_WAIT 5
|
||||
#define BOWSER_ACT_INTRO_WALK 6
|
||||
#define BOWSER_ACT_CHARGE_MARIO 7
|
||||
#define BOWSER_ACT_SPIT_FIRE_INTO_SKY 8
|
||||
#define BOWSER_ACT_SPIT_FIRE_ONTO_FLOOR 9
|
||||
#define BOWSER_ACT_HIT_EDGE 10
|
||||
#define BOWSER_ACT_TURN_FROM_EDGE 11
|
||||
#define BOWSER_ACT_HIT_MINE 12
|
||||
#define BOWSER_ACT_BIG_JUMP 13
|
||||
#define BOWSER_ACT_WALK_TO_MARIO 14
|
||||
#define BOWSER_ACT_BREATH_FIRE 15
|
||||
#define BOWSER_ACT_TELEPORT 16
|
||||
#define BOWSER_ACT_QUICK_JUMP 17
|
||||
#define BOWSER_ACT_UNUSED_SLOW_WALK 18
|
||||
#define BOWSER_ACT_TILT_LAVA_PLATFORM 19
|
||||
/* Animations */
|
||||
#define BOWSER_ANIM_STAND_UP 0
|
||||
#define BOWSER_ANIM_STAND_UP_UNUSED 1 // slightly different
|
||||
#define BOWSER_ANIM_SHAKING 2
|
||||
#define BOWSER_ANIM_GRABBED 3
|
||||
#define BOWSER_ANIM_BROKEN 4 // broken animation
|
||||
#define BOWSER_ANIM_FALL_DOWN 5 // unused
|
||||
#define BOWSER_ANIM_BREATH 6
|
||||
#define BOWSER_ANIM_JUMP 7 // unused, short jump, replaced by start/stop
|
||||
#define BOWSER_ANIM_JUMP_STOP 8
|
||||
#define BOWSER_ANIM_JUMP_START 9
|
||||
#define BOWSER_ANIM_DANCE 10
|
||||
#define BOWSER_ANIM_BREATH_UP 11
|
||||
#define BOWSER_ANIM_IDLE 12
|
||||
#define BOWSER_ANIM_SLOW_GAIT 13
|
||||
#define BOWSER_ANIM_LOOK_DOWN_STOP_WALK 14
|
||||
#define BOWSER_ANIM_LOOK_UP_START_WALK 15
|
||||
#define BOWSER_ANIM_FLIP_DOWN 16
|
||||
#define BOWSER_ANIM_LAY_DOWN 17
|
||||
#define BOWSER_ANIM_RUN_START 18
|
||||
#define BOWSER_ANIM_RUN 19
|
||||
#define BOWSER_ANIM_RUN_STOP 20
|
||||
#define BOWSER_ANIM_RUN_SLIP 21
|
||||
#define BOWSER_ANIM_BREATH_QUICK 22
|
||||
#define BOWSER_ANIM_EDGE_MOVE 23
|
||||
#define BOWSER_ANIM_EDGE_STOP 24
|
||||
#define BOWSER_ANIM_FLIP 25
|
||||
#define BOWSER_ANIM_STAND_UP_FROM_FLIP 26
|
||||
/* oBehParams2ndByte */
|
||||
#define BOWSER_BP_BITDW 0
|
||||
#define BOWSER_BP_BITFS 1
|
||||
#define BOWSER_BP_BITS 2
|
||||
/* oBowserCamAct */
|
||||
#define BOWSER_CAM_ACT_IDLE 0
|
||||
#define BOWSER_CAM_ACT_WALK 1
|
||||
#define BOWSER_CAM_ACT_END 2
|
||||
/* oBowserStatus */
|
||||
#define BOWSER_STATUS_ANGLE_MARIO (1 << 1) // 0x00000002
|
||||
#define BOWSER_STATUS_ANGLE_CENTRE (1 << 2) // 0x00000004
|
||||
#define BOWSER_STATUS_DIST_MARIO (1 << 3) // 0x00000008
|
||||
#define BOWSER_STATUS_DIST_CENTRE (1 << 4) // 0x00000010
|
||||
#define BOWSER_STATUS_BIG_JUMP (1 << 16) // 0x00010000
|
||||
#define BOWSER_STATUS_FIRE_SKY (1 << 17) // 0x00020000
|
||||
/* oBowserGrabbedStatus */
|
||||
#define BOWSER_GRAB_STATUS_NONE 0
|
||||
#define BOWSER_GRAB_STATUS_GRABBED 1
|
||||
#define BOWSER_GRAB_STATUS_HOLDING 2
|
||||
/* oSubAction */
|
||||
#define BOWSER_SUB_ACT_DEAD_FLY_BACK 0
|
||||
#define BOWSER_SUB_ACT_DEAD_BOUNCE 1
|
||||
#define BOWSER_SUB_ACT_DEAD_WAIT 2
|
||||
#define BOWSER_SUB_ACT_DEAD_DEFAULT_END 3
|
||||
#define BOWSER_SUB_ACT_DEAD_DEFAULT_END_OVER 4
|
||||
#define BOWSER_SUB_ACT_DEAD_FINAL_END 10
|
||||
#define BOWSER_SUB_ACT_DEAD_FINAL_END_OVER 11
|
||||
|
||||
#define BOWSER_SUB_ACT_CHARGE_START 0
|
||||
#define BOWSER_SUB_ACT_CHARGE_RUN 1
|
||||
#define BOWSER_SUB_ACT_CHARGE_END 2
|
||||
#define BOWSER_SUB_ACT_CHARGE_SLIP 3
|
||||
|
||||
#define BOWSER_SUB_ACT_TELEPORT_START 0
|
||||
#define BOWSER_SUB_ACT_TELEPORT_MOVE 1
|
||||
#define BOWSER_SUB_ACT_TELEPORT_STOP 2
|
||||
|
||||
#define BOWSER_SUB_ACT_HIT_MINE_START 0
|
||||
#define BOWSER_SUB_ACT_HIT_MINE_FALL 1
|
||||
#define BOWSER_SUB_ACT_HIT_MINE_STOP 2
|
||||
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_IDLE 0
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_START 1
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_LAND 2
|
||||
#define BOWSER_SUB_ACT_JUMP_ON_STAGE_STOP 3
|
||||
|
||||
/* Bowser Bits Platform*/
|
||||
/* oAction */
|
||||
#define BOWSER_BITS_PLAT_ACT_START 0
|
||||
#define BOWSER_BITS_PLAT_ACT_CHECK 1
|
||||
#define BOWSER_BITS_PLAT_ACT_FALL 2
|
||||
|
||||
/* Fish Spawer */
|
||||
/* oAction */
|
||||
#define FISH_SPAWNER_ACT_SPAWN 0
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
#define /*0x0B4*/ oVelZ OBJECT_FIELD_F32(0x0B)
|
||||
#define /*0x0B8*/ oForwardVel OBJECT_FIELD_F32(0x0C)
|
||||
#define /*0x0B8*/ oForwardVelS32 OBJECT_FIELD_S32(0x0C)
|
||||
#define /*0x0BC*/ oUnkBC OBJECT_FIELD_F32(0x0D)
|
||||
#define /*0x0C0*/ oUnkC0 OBJECT_FIELD_F32(0x0E)
|
||||
#define /*0x0BC*/ oLeftVel OBJECT_FIELD_F32(0x0D)
|
||||
#define /*0x0C0*/ oUpVel OBJECT_FIELD_F32(0x0E)
|
||||
#define /*0x0C4*/ O_MOVE_ANGLE_INDEX 0x0F
|
||||
#define /*0x0C4*/ O_MOVE_ANGLE_PITCH_INDEX (O_MOVE_ANGLE_INDEX + 0)
|
||||
#define /*0x0C4*/ O_MOVE_ANGLE_YAW_INDEX (O_MOVE_ANGLE_INDEX + 1)
|
||||
@@ -274,24 +274,24 @@
|
||||
#define /*0x0FC*/ oBBallSpawnerPeriodMinus1 OBJECT_FIELD_S32(0x1D)
|
||||
|
||||
/* Bowser */
|
||||
#define /*0x088*/ oBowserUnk88 OBJECT_FIELD_S32(0x00)
|
||||
#define /*0x0F4*/ oBowserUnkF4 OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oBowserUnkF8 OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x088*/ oBowserCamAct OBJECT_FIELD_S32(0x00)
|
||||
#define /*0x0F4*/ oBowserStatus OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oBowserTimer OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x0FC*/ oBowserDistToCentre OBJECT_FIELD_F32(0x1D)
|
||||
#define /*0x106*/ oBowserUnk106 OBJECT_FIELD_S16(0x1F, 1)
|
||||
#define /*0x108*/ oBowserUnk108 OBJECT_FIELD_S16(0x20, 0)
|
||||
#define /*0x106*/ oBowserBitsJustJump OBJECT_FIELD_S16(0x1F, 1)
|
||||
#define /*0x108*/ oBowserRandSplitFloor OBJECT_FIELD_S16(0x20, 0)
|
||||
#define /*0x10A*/ oBowserHeldAnglePitch OBJECT_FIELD_S16(0x20, 1)
|
||||
#define /*0x10D*/ oBowserHeldAngleVelYaw OBJECT_FIELD_S16(0x21, 0)
|
||||
#define /*0x10E*/ oBowserUnk10E OBJECT_FIELD_S16(0x21, 1)
|
||||
#define /*0x110*/ oBowserUnk110 OBJECT_FIELD_S16(0x22, 0)
|
||||
#define /*0x10E*/ oBowserGrabbedStatus OBJECT_FIELD_S16(0x21, 1)
|
||||
#define /*0x110*/ oBowserIsReacting OBJECT_FIELD_S16(0x22, 0)
|
||||
#define /*0x112*/ oBowserAngleToCentre OBJECT_FIELD_S16(0x22, 1)
|
||||
#define /*0x1AC*/ oBowserUnk1AC OBJECT_FIELD_S16(0x49, 0)
|
||||
#define /*0x1AE*/ oBowserUnk1AE OBJECT_FIELD_S16(0x49, 1)
|
||||
#define /*0x1AC*/ oBowserTargetOpacity OBJECT_FIELD_S16(0x49, 0)
|
||||
#define /*0x1AE*/ oBowserEyesTimer OBJECT_FIELD_S16(0x49, 1)
|
||||
#define /*0x1B0*/ oBowserEyesShut OBJECT_FIELD_S16(0x4A, 0)
|
||||
#define /*0x1B2*/ oBowserUnk1B2 OBJECT_FIELD_S16(0x4A, 1)
|
||||
#define /*0x1B2*/ oBowserRainbowLight OBJECT_FIELD_S16(0x4A, 1)
|
||||
|
||||
/* Bowser Shockwave */
|
||||
#define /*0x0F4*/ oBowserShockWaveUnkF4 OBJECT_FIELD_F32(0x1B)
|
||||
#define /*0x0F4*/ oBowserShockWaveScale OBJECT_FIELD_F32(0x1B)
|
||||
|
||||
/* Black Smoke Bowser */
|
||||
#define /*0x0F4*/ oBlackSmokeBowserUnkF4 OBJECT_FIELD_F32(0x1B)
|
||||
@@ -497,7 +497,7 @@
|
||||
/* Flame */
|
||||
#define /*0x0F4*/ oFlameScale OBJECT_FIELD_F32(0x1B)
|
||||
#define /*0x0F8*/ oFlameSpeedTimerOffset OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x0FC*/ oFlameUnkFC OBJECT_FIELD_F32(0x1D)
|
||||
#define /*0x0FC*/ oFlameUnusedRand OBJECT_FIELD_F32(0x1D)
|
||||
#define /*0x100*/ oFlameBowser OBJECT_FIELD_OBJ(0x1E)
|
||||
|
||||
/* Blue Flame */
|
||||
@@ -626,7 +626,7 @@
|
||||
#define /*0x0F4*/ oKoopaRaceEndpointRaceBegun OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oKoopaRaceEndpointKoopaFinished OBJECT_FIELD_S32(0x1C)
|
||||
#define /*0x0FC*/ oKoopaRaceEndpointRaceStatus OBJECT_FIELD_S32(0x1D)
|
||||
#define /*0x100*/ oKoopaRaceEndpointUnk100 OBJECT_FIELD_S32(0x1E)
|
||||
#define /*0x100*/ oKoopaRaceEndpointDialog OBJECT_FIELD_S32(0x1E)
|
||||
#define /*0x104*/ oKoopaRaceEndpointRaceEnded OBJECT_FIELD_S32(0x1F)
|
||||
|
||||
/* Koopa Shell Flame */
|
||||
@@ -770,10 +770,14 @@
|
||||
#define /*0x0F8*/ oPitouneUnkF8 OBJECT_FIELD_F32(0x1C)
|
||||
#define /*0x0FC*/ oPitouneUnkFC OBJECT_FIELD_F32(0x1D)
|
||||
|
||||
/* Platform */
|
||||
#define /*0x0F4*/ oPlatformTimer OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F8*/ oPlatformUnkF8 OBJECT_FIELD_OBJ(0x1C)
|
||||
#define /*0x0FC*/ oPlatformUnkFC OBJECT_FIELD_S32(0x1D)
|
||||
/* Falling Rising Bitfs Platform */
|
||||
#define /*0x0F4*/ oBitfsPlatformTimer OBJECT_FIELD_S32(0x1B)
|
||||
|
||||
/* Falling Bowser Bits Platform */
|
||||
#define /*0x0F8*/ oBitsPlatformBowser OBJECT_FIELD_OBJ(0x1C)
|
||||
#define /*0x0FC*/ oBitsPlatformTimer OBJECT_FIELD_S32(0x1D)
|
||||
|
||||
/* WF Platform */
|
||||
#define /*0x10C*/ oPlatformUnk10C OBJECT_FIELD_F32(0x21)
|
||||
#define /*0x110*/ oPlatformUnk110 OBJECT_FIELD_F32(0x22)
|
||||
|
||||
@@ -877,7 +881,7 @@
|
||||
// 0x1D-0x21 reserved for pathing
|
||||
|
||||
/* Snowman's Head */
|
||||
#define /*0x0F4*/ oSnowmansHeadUnkF4 OBJECT_FIELD_S32(0x1B)
|
||||
#define /*0x0F4*/ oSnowmansHeadDialogActive OBJECT_FIELD_S32(0x1B)
|
||||
|
||||
/* Snowman Wind Blowing */
|
||||
#define /*0x0F4*/ oSLSnowmanWindOriginalYaw OBJECT_FIELD_S32(0x1B)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef SEGMENTS_H
|
||||
#define SEGMENTS_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/*
|
||||
* Memory addresses for segments. Ideally, this header file would not be
|
||||
* needed, and the addresses would be defined in sm64.ld and linker-inserted
|
||||
@@ -20,10 +22,10 @@
|
||||
|
||||
#define SEG_BUFFERS 0x801C1000
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#define SEG_MAIN 0x80241800 // TODO: Investigate why it's different?
|
||||
#elif defined(VERSION_SH)
|
||||
#if defined(VERSION_SH) || ENABLE_RUMBLE
|
||||
#define SEG_MAIN 0x80249000
|
||||
#elif defined(VERSION_EU)
|
||||
#define SEG_MAIN 0x80241800 // TODO: Investigate why it's different?
|
||||
#else
|
||||
#define SEG_MAIN 0x80246000
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#define SEQ_BASE_ID 0x7f
|
||||
#define SEQ_VARIATION 0x80
|
||||
|
||||
#define SEQ_MENU_GAME_OVER (SEQ_MENU_TITLE_SCREEN | SEQ_VARIATION)
|
||||
|
||||
enum SeqId {
|
||||
SEQ_SOUND_PLAYER, // 0x00
|
||||
SEQ_EVENT_CUTSCENE_COLLECT_STAR, // 0x01
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
|
||||
# To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros >seq_macros.inc
|
||||
// Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
|
||||
// To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros > include/seq_macros.inc
|
||||
|
||||
# seq commands
|
||||
// seq commands
|
||||
|
||||
.macro seq_testchdisabled a
|
||||
.byte 0x0 + \a
|
||||
@@ -155,7 +155,7 @@
|
||||
.byte 0xff
|
||||
.endm
|
||||
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
|
||||
.macro seq_unreservenotes
|
||||
.byte 0xf0
|
||||
@@ -166,9 +166,9 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.ifdef VERSION_EU
|
||||
#ifdef VERSION_EU
|
||||
|
||||
.macro seq_unreservenotes
|
||||
.byte 0xf0
|
||||
@@ -179,7 +179,7 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.macro seq_unreservenotes
|
||||
.byte 0xf1
|
||||
@@ -190,11 +190,11 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
# chan commands
|
||||
// chan commands
|
||||
|
||||
.macro chan_startchannel a, b
|
||||
.byte 0x10 + \a
|
||||
@@ -462,7 +462,7 @@
|
||||
var_long \a
|
||||
.endm
|
||||
|
||||
.ifdef VERSION_SH
|
||||
#ifdef VERSION_SH
|
||||
|
||||
.macro chan_setnotepriority a
|
||||
.byte 0xe9
|
||||
@@ -495,7 +495,7 @@
|
||||
.byte 0x90 + \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.macro chan_testlayerfinished a
|
||||
.byte 0x0 + \a
|
||||
@@ -514,7 +514,7 @@
|
||||
.byte 0xa0 + \a
|
||||
.endm
|
||||
|
||||
.ifdef VERSION_EU
|
||||
#ifdef VERSION_EU
|
||||
|
||||
.macro chan_setnotepriority a
|
||||
.byte 0xe9
|
||||
@@ -530,7 +530,7 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.else
|
||||
#else
|
||||
|
||||
.macro chan_setnotepriority a
|
||||
.byte 0x60 + \a
|
||||
@@ -545,11 +545,11 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
.endif
|
||||
#endif
|
||||
|
||||
# layer commands
|
||||
// layer commands
|
||||
|
||||
.macro layer_note0 a, b, c, d
|
||||
.byte 0x0 + \a
|
||||
@@ -659,7 +659,7 @@
|
||||
.byte \c
|
||||
.endm
|
||||
|
||||
# envelope commands
|
||||
// envelope commands
|
||||
|
||||
.macro envelope_disable a
|
||||
.byte 0x0, 0x0
|
||||
@@ -686,7 +686,7 @@
|
||||
.byte \b >> 8, \b & 0xff
|
||||
.endm
|
||||
|
||||
# other commands
|
||||
// other commands
|
||||
|
||||
.macro var_long x
|
||||
.byte (0x80 | (\x & 0x7f00) >> 8), (\x & 0xff)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
#define INPUT_A_DOWN 0x0080
|
||||
#define INPUT_IN_POISON_GAS 0x0100
|
||||
#define INPUT_IN_WATER 0x0200
|
||||
#define INPUT_UNKNOWN_10 0x0400
|
||||
#define INPUT_STOMPED 0x0400
|
||||
#define INPUT_INTERACT_OBJ_GRABBABLE 0x0800
|
||||
#define INPUT_UNKNOWN_12 0x1000
|
||||
#define INPUT_B_PRESSED 0x2000
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
#define SOUND_ENV_UNK12 /* 0x40120000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) // unverified, unused
|
||||
#define SOUND_ENV_SLIDING /* 0x40130000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) // unverified
|
||||
#define SOUND_ENV_STAR /* 0x40140010 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) // unverified
|
||||
#define SOUND_ENV_UNKNOWN4 /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_MOVING_BIG_PLATFORM /* 0x41150000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_WATER_DRAIN /* 0x41160000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) // unverified
|
||||
#define SOUND_ENV_METAL_BOX_PUSH /* 0x40178000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) // unverified
|
||||
#define SOUND_ENV_SINK_QUICKSAND /* 0x40188000 */ SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) // unverified
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
#include "macros.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
// Certain functions are marked as having return values, but do not
|
||||
@@ -30,8 +31,8 @@ struct Controller
|
||||
/*0x12*/ u16 buttonPressed;
|
||||
/*0x14*/ OSContStatus *statusData;
|
||||
/*0x18*/ OSContPad *controllerData;
|
||||
#ifdef VERSION_SH
|
||||
/*0x1C*/ int port;
|
||||
#if ENABLE_RUMBLE
|
||||
/*0x1C*/ s32 port;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -261,27 +262,6 @@ struct MarioBodyState
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
struct OffsetSizePair
|
||||
{
|
||||
u32 offset;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
struct MarioAnimDmaRelatedThing
|
||||
{
|
||||
u32 count;
|
||||
u8 *srcAddr;
|
||||
struct OffsetSizePair anim[1]; // dynamic size
|
||||
};
|
||||
|
||||
struct MarioAnimation
|
||||
{
|
||||
struct MarioAnimDmaRelatedThing *animDmaTable;
|
||||
u8 *currentAnimAddr;
|
||||
struct Animation *targetAnim;
|
||||
u8 padding[4];
|
||||
};
|
||||
|
||||
struct MarioState
|
||||
{
|
||||
/*0x00*/ u16 unk00;
|
||||
@@ -327,7 +307,7 @@ struct MarioState
|
||||
/*0x94*/ struct PlayerCameraState *statusForCamera;
|
||||
/*0x98*/ struct MarioBodyState *marioBodyState;
|
||||
/*0x9C*/ struct Controller *controller;
|
||||
/*0xA0*/ struct MarioAnimation *animation;
|
||||
/*0xA0*/ struct DmaHandlerList *animList;
|
||||
/*0xA4*/ u32 collidedObjInteractTypes;
|
||||
/*0xA8*/ s16 numCoins;
|
||||
/*0xAA*/ s16 numStars;
|
||||
|
||||
Reference in New Issue
Block a user