Skip to content

Commit

Permalink
Merge branch 'wua-sprites'
Browse files Browse the repository at this point in the history
  • Loading branch information
bates64 committed Feb 7, 2024
2 parents 6a2ad7e + 5e2582c commit a7edb5f
Show file tree
Hide file tree
Showing 3,497 changed files with 345,403 additions and 29,517 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
80 changes: 80 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build
on:
push:
pull_request:

jobs:
game:
name: Game
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: ./install_deps.sh
- name: Install compilers
run: ./install_compilers.sh
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install pigment64
run: cargo binstall pigment64 -y
- name: Setup Flips
run: |
curl -L https://dl.smwcentral.net/11474/floating.zip -o floating.zip
unzip floating.zip
rm floating.zip
chmod +x flips-linux
- name: Download baserom
run: curl -L $BASEROM_US_URL -o ver/us/baserom.z64
env:
BASEROM_US_URL: ${{ secrets.BASEROM_US_URL }}
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
- name: Configure
run: ./configure
- name: Build
run: ninja
- name: Create patch file
# flips works but returns a non-zero exit code if the rom shrunk
run: ./flips-linux ver/us/baserom.z64 ver/us/build/papermario.z64 paper-mario-wish-upon-abyss.bps || true
- name: Upload patch as artifact
uses: actions/upload-artifact@v2
with:
name: paper-mario-wish-upon-abyss.bps
path: paper-mario-wish-upon-abyss.bps
prerelease:
name: Prerelease
runs-on: ubuntu-latest
needs: game
if: github.ref == 'refs/heads/main'
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: paper-mario-wish-upon-abyss.bps
path: paper-mario-wish-upon-abyss.bps
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: Development build
files: paper-mario-wish-upon-abyss.bps
release:
name: Release
runs-on: ubuntu-latest
needs: game
if: github.ref == 'refs/tags/v*'
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: paper-mario-wish-upon-abyss.bps
path: paper-mario-wish-upon-abyss.bps
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
files: paper-mario-wish-upon-abyss.bps
29 changes: 22 additions & 7 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
doxygen:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -15,13 +25,7 @@ jobs:
sudo mv doxygen-*/bin/doxy* /usr/local/bin
- name: Generate docs
run: doxygen
# deploy to gh pages if repo is pmret/papermario
- name: Deploy to gh-pages
if: github.repository != 'pmret/papermario'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/doxygen/html

- name: Deploy to papermar.io
if: github.repository == 'pmret/papermario'
uses: appleboy/scp-action@master
Expand All @@ -32,3 +36,14 @@ jobs:
source: docs/doxygen/html/
target: "/var/www/papermar.io/html/docs/"
strip_components: 3

- name: Upload artifact
if: github.repository != 'pmret/papermario'
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
if: github.repository == 'pmret/papermario'
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Python Formatting & Linting
on:
push:
pull_request:

jobs:
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ venv/
.DS_Store
ctx.c
expected/
.vscode/launch.json
.vscode/*.log
/tools/star-rod
/tools/to_rename.txt
Expand Down Expand Up @@ -61,6 +60,15 @@ build/
dump
*.backup
crash.xml
/audio/*
/sprite/*
/battle/*
/globals/*
/map/*
/world/*
/image/*
/strings/*
/res/*

/tools/Yay0compress
/tools/n64crc
13 changes: 8 additions & 5 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@
},
"includePath": [
"${workspaceFolder}/include",
"${workspaceFolder}/ver/pal/build/include",
"${workspaceFolder}/ver/us/build/include",
"${workspaceFolder}/src",
"${workspaceFolder}/assets/pal"
"${workspaceFolder}/assets/us"
],
"defines": [
"F3DEX_GBI_2",
"_LANGUAGE_C",
"_MIPS_SZLONG=32",
"VERSION=pal",
"VERSION_PAL"
"VERSION=us",
"VERSION_US",
"DEBUG",
"SHIFT",
"MODERN_COMPILER"
],
"cStandard": "c89",
"cStandard": "c23",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
}
Expand Down
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"configurations": [
{
"name": "gdb",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/ver/us/build/papermario.elf",
"MIMode": "gdb",
"miDebuggerPath": "gdb-multiarch",
"miDebuggerServerAddress": "[::1]:9123",
"miDebuggerArgs": "-readnow",
"targetArchitecture": "mips",
},
],
}
41 changes: 4 additions & 37 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,49 +33,16 @@
},
},
{
"label": "diff",
"label": "run",
"type": "shell",
"command": "./diff.py -mwo ${input:funcName}",
"command": "./run",
"isBackground": true,
"problemMatcher": [
{
"fileLocation": ["relative", "${workspaceFolder}"],
"background": {
"activeOnStart": true,
},
"pattern": {
"regexp": "^(src\\/.*|include\\/.*):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4,
},
},
{
"fileLocation": ["relative", "${workspaceFolder}"],
"background": {
"activeOnStart": true,
},
"severity": "error",
"pattern": {
"regexp": "^(src\\/.*|include\\/.*):(\\d+):\\s+(?!warning|\\()(.*)$",
"file": 1,
"line": 2,
"message": 3,
},
},
],
"dependsOn": "ninja",
"problemMatcher": [],
"group": {
"kind": "test",
"isDefault": true,
},
},
],
"inputs": [
{
"id": "funcName",
"description": "Function name",
"type": "promptString",
}
],
}
54 changes: 24 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
# Paper Mario
# Paper Mario: Wish Upon Abyss

[![Build Status][jenkins-badge]][jenkins]
[![Release](https://img.shields.io/github/v/release/abys-games/wish-upon-abyss)][releases]
[![Download](https://img.shields.io/github/downloads/abys-games/wish-upon-abyss/total)][download]
![Build Status](https://img.shields.io/github/actions/workflow/status/abys-games/wish-upon-abyss/build.yaml)
[![Discord Channel][discord-badge]][discord]

This is a work-in-progress decompilation of Paper Mario.
A full-length Paper Mario romhack.

It builds the following ROMs:
[Download][download]

| Region | SHA1 hash | Progress |
|:------:|--------------------------------------------|:--------------------------------------------------------:|
| US | `3837f44cda784b466c9a2d99df70d77c322b97a0` | [![Progress (US)][progress-us-badge]][progress-us] |
| JP | `b9cca3ff260b9ff427d981626b82f96de73586d3` | [![Progress (JP)][progress-jp-badge]][progress-jp] |
| PAL | `2111d39265a317414d359e35a7d971c4dfa5f9e1` | [![Progress (PAL)][progress-pal-badge]][progress-pal] |
| iQue | `5c724685085eba796537573dd6f84aaddedc8582` | [![Progress (iQue)][progress-ique-badge]][progress-ique] |
[discord]: https://discord.gg/abys-games
[discord-badge]: https://img.shields.io/discord/507515964636528640?color=%237289DA&logo=discord&logoColor=ffffff
[papermario-repo]: https://github.com/pmret/papermario
[releases]: https://github.com/abys-games/wish-upon-abyss/releases
[download]: https://github.com/abys-games/wish-upon-abyss/releases/latest/download/paper-mario-wish-upon-abyss.bps

To set up the repository, see [SETUP.md](SETUP.md).
## Development

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute to the project. Any and all help is welcome!
See [docs.starhaven.dev](https://docs.starhaven.dev/tools/decomp/setup.html) but swap out `star-haven/papermario-dx` for `abys-games/wish-upon-abyss`.

Also see our website at [papermar.io](https://papermar.io/).
### Star Rod

[jenkins]: https://jenkins.deco.mp/job/papermario/job/main
[jenkins-badge]: https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins.deco.mp%2Fjob%2Fpapermario%2Fjob%2Fmain

[progress-us]: https://papermar.io/progress-us
[progress-us-badge]: https://img.shields.io/endpoint?url=https://papermar.io/reports/progress_us_shield.json

[progress-jp]: https://papermar.io/progress-jp
[progress-jp-badge]: https://img.shields.io/endpoint?url=https://papermar.io/reports/progress_jp_shield.json

[progress-pal]: https://papermar.io/progress-pal
[progress-pal-badge]: https://img.shields.io/endpoint?url=https://papermar.io/reports/progress_pal_shield.json

[progress-ique]: https://papermar.io/progress-ique
[progress-ique-badge]: https://img.shields.io/endpoint?url=https://papermar.io/reports/progress_ique_shield.json

[discord]: https://discord.gg/PgcMpQTzh5
[discord-badge]: https://img.shields.io/discord/1141775228440158338?color=%237289DA&logo=discord&logoColor=ffffff
- [Download Star Rod 0.5.3.1](https://mega.nz/file/qhlF0IoS#O-zdfvabuvX2FyLqPTSGcHARmd3_xAAHh4zG-LWhLIA
)
- Open Star Rod
- Set the `wish-upon-abyss` directory (repo root) as your mod folder
- Dump assets
- Copy assets to mod
- Close Star Rod
- Now you can use the map editor and sprite editor
- Maps are in `assets/wua/mapfs/geom`
- Sprites are in `assets/wua/sprite`
18 changes: 11 additions & 7 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you encounter any issues setting up the repo, please feel free to [reach out

Clone the repository:
```sh
git clone https://github.com/pmret/papermario
git clone https://github.com/nanaian/papermario-dx
cd papermario
```

Expand Down Expand Up @@ -69,14 +69,11 @@ If you have Visual Studio Code, you can type `code .` to open the repo within it
# Building
Copy baseroms into the following places (at least 1 is required):
Copy baserom into the following place:
* `ver/us/baserom.z64` (sha1: `3837f44cda784b466c9a2d99df70d77c322b97a0`)
* `ver/jp/baserom.z64` (sha1: `b9cca3ff260b9ff427d981626b82f96de73586d3`)
* `ver/pal/baserom.z64` (sha1: `2111d39265a317414d359e35a7d971c4dfa5f9e1`)
* `ver/ique/baserom.z64` (sha1: `5c724685085eba796537573dd6f84aaddedc8582`)
(If you're using WSL, you can enter the Linux filesystem by opening `\\wsl$` in File Explorer; e.g. `\\wsl$\Ubuntu\home\<your username>\papermario`.)
(If you're using WSL, you can enter the Linux filesystem by opening `\\wsl$` in File Explorer; e.g. `\\wsl$\Ubuntu\home\<your username>\papermario-dx`.)
Configure the build and extract assets from the base ROM:
```sh
Expand All @@ -88,5 +85,12 @@ Compile the game:
ninja
```
If you get `papermario.z64: OK` at the end, the build succeeded and the built rom matches the input rom!
The output ROM is `ver/us/build/papermario.z64` - you can run this in any N64 emulator.
Alternative, to compile _and_ run, you can use the `run` script:
```sh
./run
```
(This will search [known paths](run) for an emulator. If your emulator isn't listed, add it to the list and contribute!)
You can now begin modding.
Loading

0 comments on commit a7edb5f

Please sign in to comment.