Decompile viSetViewPosition

This commit is contained in:
Ryan Dwyer
2020-06-15 19:47:36 +10:00
parent 06df4872c9
commit a2860cae1e
7 changed files with 20 additions and 38 deletions
+3 -3
View File
@@ -8142,7 +8142,7 @@ glabel func0f0bd764
/* f0bd874: 00056c03 */ sra $t5,$a1,0x10
/* f0bd878: 00046403 */ sra $t4,$a0,0x10
/* f0bd87c: 01802025 */ or $a0,$t4,$zero
/* f0bd880: 0c002f2a */ jal func0000bca8
/* f0bd880: 0c002f2a */ jal viSetViewPosition
/* f0bd884: 01a02825 */ or $a1,$t5,$zero
/* f0bd888: 0fc2f113 */ jal func0f0bc44c
/* f0bd88c: 00000000 */ sll $zero,$zero,0x0
@@ -8403,7 +8403,7 @@ glabel var7f1ad6ac
/* f0bdbac: 00056c03 */ sra $t5,$a1,0x10
/* f0bdbb0: 00046403 */ sra $t4,$a0,0x10
/* f0bdbb4: 01802025 */ or $a0,$t4,$zero
/* f0bdbb8: 0c002f2a */ jal func0000bca8
/* f0bdbb8: 0c002f2a */ jal viSetViewPosition
/* f0bdbbc: 01a02825 */ or $a1,$t5,$zero
/* f0bdbc0: 0fc2f113 */ jal func0f0bc44c
/* f0bdbc4: 00000000 */ sll $zero,$zero,0x0
@@ -10643,7 +10643,7 @@ glabel var7f1ad6ac
// // db44
// func0000aab0(var800705c0[g_HiResActive].unk10);
// func0000bdd8(60, aspectratio, func0f0bc554(), func0f0bcaa0());
// func0000bca8(func0f0bc7ac(), func0f0bce24());
// viSetViewPosition(func0f0bc7ac(), func0f0bce24());
// viSetXY(func0f0bc44c(), func0f0bc478());
// viSetBuf(func0f0bc44c(), func0f0bc478());
// func0f0bb42c();
+2 -2
View File
@@ -4743,7 +4743,7 @@ glabel var7f1b2948
/* f0f4814: 84a52042 */ lh $a1,%lo(var800a2040+0x2)($a1)
/* f0f4818: 00002012 */ mflo $a0
/* f0f481c: 0004c400 */ sll $t8,$a0,0x10
/* f0f4820: 0c002f2a */ jal func0000bca8
/* f0f4820: 0c002f2a */ jal viSetViewPosition
/* f0f4824: 00182403 */ sra $a0,$t8,0x10
/* f0f4828: 3c0b800a */ lui $t3,%hi(var800a203c)
/* f0f482c: 8d6b203c */ lw $t3,%lo(var800a203c)($t3)
@@ -6693,7 +6693,7 @@ glabel func0f0f5360
/* f0f6458: ac4b0000 */ sw $t3,0x0($v0)
/* f0f645c: 8fd00284 */ lw $s0,0x284($s8)
/* f0f6460: 86040634 */ lh $a0,0x634($s0)
/* f0f6464: 0c002f2a */ jal func0000bca8
/* f0f6464: 0c002f2a */ jal viSetViewPosition
/* f0f6468: 86050636 */ lh $a1,0x636($s0)
/* f0f646c: 8fd00284 */ lw $s0,0x284($s8)
/* f0f6470: c60c1854 */ lwc1 $f12,0x1854($s0)
+4 -4
View File
@@ -1573,7 +1573,7 @@ glabel var7f1b7868
/* f169600: 00002025 */ or $a0,$zero,$zero
/* f169604: 8e700284 */ lw $s0,0x284($s3)
/* f169608: 86040634 */ lh $a0,0x634($s0)
/* f16960c: 0c002f2a */ jal func0000bca8
/* f16960c: 0c002f2a */ jal viSetViewPosition
/* f169610: 86050636 */ lh $a1,0x636($s0)
/* f169614: 8e700284 */ lw $s0,0x284($s3)
/* f169618: c60c1854 */ lwc1 $f12,0x1854($s0)
@@ -1641,7 +1641,7 @@ glabel var7f1b7868
/* f16970c: 00002025 */ or $a0,$zero,$zero
/* f169710: 8e700284 */ lw $s0,0x284($s3)
/* f169714: 86040634 */ lh $a0,0x634($s0)
/* f169718: 0c002f2a */ jal func0000bca8
/* f169718: 0c002f2a */ jal viSetViewPosition
/* f16971c: 86050636 */ lh $a1,0x636($s0)
/* f169720: 8e700284 */ lw $s0,0x284($s3)
/* f169724: c60c1854 */ lwc1 $f12,0x1854($s0)
@@ -1714,7 +1714,7 @@ glabel var7f1b7868
/* f16982c: 00002025 */ or $a0,$zero,$zero
/* f169830: 8e700284 */ lw $s0,0x284($s3)
/* f169834: 86040634 */ lh $a0,0x634($s0)
/* f169838: 0c002f2a */ jal func0000bca8
/* f169838: 0c002f2a */ jal viSetViewPosition
/* f16983c: 86050636 */ lh $a1,0x636($s0)
/* f169840: 8e700284 */ lw $s0,0x284($s3)
/* f169844: c60c1854 */ lwc1 $f12,0x1854($s0)
@@ -1925,7 +1925,7 @@ glabel var7f1b7868
.L0f169b38:
/* f169b38: 8e700284 */ lw $s0,0x284($s3)
/* f169b3c: 86040634 */ lh $a0,0x634($s0)
/* f169b40: 0c002f2a */ jal func0000bca8
/* f169b40: 0c002f2a */ jal viSetViewPosition
/* f169b44: 86050636 */ lh $a1,0x636($s0)
/* f169b48: 8e700284 */ lw $s0,0x284($s3)
/* f169b4c: c60c1854 */ lwc1 $f12,0x1854($s0)
+2 -2
View File
@@ -4752,7 +4752,7 @@ void titleTick(void)
currentPlayerSetViewSize(576, var800624a0);
viSetViewSize(576, var800624a0);
currentPlayerSetViewPosition(0, 0);
func0000bca8(0, 0);
viSetViewPosition(0, 0);
// If there's a new mode to transition to, schedule it to apply in 3 ticks
// time and call the exit function for the current mode.
@@ -4966,7 +4966,7 @@ void func0f01adb8(void)
currentPlayerSetViewSize(576, var800624a0);
viSetViewSize(576, var800624a0);
currentPlayerSetViewPosition(0, 0);
func0000bca8(0, 0);
viSetViewPosition(0, 0);
}
void func0f01ae30(void)
+1 -1
View File
@@ -44,7 +44,7 @@ s16 viGetY(void);
void viSetViewSize(s16 x, s16 y);
s16 viGetViewX(void);
s16 viGetViewY(void);
void func0000bca8(s16 arg0, s16 arg1);
void viSetViewPosition(s16 left, s16 top);
s16 viGetViewLeft(void);
s16 viGetViewTop(void);
void viSetUseZBuf(bool use);
+7 -25
View File
@@ -2766,31 +2766,13 @@ s16 viGetViewY(void)
return g_ViData->viewy;
}
GLOBAL_ASM(
glabel func0000bca8
/* bca8: 3c038006 */ lui $v1,%hi(g_ViData)
/* bcac: 2463d594 */ addiu $v1,$v1,%lo(g_ViData)
/* bcb0: 27bdffe8 */ addiu $sp,$sp,-24
/* bcb4: 8c680000 */ lw $t0,0x0($v1)
/* bcb8: afbf0014 */ sw $ra,0x14($sp)
/* bcbc: afa40018 */ sw $a0,0x18($sp)
/* bcc0: afa5001c */ sw $a1,0x1c($sp)
/* bcc4: a5040020 */ sh $a0,0x20($t0)
/* bcc8: 8c690000 */ lw $t1,0x0($v1)
/* bccc: a5250022 */ sh $a1,0x22($t1)
/* bcd0: 8c620000 */ lw $v0,0x0($v1)
/* bcd4: 844a0020 */ lh $t2,0x20($v0)
/* bcd8: 844b0022 */ lh $t3,0x22($v0)
/* bcdc: 448a2000 */ mtc1 $t2,$f4
/* bce0: 448b3000 */ mtc1 $t3,$f6
/* bce4: 46802320 */ cvt.s.w $f12,$f4
/* bce8: 0fc2d261 */ jal currentPlayerSetScreenPosition
/* bcec: 468033a0 */ cvt.s.w $f14,$f6
/* bcf0: 8fbf0014 */ lw $ra,0x14($sp)
/* bcf4: 27bd0018 */ addiu $sp,$sp,0x18
/* bcf8: 03e00008 */ jr $ra
/* bcfc: 00000000 */ sll $zero,$zero,0x0
);
void viSetViewPosition(s16 left, s16 top)
{
g_ViData->viewleft = left;
g_ViData->viewtop = top;
currentPlayerSetScreenPosition(g_ViData->viewleft, g_ViData->viewtop);
}
s16 viGetViewLeft(void)
{
+1 -1
View File
@@ -1279,7 +1279,7 @@ glabel func0000e324
/* e504: 8e300284 */ lw $s0,0x284($s1)
.L0000e508:
/* e508: 86040634 */ lh $a0,0x634($s0)
/* e50c: 0c002f2a */ jal func0000bca8
/* e50c: 0c002f2a */ jal viSetViewPosition
/* e510: 86050636 */ lh $a1,0x636($s0)
/* e514: 8e300284 */ lw $s0,0x284($s1)
/* e518: c60c1854 */ lwc1 $f12,0x1854($s0)