Skip to content

Commit

Permalink
Merge branch 'main' into cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
z64a committed Sep 12, 2024
2 parents 22cdcea + 0ef9329 commit 1c1a816
Show file tree
Hide file tree
Showing 2,202 changed files with 9,025 additions and 7,341 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@ jobs:
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: Install pigment64 and crunch64
run: cargo binstall pigment64 crunch64-cli -y
- name: Download baserom
run: curl -L $BASEROM_US_URL -o ver/us/baserom.z64
env:
Expand All @@ -35,23 +29,20 @@ jobs:
- 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 papermario.bps || true
run: ninja ver/us/build/papermario.bps
- name: Upload patch as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: papermario.bps
path: papermario.bps
path: ver/us/build/papermario.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
uses: actions/download-artifact@v4
with:
name: papermario.bps
path: papermario.bps
Expand All @@ -69,7 +60,7 @@ jobs:
if: github.ref == 'refs/tags/v*'
steps:
- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: papermario.bps
path: papermario.bps
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ build/
*.backup
*.crash

/tools/Yay0compress
/tools/n64crc
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@
"-l 120"
],
"search.useIgnoreFiles": false,
"nixEnvSelector.nixFile": "${workspaceFolder}/shell.nix",
"workbench.editor.labelFormat": "short",
}
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ pipeline {
sh 'curl -L "https://github.com/decompals/mips-binutils-2.6/releases/download/main/binutils-2.6-linux.tar.gz" | tar zx -C tools/build/cc/gcc2.7.2'
sh 'curl -L "https://github.com/decompals/mips-binutils-egcs-2.9.5/releases/latest/download/mips-binutils-egcs-2.9.5-linux.tar.gz" | tar zx -C tools/build/cc/egcs'
sh 'curl -L "https://github.com/decompals/mips-gcc-egcs-2.91.66/releases/latest/download/mips-gcc-egcs-2.91.66-linux.tar.gz" | tar zx -C tools/build/cc/egcs'
sh 'pip install -U -r requirements.txt'
sh 'pip install -U -r requirements.txt --break-system-packages'
sh 'cargo install pigment64'
sh 'cargo install crunch64-cli'
sh './configure'
}
}
Expand Down
41 changes: 41 additions & 0 deletions decomp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Paper Mario
github: https://github.com/pmret/papermario
platform: n64
versions:
- name: us
fullname: US
paths:
baserom: "ver/us/baserom.z64"
build: "ver/us/build/papermario.z64"
asm: "ver/us/asm"
nonmatchings: "ver/us/asm/nonmatchings"
map: "ver/us/build/papermario.map"
elf: "ver/us/build/papermario.elf"
- name: pal
fullname: PAL
paths:
baserom: "ver/pal/baserom.z64"
build: "ver/pal/build/papermario.z64"
asm: "ver/pal/asm"
nonmatchings: "ver/pal/asm/nonmatchings"
map: "ver/pal/build/papermario.map"
elf: "ver/pal/build/papermario.elf"
- name: ique
fullname: iQue
paths:
baserom: "ver/ique/baserom.z64"
build: "ver/ique/build/papermario.z64"
asm: "ver/ique/asm"
nonmatchings: "ver/ique/asm/nonmatchings"
map: "ver/ique/build/papermario.map"
elf: "ver/ique/build/papermario.elf"
- name: jp
fullname: JP
paths:
baserom: "ver/jp/baserom.z64"
build: "ver/jp/build/papermario.z64"
asm: "ver/jp/asm"
nonmatchings: "ver/jp/asm/nonmatchings"
map: "ver/jp/build/papermario.map"
elf: "ver/jp/build/papermario.elf"
tools:
33 changes: 17 additions & 16 deletions include/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1094,22 +1094,23 @@ typedef struct ModelAnimator {
/* 0x008 */ s16* animReadPos;
/* 0x00C */ s16* savedReadPos;
/* 0x010 */ AnimatorNode* rootNode;
/* 0x014 */ u8 nextUniqueID;
/* 0x015 */ u8 staticNodeIDs[0x7A]; // ?
/* 0x08F */ char unk_08F[0x1];
/* 0x090 */ f32 nextUpdateTime;
/* 0x094 */ f32 timeScale;
/* 0x098 */ Mtx mtx;
/* 0x0D8 */ void* baseAddr;
/* 0x0DC */ s16* animationBuffer;
/* 0x0E0 */ StaticAnimatorNode* staticNodes[0x7A];
/* 0x2C8 */ StaticAnimatorNode** staticRoot;
/* 0x2CC */ s32 treeIndexPos;
/* 0x2D0 */ s32 savedTreePos;
/* 0x2D4 */ void (*fpRenderCallback)(void*);
/* 0x2D8 */ void* renderCallbackArg;
/* 0x2DC */ char unk_2DC[4];
} ModelAnimator; // size = 0x2E0
/* 0x014 */ AnimatorNode* nodeCache[0x7A];
/* 0x08E */ u8 nextUniqueID;
/* 0x08F */ u8 staticNodeIDs[0x7A]; // ?
/* 0x109 */ char unk_08F[0x1];
/* 0x10A */ f32 nextUpdateTime;
/* 0x10E */ f32 timeScale;
/* 0x112 */ Mtx mtx;
/* 0x152 */ void* baseAddr;
/* 0x156 */ s16* animationBuffer;
/* 0x15A */ StaticAnimatorNode* staticNodes[0x7A];
/* 0x342 */ StaticAnimatorNode** staticRoot;
/* 0x346 */ s32 treeIndexPos;
/* 0x34A */ s32 savedTreePos;
/* 0x34E */ void (*fpRenderCallback)(void*);
/* 0x352 */ void* renderCallbackArg;
/* 0x356 */ char unk_2DC[4];
} ModelAnimator; // size = 0x35A

typedef ModelAnimator* AnimatedMeshList[MAX_ANIMATED_MESHES];

Expand Down
2 changes: 0 additions & 2 deletions include/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -2413,9 +2413,7 @@ enum DoorSounds {
DOOR_SOUNDS_UNUSED = 6,
};

#if VERSION_US || VERSION_PAL || VERSION_IQUE
#include "sprite/sprite_shading_profiles.h"
#endif

enum LightSourceFlags {
LIGHT_SOURCE_DISABLED = 0,
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ ninja_syntax
msgpack
pylibyaml
tqdm
spimdisasm
pygfxd
intervaltree
rabbitizer
n64img
python-githooks
crunch64>=0.2.0
splat64>=0.22.0
crunch64>=0.5.1
spimdisasm>=1.28.1
splat64>=0.27.0
requests
6 changes: 3 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let

egcs-gcc = builtins.fetchurl {
url =
"https://github.com/decompals/mips-gcc-egcs-2.91.66/releases/latest/download/mips-gcc-egcs-2.91.66-linux.tar.gz";
"https://github.com/decompals/mips-gcc-egcs-2.91.66/releases/download/0.2/mips-gcc-egcs-2.91.66-linux.tar.gz";
sha256 = "03v1ci7j0hi53z639rwj60xwz0zzi82a9azi0yiw818r754faql0";
};

Expand Down Expand Up @@ -87,9 +87,9 @@ in pkgsCross.mkShell {
done
done
# Install pigment64
# Install Rust deps
export PATH=$HOME/.cargo/bin:$PATH
cargo install pigment64
cargo install pigment64 crunch64-cli
# Install python packages
virtualenv venv
Expand Down
2 changes: 1 addition & 1 deletion src/23680.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void spawn_drops(Enemy* enemy) {
}

if (curWeight >= dropCount) {
itemToDrop = drops->itemDrops[i].weight;
itemToDrop = drops->itemDrops[i].item;
break;
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/77480.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,13 @@ void phys_update_standard(void) {
check_input_use_partner();
phys_update_action_state();

#if DX_DEBUG_MENU
if (dx_debug_is_cheat_enabled(DEBUG_CHEAT_FLY) && playerStatus->curButtons & BUTTON_L) {
playerStatus->pos.y += 5.0f;
playerStatus->flags |= PS_FLAG_JUMPING;
}
#endif

if (!(playerStatus->flags & PS_FLAG_FLYING)) {
if (playerStatus->flags & PS_FLAG_JUMPING) {
phys_update_jump();
Expand Down
Loading

0 comments on commit 1c1a816

Please sign in to comment.