Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.0 #86

Merged
merged 55 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
bbb1c0d
memfile fix attempt
Pheenoh Jul 30, 2024
5b98d44
memfile fix
Pheenoh Jul 31, 2024
f999f2e
update pr branch
Pheenoh Jul 31, 2024
4e956e2
readd crash address for pr tests
Pheenoh Jul 31, 2024
3f7b705
fix other refs
Pheenoh Jul 31, 2024
95a6833
copy pasta
Pheenoh Jul 31, 2024
5d66e56
more granular actor pos/angle control
Pheenoh Aug 1, 2024
81237dd
simplify menu closing logic, add proc id to actor list
Pheenoh Aug 1, 2024
83fc7a4
migrate checkers to their own menu
Pheenoh Aug 1, 2024
2c856b9
Merge branch 'main' into memfile
Pheenoh Aug 1, 2024
69fc032
minor cleanup
Pheenoh Aug 1, 2024
1cb858b
Merge branch 'memfile' of github.com:zsrtp/tpgz into memfile
Pheenoh Aug 1, 2024
2d3d8d1
more actor view optimizations
Pheenoh Aug 1, 2024
25cdf89
skip startup logos
Pheenoh Aug 2, 2024
d2c2eba
rm extra mappings in tools menu
Pheenoh Aug 2, 2024
4da6740
lfc checker wip
Pheenoh Aug 3, 2024
456a30b
use new docker image(s)
Pheenoh Aug 5, 2024
74582e4
tell dme about the env it's running in
Pheenoh Aug 6, 2024
a8d6d08
crash test
Pheenoh Aug 6, 2024
40a3754
fix: Crash test at the end of main
kipcode66 Aug 6, 2024
974280f
removed redundant declaration
kipcode66 Aug 6, 2024
bef2ce7
rm crash test
Pheenoh Aug 6, 2024
9403d82
actor view address, update button combo checks for pause/delete
Pheenoh Aug 6, 2024
5577ee9
skip wii intros
Pheenoh Aug 7, 2024
254a534
rm extra testing
Pheenoh Aug 7, 2024
b6f966c
remove counters from save manager
Pheenoh Aug 7, 2024
18e14f5
use fpcEx_Search
Pheenoh Aug 12, 2024
2b02f55
very basic sound test menu
TakaRikka Aug 13, 2024
29a2153
add set scent option in pause menu
Pheenoh Aug 20, 2024
7aa025b
rm debug logging
Pheenoh Aug 20, 2024
ef55343
ee checker
Pheenoh Aug 27, 2024
a772b1a
golden bugs menu
Pheenoh Sep 1, 2024
6dc16ef
allow setting of charlo donation
Pheenoh Sep 2, 2024
b788995
add leever range viewer
TakaRikka Sep 2, 2024
084b1a9
add funraising flags, sort rupee flags into their own menu
Pheenoh Sep 2, 2024
49ea336
sort pause menu into sub menus
Pheenoh Sep 2, 2024
7c93c7b
sort tools menu into sub menus
Pheenoh Sep 3, 2024
82c82fb
intro cs flag WIP
Pheenoh Sep 4, 2024
f7d3969
fix actor spawner
TakaRikka Sep 16, 2024
971b08b
add coro/rusl td
Pheenoh Sep 17, 2024
196d876
Merge branch '1.1.0-dev' of github.com:zsrtp/tpgz into 1.1.0-dev
Pheenoh Sep 17, 2024
77e7146
update hundo saves, add stage info display
TakaRikka Sep 19, 2024
a98ece4
updating (simplifying) docker config
kipcode66 Sep 26, 2024
bc58c71
added wii BiTE saves
kipcode66 Sep 26, 2024
d671721
Update README.md
kipcode66 Sep 26, 2024
1597cb5
account for dScnLogo_c size difference on PAL
Pheenoh Sep 27, 2024
9e94c0d
rm wii fade on warning menu
Pheenoh Sep 27, 2024
5eeb8fb
use same class name for dScnLogo_c
Pheenoh Sep 27, 2024
a4a24f1
add missing enum
Pheenoh Sep 27, 2024
0c2aebd
keep fade function
Pheenoh Sep 27, 2024
04c40a2
rm intro cs flag feature for now
Pheenoh Sep 27, 2024
4b82ebc
fix bombs
kipcode66 Sep 27, 2024
f8363cd
update release automation
Pheenoh Sep 27, 2024
0760e64
Merge branch '1.1.0-dev' of github.com:zsrtp/tpgz into 1.1.0-dev
Pheenoh Sep 27, 2024
c303ca4
fixed wii nand writing
kipcode66 Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/multi-region-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Multi-Region Tests

on:
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
dolphin_memory: "0x8044A6C0"
iso_name: tpgz.iso
container:
image: ghcr.io/pheenoh/zsrtp-tpgz:${{ matrix.container }}
image: ghcr.io/zsrtp/zsrtp-tpgz:${{ matrix.container }}
options: --shm-size=128m --ulimit core=-1 --privileged=true
name: ${{ matrix.platform }}-${{ matrix.region }} Test
steps:
Expand All @@ -70,4 +70,4 @@ jobs:
run: |
dolphin-emu-nogui --platform=headless --video_backend=Null -e build/${{ matrix.iso_name }} &
sleep 15
/dme -c ${{ matrix.dolphin_memory }}
dme -d dolphin-emu-nog -a ${{ matrix.dolphin_memory }} -q 0 --platform offscreen
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ include(cmake/relmapper.cmake)
include(cmake/fonts.cmake)

project(TPGZ
VERSION 1.0.0
VERSION 1.1.0
DESCRIPTION "Twilight Princess speedrunning practice and testing tool"
HOMEPAGE_URL "tpgz.io"
LANGUAGES C CXX ASM)
Expand Down
22 changes: 22 additions & 0 deletions external/libtp_c/include/SSystem/SComponent/c_phase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef C_PHASE_H
#define C_PHASE_H

#include "../../dolphin/types.h"

typedef int (*cPhs__Handler)(void*);

enum cPhs__Step {
/* 0x0 */ cPhs_INIT_e,
/* 0x1 */ cPhs_LOADING_e,
/* 0x2 */ cPhs_NEXT_e,
/* 0x3 */ cPhs_UNK3_e, // appears to be an alternate error code, unsure how it differs
/* 0x4 */ cPhs_COMPLEATE_e,
/* 0x5 */ cPhs_ERROR_e,
};

typedef struct request_of_phase_process_class {
cPhs__Handler* mpHandlerTable;
int id;
} request_of_phase_process_class;

#endif
3 changes: 2 additions & 1 deletion external/libtp_c/include/d/meter/d_meter2_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class dMeter2Info_c {
u8& getDirectUseItem() { return mDirectUseItem; }
dMeterMap_c* getMeterMapClass() { return mMeterMap; }
void offUseButton(int pButton) { mUseButton &= ~(u16)pButton; }
void offMenuInForce(int flag) { mMenuInForce &= ~(1 << flag); }

/* 0x00 */ void* vtable;
/* 0x04 */ u8 unk4[4];
Expand Down Expand Up @@ -56,7 +57,7 @@ class dMeter2Info_c {
/* 0x90 */ u32 mTempBits;
/* 0x94 */ s16 mMsgKeyWaitTimer;
/* 0x96 */ u16 mHorseLifeCount;
/* 0x98 */ u16 unk152;
/* 0x98 */ u16 mMenuInForce;
/* 0x9A */ u16 mHotSpringTimer[4];
/* 0xA2 */ u16 mSub2DStatus;
/* 0xA4 */ u16 mFloatingFlowID;
Expand Down
133 changes: 133 additions & 0 deletions external/libtp_c/include/d/s/d_s_logo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
#ifndef D_D_S_LOGO_H
#define D_D_S_LOGO_H

#include "../../f_op/f_op_scene.h"

class mDoDvdThd_mountXArchive_c;
class mDoDvdThd_toMainRam_c;
class dDlst_2D_c;
class ResTIMG;
class JKRExpHeap;
class JKRHeap;


#ifdef WII_PLATFORM
class dScnLogo_c_wii {
public:
/* 0x000*/ u8 field_0x00[0x20c];
/* 0x20C */ u8 mExecCommand;
/* 0x20D */ u8 field_0x209;
/* 0x20E */ u8 field_0x20a;
/* 0x20F */ u8 field_0x20b;
/* 0x210 */ u16 mTimer;
};
#else
class dScnLogo_c : public scene_class {
public:
enum {
/* 0x0 */ EXEC_WARNING_IN,
/* 0x1 */ EXEC_WARNING_DISP,
/* 0x2 */ EXEC_WARNING_OUT,
/* 0x3 */ EXEC_NINTENDO_IN,
/* 0x4 */ EXEC_NINTENDO_OUT,
/* 0x5 */ EXEC_DOLBY_IN,
/* 0x6 */ EXEC_DOLBY_OUT,
/* 0x7 */ EXEC_DOLBY_OUT2,
/* 0x8 */ EXEC_PROG_IN,
/* 0x9 */ EXEC_PROG_SEL,
/* 0xA */ EXEC_PROG_OUT,
/* 0xB */ EXEC_PROG_SET,
/* 0xC */ EXEC_PROG_SET2,
/* 0xD */ EXEC_PROG_CHANGE,
/* 0xE */ EXEC_DVD_WAIT,
/* 0xF */ EXEC_SCENE_CHANGE,
};

dScnLogo_c() {}
/* 802560B4 */ void preLoad_dyl_create();
/* 802560F8 */ void preLoad_dyl_remove();
/* 8025611C */ bool preLoad_dyl();
/* 80256198 */ void checkProgSelect();
/* 80256210 */ int draw();
/* 80256264 */ void progInDraw();
/* 8025631C */ void progSelDraw();
/* 802568E0 */ void progOutDraw();
/* 80256A3C */ void progSetDraw();
/* 80256AC0 */ void progSet2Draw();
/* 80256B3C */ void progChangeDraw();
/* 80256BF4 */ void warningInDraw();
/* 80256C68 */ void warningDispDraw();
/* 80256DC4 */ void warningOutDraw();
/* 80256E48 */ void nintendoInDraw();
/* 80256ECC */ void nintendoOutDraw();
/* 80256F50 */ void dolbyInDraw();
/* 80256FD4 */ void dolbyOutDraw();
/* 80257058 */ void dolbyOutDraw2();
/* 80257070 */ void dvdWaitDraw();
/* 80257284 */ void nextSceneChange();
/* 802572B8 */ ~dScnLogo_c();
/* 80257AE0 */ int create();
/* 80257C64 */ void logoInitGC();
/* 80257FEC */ void dvdDataLoad();
/* 802584D8 */ void setProgressiveMode(u8);
/* 802584FC */ u8 getProgressiveMode();
/* 80258520 */ bool isProgressiveMode();
/* 8025854C */ void setRenderMode();

public:
/* 0x1C4 */ request_of_phase_process_class field_0x1c4;
/* 0x1CC */ mDoDvdThd_toMainRam_c* sceneCommand;
/* 0x1D0 */ JKRExpHeap* field_0x1d0;
/* 0x1D4 */ JKRExpHeap* field_0x1d4;
/* 0x1D8 */ JKRHeap* mpHeap;
/* 0x1DC */ dDlst_2D_c* mWarning;
/* 0x1E0 */ dDlst_2D_c* mWarningStart;
/* 0x1E4 */ dDlst_2D_c* mNintendoLogo;
/* 0x1E8 */ dDlst_2D_c* mDolbyLogo;
/* 0x1EC */ dDlst_2D_c* mProgressiveChoice;
/* 0x1F0 */ dDlst_2D_c* mProgressiveYes;
/* 0x1F4 */ dDlst_2D_c* mProgressiveNo;
/* 0x1F8 */ dDlst_2D_c* mProgressiveSel;
/* 0x1FC */ request_of_phase_process_class* m_preLoad_dylPhase;
/* 0x200 */ ResTIMG* mProgressivePro;
/* 0x204 */ ResTIMG* mProgressiveInter;
/* 0x208 */ u8 mExecCommand;
/* 0x209 */ u8 field_0x209;
/* 0x20A */ u8 field_0x20a;
/* 0x20B */ u8 field_0x20b;
/* 0x20C */ u16 mTimer;
/* 0x20E */ u16 field_0x20e;
/* 0x210 */ u16 field_0x210;
/* 0x212 */ u16 field_0x212;
/* 0x214 */ u16 field_0x214;
/* 0x218 */ u32 field_0x218;
/* 0x21C */ void* buffer;
/* 0x220 */ mDoDvdThd_mountXArchive_c* mpField0Command;
/* 0x224 */ mDoDvdThd_mountXArchive_c* mpAlAnmCommand;
/* 0x228 */ u8 field_0x228[4];
/* 0x22C */ mDoDvdThd_mountXArchive_c* mpFmapResCommand;
/* 0x230 */ mDoDvdThd_mountXArchive_c* mpDmapResCommand;
/* 0x234 */ mDoDvdThd_mountXArchive_c* mpCollectResCommand;
/* 0x238 */ u8 field_0x238[4];
/* 0x23C */ mDoDvdThd_mountXArchive_c* mpItemIconCommand;
/* 0x240 */ mDoDvdThd_mountXArchive_c* mpRingResCommand;
/* 0x244 */ u8 field_0x244[4];
/* 0x248 */ mDoDvdThd_mountXArchive_c* mpPlayerNameCommand;
/* 0x24C */ mDoDvdThd_mountXArchive_c* mpItemInfResCommand;
/* 0x250 */ mDoDvdThd_mountXArchive_c* mpButtonCommand;
/* 0x254 */ u8 field_0x254[4];
/* 0x258 */ mDoDvdThd_mountXArchive_c* mpCardIconCommand;
/* 0x25C */ mDoDvdThd_mountXArchive_c* mpBmgResCommand;
/* 0x260 */ mDoDvdThd_mountXArchive_c* mpMsgComCommand;
/* 0x264 */ mDoDvdThd_mountXArchive_c* mpMsgResCommand[7];
/* 0x280 */ u8 field_0x280[0x10];
/* 0x290 */ mDoDvdThd_mountXArchive_c* mpFontResCommand;
/* 0x294 */ mDoDvdThd_mountXArchive_c* mpMain2DCommand;
/* 0x298 */ mDoDvdThd_mountXArchive_c* mpRubyResCommand;
/* 0x29C */ mDoDvdThd_toMainRam_c* mParticleCommand;
/* 0x2A0 */ mDoDvdThd_toMainRam_c* mItemTableCommand;
/* 0x2A4 */ mDoDvdThd_toMainRam_c* mEnemyItemCommand;
};
#endif

#endif
22 changes: 22 additions & 0 deletions external/libtp_c/include/f_op/f_op_scene.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef F_F_OP_SCENE_H_
#define F_F_OP_SCENE_H_

#include "../f_op/f_op_scene_tag.h"

struct request_of_phase_process_class;
class mDoDvdThd_command_c;

typedef struct scene_process_profile_definition {
/* 0x00 */ node_process_profile_definition mBase;
/* 0x20 */ process_method_class* mpMtd; // Subclass methods
/* 0x24 */ u32 field_0x24; // padding?
} scene_process_profile_definition;

class scene_class {
public:
/* 0x000 */ process_node_class mBase;
/* 0x1AC */ process_method_class * mpMtd;
/* 0x1B0 */ scene_tag_class mScnTg;
};

#endif
12 changes: 12 additions & 0 deletions external/libtp_c/include/f_op/f_op_scene_tag.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef F_OP_SCENE_TAG_H
#define F_OP_SCENE_TAG_H

#include "../f_pc/f_pc_node.h"
#include "../SSystem/SComponent/c_phase.h"

class scene_tag_class {
public:
u8 field_0x00[0x14];
};

#endif
19 changes: 19 additions & 0 deletions external/libtp_c/include/f_pc/f_pc_node.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef F_PC_NODE_H_
#define F_PC_NODE_H_

#include "../f_pc/f_pc_base.h"

typedef struct process_node_class {
/* 0x00 */ base_process_class mBase;
/* 0xB8 */ nodedraw_method_class* mpNodeMtd;
/* 0xBC */ layer_class mLayer;
/* 0xE8 */ node_list_class mLayerNodeLists[16];
/* 0x1A8 */ s8 mUnk0;
} process_node_class;

typedef struct node_process_profile_definition {
/* 0x00 */ process_profile_definition mBase;
/* 0x1C */ process_method_class* sub_method; // Subclass methods
} node_process_profile_definition;

#endif
1 change: 1 addition & 0 deletions modules/boot/include/gz_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum GZFlags {
GZFLG_FREEZE_TIME,
GZFLG_DISABLE_BGM,
GZFLG_DISABLE_SFX,
GZFLG_LFC
};

struct GZFlag {
Expand Down
3 changes: 3 additions & 0 deletions modules/boot/include/menus/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ enum MenuIndex {
MN_CREDITS_INDEX,
MN_COMBO_INDEX,

// Tools menu's sub menus
MN_CHECKERS_INDEX,

// This entry is used only to get a count of the number of valid entries.
MN_COUNT
};
Expand Down
1 change: 1 addition & 0 deletions modules/boot/include/modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bool umd_active();
bool bit_active();
#endif
bool corotd_active();
bool lfc_active();
bool mash_checker_active();
bool gorge_active();
bool rollcheck_active();
Expand Down
3 changes: 0 additions & 3 deletions modules/boot/include/save_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,9 @@ class SaveManager {
AreaReload mAreaReloadOpts;
special* mSpecials;
bool loading_initiated = false;
int repeat_count = 0;
bool repeat_during = false;

static bool s_injectSave;
static bool s_injectMemfile;
static s8 s_applyAfterTimer;

public:
static void injectSave(void* buffer);
Expand Down
2 changes: 2 additions & 0 deletions modules/boot/include/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ enum GZSettingID : uint32_t {
STNG_CMD_BIT, // Wii only, but we reserve the id anyway
STNG_CMD_GORGE_VOID,
STNG_CMD_MOON_JUMP,
// New Adds
STNG_TOOLS_LFC,
};

struct GZSettingEntry {
Expand Down
9 changes: 1 addition & 8 deletions modules/boot/include/tools.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
#pragma once

enum ToolsIndex {
CHECKERS_INDEX,
RELOAD_AREA_INDEX,
FRAME_ADVANCE_INDEX,
FAST_BONK_INDEX,
FAST_MOVEMENT_INDEX,
GORGE_INDEX,
#ifdef WII_PLATFORM
BIT_INDEX,
#endif
COROTD_INDEX,
UMD_INDEX,
INPUT_VIEWER_INDEX,
LINK_DEBUG_INDEX,
HEAP_DEBUG_INDEX,
SAND_INDEX,
ROLL_INDEX,
MASH_CHECKER_INDEX,
TELEPORT_INDEX,
TURBO_MODE_INDEX,
TIMER_INDEX,
Expand Down
8 changes: 3 additions & 5 deletions modules/boot/src/gz_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,12 @@ void GZ_execute(int phase) {
}
}

// Timer set after dScnPly__phase_4, delay until objects are fully loaded
if (!fopScnRq.isLoading && SaveManager::s_applyAfterTimer > 0) {
SaveManager::s_applyAfterTimer--;
} else if (SaveManager::s_applyAfterTimer == 0) {
// Check for post load callback and run it once link is valid
if (!fopScnRq.isLoading && dComIfGp_getPlayer()) {
if (gSaveManager.mPracticeFileOpts.inject_options_after_load) {
gSaveManager.mPracticeFileOpts.inject_options_after_load();
gSaveManager.mPracticeFileOpts.inject_options_after_load = nullptr;
}
SaveManager::s_applyAfterTimer = -1;
}

// normally oxygen doesn't get set until going to the file select screen
Expand Down
24 changes: 12 additions & 12 deletions modules/boot/src/menus/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

// This array must correspond to the order of the MenuIndex enum.
const char* g_menuPaths[MN_COUNT] = {
"main", "cheats", "flags",
"inventory", "memory", "practice",
"scene", "settings", "tools",
"warp", "general_flags", "dungeon_flags",
"portal_flags", "flag_records", "flag_log",
"item_wheel", "pause", "amounts",
"watches", "memory_editor", "memfiles",
"any_saves", "any_bite_saves", "hundo_saves",
"ad_saves", "nosq_saves", "glitchless_saves",
"actor_spawn", "actor_list", "collision_view",
"projection_view", "trigger_view", "pos_settings",
"credits", "combo"
"main", "cheats", "flags",
"inventory", "memory", "practice",
"scene", "settings", "tools",
"warp", "general_flags", "dungeon_flags",
"portal_flags", "flag_records", "flag_log",
"item_wheel", "pause", "amounts",
"watches", "memory_editor", "memfiles",
"any_saves", "any_bite_saves", "hundo_saves",
"ad_saves", "nosq_saves", "glitchless_saves",
"actor_spawn", "actor_list", "collision_view",
"projection_view", "trigger_view", "pos_settings",
"credits", "combo", "checkers"
};

KEEP_FUNC Menu::Menu(Cursor& cursor) : cursor(cursor) {}
Loading