This commit is contained in:
Matteias Collet 2020-07-01 06:55:31 +02:00
parent 0cfd7217d2
commit f8f0d45b0a
69 changed files with 10748 additions and 169 deletions

View file

@ -1,2 +1,2 @@
node_modules/
docs/.vuepress/dist/
site/.vuepress/dist/

5
.gitattributes vendored
View file

@ -19,7 +19,4 @@ LICENSE text eol=crlf
# Binary files
*.jpg binary
*.png binary
*.zip binary
# Linguist
docs/* -linguist-documentation
*.zip binary

View file

@ -19,11 +19,11 @@ This repository contains the code behind the Super Mario Sunshine Cheatfile Gene
### Updating Practice Codes
The codes are stored as XML files (one for each game version) in the [docs/.vuepress/public/codes](https://github.com/BitPatty/gctGenerator/tree/master/docs/.vuepress/public/codes) directory. If you want to add or change codes edit the corresponding XML file. Node that GMSJ0A refers to the NTSC-J 1.1 release of Super Mario Sunshine. (It's not actually called version A but that's what we've been calling it for years due to a misconception on what the A on the back of the box means).
The codes are stored as XML files (one for each game version) in the [site/.vuepress/public/codes](https://github.com/BitPatty/gctGenerator/tree/master/site/.vuepress/public/codes) directory. If you want to add or change codes edit the corresponding XML file. Node that GMSJ0A refers to the NTSC-J 1.1 release of Super Mario Sunshine. (It's not actually called version A but that's what we've been calling it for years due to a misconception on what the A on the back of the box means).
### Updating Guides
You can find the guides in the [docs](https://github.com/BitPatty/gctGenerator/tree/master/docs) folder. Simply edit the corresponding markdown file (.md).
You can find the guides in the [site](https://github.com/BitPatty/gctGenerator/tree/master/site) folder. Simply edit the corresponding markdown file (.md).
### Site Development

View file

@ -14,5 +14,5 @@ WORKDIR /src
RUN apt-get update
RUN apt install -y git
COPY ./scripts/deploy.ps1 ./deploy.ps1
COPY --from=build /src/docs/.vuepress/dist ./dist
COPY --from=build /src/site/.vuepress/dist ./dist
CMD [ "pwsh", "deploy.ps1" ]

View file

@ -11,7 +11,7 @@ RUN yarn build
FROM httpd:latest AS final
WORKDIR /usr/local/apache2/htdocs/
COPY --from=build /src/docs/.vuepress/dist .
COPY --from=build /src/site/.vuepress/dist .
EXPOSE 80
CMD ["httpd-foreground"]

View file

@ -1,22 +0,0 @@
[
{
"identifier": "GMSE01",
"name": "GMSE01 (NTSC-U)",
"version": "GMSE01"
},
{
"identifier": "GMSP01",
"name": "GMSP01 (PAL)",
"version": "GMSP01"
},
{
"identifier": "GMSJ01",
"name": "GMSJ01 (NTSC-J 1.0)",
"version": "GMSJ01"
},
{
"identifier": "GMSJ0A",
"name": "GMSJ01 (NTSC-J 1.1)",
"version": "GMSJ01"
}
]

View file

@ -1,19 +0,0 @@
{
"fileSelect": 2701876,
"shineGet": 2718852,
"system": 2724400,
"proc": 2778900,
"gpAppHi": "803F",
"gpAppLo": "9712",
"fmOffset": "9FA0",
"notext": {
"yes": "048D3A3C2100000004153DA0380000000415317C380050000429134060000000",
"pv5": "048D3A3C21000000283E971200002A0004153DA0801C00040415317CA81C03400429134088030214E2000001000000002A3E971200002A0004153DA0380000000415317C380050000429134060000000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "042B5EF438600001042B5E8C38600001",
"pp": "C22B5E88000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C22B5EF0000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
}

View file

@ -1,19 +0,0 @@
{
"fileSelect": 946160,
"shineGet": 963136,
"system": 968628,
"proc": 1024280,
"gpAppHi": "803E",
"gpAppLo": "6012",
"fmOffset": "97D0",
"notext": {
"yes": "048D8A7CD6008149048D8A8081498149048D8A840000000004215290380000000421461038005000040E488860000000",
"pv5": "048D8A7CD6008149048D8A8081498149048D8A8400000000283E601200002A0004215290801C000404214610A81C0340040E488888030214E2000001000000002A3E601200002A0004215290380000000421461038005000040E488860000000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "0410AF5C386000010410AFC038600001",
"pp": "C210AF58000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C210AFBC000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
}

View file

@ -1,19 +0,0 @@
{
"fileSelect": 2569968,
"shineGet": 2586924,
"system": 2592480,
"proc": 2647408,
"gpAppHi": "803E",
"gpAppLo": "A8F2",
"fmOffset": "9E60",
"notext": {
"yes": "048CD55CD6008149048CD56081498149048CD56400000000041351C43800000004134524380050000427109060000000",
"pv5": "048CD55CD6008149048CD56081498149048CD56400000000283DA8F200002A00041351C4801C000404134524A81C03400427109088030214E2000001000000002A3DA8F200002A00041351C43800000004134524380050000427109060000000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "04295AB43860000104295B1838600001",
"pp": "C2295AB0000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C2295B14000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
}

View file

@ -1,19 +0,0 @@
{
"fileSelect": 2668620,
"shineGet": 2685724,
"system": 2691272,
"proc": 2745964,
"gpAppHi": "803E",
"gpAppLo": "10D2",
"fmOffset": "9EC8",
"notext": {
"yes": "20570B7C000000000474E87C2100000020570B7D000000010474E9F42121000020570B7D000000020474ED380000000020570B7D000000030474EE04A100000020570B7D000000040474EBDC21210000E20000010000000004148D203800000004147F9838005000042890CC60000000",
"pv5": "283E10D200002A0004148D20801C000404147F98A81C0340042890CC88030214E2000001000000002A3E10D200002A0004148D203800000004147F9838005000042890CC60000000E20000010000000020570B7C000000000474E87C2100000020570B7D000000010474E9F42121000020570B7D000000020474ED380000000020570B7D000000030474EE04A100000020570B7D000000040474EBDC21210000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "042ADE2038600001042ADE8838600001",
"pp": "C22ADE1C000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C22ADE84000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
}

10583
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -9,8 +9,8 @@
},
"repository": "https://github.com/BitPatty/gctGenerator/gctGenerator",
"scripts": {
"dev": "vuepress dev docs",
"build": "vuepress build docs"
"dev": "vuepress dev site",
"build": "vuepress build site"
},
"license": "Apache-2.0",
"devDependencies": {
@ -19,7 +19,6 @@
"@vuepress/plugin-medium-zoom": "^1.3.1"
},
"dependencies": {
"axios": "^0.19.2",
"vuedraggable": "^2.23.2"
}
}

View file

@ -9,7 +9,7 @@ Write-Host "Packing archives...";
# Setup workspace
New-Item -ItemType directory -Path "./tmp" > $null;
Copy-Item "./docs/.vuepress/public/codes/*.xml" "./tmp/";
Copy-Item "./site/.vuepress/public/codes/*.xml" "./tmp/";
Set-Location "./tmp";
# Helper function to convert the XML files to the GCM txt format
@ -52,7 +52,7 @@ XmlToGcm "GMSJ0A.xml" "GMSJ01 (A).txt" "GMSJ01";
# Replace zip file
Write-Host "Compressing GCM archive..";
Compress-Archive "./*.txt" "../docs/.vuepress/public/files/GCMCodes.zip";
Compress-Archive "./*.txt" "../site/.vuepress/public/files/GCMCodes.zip";
Write-Host "GCM Archive built";
# Convert files to Dolphin format
@ -65,7 +65,7 @@ XmlToIni "GMSJ01.xml" "GMSJ01.txt" "GMSJ01";
XmlToIni "GMSJ0A.xml" "GMSJ01 (A).txt" "GMSJ01";
Write-Host "Compressing Dolphin archive..";
Compress-Archive "./*.txt" "../docs/.vuepress/public/files/DolphinCodes.zip";
Compress-Archive "./*.txt" "../site/.vuepress/public/files/DolphinCodes.zip";
Write-Host "Dolphin Archive built";

View file

@ -1,3 +1,8 @@
import fs from 'fs';
const jsonFilePath = '../site/.vuepress/data/gameVersions.json';
const codeVersions = ['GMSE01', 'GMSJ01', 'GMSP01', 'GMSJ0A'];
const parseXml = xmlString => {
const codeCollection = new DOMParser()
.parseFromString(xmlString, 'text/xml')
@ -17,4 +22,11 @@ const parseXml = xmlString => {
const parseTextNode = (node, identifier) => node.getElementsByTagName(identifier)[0].textContent;
export default parseXml;
const codes = JSON.parse(fs.readFileSync(jsonFilePath));
for (let i = 0; i < codeVersions.length; i++) {
const xml = fs.readFileSync(`../${codeVersions[i]}.xml`);
codes.find(c => c.identifier === codeVersions[i]).codes = parseXml(xml);
}
fs.writeFileSync(jsonFilePath, JSON.stringify(codes));

View file

@ -26,9 +26,6 @@
:format="selectedFormat"
/>
</div>
<div v-if="isLoading" class="loading-overlay">
<div class="spinner"></div>
</div>
</section>
<br />
<hr />
@ -128,29 +125,9 @@ import gameVersions from '../data/gameVersions.json';
// Util
import parseXml from './scripts/parseXml';
// Libs
import axios from 'axios';
export default {
mounted() {
Promise.all(
gameVersions.map(async v => ({
identifier: v.identifier,
cheats: parseXml((await axios.get(`/codes/${v.identifier}.xml`)).data),
fastCodes: (await axios.get(`/codes/fast/${v.identifier}.json`)).data,
})),
)
.then(codes => {
localStorage.setItem('codes', JSON.stringify(codes));
this.isLoading = false;
})
.catch(err => {
if (localStorage.getItem('codes') != null) this.isLoading = false;
});
},
data() {
return {
isLoading: true,
codes: [],
selectedCheats: [],
selectedStageLoader: null,
@ -169,9 +146,8 @@ export default {
onVersionChanged(e) {
this.selectedVersion = e;
this.selectedCheats = [];
const storedCodes = JSON.parse(localStorage.getItem('codes'));
this.codes = storedCodes.find(c => c.identifier === e).cheats;
this.stageLoaderCodes = storedCodes.find(c => c.identifier === e).fastCodes;
this.codes = gameVersions.find(c => c.identifier === e).codes;
this.stageLoaderCodes = gameVersions.find(c => c.identifier === e).fastCode;
this.inspectingCode = null;
},
onFormatChanged(e) {
@ -216,19 +192,6 @@ section > div:not(:first-child) {
position: relative;
}
.config .loading-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 15;
text-align: center;
background: #ffffff44;
background-color: rgba(255, 255, 255, 0.7);
margin-left: -1px;
}
.config span {
display: block;
margin-bottom: 10px;
@ -239,21 +202,6 @@ section > div:not(:first-child) {
text-align: left;
}
.spinner {
display: inline-block;
}
.spinner:after {
content: ' ';
display: block;
width: 32px;
height: 32px;
border-radius: 50%;
border: 6px solid #fff;
border-color: #2eb9e2 transparent #2eb9e2 transparent;
animation: spinner 1.2s linear infinite;
}
@keyframes spinner {
0% {
transform: rotate(0deg);

View file

@ -18,7 +18,7 @@ module.exports = {
themeConfig: {
repo: 'BitPatty/gctGenerator',
editLinks: true,
docsDir: 'docs',
docsDir: 'site',
editLinkText: 'Edit this page on GitHub',
lastUpdated: false,
nav: [

View file

@ -0,0 +1,138 @@
[
{
"identifier": "GMSE01",
"name": "GMSE01 (NTSC-U)",
"version": "GMSE01",
"fastCode": {
"fileSelect": 2701876,
"shineGet": 2718852,
"system": 2724400,
"proc": 2778900,
"gpAppHi": "803F",
"gpAppLo": "9712",
"fmOffset": "9FA0",
"notext": {
"yes": "048D3A3C2100000004153DA0380000000415317C380050000429134060000000",
"pv5": "048D3A3C21000000283E971200002A0004153DA0801C00040415317CA81C03400429134088030214E2000001000000002A3E971200002A0004153DA0380000000415317C380050000429134060000000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "042B5EF438600001042B5E8C38600001",
"pp": "C22B5E88000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C22B5EF0000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
},
"codes": [
{
"author": "Placeholder",
"title": "Placeholder",
"description": "Placeholder",
"version": "Placeholder",
"date": "Placeholder",
"source": "0000000000000000"
}
]
},
{
"identifier": "GMSP01",
"name": "GMSP01 (PAL)",
"version": "GMSP01",
"fastCode": {
"fileSelect": 2668620,
"shineGet": 2685724,
"system": 2691272,
"proc": 2745964,
"gpAppHi": "803E",
"gpAppLo": "10D2",
"fmOffset": "9EC8",
"notext": {
"yes": "20570B7C000000000474E87C2100000020570B7D000000010474E9F42121000020570B7D000000020474ED380000000020570B7D000000030474EE04A100000020570B7D000000040474EBDC21210000E20000010000000004148D203800000004147F9838005000042890CC60000000",
"pv5": "283E10D200002A0004148D20801C000404147F98A81C0340042890CC88030214E2000001000000002A3E10D200002A0004148D203800000004147F9838005000042890CC60000000E20000010000000020570B7C000000000474E87C2100000020570B7D000000010474E9F42121000020570B7D000000020474ED380000000020570B7D000000030474EE04A100000020570B7D000000040474EBDC21210000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "042ADE2038600001042ADE8838600001",
"pp": "C22ADE1C000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C22ADE84000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
},
"codes": [
{
"author": "Placeholder",
"title": "Placeholder",
"description": "Placeholder",
"version": "Placeholder",
"date": "Placeholder",
"source": "0000000000000000"
}
]
},
{
"identifier": "GMSJ01",
"name": "GMSJ01 (NTSC-J 1.0)",
"version": "GMSJ01",
"fastCode": {
"fileSelect": 946160,
"shineGet": 963136,
"system": 968628,
"proc": 1024280,
"gpAppHi": "803E",
"gpAppLo": "6012",
"fmOffset": "97D0",
"notext": {
"yes": "048D8A7CD6008149048D8A8081498149048D8A840000000004215290380000000421461038005000040E488860000000",
"pv5": "048D8A7CD6008149048D8A8081498149048D8A8400000000283E601200002A0004215290801C000404214610A81C0340040E488888030214E2000001000000002A3E601200002A0004215290380000000421461038005000040E488860000000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "0410AF5C386000010410AFC038600001",
"pp": "C210AF58000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C210AFBC000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
},
"codes": [
{
"author": "Placeholder",
"title": "Placeholder",
"description": "Placeholder",
"version": "Placeholder",
"date": "Placeholder",
"source": "0000000000000000"
}
]
},
{
"identifier": "GMSJ0A",
"name": "GMSJ01 (NTSC-J 1.1)",
"version": "GMSJ01",
"fastCode": {
"fileSelect": 2569968,
"shineGet": 2586924,
"system": 2592480,
"proc": 2647408,
"gpAppHi": "803E",
"gpAppLo": "A8F2",
"fmOffset": "9E60",
"notext": {
"yes": "048CD55CD6008149048CD56081498149048CD56400000000041351C43800000004134524380050000427109060000000",
"pv5": "048CD55CD6008149048CD56081498149048CD56400000000283DA8F200002A00041351C4801C000404134524A81C03400427109088030214E2000001000000002A3DA8F200002A00041351C43800000004134524380050000427109060000000E200000100000000",
"no": ""
},
"nofmvs": {
"yes": "04295AB43860000104295B1838600001",
"pp": "C2295AB0000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000C2295B14000000055480043F388403914182001C5480043C2C000398418200103C8000016084039A6000000000000000",
"no": ""
}
},
"codes": [
{
"author": "Placeholder",
"title": "Placeholder",
"description": "Placeholder",
"version": "Placeholder",
"date": "Placeholder",
"source": "0000000000000000"
}
]
}
]

View file

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

View file

Before

Width:  |  Height:  |  Size: 342 KiB

After

Width:  |  Height:  |  Size: 342 KiB

View file

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View file

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View file

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 153 KiB

View file

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB