summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPheenoh <pheenoh@gmail.com>2021-09-27 12:39:53 -0400
committerGitHub <noreply@github.com>2021-09-27 12:39:53 -0400
commitcc2199daec548f535142f7c4649b765dcaed0b76 (patch)
treeb407ae09ef5a68ec22f26a9af0c8a28d980e933d
parent158bb571703482ab536e69d25649bb59f670d584 (diff)
Multi-Region, Multi-Platform CI Pipeline (#62)
* Add multi-region, multi-platform tests + fix wii issues * pass in env variables as arguments to make * missed gcn_ntscj
-rw-r--r--.github/workflows/c-cpp.yml32
-rw-r--r--.github/workflows/gcn-ntscj.yml31
-rw-r--r--.github/workflows/gcn-ntscu.yml31
-rw-r--r--.github/workflows/gcn-pal.yml31
-rw-r--r--.github/workflows/wii-ntscu10.yml31
-rw-r--r--include/spawning.h2
-rw-r--r--src/bit.cpp10
-rw-r--r--src/corotdcheck.cpp15
-rw-r--r--src/menus/actor_spawner_menu.cpp26
-rw-r--r--src/menus/hundo_saves_menu.cpp2
-rw-r--r--src/movelink.cpp4
-rw-r--r--src/utils/hook.cpp12
-rw-r--r--src/utils/link.cpp8
13 files changed, 172 insertions, 63 deletions
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
deleted file mode 100644
index 86ec128..0000000
--- a/.github/workflows/c-cpp.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: DevkitPPC Make
-
-on:
- pull_request:
- branches: [ master ]
-
-jobs:
- build:
- runs-on: ubuntu-latest
- container:
- image: ghcr.io/pheenoh/zsrtp-tpgz:latest
- options: --shm-size=128m --ulimit core=-1 --privileged=true
- steps:
- - name: Checkout
- uses: actions/checkout@v1
- with:
- token: ${{secrets.MY_REPO_PAT}}
- submodules: recursive
- - name: Debug Flag
- run: export PR_TEST=1
- - name: Run Make
- run: make
- - name: Move ISO
- run: mv /gz2e01.iso ./GZ2E01.iso
- # hacky work around to catch failures since romhack always returns 0 exit code
- - name: Run Romhack
- run: ROMHACK=$(romhack build --raw 2>&1) && ROMHACKSTRING=$(echo "$ROMHACK" | tail -c 9) && FINISHEDSTRING="Rom Hack" && echo "$ROMHACK" && if [ "$ROMHACKSTRING" != "$FINISHEDSTRING" ]; then exit 1; fi
- - name: Boot Dolphin
- run: |
- dolphin-emu-nogui --platform=headless --video_backend=Null -e build/tpgz.iso &
- sleep 15
- /dme -c 0x80450580 \ No newline at end of file
diff --git a/.github/workflows/gcn-ntscj.yml b/.github/workflows/gcn-ntscj.yml
new file mode 100644
index 0000000..04371f6
--- /dev/null
+++ b/.github/workflows/gcn-ntscj.yml
@@ -0,0 +1,31 @@
+name: GCN NTSC-J Tests
+
+on:
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/pheenoh/zsrtp-tpgz:gcn_ntscj
+ options: --shm-size=128m --ulimit core=-1 --privileged=true
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ with:
+ token: ${{secrets.MY_REPO_PAT}}
+ submodules: recursive
+ - name: Enable PR Test Flag
+ run: export PR_TEST=1
+ - name: Move ISO
+ run: mv /GZ2J01.iso ./
+ - name: Compiler Test
+ run: make PLATFORM=GCN REGION=NTSCJ
+ - name: Linker Test
+ run: romhack build --raw
+ - name: Boot Dolphin
+ run: |
+ dolphin-emu-nogui --platform=headless --video_backend=Null -e build/tpgz.iso &
+ sleep 15
+ /dme -c 0x8044A6C0 \ No newline at end of file
diff --git a/.github/workflows/gcn-ntscu.yml b/.github/workflows/gcn-ntscu.yml
new file mode 100644
index 0000000..07e0175
--- /dev/null
+++ b/.github/workflows/gcn-ntscu.yml
@@ -0,0 +1,31 @@
+name: GCN NTSC-U Tests
+
+on:
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/pheenoh/zsrtp-tpgz:gcn_ntscu
+ options: --shm-size=128m --ulimit core=-1 --privileged=true
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ with:
+ token: ${{secrets.MY_REPO_PAT}}
+ submodules: recursive
+ - name: Enable PR Test Flag
+ run: export PR_TEST=1
+ - name: Move ISO
+ run: mv /GZ2E01.iso ./
+ - name: Compiler Test
+ run: make PLATFORM=GCN REGION=NTSCU
+ - name: Linker Test
+ run: romhack build --raw
+ - name: Boot Dolphin
+ run: |
+ dolphin-emu-nogui --platform=headless --video_backend=Null -e build/tpgz.iso &
+ sleep 15
+ /dme -c 0x80450580 \ No newline at end of file
diff --git a/.github/workflows/gcn-pal.yml b/.github/workflows/gcn-pal.yml
new file mode 100644
index 0000000..fc6d3e7
--- /dev/null
+++ b/.github/workflows/gcn-pal.yml
@@ -0,0 +1,31 @@
+name: GCN PAL Tests
+
+on:
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/pheenoh/zsrtp-tpgz:gcn_pal
+ options: --shm-size=128m --ulimit core=-1 --privileged=true
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ with:
+ token: ${{secrets.MY_REPO_PAT}}
+ submodules: recursive
+ - name: Enable PR Test Flag
+ run: export PR_TEST=1
+ - name: Move ISO
+ run: mv /GZ2P01.iso ./
+ - name: Compiler Test
+ run: make PLATFORM=GCN REGION=PAL
+ - name: Linker Test
+ run: romhack build --raw
+ - name: Boot Dolphin
+ run: |
+ dolphin-emu-nogui --platform=headless --video_backend=Null -e build/tpgz.iso &
+ sleep 15
+ /dme -c 0x80452540 \ No newline at end of file
diff --git a/.github/workflows/wii-ntscu10.yml b/.github/workflows/wii-ntscu10.yml
new file mode 100644
index 0000000..0066d62
--- /dev/null
+++ b/.github/workflows/wii-ntscu10.yml
@@ -0,0 +1,31 @@
+name: Wii NTSC-U 1.0 Tests
+
+on:
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/pheenoh/zsrtp-tpgz:wii_ntscu_10
+ options: --shm-size=128m --ulimit core=-1 --privileged=true
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ with:
+ token: ${{secrets.MY_REPO_PAT}}
+ submodules: recursive
+ - name: Enable PR Test Flag
+ run: export PR_TEST=1
+ - name: Move ISO
+ run: mv /RZDE01.iso ./
+ - name: Compiler Test
+ run: make PLATFORM=WII REGION=NTSCU_10
+ - name: Linker Test
+ run: romhack build --raw
+ - name: Boot Dolphin
+ run: |
+ dolphin-emu-nogui --platform=headless --video_backend=Null -e build/tpgzw.iso &
+ sleep 15
+ /dme -c 0x80537560 \ No newline at end of file
diff --git a/include/spawning.h b/include/spawning.h
index 7c32c49..7b6392c 100644
--- a/include/spawning.h
+++ b/include/spawning.h
@@ -61,7 +61,7 @@ void createActor(const char* name, Vec3& coord, uint16_t rotation) {
mem->rotation[1] = actTemp.rotation[1];
mem->flag = actTemp.flag;
mem->enemyId = actTemp.enemyId;
- mem->room_id = tp_gameInfo.last_room_id;
+ mem->room_id = g_dComIfG_gameInfo.last_room_id;
dStage_ActorCreate(actTemp, *mem);
}
diff --git a/src/bit.cpp b/src/bit.cpp
index 48ffb08..13293e2 100644
--- a/src/bit.cpp
+++ b/src/bit.cpp
@@ -1,7 +1,10 @@
#ifdef WII_PLATFORM
#include "bit.h"
-#include "libtp_c/include/msl_c/math.h.h"
+#include "libtp_c/include/msl_c/math.h"
#include "libtp_c/include/JSystem/JUtility/JUTGamePad.h"
+#include "libtp_c/include/d/com/d_com_inf_game.h"
+#include "libtp_c/include/f_op/f_op_draw_tag.h"
+#include "libtp_c/include/f_op/f_op_scene_req.h"
#include "libtp_c/include/msl_c/string.h"
#include "fifo_queue.h"
#include "controller.h"
@@ -25,7 +28,7 @@ using namespace Controller;
static char buf[30];
void set_camera_angle_position() {
- dComIfGp_getPlayer()->mCurrent.mPosition = {466.622467f, 319.770752f, -11651.3867f};
+ dComIfGp_getPlayer()->mCurrent.mPosition = (cXyz){466.622467f, 319.770752f, -11651.3867f};
dComIfGp_getPlayer()->mCollisionRot.mY = 32000;
tp_matrixInfo.matrix_info->target = {465.674622f, 421.052704f, -11651.0684f};
tp_matrixInfo.matrix_info->pos = {735.525391f, 524.418701f, -11576.4746f};
@@ -66,7 +69,8 @@ void run() {
// log.PrintLog(buf, DEBUG);
// }
- if (tp_strcmp((const char*)tp_gameInfo.current_stage, "F_SP104") == 0 &&
+ if (tp_strcmp((const char*)g_dComIfG_gameInfo.info.getPlayer().mPlayerReturnPlace.mName,
+ "F_SP104") == 0 &&
button_is_down(HOME) && tp_homeMenuSts.is_visible == 0 && !tp_fopScnRq.isLoading) {
if ((int)dt == TARGET_FRAME) {
tp_sprintf(buf, "Got it");
diff --git a/src/corotdcheck.cpp b/src/corotdcheck.cpp
index f1e03f0..8b28718 100644
--- a/src/corotdcheck.cpp
+++ b/src/corotdcheck.cpp
@@ -24,7 +24,7 @@ void run() {
start_timer = false;
}
- if (start_timer == false && button_is_down(A) &&
+ if (start_timer == false && button_is_down(Pad::A) &&
tp_strcmp((const char*)g_dComIfG_gameInfo.play.mStartStage.mStage, "F_SP108") == 0) {
start_timer = true;
}
@@ -34,23 +34,24 @@ void run() {
if (current_counter < 20) {
// went early
- if (!got_it && (!button_is_held(Y) || !button_is_held(X)) && (current_counter < 10) &&
- (button_is_down(Y) || button_is_down(X))) {
+ if (!got_it && (!button_is_held(Pad::Y) || !button_is_held(Pad::X)) &&
+ (current_counter < 10) && (button_is_down(Pad::Y) || button_is_down(Pad::X))) {
int final_val = 10 - current_counter;
tp_sprintf(buf, "%df early", final_val);
FIFOQueue::push(buf, Queue, 0x0000FF00);
}
// got it
- else if (!got_it && (!button_is_held(Y) || !button_is_held(X)) &&
- (current_counter == 10) && (button_is_down(Y) || button_is_down(X))) {
+ else if (!got_it && (!button_is_held(Pad::Y) || !button_is_held(Pad::X)) &&
+ (current_counter == 10) &&
+ (button_is_down(Pad::Y) || button_is_down(Pad::X))) {
FIFOQueue::push("got it", Queue, 0x00CC0000);
got_it = true;
}
// went late
- else if (!got_it && (!button_is_held(Y) || !button_is_held(X)) &&
- current_counter > 10 && (button_is_down(Y) || button_is_down(X))) {
+ else if (!got_it && (!button_is_held(Pad::Y) || !button_is_held(Pad::X)) &&
+ current_counter > 10 && (button_is_down(Pad::Y) || button_is_down(Pad::X))) {
int final_val = current_counter - 10;
tp_sprintf(buf, "%df late", final_val);
FIFOQueue::push(buf, Queue, 0x99000000);
diff --git a/src/menus/actor_spawner_menu.cpp b/src/menus/actor_spawner_menu.cpp
index bcb5402..4a6195d 100644
--- a/src/menus/actor_spawner_menu.cpp
+++ b/src/menus/actor_spawner_menu.cpp
@@ -46,7 +46,7 @@ float render_selected_number_selector(const char* str, float x, float y, size_t
}
void ActorSpawnMenu::render() {
- if (button_is_pressed(BACK_BUTTON)) {
+ if (Controller::button_is_pressed(BACK_BUTTON)) {
if (params_selected) {
lock_cursor_y = false;
params_selected = false;
@@ -78,25 +78,25 @@ void ActorSpawnMenu::render() {
switch (cursor.y) {
case ACTOR_ID_INDEX: {
- if (button_is_pressed(Controller::DPAD_RIGHT)) {
+ if (Controller::button_is_pressed(Controller::Pad::DPAD_RIGHT)) {
actor_id++;
- } else if (button_is_pressed(Controller::DPAD_LEFT)) {
+ } else if (Controller::button_is_pressed(Controller::Pad::DPAD_LEFT)) {
actor_id--;
- } else if (button_is_pressed(Controller::X)) {
+ } else if (Controller::button_is_pressed(Controller::Pad::X)) {
actor_id += 10;
- } else if (button_is_pressed(Controller::Y)) {
+ } else if (Controller::button_is_pressed(Controller::Pad::Y)) {
actor_id -= 10;
}
break;
}
case ACTOR_SUBTYPE_INDEX: {
- if (button_is_pressed(Controller::DPAD_RIGHT)) {
+ if (Controller::button_is_pressed(Controller::Pad::DPAD_RIGHT)) {
actor_type++;
- } else if (button_is_pressed(Controller::DPAD_LEFT)) {
+ } else if (Controller::button_is_pressed(Controller::Pad::DPAD_LEFT)) {
actor_type--;
- } else if (button_is_pressed(Controller::X)) {
+ } else if (Controller::button_is_pressed(Controller::Pad::X)) {
actor_type += 10;
- } else if (button_is_pressed(Controller::Y)) {
+ } else if (Controller::button_is_pressed(Controller::Pad::Y)) {
actor_type -= 10;
}
break;
@@ -106,21 +106,21 @@ void ActorSpawnMenu::render() {
char buf[9];
tp_sprintf(buf, "%08X", actor_params);
if (params_selected) {
- if (button_is_pressed(Controller::DPAD_RIGHT)) {
+ if (Controller::button_is_pressed(Controller::Pad::DPAD_RIGHT)) {
if (param_index == 7) {
param_index = 0;
} else if (param_index >= 0 && param_index < 8) {
param_index++;
}
}
- if (button_is_pressed(Controller::DPAD_LEFT)) {
+ if (Controller::button_is_pressed(Controller::Pad::DPAD_LEFT)) {
if (param_index == 0) {
param_index = 7;
} else if (param_index >= 0 && param_index < 8) {
param_index--;
}
}
- if (button_is_pressed(Controller::DPAD_UP)) {
+ if (Controller::button_is_pressed(Controller::Pad::DPAD_UP)) {
switch (param_index) {
case 0: {
actor_params += 0x10000000;
@@ -156,7 +156,7 @@ void ActorSpawnMenu::render() {
}
}
}
- if (button_is_pressed(Controller::DPAD_DOWN)) {
+ if (Controller::button_is_pressed(Controller::Pad::DPAD_DOWN)) {
switch (param_index) {
case 0: {
actor_params -= 0x10000000;
diff --git a/src/menus/hundo_saves_menu.cpp b/src/menus/hundo_saves_menu.cpp
index a6ddaf5..b6af5d8 100644
--- a/src/menus/hundo_saves_menu.cpp
+++ b/src/menus/hundo_saves_menu.cpp
@@ -193,7 +193,7 @@ void tot_early_hp() {
void hugo_archery() {
gSaveManager.inject_default_during();
- // tp_gameInfo.temp_flags.flags[14] = 0xC0; // start archery minigame
+ // g_dComIfG_gameInfo.temp_flags.flags[14] = 0xC0; // start archery minigame
}
void cits_poe_cycle() {
diff --git a/src/movelink.cpp b/src/movelink.cpp
index 6f648b6..24ab899 100644
--- a/src/movelink.cpp
+++ b/src/movelink.cpp
@@ -69,7 +69,7 @@ void move_link() {
cXyz tmp(0.0f, 0.0f, 0.0f);
dComIfGp_getPlayer()->mSpeed = tmp;
// Disable Link collision (causes console crash dont use)
- // tp_gameInfo.link_collision_ptr->no_collision = 0x7F;
+ // g_dComIfG_gameInfo.link_collision_ptr->no_collision = 0x7F;
if (!init_once) {
angle = (float)link_angle / 65536.f * (2 * M_PI);
@@ -110,7 +110,7 @@ void move_link() {
if (init_once) {
dComIfGp_getEvent().mHalt = false;
dComIfGp_getEventManager().mCameraPlay = 0;
- // tp_gameInfo.link_collision_ptr->no_collision = 0x80;
+ // g_dComIfG_gameInfo.link_collision_ptr->no_collision = 0x80;
init_once = false;
}
}
diff --git a/src/utils/hook.cpp b/src/utils/hook.cpp
index 80eaf49..621c01f 100644
--- a/src/utils/hook.cpp
+++ b/src/utils/hook.cpp
@@ -34,6 +34,18 @@ struct PadStatus {
#ifdef GCN_NTSCU
#define CRASH_ADDRESS (0x80450580)
#endif
+#ifdef GCN_PAL
+#define CRASH_ADDRESS (0x80452540)
+#endif
+#ifdef GCN_NTSCJ
+#define CRASH_ADDRESS (0x8044A6C0)
+#endif
+#ifdef WII_NTSCU_10
+#define CRASH_ADDRESS (0x80537560)
+#endif
+#ifdef WII_PAL
+#define CRASH_ADDRESS (0x8051DEE0)
+#endif
HOOK_DEF(uint32_t, PADRead, (uint16_t*));
HOOK_DEF(uint32_t, checkHookshotStickBG, (void*, void*));
diff --git a/src/utils/link.cpp b/src/utils/link.cpp
index db55918..b4aed1d 100644
--- a/src/utils/link.cpp
+++ b/src/utils/link.cpp
@@ -134,10 +134,10 @@ void change_tunic_color() {
dComIfGp_getPlayer()->field_0x32a0[1].mColor.r = red_ - 0x10;
dComIfGp_getPlayer()->field_0x32a0[1].mColor.g = green_ - 0x10;
dComIfGp_getPlayer()->field_0x32a0[1].mColor.b = blue_ - 0x10;
- // tp_gameInfo.link_tunic_ptr->not_tunic_red = 1;
- // tp_gameInfo.link_tunic_ptr->tunic_red = red_ - 0x10;
- // tp_gameInfo.link_tunic_ptr->tunic_green = green_ - 0x10;
- // tp_gameInfo.link_tunic_ptr->tunic_blue = blue_ - 0x10;
+ // g_dComIfG_gameInfo.link_tunic_ptr->not_tunic_red = 1;
+ // g_dComIfG_gameInfo.link_tunic_ptr->tunic_red = red_ - 0x10;
+ // g_dComIfG_gameInfo.link_tunic_ptr->tunic_green = green_ - 0x10;
+ // g_dComIfG_gameInfo.link_tunic_ptr->tunic_blue = blue_ - 0x10;
#endif
}
}