Added CAngle
for 'Customized Display' to show camera angle
This commit is contained in:
parent
c6fad5f383
commit
375ba5eb73
5 changed files with 65 additions and 42 deletions
|
@ -3313,6 +3313,7 @@
|
|||
|`HSpd`|Horizontal speed of Mario|float|
|
||||
|`VSpd`|Vertical speed of Mario|float|
|
||||
|`QF`|QF offset|\{0,1,2,3}|
|
||||
|`CAngle`|Camera Angle|uint16|
|
||||
|
||||
For float data, you can set the *format* to `.{digit}` to specify how many digits to show.
|
||||
|
||||
|
@ -3339,6 +3340,7 @@
|
|||
|`HSpd`|マリオの水平速度|float|
|
||||
|`VSpd`|マリオのY速度|float|
|
||||
|`QF`|ずれたQFの数|\{0,1,2,3}|
|
||||
|`CAngle`|カメラの角度|uint16|
|
||||
|
||||
float(小数)型に対して、「表示のフォーマット」を`.{桁数}`に設定して何桁まで表示するか指定できます。
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
# Changelog
|
||||
## Nov 19, 2022
|
||||
Added `CAngle` for 'Customized Display' to show camera angle
|
||||
|
||||
## Nov 9, 2022
|
||||
### Added 'Fast Piantissimo'
|
||||
To make Piantissimo go as fast as he will in a level, you need to beat him with an in-game time under 25 seconds and grab his Shine. Or you could just use this code.
|
||||
|
|
|
@ -70,6 +70,12 @@ const bases = {
|
|||
GMSP01: (rT) => ASM.lwz(rT, 13, -0x6120),
|
||||
GMSJ0A: (rT) => ASM.lwz(rT, 13, -0x6188),
|
||||
}),
|
||||
gpCamera: /**@type{VBase}*/ ({
|
||||
GMSJ01: (rT) => ASM.lwz(rT, 13, -0x5750),
|
||||
GMSE01: (rT) => ASM.lwz(rT, 13, -0x7118),
|
||||
GMSP01: (rT) => ASM.lwz(rT, 13, -0x7158),
|
||||
GMSJ0A: (rT) => ASM.lwz(rT, 13, -0x5768),
|
||||
}),
|
||||
};
|
||||
/** @typedef {keyof typeof bases} BaseId */
|
||||
|
||||
|
@ -104,6 +110,15 @@ const fields = [
|
|||
preview: 0,
|
||||
post: (rT) => ASM.rlwinm(rT, rT, 0, 30, 31, false),
|
||||
},
|
||||
{
|
||||
id: 'CAngle',
|
||||
base: 'gpCamera',
|
||||
dtype: 16,
|
||||
offset: 0xa6,
|
||||
fmt: '%hu',
|
||||
preview: 9,
|
||||
post: (rT) => ASM.addi(rT, rT, -0x8000), // offset by 0x8000
|
||||
},
|
||||
];
|
||||
const fieldDB = Object.fromEntries(
|
||||
fields.map(({ id, base, fmt, preview, ...info }) => [
|
||||
|
|
|
@ -114,7 +114,10 @@ const makeInstXS = (op, op2) => (rA, rS, rB, Rc) => InstX(op, rA, rS, rB, op2, +
|
|||
/** @type {(op: number) => InstM} */
|
||||
const makeInstM = (op) => (rA, rS, SH, MB, ME, Rc) => InstM(op, rA, rS, SH, MB, ME, +Rc);
|
||||
/** @type {(op: number) => InstI} */
|
||||
const makeInstI = (op) => (LL, LK, AA = 0) => InstI(op, LL >> 2, +AA, +LK);
|
||||
const makeInstI =
|
||||
(op) =>
|
||||
(LL, LK, AA = 0) =>
|
||||
InstI(op, LL >> 2, +AA, +LK);
|
||||
|
||||
export const ASM = {
|
||||
// store rT, rA, D
|
||||
|
|
Loading…
Reference in a new issue