mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 09:45:02 +00:00
Done
This commit is contained in:
parent
4ab558d628
commit
c4bb9bed4c
6 changed files with 94 additions and 213 deletions
|
@ -1,82 +0,0 @@
|
|||
.rdata
|
||||
|
||||
glabel D_808B207C
|
||||
|
||||
.asciz "../z_bg_spot09_obj.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_808B2094
|
||||
|
||||
.asciz "../z_bg_spot09_obj.c"
|
||||
.balign 4
|
||||
|
||||
glabel D_808B20AC
|
||||
.asciz "../z_bg_spot09_obj.c"
|
||||
.balign 4
|
||||
|
||||
.text
|
||||
|
||||
glabel BgSpot09Obj_Draw
|
||||
/* 003A0 808B1E80 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
|
||||
/* 003A4 808B1E84 AFB00014 */ sw $s0, 0x0014($sp)
|
||||
/* 003A8 808B1E88 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000
|
||||
/* 003AC 808B1E8C AFBF001C */ sw $ra, 0x001C($sp)
|
||||
/* 003B0 808B1E90 AFB10018 */ sw $s1, 0x0018($sp)
|
||||
/* 003B4 808B1E94 860E001C */ lh $t6, 0x001C($s0) ## 0000001C
|
||||
/* 003B8 808B1E98 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000
|
||||
/* 003BC 808B1E9C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000
|
||||
/* 003C0 808B1EA0 3C05808B */ lui $a1, %hi(D_808B1FC8) ## $a1 = 808B0000
|
||||
/* 003C4 808B1EA4 000E7880 */ sll $t7, $t6, 2
|
||||
/* 003C8 808B1EA8 00AF2821 */ addu $a1, $a1, $t7
|
||||
/* 003CC 808B1EAC 0C00D498 */ jal Draw_DListOpa
|
||||
|
||||
/* 003D0 808B1EB0 8CA51FC8 */ lw $a1, %lo(D_808B1FC8)($a1)
|
||||
/* 003D4 808B1EB4 8618001C */ lh $t8, 0x001C($s0) ## 0000001C
|
||||
/* 003D8 808B1EB8 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
|
||||
/* 003DC 808B1EBC 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFEC
|
||||
/* 003E0 808B1EC0 17010024 */ bne $t8, $at, .L808B1F54
|
||||
/* 003E4 808B1EC4 3C06808B */ lui $a2, %hi(D_808B207C) ## $a2 = 808B0000
|
||||
/* 003E8 808B1EC8 8E250000 */ lw $a1, 0x0000($s1) ## 00000000
|
||||
/* 003EC 808B1ECC 24C6207C */ addiu $a2, $a2, %lo(D_808B207C) ## $a2 = 808B207C
|
||||
/* 003F0 808B1ED0 24070184 */ addiu $a3, $zero, 0x0184 ## $a3 = 00000184
|
||||
/* 003F4 808B1ED4 0C031AB1 */ jal func_800C6AC4
|
||||
/* 003F8 808B1ED8 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000
|
||||
/* 003FC 808B1EDC 0C024F61 */ jal func_80093D84
|
||||
/* 00400 808B1EE0 8E240000 */ lw $a0, 0x0000($s1) ## 00000000
|
||||
/* 00404 808B1EE4 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
|
||||
/* 00408 808B1EE8 3C08DA38 */ lui $t0, 0xDA38 ## $t0 = DA380000
|
||||
/* 0040C 808B1EEC 35080003 */ ori $t0, $t0, 0x0003 ## $t0 = DA380003
|
||||
/* 00410 808B1EF0 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008
|
||||
/* 00414 808B1EF4 AE1902D0 */ sw $t9, 0x02D0($s0) ## 000002D0
|
||||
/* 00418 808B1EF8 AC480000 */ sw $t0, 0x0000($v0) ## 00000000
|
||||
/* 0041C 808B1EFC 8E240000 */ lw $a0, 0x0000($s1) ## 00000000
|
||||
/* 00420 808B1F00 3C05808B */ lui $a1, %hi(D_808B2094) ## $a1 = 808B0000
|
||||
/* 00424 808B1F04 24A52094 */ addiu $a1, $a1, %lo(D_808B2094) ## $a1 = 808B2094
|
||||
/* 00428 808B1F08 24060187 */ addiu $a2, $zero, 0x0187 ## $a2 = 00000187
|
||||
/* 0042C 808B1F0C 0C0346A2 */ jal Matrix_NewMtx
|
||||
/* 00430 808B1F10 AFA20028 */ sw $v0, 0x0028($sp)
|
||||
/* 00434 808B1F14 8FA30028 */ lw $v1, 0x0028($sp)
|
||||
/* 00438 808B1F18 3C0B0601 */ lui $t3, 0x0601 ## $t3 = 06010000
|
||||
/* 0043C 808B1F1C 256B8010 */ addiu $t3, $t3, 0x8010 ## $t3 = 06008010
|
||||
/* 00440 808B1F20 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
|
||||
/* 00444 808B1F24 8E0202D0 */ lw $v0, 0x02D0($s0) ## 000002D0
|
||||
/* 00448 808B1F28 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000
|
||||
/* 0044C 808B1F2C 3C06808B */ lui $a2, %hi(D_808B20AC) ## $a2 = 808B0000
|
||||
/* 00450 808B1F30 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008
|
||||
/* 00454 808B1F34 AE0902D0 */ sw $t1, 0x02D0($s0) ## 000002D0
|
||||
/* 00458 808B1F38 AC4B0004 */ sw $t3, 0x0004($v0) ## 00000004
|
||||
/* 0045C 808B1F3C AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000
|
||||
/* 00460 808B1F40 8E250000 */ lw $a1, 0x0000($s1) ## 00000000
|
||||
/* 00464 808B1F44 24C620AC */ addiu $a2, $a2, %lo(D_808B20AC) ## $a2 = 808B20AC
|
||||
/* 00468 808B1F48 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFEC
|
||||
/* 0046C 808B1F4C 0C031AD5 */ jal func_800C6B54
|
||||
/* 00470 808B1F50 2407018C */ addiu $a3, $zero, 0x018C ## $a3 = 0000018C
|
||||
.L808B1F54:
|
||||
/* 00474 808B1F54 8FBF001C */ lw $ra, 0x001C($sp)
|
||||
/* 00478 808B1F58 8FB00014 */ lw $s0, 0x0014($sp)
|
||||
/* 0047C 808B1F5C 8FB10018 */ lw $s1, 0x0018($sp)
|
||||
/* 00480 808B1F60 03E00008 */ jr $ra
|
||||
/* 00484 808B1F64 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
|
||||
/* 00488 808B1F68 00000000 */ nop
|
||||
/* 0048C 808B1F6C 00000000 */ nop
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
glabel func_808B1AE0
|
||||
/* 00000 808B1AE0 3C028016 */ lui $v0, 0x8016 ## $v0 = 80160000
|
||||
/* 00004 808B1AE4 2442E660 */ addiu $v0, $v0, 0xE660 ## $v0 = 8015E660
|
||||
/* 00008 808B1AE8 8C4E1360 */ lw $t6, 0x1360($v0) ## 8015F9C0
|
||||
/* 0000C 808B1AEC AFA50004 */ sw $a1, 0x0004($sp)
|
||||
/* 00010 808B1AF0 29C10004 */ slti $at, $t6, 0x0004
|
||||
/* 00014 808B1AF4 54200005 */ bnel $at, $zero, .L808B1B0C
|
||||
/* 00018 808B1AF8 94430EE6 */ lhu $v1, 0x0EE6($v0) ## 8015F546
|
||||
/* 0001C 808B1AFC 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 00020 808B1B00 03E00008 */ jr $ra
|
||||
/* 00024 808B1B04 2C420001 */ sltiu $v0, $v0, 0x0001
|
||||
.L808B1B08:
|
||||
/* 00028 808B1B08 94430EE6 */ lhu $v1, 0x0EE6($v0) ## 8015F546
|
||||
.L808B1B0C:
|
||||
/* 0002C 808B1B0C 8C4F0004 */ lw $t7, 0x0004($v0) ## 8015E664
|
||||
/* 00030 808B1B10 24010011 */ addiu $at, $zero, 0x0011 ## $at = 00000011
|
||||
/* 00034 808B1B14 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000
|
||||
/* 00038 808B1B18 3863000F */ xori $v1, $v1, 0x000F ## $v1 = 0000000F
|
||||
/* 0003C 808B1B1C 11E00003 */ beq $t7, $zero, .L808B1B2C
|
||||
/* 00040 808B1B20 2C630001 */ sltiu $v1, $v1, 0x0001
|
||||
/* 00044 808B1B24 10000002 */ beq $zero, $zero, .L808B1B30
|
||||
/* 00048 808B1B28 24020005 */ addiu $v0, $zero, 0x0005 ## $v0 = 00000005
|
||||
.L808B1B2C:
|
||||
/* 0004C 808B1B2C 24020011 */ addiu $v0, $zero, 0x0011 ## $v0 = 00000011
|
||||
.L808B1B30:
|
||||
/* 00050 808B1B30 54410016 */ bnel $v0, $at, .L808B1B8C
|
||||
/* 00054 808B1B34 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 00058 808B1B38 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
/* 0005C 808B1B3C 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001
|
||||
/* 00060 808B1B40 10400009 */ beq $v0, $zero, .L808B1B68
|
||||
/* 00064 808B1B44 00000000 */ nop
|
||||
/* 00068 808B1B48 10410009 */ beq $v0, $at, .L808B1B70
|
||||
/* 0006C 808B1B4C 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003
|
||||
/* 00070 808B1B50 1041000B */ beq $v0, $at, .L808B1B80
|
||||
/* 00074 808B1B54 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004
|
||||
/* 00078 808B1B58 10410007 */ beq $v0, $at, .L808B1B78
|
||||
/* 0007C 808B1B5C 00000000 */ nop
|
||||
/* 00080 808B1B60 1000000D */ beq $zero, $zero, .L808B1B98
|
||||
/* 00084 808B1B64 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
|
||||
.L808B1B68:
|
||||
/* 00088 808B1B68 03E00008 */ jr $ra
|
||||
/* 0008C 808B1B6C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000
|
||||
.L808B1B70:
|
||||
/* 00090 808B1B70 03E00008 */ jr $ra
|
||||
/* 00094 808B1B74 2C620001 */ sltiu $v0, $v1, 0x0001
|
||||
.L808B1B78:
|
||||
/* 00098 808B1B78 03E00008 */ jr $ra
|
||||
/* 0009C 808B1B7C 00601025 */ or $v0, $v1, $zero ## $v0 = 0000000F
|
||||
.L808B1B80:
|
||||
/* 000A0 808B1B80 03E00008 */ jr $ra
|
||||
/* 000A4 808B1B84 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001
|
||||
.L808B1B88:
|
||||
/* 000A8 808B1B88 8482001C */ lh $v0, 0x001C($a0) ## 0000001C
|
||||
.L808B1B8C:
|
||||
/* 000AC 808B1B8C 38420002 */ xori $v0, $v0, 0x0002 ## $v0 = 00000003
|
||||
/* 000B0 808B1B90 03E00008 */ jr $ra
|
||||
/* 000B4 808B1B94 2C420001 */ sltiu $v0, $v0, 0x0001
|
||||
.L808B1B98:
|
||||
/* 000B8 808B1B98 03E00008 */ jr $ra
|
||||
/* 000BC 808B1B9C 00000000 */ nop
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purposee registers
|
||||
|
||||
.section .rodata
|
||||
glabel D_808B20D0
|
||||
|
||||
.incbin "baserom/ovl_Bg_Spot09_Obj", 0x5F0, 0x000000B0
|
45
diff.py
45
diff.py
|
@ -16,14 +16,16 @@ def fail(msg):
|
|||
print(msg, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
MISSING_PREREQUISITES = "Missing prerequisite python module {}. " \
|
||||
"Run `python3 -m pip install --user colorama ansiwrap attrs watchdog python-Levenshtein` to install prerequisites (python-Levenshtein only needed for --algorithm=levenshtein)."
|
||||
|
||||
try:
|
||||
import attr
|
||||
from colorama import Fore, Style, Back
|
||||
import ansiwrap
|
||||
import watchdog
|
||||
except ModuleNotFoundError as e:
|
||||
fail(f"Missing prerequisite python module {e.name}. "
|
||||
"Run `python3 -m pip install --user colorama ansiwrap attrs watchdog` to install prerequisites.")
|
||||
fail(MISSING_PREREQUISITES.format(e.name))
|
||||
|
||||
# Prefer to use diff_settings.py from the current working directory
|
||||
sys.path.insert(0, '.')
|
||||
|
@ -66,6 +68,8 @@ parser.add_argument('-w', '--watch', dest='watch', action='store_true',
|
|||
"Recommended in combination with -m.")
|
||||
parser.add_argument('--width', dest='column_width', type=int, default=50,
|
||||
help="Sets the width of the left and right view column.")
|
||||
parser.add_argument('--algorithm', dest='algorithm', default='difflib',
|
||||
choices=['levenshtein', 'difflib'], help="Diff algorithm to use.")
|
||||
|
||||
# Project-specific flags, e.g. different versions/make arguments.
|
||||
if hasattr(diff_settings, "add_custom_arguments"):
|
||||
|
@ -106,6 +110,12 @@ FS_WATCH_EXTENSIONS = ['.c', '.h']
|
|||
|
||||
# ==== LOGIC ====
|
||||
|
||||
if args.algorithm == 'levenshtein':
|
||||
try:
|
||||
import Levenshtein
|
||||
except ModuleNotFoundError as e:
|
||||
fail(MISSING_PREREQUISITES.format(e.name))
|
||||
|
||||
binutils_prefix = None
|
||||
|
||||
for binutils_cand in ['mips-linux-gnu-', 'mips64-elf-']:
|
||||
|
@ -449,6 +459,32 @@ def color_branch_imms(br1, br2):
|
|||
br2 = f'{Fore.LIGHTBLUE_EX}{br2}{Style.RESET_ALL}'
|
||||
return br1, br2
|
||||
|
||||
def diff_sequences_difflib(seq1, seq2):
|
||||
differ = difflib.SequenceMatcher(a=seq1, b=seq2, autojunk=False)
|
||||
return differ.get_opcodes()
|
||||
|
||||
def diff_sequences(seq1, seq2):
|
||||
if (args.algorithm != 'levenshtein' or len(seq1) * len(seq2) > 4 * 10**8 or
|
||||
len(seq1) + len(seq2) >= 0x110000):
|
||||
return diff_sequences_difflib(seq1, seq2)
|
||||
|
||||
# The Levenshtein library assumes that we compare strings, not lists. Convert.
|
||||
# (Per the check above we know we have fewer than 0x110000 unique elements, so chr() works.)
|
||||
remapping = {}
|
||||
def remap(seq):
|
||||
seq = seq[:]
|
||||
for i in range(len(seq)):
|
||||
val = remapping.get(seq[i])
|
||||
if val is None:
|
||||
val = chr(len(remapping))
|
||||
remapping[seq[i]] = val
|
||||
seq[i] = val
|
||||
return ''.join(seq)
|
||||
|
||||
seq1 = remap(seq1)
|
||||
seq2 = remap(seq2)
|
||||
return Levenshtein.opcodes(seq1, seq2)
|
||||
|
||||
def do_diff(basedump, mydump):
|
||||
asm_lines1 = basedump.split('\n')
|
||||
asm_lines2 = mydump.split('\n')
|
||||
|
@ -477,8 +513,7 @@ def do_diff(basedump, mydump):
|
|||
btset.add(bt + ":")
|
||||
sc.color_symbol(bt + ":")
|
||||
|
||||
differ: difflib.SequenceMatcher = difflib.SequenceMatcher(a=mnemonics1, b=mnemonics2, autojunk=False)
|
||||
for (tag, i1, i2, j1, j2) in differ.get_opcodes():
|
||||
for (tag, i1, i2, j1, j2) in diff_sequences(mnemonics1, mnemonics2):
|
||||
lines1 = asm_lines1[i1:i2]
|
||||
lines2 = asm_lines2[j1:j2]
|
||||
|
||||
|
@ -791,7 +826,7 @@ def main():
|
|||
display.progress("Building...")
|
||||
ret = run_make(make_target, capture_output=True)
|
||||
if ret.returncode != 0:
|
||||
display.update(ret.stderr.decode() or ret.stdout.decode(), error=True)
|
||||
display.update(ret.stderr.decode('utf-8-sig', 'replace') or ret.stdout.decode('utf-8-sig', 'replace'), error=True)
|
||||
continue
|
||||
mydump = run_objdump(mycmd)
|
||||
display.update(mydump, error=False)
|
||||
|
|
2
spec
2
spec
|
@ -1458,7 +1458,7 @@ endseg
|
|||
beginseg
|
||||
name "ovl_Bg_Spot09_Obj"
|
||||
include "build/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.o"
|
||||
include "build/data/overlays/actors/z_bg_spot09_obj.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
#define ROOM 0x00
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
|
||||
s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static s32 func_808B1BA0(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
static s32 func_808B1BEC(BgSpot09Obj* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit Bg_Spot09_Obj_InitVars =
|
||||
{
|
||||
|
@ -26,66 +26,66 @@ const ActorInit Bg_Spot09_Obj_InitVars =
|
|||
(ActorFunc)BgSpot09Obj_Draw,
|
||||
};
|
||||
|
||||
u32 D_808B1F90[] = {
|
||||
static u32 D_808B1F90[] = {
|
||||
0x00000000, 0x06005520, 0x0600283C, 0x06008458, 0x06007580
|
||||
};
|
||||
|
||||
typedef s32 (*ActorFuncRet)(struct Actor*, struct GlobalContext*);
|
||||
ActorFuncRet D_808B1FA4[] = {
|
||||
static ActorFuncRet D_808B1FA4[] = {
|
||||
(ActorFuncRet)func_808B1BEC, (ActorFuncRet)func_808B1AE0, (ActorFuncRet)func_808B1BA0,
|
||||
};
|
||||
|
||||
InitChainEntry initChain1[] = {
|
||||
static InitChainEntry initChain1[] = {
|
||||
ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F8, 3000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_FC, 7200, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
InitChainEntry initChain2[] = {
|
||||
static InitChainEntry initChain2[] = {
|
||||
ICHAIN_F32(unk_F4, 7200, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F8, 800, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_FC, 1500, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
u32 dists[] = {
|
||||
static u32 dlists[] = {
|
||||
0x06000100, 0x06003970, 0x06001120, 0x06007D40, 0x06006210,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06008010;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot09_Obj/func_808B1AE0.s")
|
||||
/*void func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
u16 temp_v1;
|
||||
s32 phi_v0;
|
||||
static s32 func_808B1AE0(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
s32 temp_v1;
|
||||
s32 linkAge;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
if (gSaveContext->unk1360 >= 4) {
|
||||
return (u32) arg0->unk1C < 1U;
|
||||
if (gSaveContext.scene_setup_index >= 4) {
|
||||
return thisx->params == 0;
|
||||
}
|
||||
temp_v1 = (u32) ((gSaveContext->unkEE6 & 0xF) ^ 0xF) < 1U;
|
||||
if (gSaveContext->unk4 != 0) {
|
||||
phi_v0 = 5;
|
||||
temp_v1 = (gSaveContext.event_chk_inf[9] & 0xF) == 0xF;
|
||||
if (LINK_IS_CHILD) {
|
||||
linkAge = YEARS_CHILD;
|
||||
} else {
|
||||
phi_v0 = 0x11;
|
||||
linkAge = YEARS_ADULT;
|
||||
}
|
||||
if (phi_v0 == 0x11) {
|
||||
if (arg0->unk1C == 0) {
|
||||
return (u16)0;
|
||||
}
|
||||
if (arg0->unk1C == 1) {
|
||||
return temp_v1 < 1U;
|
||||
}
|
||||
if (arg0->unk1C == 3) {
|
||||
return (u16)1;
|
||||
}
|
||||
if (arg0->unk1C == 4) {
|
||||
return temp_v1;
|
||||
}
|
||||
return (u16)0;
|
||||
}
|
||||
return (u32) (arg0->unk1C ^ 2) < 1U;
|
||||
}*/
|
||||
|
||||
s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
||||
if (linkAge == YEARS_ADULT) {
|
||||
switch (thisx->params) {
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
return !temp_v1;
|
||||
case 4:
|
||||
return temp_v1;
|
||||
case 3:
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
return thisx->params == 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
if (thisx->params == 3) {
|
||||
Actor_SetScale(thisx, 0.1f);
|
||||
|
@ -95,7 +95,7 @@ s32 func_808B1BA0(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
||||
static s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
s32 localC = 0;
|
||||
s32 pad[2];
|
||||
|
@ -108,7 +108,7 @@ s32 func_808B1BEC(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
||||
static s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
||||
s32 i;
|
||||
for (i = 0; i < ARRAY_COUNT(D_808B1FA4); i++) {
|
||||
if (!D_808B1FA4[i](this, globalCtx)) {
|
||||
|
@ -118,17 +118,17 @@ s32 func_808B1C70(BgSpot09Obj *this, GlobalContext *globalCtx) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
s32 func_808B1CEC(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
static s32 func_808B1CEC(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, &initChain1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 func_808B1D18(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
static s32 func_808B1D18(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, &initChain2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
static s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
if (this->dyna.actor.params == 3) {
|
||||
return func_808B1D18(this, globalCtx);
|
||||
} else {
|
||||
|
@ -136,7 +136,7 @@ s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
static void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", thisx->params,
|
||||
|
@ -154,7 +154,7 @@ void BgSpot09Obj_Init(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
static void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
DynaCollisionContext* dynaColCtx = &globalCtx->colCtx.dyna;
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
|
||||
|
@ -163,17 +163,18 @@ void BgSpot09Obj_Destroy(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
static void BgSpot09Obj_Update(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
|
||||
}
|
||||
|
||||
void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
Gfx* gfxArr[3];
|
||||
static void BgSpot09Obj_Draw(BgSpot09Obj* this, GlobalContext* globalCtx) {
|
||||
Actor* thisx = &this->dyna.actor;
|
||||
GraphicsContext* gfxCtx;
|
||||
Gfx* gfxArr[3];
|
||||
|
||||
Draw_DListOpa(globalCtx, dists[thisx->params]);
|
||||
Draw_DListOpa(globalCtx, dlists[thisx->params]);
|
||||
if (thisx->params == 3) {
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_bg_spot09_obj.c", 388);
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
|
|
Loading…
Reference in a new issue