diff --git a/asm/nonmatchings/battle/area_flo2/5CE690/func_802188A8_5CEF38.s b/asm/nonmatchings/battle/area_flo2/5CE690/func_802188A8_5CEF38.s deleted file mode 100644 index f40de01775..0000000000 --- a/asm/nonmatchings/battle/area_flo2/5CE690/func_802188A8_5CEF38.s +++ /dev/null @@ -1,21 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802188A8_5CEF38 -/* 5CEF38 802188A8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 5CEF3C 802188AC AFBF0010 */ sw $ra, 0x10($sp) -/* 5CEF40 802188B0 0C04760B */ jal func_8011D82C -/* 5CEF44 802188B4 24040001 */ addiu $a0, $zero, 1 -/* 5CEF48 802188B8 0000202D */ daddu $a0, $zero, $zero -/* 5CEF4C 802188BC 24020001 */ addiu $v0, $zero, 1 -/* 5CEF50 802188C0 0080282D */ daddu $a1, $a0, $zero -/* 5CEF54 802188C4 0080302D */ daddu $a2, $a0, $zero -/* 5CEF58 802188C8 3C038015 */ lui $v1, %hi(D_801512F0) -/* 5CEF5C 802188CC 8C6312F0 */ lw $v1, %lo(D_801512F0)($v1) -/* 5CEF60 802188D0 0080382D */ daddu $a3, $a0, $zero -/* 5CEF64 802188D4 0C046F97 */ jal set_background_color_blend -/* 5CEF68 802188D8 A0620000 */ sb $v0, ($v1) -/* 5CEF6C 802188DC 8FBF0010 */ lw $ra, 0x10($sp) -/* 5CEF70 802188E0 24020002 */ addiu $v0, $zero, 2 -/* 5CEF74 802188E4 03E00008 */ jr $ra -/* 5CEF78 802188E8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/battle/area_flo2/5CE690/func_802188EC_5CEF7C.s b/asm/nonmatchings/battle/area_flo2/5CE690/func_802188EC_5CEF7C.s deleted file mode 100644 index 422780c7d2..0000000000 --- a/asm/nonmatchings/battle/area_flo2/5CE690/func_802188EC_5CEF7C.s +++ /dev/null @@ -1,18 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802188EC_5CEF7C -/* 5CEF7C 802188EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 5CEF80 802188F0 AFBF0010 */ sw $ra, 0x10($sp) -/* 5CEF84 802188F4 8C82000C */ lw $v0, 0xc($a0) -/* 5CEF88 802188F8 0C0B1EAF */ jal get_variable -/* 5CEF8C 802188FC 8C450000 */ lw $a1, ($v0) -/* 5CEF90 80218900 0000202D */ daddu $a0, $zero, $zero -/* 5CEF94 80218904 0080282D */ daddu $a1, $a0, $zero -/* 5CEF98 80218908 0080302D */ daddu $a2, $a0, $zero -/* 5CEF9C 8021890C 0C046F97 */ jal set_background_color_blend -/* 5CEFA0 80218910 304700FF */ andi $a3, $v0, 0xff -/* 5CEFA4 80218914 8FBF0010 */ lw $ra, 0x10($sp) -/* 5CEFA8 80218918 24020002 */ addiu $v0, $zero, 2 -/* 5CEFAC 8021891C 03E00008 */ jr $ra -/* 5CEFB0 80218920 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A14E8_7905B8.s b/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A14E8_7905B8.s deleted file mode 100644 index 4c5927b76a..0000000000 --- a/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A14E8_7905B8.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802A14E8_7905B8 -/* 7905B8 802A14E8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 7905BC 802A14EC AFBF0010 */ sw $ra, 0x10($sp) -/* 7905C0 802A14F0 0C00EABB */ jal get_npc_unsafe -/* 7905C4 802A14F4 24040064 */ addiu $a0, $zero, 0x64 -/* 7905C8 802A14F8 0040202D */ daddu $a0, $v0, $zero -/* 7905CC 802A14FC 24030020 */ addiu $v1, $zero, 0x20 -/* 7905D0 802A1500 A48300A8 */ sh $v1, 0xa8($a0) -/* 7905D4 802A1504 A48300A6 */ sh $v1, 0xa6($a0) -/* 7905D8 802A1508 8FBF0010 */ lw $ra, 0x10($sp) -/* 7905DC 802A150C 24020002 */ addiu $v0, $zero, 2 -/* 7905E0 802A1510 03E00008 */ jr $ra -/* 7905E4 802A1514 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A1518_7905E8.s b/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A1518_7905E8.s deleted file mode 100644 index 1ff8d47390..0000000000 --- a/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A1518_7905E8.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802A1518_7905E8 -/* 7905E8 802A1518 3C01802A */ lui $at, %hi(D_802A2CC0) -/* 7905EC 802A151C AC202CC0 */ sw $zero, %lo(D_802A2CC0)($at) -/* 7905F0 802A1520 03E00008 */ jr $ra -/* 7905F4 802A1524 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A1528_7905F8.s b/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A1528_7905F8.s deleted file mode 100644 index 78171a7722..0000000000 --- a/asm/nonmatchings/battle/star/chill_out_7900D0/func_802A1528_7905F8.s +++ /dev/null @@ -1,9 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802A1528_7905F8 -/* 7905F8 802A1528 3C02802A */ lui $v0, %hi(D_802A2CC0) -/* 7905FC 802A152C 8C422CC0 */ lw $v0, %lo(D_802A2CC0)($v0) -/* 790600 802A1530 AC820084 */ sw $v0, 0x84($a0) -/* 790604 802A1534 03E00008 */ jr $ra -/* 790608 802A1538 24020002 */ addiu $v0, $zero, 2 diff --git a/install.sh b/install.sh index 8842612f7e..fb18cf8037 100755 --- a/install.sh +++ b/install.sh @@ -1,8 +1,8 @@ #!/bin/bash -# Ubuntu (apt) -if cat /etc/os-release | grep ID=ubuntu &> /dev/null; then - echo "Installing packages for Ubuntu (apt)" +# Debian and derivatives (apt) +if cat /etc/os-release | grep -E 'ID=debian|ID_LIKE=debian' &> /dev/null; then + echo "Installing packages for Debian or derivative (apt)" sudo apt install -y git python3 python3-pip python3-setuptools build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev ninja-build || exit 1 python3 -m pip install -U -r requirements.txt @@ -17,9 +17,9 @@ if cat /etc/os-release | grep ID=ubuntu &> /dev/null; then exit fi -# Arch Linux (pacman) -if cat /etc/os-release | grep ID=arch &> /dev/null; then - echo "Installing packages for Arch Linux (pacman)" +# Arch Linux and derivatives (pacman) +if cat /etc/os-release | grep -E 'ID=arch|ID_LIKE=arch' &> /dev/null; then + echo "Installing packages for Arch Linux or derivative (pacman)" # Upgrade existing packages (note: no --noconfirm) sudo pacman -Syu || exit 1 @@ -151,8 +151,8 @@ if cat /etc/os-release | grep ID=alpine &> /dev/null; then fi -echo "The following distros are supported by install.sh:" -echo "- Ubuntu (apt)" +echo "The following distros (and their derivatives) are supported by install.sh:" +echo "- Debian/Ubuntu (apt)" echo "- Arch Linux (pacman)" echo "- openSUSE (zypper)" echo "- Alpine Linux (apk)" diff --git a/src/battle/area_flo2/5CE690.c b/src/battle/area_flo2/5CE690.c index 10007aad71..96a19d6658 100644 --- a/src/battle/area_flo2/5CE690.c +++ b/src/battle/area_flo2/5CE690.c @@ -18,9 +18,19 @@ INCLUDE_ASM(s32, "battle/area_flo2/5CE690", func_80218620_5CECB0); INCLUDE_ASM(s32, "battle/area_flo2/5CE690", func_80218774_5CEE04); -INCLUDE_ASM(s32, "battle/area_flo2/5CE690", func_802188A8_5CEF38); +ApiStatus func_802188A8_5CEF38(ScriptInstance* script, s32 isInitialCall) { + func_8011D82C(1); + *D_801512F0 = 1; + set_background_color_blend(0, 0, 0, 0); + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "battle/area_flo2/5CE690", func_802188EC_5CEF7C); +ApiStatus func_802188EC_5CEF7C(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + + set_background_color_blend(0, 0, 0, get_variable(script, *args++)); + return ApiStatus_DONE2; +} INCLUDE_ASM(s32, "battle/area_flo2/5CE690", func_80218924_5CEFB4); diff --git a/src/battle/star/chill_out_7900D0.c b/src/battle/star/chill_out_7900D0.c index fc2b530a17..e12f1d6c53 100644 --- a/src/battle/star/chill_out_7900D0.c +++ b/src/battle/star/chill_out_7900D0.c @@ -1,5 +1,7 @@ #include "common.h" +extern s32 D_802A2CC0; + INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A1000_7900D0); INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A10AC_79017C); @@ -17,11 +19,23 @@ INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A1414_7904E4); INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A1494_790564); -INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A14E8_7905B8); +ApiStatus func_802A14E8_7905B8(ScriptInstance* script, s32 isInitialCall) { + Npc* npc = get_npc_unsafe(100); -INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A1518_7905E8); + npc->collisionHeight = 32; + npc->collisionRadius = 32; + return ApiStatus_DONE2; +} -INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A1528_7905F8); +ApiStatus func_802A1518_7905E8(ScriptInstance* script, s32 isInitialCall) { + D_802A2CC0 = 0; + return ApiStatus_DONE2; +} + +s32 func_802A1528_7905F8(ActorPart* actorPart) { + actorPart->unk_84 = D_802A2CC0; + return 2; +} INCLUDE_ASM(s32, "battle/star/chill_out_7900D0", func_802A153C_79060C); diff --git a/src/battle/star/focus_789E60.c b/src/battle/star/focus_789E60.c index e48096bcde..cb54c1c941 100644 --- a/src/battle/star/focus_789E60.c +++ b/src/battle/star/focus_789E60.c @@ -17,6 +17,7 @@ INCLUDE_ASM(s32, "battle/star/focus_789E60", func_802A1414_78A274); INCLUDE_ASM(s32, "battle/star/focus_789E60", func_802A1494_78A2F4); +// Duplicate of func_802A14E8_7905B8 INCLUDE_ASM(s32, "battle/star/focus_789E60", func_802A14E8_78A348); INCLUDE_ASM(s32, "battle/star/focus_789E60", func_802A1518_78A378);