Skip to content

Commit

Permalink
Merge branch 'master' into gci
Browse files Browse the repository at this point in the history
  • Loading branch information
sup39 committed Jul 15, 2023
2 parents eeee311 + c030def commit 60837c1
Show file tree
Hide file tree
Showing 56 changed files with 7,349 additions and 2,328 deletions.
2,428 changes: 1,505 additions & 923 deletions Codes.xml

Large diffs are not rendered by default.

420 changes: 420 additions & 0 deletions Removed-Codes.xml

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# Changelog
## Jul 15, 2023
### Fixed the bug that background color cannot be changed in 'Controller Input Display'
### Ported 'FastForward', 'InstantRestart', 'SpawnYoshi', 'StageIntroSkip' to all versions

## Jul 9, 2023
### Updated 'Level Select'
The peaceful plaza (after unlocking Ricco and Gelato) is now available as C↘ + Y, later plazas have their shortcuts moved clockwise, and the post-Corona plaza no longer has a dedicated shortcut. To access it, simply load Corona (X with neutral C stick) or Bowser (C↖ + Y + L) then exit to the plaza.

## May 17, 2023
- Added font for NTSC-U
- Fixed the encoding of NTSC-U and PAL (should be Windows-1252 instead of latin1)

## May 16, 2023
### GCI Loader 0.5
Added error messages
### GCI Loader 0.4
Fixed hook address of GMSE01 code

## Feb 28, 2023
Fix preview of Controller Input Display

## Feb 23, 2023
### Updated 'Force Plaza Events'
Set the correct BH/RH/GB unlock flag
Expand All @@ -21,6 +36,8 @@ Disable Z menu for Instant Level Select to prevent broken texture
- Added 'Mario State Savestate'
- Added 'No Shine Get Animation'
- Added 'Fruit Never Time Out'
- Added 'In-Stage Attempt Counter'
- Added 'Manual Attempt Counter'

## Feb 11, 2023
- Added 'Deathless Blooper Surfing'
Expand All @@ -36,6 +53,46 @@ Ported GCI Loader to all versions
### Updated 'Instant Level Select'
Overwrite button input value to prevent Level Select being activated when AreaLock is enabled

## Feb 07, 2023
### Updated 'Customized Display'
Support signed int32 and int16 for fields

## Feb 06, 2023
### Fixed 'Customized Display'
Fixed the hex value of multi-byte char in format string

## Feb 05, 2023
### Created 'Controller Input Display'
Display controller input
### Created 'Attempt Counter'
Display attempt count and success count of current area
### Updated 'Instant Level Select'
- Rewrote with C2
- Go to level instantly without transition

## Jan 31, 2023
### Created 'Quarterframe Section Timer'
Calculate and display section times whenever Quarterframe Timer freezes
### Updated 'Pattern Selector'
- Rewrote with C2 + separated config 06
- Remove label option
### Updated 'Customized Display'
- Rewrote with C2
- Implemented a more complex assembler/compiler to support function call
- Add options
- Invincibility Timer
- Pollution Degree
- Spin Jump Condition Check

## Jan 28, 2023
### Rewrote 'drawText'
- Reduced parameters to struct pointer + format string + varargs
- Rewrote QFT, Pattern Selector, Customized Display with the new drawText function
### Improved Preview
- Added PAL font (TODO: NTSC-U)
- Merged P/A/S Display and Speed Display to Customized Display
- Provided background options to Pattern Selector and Customized Display

## Jan 10, 2023
### Updated 'Quarterframe Timer'
Added the following options to freeze QFT:
Expand Down
29 changes: 0 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
"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.8",
"@vuepress/plugin-medium-zoom": "1.9.8",
"encoding-japanese": "^2.0.0",
"jsdom": "21.1.0",
"pre-commit": "1.2.2",
"prettier": "2.8.3",
Expand Down
9 changes: 2 additions & 7 deletions site/.vuepress/components/CodeInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<script>
import { translate, translateCode } from '../i18n/localeHelper';
import { previewIds } from './codes/preview.js';
import configUIs from './codes/ui.js';
export default {
Expand All @@ -36,13 +37,7 @@ export default {
return configUIs[this.code.id];
},
showPreview() {
return [
'PatternSelector',
'PASDisplay',
'SpeedDisplay',
'CustomizedDisplay',
'qft',
].includes(this.code.id); // TODO
return previewIds.includes(this.code.id);
},
},
data() {
Expand Down
23 changes: 9 additions & 14 deletions site/.vuepress/components/Generator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
>Psychonauter</a
>,
<a href="https://twitter.com/Qbe_Root" target="_blank" rel="noopener">Noki Doki</a>,
<a href="https://twitter.com/sup39x1207" target="_blank" rel="noopener">sup39</a>
<a href="https://github.com/sup39" target="_blank" rel="noopener">sup39</a>
&amp;
<a href="https://twitter.com/srlMilk" target="_blank" rel="noopener">Milk</a>.
</p>
Expand All @@ -112,9 +112,7 @@ import codeCategories from '../data/codeCategories.json';
import { translate } from '../i18n/localeHelper';
// Code Configs
import {getConfig as getConfigQFT} from './codes/qft/codegen';
import {getConfig as getConfigCD} from './codes/CustomizedDisplay/codegen';
import {getConfig as getConfigPS} from './codes/PatternSelector/codegen';
import {getConfigs} from './codes/preview.js';
export default {
data() {
Expand All @@ -132,15 +130,6 @@ export default {
codeConfigs: {},
};
},
created() {
this.codeConfigs = {
qft: getConfigQFT(),
PatternSelector: getConfigPS(),
SpeedDisplay: {},
PASDisplay: {},
CustomizedDisplay: getConfigCD(this.version),
};
},
methods: {
getLabel(key) {
return translate(key, this.$lang);
Expand Down Expand Up @@ -168,6 +157,9 @@ export default {
JSON.stringify({ version: e }),
]);
} catch {}
// update config for preview
this.codeConfigs = getConfigs(e);
},
onFormatChanged(e) {
this.selectedFormat = e;
Expand Down Expand Up @@ -222,7 +214,10 @@ export default {
.filter(code => !(code.category === category && exclusive))
.map(code => code.id));
ids.add(id);
return Object.fromEntries(Object.entries(this.codeConfigs).filter(([id]) => ids.has(id)));
return {
...Object.fromEntries(Object.entries(this.codeConfigs).filter(([id]) => ids.has(id))),
_version: this.selectedVersion,
};
},
},
};
Expand Down
87 changes: 24 additions & 63 deletions site/.vuepress/components/Preview.vue
Original file line number Diff line number Diff line change
@@ -1,94 +1,55 @@
<template>
<div class="preview-root">
<div class="preview-ctn">
<div v-if="qft">
<div :style="qft.bgStyle" />
<PreviewString :x="qft.x" :y="qft.y" :size="qft.fontSize" :color="qft.color" text="0:00:00" />
</div>
<div v-if="mdps">
<PreviewString v-for="mdp,i in mdps" :key="i"
:x="mdp.x" :y="mdp.y" :size="mdp.fontSize" :color="mdp.color" :text="mdp.text" />
</div>
<PreviewString v-if="ps" :x="ps.x" :y="ps.y" :size="ps.fontSize" :color="ps.color" :text="ps.text" />
<PreviewString v-for="c in previews"
:key="c.key" :config="c" :version="_version" />
<PreviewString v-for="c,i in config.CustomizedDisplay||[]"
:key="'CustomizedDisplay-'+i" :config="c" :version="_version" />
<ControllerPreview v-if="config.controller" :config="config.controller" />
</div>
</div>
</template>

<script>
import { rgbaI2S, fg2Style } from './codes/utils.js';
import {previewIds} from './codes/preview.js';
import ControllerPreview from './codes/controller/preview.vue';
export default {
components: {
ControllerPreview,
},
props: {
config: {type: Object},
},
computed: {
mdps() {
const {config} = this;
if (config.PASDisplay) return [{
x: 16,
y: 200,
fontSize: 20,
color: '#fff',
text: 'X Pos -39\nY Pos 1207\nZ Pos -4193\nAngle 65535\nH Spd 15.15\nV Spd -31.17',
}];
if (config.SpeedDisplay) return [{
x: 16,
y: 240,
fontSize: 20,
color: '#fff',
text: 'H Spd 15.15\nV Spd -31.17',
}];
if (config.CustomizedDisplay) {
return config.CustomizedDisplay.map(({fgRGB, fgA, fgRGB2, fgA2, ...o}) => ({
...o,
color: fg2Style(fgRGB, fgA, fgRGB2, fgA2),
}));
}
},
qft() {
const {config: {qft}} = this;
if (qft == null) return;
const {x, y, fontSize, fgRGB, fgA, fgRGB2, fgA2, bgRGB, bgA, width} = qft;
const bg = rgbaI2S(bgRGB, bgA);
return {
x, y, fontSize,
color: fg2Style(fgRGB, fgA, fgRGB2, fgA2),
bgStyle: {
left: x+'px',
top: (y-fontSize)+'px',
width: (width*fontSize/20)+'px',
height: fontSize+'px',
background: bg,
},
};
_version() {
const {_version} = this.config;
return _version;
},
ps() {
const {config: {PatternSelector: ps}} = this;
if (ps == null) return;
const {x, y, fontSize, fgRGB, fgA, fgRGB2, fgA2, label} = ps;
return {
x, y, fontSize,
color: fg2Style(fgRGB, fgA, fgRGB2, fgA2),
text: label+'#0 0 0',
};
previews() {
return previewIds.flatMap(id => {
const config = /**@type{any}*/(this.config)[id];
// special
if (['controller', 'CustomizedDisplay'].includes(id)) return [];
if (config == null) return [];
return {...config, key: id};
});
},
},
}
</script>

<style scoped>
div.preview-root {
.preview-root {
position: relative;
width: 600px;
height: 448px;
background: url(/img/preview/background.png);
padding: 0;
overflow: hidden;
}
div.preview-ctn {
.preview-ctn {
position: absolute;
top: -16px;
}
div.preview-ctn * {
position: absolute;
}
</style>
Loading

0 comments on commit 60837c1

Please sign in to comment.