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.
|
||||
|
|
82
package.json
82
package.json
|
@ -1,41 +1,41 @@
|
|||
{
|
||||
"name": "gctgenerator",
|
||||
"version": "3.0.1",
|
||||
"description": "Super Mario Sunshine Practice File Generator",
|
||||
"main": "index.js",
|
||||
"authors": {
|
||||
"name": "Matteias Collet",
|
||||
"email": "matteias.collet@bluewin.ch"
|
||||
},
|
||||
"repository": "https://github.com/BitPatty/gctGenerator/gctGenerator",
|
||||
"scripts": {
|
||||
"dev": "npm run codes:inject && npm run translations:compare && vuepress dev site",
|
||||
"build": "node ./scripts/inject_codes.js && npm run translations:compare && vuepress build site",
|
||||
"format": "prettier --write ./site/**/*{.md,.js,.json}",
|
||||
"translations:compare": "node ./scripts/compare_translations.js",
|
||||
"codes:inject": "node ./scripts/inject_codes.js && npm run format",
|
||||
"codes:clean": "node ./scripts/clean_codes.js && npm run format",
|
||||
"precommit": "npm run codes:clean && git add .",
|
||||
"serve": "serve ./site/.vuepress/dist"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@sup39/markdown-it-attr": "1.2.2",
|
||||
"@sup39/markdown-it-inline-tag": "1.0.1",
|
||||
"@types/encoding-japanese": "^2.0.1",
|
||||
"@vuepress/plugin-back-to-top": "1.9.7",
|
||||
"@vuepress/plugin-medium-zoom": "1.9.7",
|
||||
"encoding-japanese": "^2.0.0",
|
||||
"jsdom": "20.0.2",
|
||||
"pre-commit": "1.2.2",
|
||||
"prettier": "2.7.1",
|
||||
"serve": "14.1.1",
|
||||
"vuepress": "1.9.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"vuedraggable": "2.24.3"
|
||||
},
|
||||
"pre-commit": [
|
||||
"precommit"
|
||||
]
|
||||
}
|
||||
{
|
||||
"name": "gctgenerator",
|
||||
"version": "3.0.1",
|
||||
"description": "Super Mario Sunshine Practice File Generator",
|
||||
"main": "index.js",
|
||||
"authors": {
|
||||
"name": "Matteias Collet",
|
||||
"email": "matteias.collet@bluewin.ch"
|
||||
},
|
||||
"repository": "https://github.com/BitPatty/gctGenerator/gctGenerator",
|
||||
"scripts": {
|
||||
"dev": "npm run codes:inject && npm run translations:compare && vuepress dev site",
|
||||
"build": "node ./scripts/inject_codes.js && npm run translations:compare && vuepress build site",
|
||||
"format": "prettier --write ./site/**/*{.md,.js,.json}",
|
||||
"translations:compare": "node ./scripts/compare_translations.js",
|
||||
"codes:inject": "node ./scripts/inject_codes.js && npm run format",
|
||||
"codes:clean": "node ./scripts/clean_codes.js && npm run format",
|
||||
"precommit": "npm run codes:clean && git add .",
|
||||
"serve": "serve ./site/.vuepress/dist"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@sup39/markdown-it-attr": "1.2.2",
|
||||
"@sup39/markdown-it-inline-tag": "1.0.1",
|
||||
"@types/encoding-japanese": "^2.0.1",
|
||||
"@vuepress/plugin-back-to-top": "1.9.7",
|
||||
"@vuepress/plugin-medium-zoom": "1.9.7",
|
||||
"encoding-japanese": "^2.0.0",
|
||||
"jsdom": "20.0.2",
|
||||
"pre-commit": "1.2.2",
|
||||
"prettier": "2.7.1",
|
||||
"serve": "14.1.1",
|
||||
"vuepress": "1.9.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"vuedraggable": "2.24.3"
|
||||
},
|
||||
"pre-commit": [
|
||||
"precommit"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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