Merge branch 'master' into gci

This commit is contained in:
サポミク 2022-11-20 01:46:36 +09:00 committed by GitHub
commit 0470daacf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View file

@ -3313,6 +3313,7 @@
|`HSpd`|Horizontal speed of Mario|float| |`HSpd`|Horizontal speed of Mario|float|
|`VSpd`|Vertical speed of Mario|float| |`VSpd`|Vertical speed of Mario|float|
|`QF`|QF offset|\{0,1,2,3}| |`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. For float data, you can set the *format* to `.{digit}` to specify how many digits to show.
@ -3339,6 +3340,7 @@
|`HSpd`|マリオの水平速度|float| |`HSpd`|マリオの水平速度|float|
|`VSpd`|マリオのY速度|float| |`VSpd`|マリオのY速度|float|
|`QF`|ずれたQFの数|\{0,1,2,3}| |`QF`|ずれたQFの数|\{0,1,2,3}|
|`CAngle`|カメラの角度|uint16|
float(小数)型に対して、「表示のフォーマット」を`.{桁数}`に設定して何桁まで表示するか指定できます。 float(小数)型に対して、「表示のフォーマット」を`.{桁数}`に設定して何桁まで表示するか指定できます。

View file

@ -1,4 +1,7 @@
# Changelog # Changelog
## Nov 19, 2022
Added `CAngle` for 'Customized Display' to show camera angle
## Nov 16, 2022 ## Nov 16, 2022
- Add GCI+XXX as download format - Add GCI+XXX as download format
- Add return code for GCI Loader - Add return code for GCI Loader

View file

@ -70,6 +70,12 @@ const bases = {
GMSP01: (rT) => ASM.lwz(rT, 13, -0x6120), GMSP01: (rT) => ASM.lwz(rT, 13, -0x6120),
GMSJ0A: (rT) => ASM.lwz(rT, 13, -0x6188), 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 */ /** @typedef {keyof typeof bases} BaseId */
@ -104,6 +110,15 @@ const fields = [
preview: 0, preview: 0,
post: (rT) => ASM.rlwinm(rT, rT, 0, 30, 31, false), 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( const fieldDB = Object.fromEntries(
fields.map(({ id, base, fmt, preview, ...info }) => [ fields.map(({ id, base, fmt, preview, ...info }) => [