diff --git a/Codes.xml b/Codes.xml index f2d118a..d3e6bfb 100644 --- a/Codes.xml +++ b/Codes.xml @@ -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(小数)型に対して、「表示のフォーマット」を`.{桁数}`に設定して何桁まで表示するか指定できます。 diff --git a/changelog.md b/changelog.md index b9abd0b..ed8a833 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # Changelog +## Nov 19, 2022 +Added `CAngle` for 'Customized Display' to show camera angle + ## Nov 16, 2022 - Add GCI+XXX as download format - Add return code for GCI Loader diff --git a/site/.vuepress/components/codes/CustomizedDisplay/codegen.js b/site/.vuepress/components/codes/CustomizedDisplay/codegen.js index cc86b6c..e34297e 100644 --- a/site/.vuepress/components/codes/CustomizedDisplay/codegen.js +++ b/site/.vuepress/components/codes/CustomizedDisplay/codegen.js @@ -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 }) => [