mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
decomp hud functions (#324)
* decomp dead functions * decomp battle functions in 1A5830.c * delete matched functions .s files * fix variable names * decomp hud elements * merge master, delete asm files * fix style * Update src/d5a50_len_5fd0.c Co-authored-by: alex <hi@imalex.xyz> Co-authored-by: Ethan Roseman <ethteck@gmail.com> Co-authored-by: alex <hi@imalex.xyz>
This commit is contained in:
parent
3763936d82
commit
186ceb8eb0
@ -46,21 +46,33 @@ INCLUDE_ASM(s32, "d5a50_len_5fd0", render_hud_elements_world);
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", func_80143C48);
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", func_80144218);
|
||||
void func_80144218 (s32 arg0) {
|
||||
func_80143C48(arg0, 1, 3);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", func_80144238);
|
||||
void func_80144238(s32 arg0) {
|
||||
func_80143C48(arg0, 0, 3);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", func_80144258);
|
||||
void func_80144258(s32 arg0) {
|
||||
func_80143C48(arg0, 1, 1);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", func_80144278);
|
||||
void func_80144278(s32 arg0) {
|
||||
func_80143C48(arg0, 0, 1);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", draw_hud_element);
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", draw_hud_element_clipped);
|
||||
void draw_hud_element_clipped(s32 arg0) {
|
||||
draw_hud_element(arg0, 0);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", draw_hud_element_2);
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", draw_icon_2);
|
||||
void draw_icon_2(s32 iconID) {
|
||||
draw_hud_element(iconID, 2);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", set_hud_element_script);
|
||||
|
||||
@ -114,7 +126,12 @@ INCLUDE_ASM(s32, "d5a50_len_5fd0", set_hud_element_size);
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", func_80144E4C);
|
||||
|
||||
INCLUDE_ASM(s32, "d5a50_len_5fd0", func_80144E74);
|
||||
void func_80144E74(s32 iconIndex, s32 arg1) {
|
||||
HudElement* hudElement = gHudElementList[iconIndex & ~0x800];
|
||||
|
||||
hudElement->flags &= ~0xF000000;
|
||||
hudElement->flags |= arg1 << 24;
|
||||
}
|
||||
|
||||
void set_hud_element_alpha(s32 iconIndex, s32 opacity) {
|
||||
HudElement* hudElement = gHudElementList[iconIndex & ~0x800];
|
||||
|
@ -1,11 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel draw_hud_element_clipped
|
||||
/* DAEA8 801447A8 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* DAEAC 801447AC AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* DAEB0 801447B0 0C0510A6 */ jal draw_hud_element
|
||||
/* DAEB4 801447B4 0000282D */ daddu $a1, $zero, $zero
|
||||
/* DAEB8 801447B8 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* DAEBC 801447BC 03E00008 */ jr $ra
|
||||
/* DAEC0 801447C0 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,11 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel draw_icon_2
|
||||
/* DAEE0 801447E0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* DAEE4 801447E4 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* DAEE8 801447E8 0C0510A6 */ jal draw_hud_element
|
||||
/* DAEEC 801447EC 24050002 */ addiu $a1, $zero, 2
|
||||
/* DAEF0 801447F0 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* DAEF4 801447F4 03E00008 */ jr $ra
|
||||
/* DAEF8 801447F8 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,12 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80144218
|
||||
/* DA918 80144218 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* DA91C 8014421C 24050001 */ addiu $a1, $zero, 1
|
||||
/* DA920 80144220 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* DA924 80144224 0C050F12 */ jal func_80143C48
|
||||
/* DA928 80144228 24060003 */ addiu $a2, $zero, 3
|
||||
/* DA92C 8014422C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* DA930 80144230 03E00008 */ jr $ra
|
||||
/* DA934 80144234 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,12 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80144238
|
||||
/* DA938 80144238 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* DA93C 8014423C 0000282D */ daddu $a1, $zero, $zero
|
||||
/* DA940 80144240 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* DA944 80144244 0C050F12 */ jal func_80143C48
|
||||
/* DA948 80144248 24060003 */ addiu $a2, $zero, 3
|
||||
/* DA94C 8014424C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* DA950 80144250 03E00008 */ jr $ra
|
||||
/* DA954 80144254 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,12 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80144258
|
||||
/* DA958 80144258 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* DA95C 8014425C 24050001 */ addiu $a1, $zero, 1
|
||||
/* DA960 80144260 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* DA964 80144264 0C050F12 */ jal func_80143C48
|
||||
/* DA968 80144268 00A0302D */ daddu $a2, $a1, $zero
|
||||
/* DA96C 8014426C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* DA970 80144270 03E00008 */ jr $ra
|
||||
/* DA974 80144274 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,12 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80144278
|
||||
/* DA978 80144278 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* DA97C 8014427C 0000282D */ daddu $a1, $zero, $zero
|
||||
/* DA980 80144280 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* DA984 80144284 0C050F12 */ jal func_80143C48
|
||||
/* DA988 80144288 24060001 */ addiu $a2, $zero, 1
|
||||
/* DA98C 8014428C 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* DA990 80144290 03E00008 */ jr $ra
|
||||
/* DA994 80144294 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,19 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80144E74
|
||||
/* DB574 80144E74 2402F7FF */ addiu $v0, $zero, -0x801
|
||||
/* DB578 80144E78 00822024 */ and $a0, $a0, $v0
|
||||
/* DB57C 80144E7C 00042080 */ sll $a0, $a0, 2
|
||||
/* DB580 80144E80 3C028015 */ lui $v0, %hi(gHudElementList)
|
||||
/* DB584 80144E84 8C427960 */ lw $v0, %lo(gHudElementList)($v0)
|
||||
/* DB588 80144E88 3C03F0FF */ lui $v1, 0xf0ff
|
||||
/* DB58C 80144E8C 00822021 */ addu $a0, $a0, $v0
|
||||
/* DB590 80144E90 8C840000 */ lw $a0, ($a0)
|
||||
/* DB594 80144E94 3463FFFF */ ori $v1, $v1, 0xffff
|
||||
/* DB598 80144E98 8C820000 */ lw $v0, ($a0)
|
||||
/* DB59C 80144E9C 00052E00 */ sll $a1, $a1, 0x18
|
||||
/* DB5A0 80144EA0 00431024 */ and $v0, $v0, $v1
|
||||
/* DB5A4 80144EA4 00451025 */ or $v0, $v0, $a1
|
||||
/* DB5A8 80144EA8 03E00008 */ jr $ra
|
||||
/* DB5AC 80144EAC AC820000 */ sw $v0, ($a0)
|
Loading…
Reference in New Issue
Block a user