forked from Ports/perfect_dark
Merge branch 'port' of https://github.com/fgsfdsfgs/perfect_dark into port-debugger
This commit is contained in:
commit
18ad06e3d7
17 files changed
+335
-1
No files matched your search
@@ -78,10 +78,46 @@ jobs:
|
|||||||
path: bin/
|
path: bin/
|
||||||
retention-days: 0
|
retention-days: 0
|
||||||
|
|
||||||
|
build-flatpak-bundle:
|
||||||
|
name: "Build flatpak bundle"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-i686-linux]
|
||||||
|
container:
|
||||||
|
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
|
||||||
|
options: --privileged
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: pd-i686-linux
|
||||||
|
path: dist/linux/bin/
|
||||||
|
|
||||||
|
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||||
|
with:
|
||||||
|
bundle: io.github.fgsfdsfgs.perfect_dark.flatpak
|
||||||
|
manifest-path: dist/linux/io.github.fgsfdsfgs.perfect_dark.yaml
|
||||||
|
cache-key: flatpak-builder-${{ github.sha }}
|
||||||
|
upload-artifact: true
|
||||||
|
|
||||||
|
# - name: Build Flatpak bundle
|
||||||
|
# run: |
|
||||||
|
# cd dist/linux/
|
||||||
|
# flatpak-builder build --force-clean io.github.fgsfdsfgs.perfect_dark.yaml
|
||||||
|
# flatpak build-export export build
|
||||||
|
# flatpak build-bundle export io.github.fgsfdsfgs.perfect_dark.flatpak io.github.fgsfdsfgs.perfect_dark
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: io.github.fgsfdsfgs.perfect_dark.flatpak
|
||||||
|
path: io.github.fgsfdsfgs.perfect_dark.flatpak
|
||||||
|
retention-days: 0
|
||||||
|
|
||||||
|
|
||||||
publish-latest-build:
|
publish-latest-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/port'
|
if: github.ref == 'refs/heads/port'
|
||||||
needs: [build-i686-windows, build-i686-linux]
|
needs: [build-i686-windows, build-i686-linux, build-flatpak-bundle]
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
@@ -97,6 +133,7 @@ jobs:
|
|||||||
pushd ci-artifacts
|
pushd ci-artifacts
|
||||||
tar czf ../ci-release/pd-i686-linux.tar.gz pd-i686-linux
|
tar czf ../ci-release/pd-i686-linux.tar.gz pd-i686-linux
|
||||||
zip -r ../ci-release/pd-i686-windows.zip pd-i686-windows
|
zip -r ../ci-release/pd-i686-windows.zip pd-i686-windows
|
||||||
|
mv io.github.fgsfdsfgs.perfect_dark.flatpak/io.github.fgsfdsfgs.perfect_dark.flatpak ../ci-release/
|
||||||
popd
|
popd
|
||||||
git tag --force ci-dev-build port
|
git tag --force ci-dev-build port
|
||||||
git push --force origin ci-dev-build
|
git push --force origin ci-dev-build
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
*.exe
|
*.exe
|
||||||
pd.*.z64
|
pd.*.z64
|
||||||
build
|
build
|
||||||
|
.flatpak-builder
|
||||||
extracted
|
extracted
|
||||||
src/assets/*/*.bin
|
src/assets/*/*.bin
|
||||||
src/assets/*/*.ctl
|
src/assets/*/*.ctl
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ There are minor graphics- and gameplay-related issues, and possibly occasional c
|
|||||||
* experimental high framerate support (up to 240 FPS):
|
* experimental high framerate support (up to 240 FPS):
|
||||||
* set `Game.TickRateDivisor` to `0` in `pd.ini` to activate;
|
* set `Game.TickRateDivisor` to `0` in `pd.ini` to activate;
|
||||||
* in practice the game will have issues running faster than ~165 FPS, so use VSync or `Video.FramerateLimit` to cap it.
|
* in practice the game will have issues running faster than ~165 FPS, so use VSync or `Video.FramerateLimit` to cap it.
|
||||||
|
* emulate the Transfer Pak functionality the game has on the Nintendo 64 to unlock some cheats automatically.
|
||||||
|
|
||||||
Currently only 32-bit platforms are supported, namely x86 Windows and Linux.
|
Currently only 32-bit platforms are supported, namely x86 Windows and Linux.
|
||||||
Note that 32-bit binaries will still work on 64-bit versions of those platforms,
|
Note that 32-bit binaries will still work on 64-bit versions of those platforms,
|
||||||
@@ -58,6 +59,8 @@ If you want to use a PAL or JPN ROM instead, put them into the `data` directory
|
|||||||
* PAL: ROM name `pd.pal-final.z64`, EXE name `pd.pal.exe`.
|
* PAL: ROM name `pd.pal-final.z64`, EXE name `pd.pal.exe`.
|
||||||
* JPN: ROM name `pd.jpn-final.z64`, EXE name `pd.jpn.exe`.
|
* JPN: ROM name `pd.jpn-final.z64`, EXE name `pd.jpn.exe`.
|
||||||
|
|
||||||
|
Optionally, you can also put your Perfect Dark for GameBoy Color ROM named `pd.gbc` in the `data` directory if you want to emulate having the Nintendo 64's Transfer Pak and unlock some cheats automatically.
|
||||||
|
|
||||||
Additional information can be found in the [wiki](https://github.com/fgsfdsfgs/perfect_dark/wiki).
|
Additional information can be found in the [wiki](https://github.com/fgsfdsfgs/perfect_dark/wiki).
|
||||||
|
|
||||||
A GPU supporting OpenGL 3.0 or above is required to run the port.
|
A GPU supporting OpenGL 3.0 or above is required to run the port.
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Perfect Dark
|
||||||
|
Comment=Modern source port of Perfect Dark
|
||||||
|
Exec=pd
|
||||||
|
Icon=io.github.fgsfdsfgs.perfect_dark
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Game;ActionGame;
|
||||||
|
StartupNotify=false
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop-application">
|
||||||
|
<id>io.github.fgsfdsfgs.perfect_dark</id>
|
||||||
|
<name>Perfect Dark</name>
|
||||||
|
<developer id="io.github.fgsfdsfgs.perfect_dark">
|
||||||
|
<name>Perfect Dark Contributors</name>
|
||||||
|
<url>https://github.com/fgsfdsfgs/perfect_dark/graphs/contributors</url>
|
||||||
|
</developer>
|
||||||
|
<launchable type="desktop-id">io.github.fgsfdsfgs.perfect_dark.desktop</launchable>
|
||||||
|
<summary>Modern cross-platform port of Perfect Dark</summary>
|
||||||
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
<project_license>MIT</project_license>
|
||||||
|
<url type="homepage">https://github.com/fgsfdsfgs/perfect_dark/</url>
|
||||||
|
<description>
|
||||||
|
<p>This is a port of Ryan Dywer's decompilation of classic N64 shooter Perfect Dark to modern systems.</p>
|
||||||
|
</description>
|
||||||
|
<!--
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">
|
||||||
|
<image type="source">https://gitlab.com/fpiesche/dxx-rebirth-assets/-/raw/c6e7e79eebe92905f84f07a635ffab5122a94bd1/d1x/screenshots/retromode.png</image>
|
||||||
|
<caption>"Retro mode": the default graphics setup, like the original game but in high resolution</caption>
|
||||||
|
<screenshots>
|
||||||
|
-->
|
||||||
|
<categories>
|
||||||
|
<category>Game</category>
|
||||||
|
<category>ActionGame</category>
|
||||||
|
<category>Shooter</category>
|
||||||
|
</categories>
|
||||||
|
<keywords>
|
||||||
|
<keyword>n64</keyword>
|
||||||
|
<keyword>scifi</keyword>
|
||||||
|
<keyword>cyberpunk</keyword>
|
||||||
|
<keyword>retro</keyword>
|
||||||
|
<keyword>sourceport</keyword>
|
||||||
|
<keyword>port</keyword>
|
||||||
|
</keywords>
|
||||||
|
<releases>
|
||||||
|
<release version="latest" date="2024-05-14"/>
|
||||||
|
</releases>
|
||||||
|
<content_rating type="oars-1.1">
|
||||||
|
<content_attribute id="violence-realistic">moderate</content_attribute>
|
||||||
|
<content_attribute id="violence-bloodshed">mild</content_attribute>
|
||||||
|
</content_rating>
|
||||||
|
<update_contact>https://github.com/fgsfdsfgs/perfect_dark/</update_contact>
|
||||||
|
</component>
|
||||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
+38
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Create user data directories if necessary
|
||||||
|
userdirs=( roms saves mods )
|
||||||
|
for path in "${userdirs[@]}"; do
|
||||||
|
if [ ! -d "${XDG_DATA_HOME}/${path}" ]; then
|
||||||
|
mkdir -p "${XDG_DATA_HOME}/${path}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Default to pd as executable but switch to jpn/pal if the NTSC rom
|
||||||
|
# is missing but JPN/PAL are present.
|
||||||
|
executable="pd"
|
||||||
|
if [ -f ${XDG_DATA_HOME}/roms/pd.ntsc-final.z64 ] | \
|
||||||
|
[ -f ${XDG_DATA_HOME}/roms/pd.ntsc-1.0.z64 ]; then
|
||||||
|
executable="pd"
|
||||||
|
elif [ -f ${XDG_DATA_HOME}/roms/pd.jpn-final.z64 ]; then
|
||||||
|
executable="pd.jpn"
|
||||||
|
elif [ -f ${XDG_DATA_HOME}/roms/pd.pal-final.z64 ]; then
|
||||||
|
executable="pd.pal"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If first parameter passed to this script is one of the pd executables,
|
||||||
|
# run that regardless of ROM auto-detection above and pass the remaining
|
||||||
|
# parameters to it; otherwise pass all arguments to the executable selected
|
||||||
|
# above
|
||||||
|
case $1 in
|
||||||
|
"pd."*)
|
||||||
|
executable=$1
|
||||||
|
params="${@:2}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
params="$@"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Run game
|
||||||
|
$executable --basedir ${XDG_DATA_HOME}/roms --savedir ${XDG_DATA_HOME}/saves $params
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
app-id: io.github.fgsfdsfgs.perfect_dark
|
||||||
|
runtime: org.freedesktop.Platform
|
||||||
|
runtime-version: &runtime-version '23.08'
|
||||||
|
sdk: org.freedesktop.Sdk
|
||||||
|
command: io.github.fgsfdsfgs.perfect_dark.sh
|
||||||
|
|
||||||
|
finish-args:
|
||||||
|
# multiarch is required for 32bit binaries
|
||||||
|
- --allow=multiarch
|
||||||
|
# hardware 3D and controller access
|
||||||
|
- --device=all
|
||||||
|
# X11 + XShm access
|
||||||
|
- --share=ipc
|
||||||
|
- --socket=x11
|
||||||
|
# Audio
|
||||||
|
- --socket=pulseaudio
|
||||||
|
# Enable network for multiplayer
|
||||||
|
- --share=network
|
||||||
|
|
||||||
|
# Parameters for 32-bit extensions
|
||||||
|
x-gl-version: &gl-version '1.4'
|
||||||
|
x-gl-versions: &gl-versions 23.08;1.4
|
||||||
|
x-gl-merge-dirs: &gl-merge-dirs vulkan/icd.d;glvnd/egl_vendor.d;egl/egl_external_platform.d;OpenCL/vendors;lib/dri;lib/d3d;lib/gbm;vulkan/explicit_layer.d;vulkan/implicit_layer.d
|
||||||
|
|
||||||
|
add-extensions:
|
||||||
|
org.freedesktop.Platform.Compat.i386:
|
||||||
|
directory: lib/i386-linux-gnu
|
||||||
|
version: '23.08'
|
||||||
|
|
||||||
|
org.freedesktop.Platform.GL32:
|
||||||
|
directory: lib/i386-linux-gnu/GL
|
||||||
|
version: *gl-version
|
||||||
|
versions: *gl-versions
|
||||||
|
subdirectories: true
|
||||||
|
no-autodownload: true
|
||||||
|
autodelete: false
|
||||||
|
add-ld-path: lib
|
||||||
|
merge-dirs: *gl-merge-dirs
|
||||||
|
download-if: active-gl-driver
|
||||||
|
enable-if: active-gl-driver
|
||||||
|
autoprune-unless: active-gl-driver
|
||||||
|
|
||||||
|
org.freedesktop.Platform.GL32.Debug:
|
||||||
|
directory: lib/debug/lib/i386-linux-gnu/GL
|
||||||
|
version: *gl-version
|
||||||
|
versions: *gl-versions
|
||||||
|
subdirectories: true
|
||||||
|
no-autodownload: true
|
||||||
|
merge-dirs: *gl-merge-dirs
|
||||||
|
enable-if: active-gl-driver
|
||||||
|
autoprune-unless: active-gl-driver
|
||||||
|
|
||||||
|
org.freedesktop.Platform.VAAPI.Intel.i386:
|
||||||
|
directory: lib/i386-linux-gnu/dri/intel-vaapi-driver
|
||||||
|
version: *runtime-version
|
||||||
|
versions: *runtime-version
|
||||||
|
autodelete: false
|
||||||
|
no-autodownload: true
|
||||||
|
add-ld-path: lib
|
||||||
|
download-if: have-intel-gpu
|
||||||
|
autoprune-unless: have-intel-gpu
|
||||||
|
|
||||||
|
modules:
|
||||||
|
- name: perfect_dark
|
||||||
|
buildsystem: simple
|
||||||
|
sources:
|
||||||
|
- type: file
|
||||||
|
path: bin/pd
|
||||||
|
- type: file
|
||||||
|
path: bin/pd.jpn
|
||||||
|
- type: file
|
||||||
|
path: bin/pd.pal
|
||||||
|
- type: file
|
||||||
|
path: io.github.fgsfdsfgs.perfect_dark.sh
|
||||||
|
- type: file
|
||||||
|
path: io.github.fgsfdsfgs.perfect_dark.png
|
||||||
|
- type: file
|
||||||
|
path: io.github.fgsfdsfgs.perfect_dark.metainfo.xml
|
||||||
|
- type: file
|
||||||
|
path: io.github.fgsfdsfgs.perfect_dark.desktop
|
||||||
|
build-commands: []
|
||||||
|
post-install:
|
||||||
|
# create extension mountpoints
|
||||||
|
- mkdir -p /app/lib/i386-linux-gnu
|
||||||
|
- mkdir -p /app/lib/i386-linux-gnu/GL
|
||||||
|
- mkdir -p /app/lib/debug/lib/i386-linux-gnu/GL
|
||||||
|
- mkdir -p /app/lib/i386-linux-gnu/dri/intel-vaapi-driver
|
||||||
|
# port
|
||||||
|
- install -Dm 755 -t /app/bin/ pd*
|
||||||
|
- install -Dm 755 ${FLATPAK_ID}.sh /app/bin/${FLATPAK_ID}.sh
|
||||||
|
- install -Dm 644 ${FLATPAK_ID}.desktop /app/share/applications/${FLATPAK_ID}.desktop
|
||||||
|
- install -Dm 644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
|
||||||
|
- install -Dm 644 ${FLATPAK_ID}.png /app/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png
|
||||||
@@ -22,4 +22,6 @@ u8 *romdataSegGetData(const char *segName);
|
|||||||
u8 *romdataSegGetDataEnd(const char *segName);
|
u8 *romdataSegGetDataEnd(const char *segName);
|
||||||
u32 romdataSegGetSize(const char *segName);
|
u32 romdataSegGetSize(const char *segName);
|
||||||
|
|
||||||
|
void gbcRomCheck(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -109,6 +109,7 @@ int main(int argc, const char **argv)
|
|||||||
audioInit();
|
audioInit();
|
||||||
romdataInit();
|
romdataInit();
|
||||||
debuggerInit();
|
debuggerInit();
|
||||||
|
gbcRomCheck();
|
||||||
|
|
||||||
gameInit();
|
gameInit();
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "preprocess.h"
|
#include "preprocess.h"
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
#include "bss.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* asset files and ROM segments can be replaced by optional external files,
|
* asset files and ROM segments can be replaced by optional external files,
|
||||||
@@ -51,6 +54,9 @@
|
|||||||
|
|
||||||
#define ROMDATA_MAX_FILES 2048
|
#define ROMDATA_MAX_FILES 2048
|
||||||
|
|
||||||
|
#define GBC_ROM_NAME "pd.gbc"
|
||||||
|
#define GBC_ROM_SIZE 4194304
|
||||||
|
|
||||||
u8 *g_RomFile;
|
u8 *g_RomFile;
|
||||||
u32 g_RomFileSize;
|
u32 g_RomFileSize;
|
||||||
|
|
||||||
@@ -386,6 +392,45 @@ s32 romdataInit(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gbcRomCheck(void)
|
||||||
|
{
|
||||||
|
u32 gbcRomSize;
|
||||||
|
u8* gbcRomFile = fsFileLoad(GBC_ROM_NAME, &gbcRomSize);
|
||||||
|
|
||||||
|
if (!gbcRomFile) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gbcRomSize != GBC_ROM_SIZE) {
|
||||||
|
free(gbcRomFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ROM title
|
||||||
|
|
||||||
|
if (memcmp(gbcRomFile + 0x134, "PerfDark VPDE", 15) != 0) {
|
||||||
|
free(gbcRomFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Licensee code
|
||||||
|
|
||||||
|
if (memcmp(gbcRomFile + 0x144, "4Y", 2) != 0) {
|
||||||
|
free(gbcRomFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Header and global checksums
|
||||||
|
|
||||||
|
if (gbcRomFile[0x14D] != 0xA1 || gbcRomFile[0x14E] != 0xAD || gbcRomFile[0x14F] != 0x0F) {
|
||||||
|
free(gbcRomFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_validGbcRomFound = true;
|
||||||
|
free(gbcRomFile);
|
||||||
|
}
|
||||||
|
|
||||||
s32 romdataFileGetSize(s32 fileNum)
|
s32 romdataFileGetSize(s32 fileNum)
|
||||||
{
|
{
|
||||||
if (fileNum < 1 || fileNum >= ROMDATA_MAX_FILES) {
|
if (fileNum < 1 || fileNum >= ROMDATA_MAX_FILES) {
|
||||||
|
|||||||
@@ -3146,6 +3146,21 @@ void mpRemoveSimulant(s32 index)
|
|||||||
mpGenerateBotNames();
|
mpGenerateBotNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
void mpCopySimulant(s32 index)
|
||||||
|
{
|
||||||
|
s32 dest = mpGetSlotForNewBot();
|
||||||
|
|
||||||
|
g_MpSetup.chrslots |= 1 << (dest + 4);
|
||||||
|
g_BotConfigsArray[dest].base.name[0] = g_BotConfigsArray[index].base.name[0];
|
||||||
|
g_BotConfigsArray[dest].base.mpheadnum = g_BotConfigsArray[index].base.mpheadnum;
|
||||||
|
g_BotConfigsArray[dest].base.mpbodynum = g_BotConfigsArray[index].base.mpbodynum;
|
||||||
|
g_BotConfigsArray[dest].type = g_BotConfigsArray[index].type;
|
||||||
|
g_BotConfigsArray[dest].difficulty = g_BotConfigsArray[index].difficulty;
|
||||||
|
mpGenerateBotNames();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool mpHasSimulants(void)
|
bool mpHasSimulants(void)
|
||||||
{
|
{
|
||||||
if ((g_MpSetup.chrslots & 0xfff0) != 0) {
|
if ((g_MpSetup.chrslots & 0xfff0) != 0) {
|
||||||
|
|||||||
@@ -2933,6 +2933,24 @@ MenuItemHandlerResult menuhandlerMpDeleteSimulant(s32 operation, struct menuitem
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
MenuItemHandlerResult menuhandlerMpCopySimulant(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||||
|
{
|
||||||
|
switch (operation) {
|
||||||
|
case MENUOP_SET:
|
||||||
|
mpCopySimulant(g_Menus[g_MpPlayerNum].mpsetup.slotindex);
|
||||||
|
menuPopDialog();
|
||||||
|
break;
|
||||||
|
case MENUOP_CHECKDISABLED:
|
||||||
|
if (mpHasUnusedBotSlots() == 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
char *mpMenuTitleEditSimulant(struct menudialogdef *dialogdef)
|
char *mpMenuTitleEditSimulant(struct menudialogdef *dialogdef)
|
||||||
{
|
{
|
||||||
sprintf(g_StringPointer, "%s", &g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name);
|
sprintf(g_StringPointer, "%s", &g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name);
|
||||||
@@ -3151,6 +3169,16 @@ struct menuitem g_MpEditSimulantMenuItems[] = {
|
|||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
},
|
},
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
{
|
||||||
|
MENUITEMTYPE_SELECTABLE,
|
||||||
|
0,
|
||||||
|
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
||||||
|
(uintptr_t)"Copy Simulant\n",
|
||||||
|
0,
|
||||||
|
menuhandlerMpCopySimulant,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_SELECTABLE,
|
MENUITEMTYPE_SELECTABLE,
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -329,6 +329,10 @@ u8 g_PaksPlugged = 0;
|
|||||||
bool var80075d14 = true;
|
bool var80075d14 = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
bool g_validGbcRomFound = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
u32 pakGetBlockSize(s8 device)
|
u32 pakGetBlockSize(s8 device)
|
||||||
{
|
{
|
||||||
return device == SAVEDEVICE_GAMEPAK ? 0x10 : 0x20;
|
return device == SAVEDEVICE_GAMEPAK ? 0x10 : 0x20;
|
||||||
@@ -5982,6 +5986,7 @@ s32 pak0f11e750(s8 device)
|
|||||||
|
|
||||||
bool gbpakIsAnyPerfectDark(void)
|
bool gbpakIsAnyPerfectDark(void)
|
||||||
{
|
{
|
||||||
|
#ifdef PLATFORM_N64
|
||||||
s8 i;
|
s8 i;
|
||||||
|
|
||||||
for (i = 0; i < MAX_PLAYERS; i++) {
|
for (i = 0; i < MAX_PLAYERS; i++) {
|
||||||
@@ -5991,6 +5996,9 @@ bool gbpakIsAnyPerfectDark(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
#else
|
||||||
|
return g_validGbcRomFound;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -293,5 +293,8 @@ extern struct bossfile g_BossFile;
|
|||||||
extern struct chrdata *g_MpBotChrPtrs[MAX_BOTS];
|
extern struct chrdata *g_MpBotChrPtrs[MAX_BOTS];
|
||||||
extern s32 g_JpnMaxCacheItems;
|
extern s32 g_JpnMaxCacheItems;
|
||||||
extern s32 var8009d370jf;
|
extern s32 var8009d370jf;
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
extern bool g_validGbcRomFound;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -90,6 +90,9 @@ void mpCreateBotFromProfile(s32 botnum, u8 difficulty);
|
|||||||
void mpSetBotDifficulty(s32 botnum, s32 difficulty);
|
void mpSetBotDifficulty(s32 botnum, s32 difficulty);
|
||||||
s32 mpGetSlotForNewBot(void);
|
s32 mpGetSlotForNewBot(void);
|
||||||
void mpRemoveSimulant(s32 index);
|
void mpRemoveSimulant(s32 index);
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
void mpCopySimulant(s32 index);
|
||||||
|
#endif
|
||||||
bool mpHasSimulants(void);
|
bool mpHasSimulants(void);
|
||||||
bool mpHasUnusedBotSlots(void);
|
bool mpHasUnusedBotSlots(void);
|
||||||
bool mpIsSimSlotEnabled(s32 slot);
|
bool mpIsSimSlotEnabled(s32 slot);
|
||||||
|
|||||||
@@ -144,6 +144,9 @@ MenuDialogHandlerResult menudialogMpSimulant(s32 operation, struct menudialogdef
|
|||||||
MenuItemHandlerResult menuhandlerMpSimulantHead(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerMpSimulantHead(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
MenuItemHandlerResult menuhandlerMpSimulantBody(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerMpSimulantBody(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
MenuItemHandlerResult menuhandlerMpDeleteSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerMpDeleteSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
|
#ifndef PLATFORM_N64
|
||||||
|
MenuItemHandlerResult menuhandlerMpCopySimulant(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
|
#endif
|
||||||
MenuItemHandlerResult menuhandlerMpChangeSimulantType(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerMpChangeSimulantType(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
MenuItemHandlerResult menuhandlerMpClearAllSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerMpClearAllSimulants(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
MenuItemHandlerResult menuhandlerMpAddSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
|
MenuItemHandlerResult menuhandlerMpAddSimulant(s32 operation, struct menuitem *item, union handlerdata *data);
|
||||||
|
|||||||
Reference in new issue
Block a user