49e6095312
Bumps [jsdom](https://github.com/jsdom/jsdom) from 20.0.2 to 21.1.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/20.0.2...21.1.0) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.devcontainer | ||
.github | ||
.vscode | ||
dockerfiles | ||
docs | ||
scripts | ||
site | ||
utils | ||
.dockerignore | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.nvmrc | ||
.prettierignore | ||
.prettierrc | ||
changelog.md | ||
Codes.xml | ||
docker-compose.yml | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
Readme.md | ||
Removed-Codes.xml |
GCT Generator
This repository contains the code behind the Super Mario Sunshine Cheatfile Generator at https://gct.zint.ch/
Features
- Custom cheat combination
- Custom stage loader based on QbeRoot's fastcodes
- Creates cheatfiles ready for use with Nintendont, Gecko Cheat Manager and Dolphin
Contributing
Updating Practice Codes
The codes are stored in the Codes.xml
file. If you want to add or change codes edit the XML file. Note 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).
When adding new codes keep in mind that the English title/description are mandatory.
Codes with configuration
Codes with configuration are usually defined as vue components,
which is defined in site/.vuepress/components/codes/.
When creating/updating those codes,
in addition to editing the Codes.xml
file,
you may also need to check the following files:
- site/.vuepress/components/codes/codegen.js: Specify the Gecko code generator function of the code. The version string will be passed as the first argument.
- site/.vuepress/components/codes/ui.js: Specify the vue component for the configuration of the code. The version string will be passed as a property.
Reserved Memory
Some codes store some states in the games memory starting from address 0x817F0000. To avoid collisions use a memory range in the unallocated ranges:
Adding translations
- Create a new file
<lang>.json
insite/.vuepress/i18n
, where<lang>
is the language code you want to add. Copy the contents ofen-US.json
into your file and translate each entry in the JSON file. - Create a new folder with your language code in
site
(such assite/de
for German). Create a new markdown file for each existing page (guide.md
,index.md
,ios58.md
, ...) and translate its contents from the English version. - Create a new entry in
site/.vuepress/i18n/locales.json
with the site metadata and navigation items for your language. - Add your locale to the
translations
insite/.vuepress/i18n/localeHelper.js
. - Open
Codes.xml
and add a translation for each code (<title>
and<description>
).
Updating Guides
You can find the guides in the site folder. Simply edit the corresponding markdown file (.md).
Note that in the code reference files everything following the <!-- injectionpoint -->
tag will be removed during the next build.
Site Development
You can either use dev containers or your own setup to develop new features.
Using Dev-Containers
If you have access to codespaces simply open the repository in codespaces. Else you can set it up locally as follows:
- Install Docker and docker-compose.
- Open the project in VSCode
- Click the
Reopen in Container
button or run the command with the same name.
Using your own environment
Due to formatting rules you should use VSCode for development with the following features/extensions:
- NodeJS 16.x (LTS)
- npm 8.x
octref.vetur
esbenp.prettier-vscode
Development commands
# Install dependencies
npm i
# Inject codes from the Codes.xml file
npm run codes:inject
# Run project in watch mode
# This will serve the page in development mode on http://localhost:8080
npm run dev
# Remove injected codes
npm run codes:clean
# Build project for production
npm run build
# Serve the production build
npm run serve
The XML codes will be written automatically to the json file and code reference during the following actions:
- Starting the development server with
npm run dev
- Building the site with
npm run build
If you want to inject the codes at any given point you can use npm run codes:inject
.
!!! Note that if npm was used, npm run codes:clean
is ran automatically as a pre-commit hook, removing all injected codes and staging ALL changes. If you want to commit changes without cleaning codes first you have to commit through git commit --no-verify
.
Build and preview the site (Docker)
The project root provides a docker-compose file, which creates a clean build (with the same configuration as the production build) and spins up a minimal Apache server on your local, serving the resulting build on port 8080.
# Build and serve the site on http://localhost:8080
# Press CTRL+C to stop the container
docker-compose up --build