mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
more
This commit is contained in:
parent
47d0341710
commit
20bea3dfe9
@ -1,66 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802E455C
|
||||
/* 105DDC 802E455C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 105DE0 802E4560 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 105DE4 802E4564 3C10800A */ lui $s0, %hi(gMasterGfxPos)
|
||||
/* 105DE8 802E4568 8E10A66C */ lw $s0, %lo(gMasterGfxPos)($s0)
|
||||
/* 105DEC 802E456C AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 105DF0 802E4570 0C04417A */ jal get_entity_by_index
|
||||
/* 105DF4 802E4574 00000000 */ nop
|
||||
/* 105DF8 802E4578 3C04E300 */ lui $a0, 0xe300
|
||||
/* 105DFC 802E457C 34841001 */ ori $a0, $a0, 0x1001
|
||||
/* 105E00 802E4580 3C05D700 */ lui $a1, 0xd700
|
||||
/* 105E04 802E4584 34A50002 */ ori $a1, $a1, 2
|
||||
/* 105E08 802E4588 0200182D */ daddu $v1, $s0, $zero
|
||||
/* 105E0C 802E458C 26100008 */ addiu $s0, $s0, 8
|
||||
/* 105E10 802E4590 AC640000 */ sw $a0, ($v1)
|
||||
/* 105E14 802E4594 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 105E18 802E4598 AC600004 */ sw $zero, 4($v1)
|
||||
/* 105E1C 802E459C 2403FFFF */ addiu $v1, $zero, -1
|
||||
/* 105E20 802E45A0 AC850000 */ sw $a1, ($a0)
|
||||
/* 105E24 802E45A4 0040282D */ daddu $a1, $v0, $zero
|
||||
/* 105E28 802E45A8 AC830004 */ sw $v1, 4($a0)
|
||||
/* 105E2C 802E45AC 90A2000B */ lbu $v0, 0xb($a1)
|
||||
/* 105E30 802E45B0 2C4200FF */ sltiu $v0, $v0, 0xff
|
||||
/* 105E34 802E45B4 14400011 */ bnez $v0, .L802E45FC
|
||||
/* 105E38 802E45B8 26100008 */ addiu $s0, $s0, 8
|
||||
/* 105E3C 802E45BC 0200282D */ daddu $a1, $s0, $zero
|
||||
/* 105E40 802E45C0 26100008 */ addiu $s0, $s0, 8
|
||||
/* 105E44 802E45C4 3C07E200 */ lui $a3, 0xe200
|
||||
/* 105E48 802E45C8 34E7001C */ ori $a3, $a3, 0x1c
|
||||
/* 105E4C 802E45CC 3C060055 */ lui $a2, 0x55
|
||||
/* 105E50 802E45D0 34C62078 */ ori $a2, $a2, 0x2078
|
||||
/* 105E54 802E45D4 0200182D */ daddu $v1, $s0, $zero
|
||||
/* 105E58 802E45D8 26100008 */ addiu $s0, $s0, 8
|
||||
/* 105E5C 802E45DC 3C04FC12 */ lui $a0, 0xfc12
|
||||
/* 105E60 802E45E0 34841824 */ ori $a0, $a0, 0x1824
|
||||
/* 105E64 802E45E4 3C02FF33 */ lui $v0, 0xff33
|
||||
/* 105E68 802E45E8 3442FFFF */ ori $v0, $v0, 0xffff
|
||||
/* 105E6C 802E45EC ACA70000 */ sw $a3, ($a1)
|
||||
/* 105E70 802E45F0 ACA60004 */ sw $a2, 4($a1)
|
||||
/* 105E74 802E45F4 080B918C */ j .L802E4630
|
||||
/* 105E78 802E45F8 AC640000 */ sw $a0, ($v1)
|
||||
.L802E45FC:
|
||||
/* 105E7C 802E45FC 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 105E80 802E4600 26100008 */ addiu $s0, $s0, 8
|
||||
/* 105E84 802E4604 3C03FCFF */ lui $v1, 0xfcff
|
||||
/* 105E88 802E4608 3463B3FF */ ori $v1, $v1, 0xb3ff
|
||||
/* 105E8C 802E460C 3C02FF2C */ lui $v0, 0xff2c
|
||||
/* 105E90 802E4610 3442FE7F */ ori $v0, $v0, 0xfe7f
|
||||
/* 105E94 802E4614 AC830000 */ sw $v1, ($a0)
|
||||
/* 105E98 802E4618 0200182D */ daddu $v1, $s0, $zero
|
||||
/* 105E9C 802E461C AC820004 */ sw $v0, 4($a0)
|
||||
/* 105EA0 802E4620 3C02FA00 */ lui $v0, 0xfa00
|
||||
/* 105EA4 802E4624 AC620000 */ sw $v0, ($v1)
|
||||
/* 105EA8 802E4628 90A2000B */ lbu $v0, 0xb($a1)
|
||||
/* 105EAC 802E462C 26100008 */ addiu $s0, $s0, 8
|
||||
.L802E4630:
|
||||
/* 105EB0 802E4630 AC620004 */ sw $v0, 4($v1)
|
||||
/* 105EB4 802E4634 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 105EB8 802E4638 3C01800A */ lui $at, %hi(gMasterGfxPos)
|
||||
/* 105EBC 802E463C AC30A66C */ sw $s0, %lo(gMasterGfxPos)($at)
|
||||
/* 105EC0 802E4640 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 105EC4 802E4644 03E00008 */ jr $ra
|
||||
/* 105EC8 802E4648 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -1,55 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_E00D8288
|
||||
/* 3D6A48 E00D8288 0080402D */ daddu $t0, $a0, $zero
|
||||
/* 3D6A4C E00D828C 05010002 */ bgez $t0, .LE00D8298
|
||||
/* 3D6A50 E00D8290 00A0482D */ daddu $t1, $a1, $zero
|
||||
/* 3D6A54 E00D8294 0000402D */ daddu $t0, $zero, $zero
|
||||
.LE00D8298:
|
||||
/* 3D6A58 E00D8298 05220001 */ bltzl $t1, .LE00D82A0
|
||||
/* 3D6A5C E00D829C 0000482D */ daddu $t1, $zero, $zero
|
||||
.LE00D82A0:
|
||||
/* 3D6A60 E00D82A0 04C20001 */ bltzl $a2, .LE00D82A8
|
||||
/* 3D6A64 E00D82A4 0000302D */ daddu $a2, $zero, $zero
|
||||
.LE00D82A8:
|
||||
/* 3D6A68 E00D82A8 04E20001 */ bltzl $a3, .LE00D82B0
|
||||
/* 3D6A6C E00D82AC 0000382D */ daddu $a3, $zero, $zero
|
||||
.LE00D82B0:
|
||||
/* 3D6A70 E00D82B0 29020140 */ slti $v0, $t0, 0x140
|
||||
/* 3D6A74 E00D82B4 50400001 */ beql $v0, $zero, .LE00D82BC
|
||||
/* 3D6A78 E00D82B8 2408013F */ addiu $t0, $zero, 0x13f
|
||||
.LE00D82BC:
|
||||
/* 3D6A7C E00D82BC 292200F0 */ slti $v0, $t1, 0xf0
|
||||
/* 3D6A80 E00D82C0 50400001 */ beql $v0, $zero, .LE00D82C8
|
||||
/* 3D6A84 E00D82C4 240900EF */ addiu $t1, $zero, 0xef
|
||||
.LE00D82C8:
|
||||
/* 3D6A88 E00D82C8 28C20140 */ slti $v0, $a2, 0x140
|
||||
/* 3D6A8C E00D82CC 50400001 */ beql $v0, $zero, .LE00D82D4
|
||||
/* 3D6A90 E00D82D0 2406013F */ addiu $a2, $zero, 0x13f
|
||||
.LE00D82D4:
|
||||
/* 3D6A94 E00D82D4 28E200F0 */ slti $v0, $a3, 0xf0
|
||||
/* 3D6A98 E00D82D8 50400001 */ beql $v0, $zero, .LE00D82E0
|
||||
/* 3D6A9C E00D82DC 240700EF */ addiu $a3, $zero, 0xef
|
||||
.LE00D82E0:
|
||||
/* 3D6AA0 E00D82E0 3C03800A */ lui $v1, %hi(gMasterGfxPos)
|
||||
/* 3D6AA4 E00D82E4 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
|
||||
/* 3D6AA8 E00D82E8 30C403FF */ andi $a0, $a2, 0x3ff
|
||||
/* 3D6AAC E00D82EC 8C620000 */ lw $v0, ($v1)
|
||||
/* 3D6AB0 E00D82F0 00042380 */ sll $a0, $a0, 0xe
|
||||
/* 3D6AB4 E00D82F4 0040282D */ daddu $a1, $v0, $zero
|
||||
/* 3D6AB8 E00D82F8 24420008 */ addiu $v0, $v0, 8
|
||||
/* 3D6ABC E00D82FC AC620000 */ sw $v0, ($v1)
|
||||
/* 3D6AC0 E00D8300 30E203FF */ andi $v0, $a3, 0x3ff
|
||||
/* 3D6AC4 E00D8304 00021080 */ sll $v0, $v0, 2
|
||||
/* 3D6AC8 E00D8308 3C03F600 */ lui $v1, 0xf600
|
||||
/* 3D6ACC E00D830C 00431025 */ or $v0, $v0, $v1
|
||||
/* 3D6AD0 E00D8310 00822025 */ or $a0, $a0, $v0
|
||||
/* 3D6AD4 E00D8314 310303FF */ andi $v1, $t0, 0x3ff
|
||||
/* 3D6AD8 E00D8318 00031B80 */ sll $v1, $v1, 0xe
|
||||
/* 3D6ADC E00D831C 312203FF */ andi $v0, $t1, 0x3ff
|
||||
/* 3D6AE0 E00D8320 00021080 */ sll $v0, $v0, 2
|
||||
/* 3D6AE4 E00D8324 00621825 */ or $v1, $v1, $v0
|
||||
/* 3D6AE8 E00D8328 ACA40000 */ sw $a0, ($a1)
|
||||
/* 3D6AEC E00D832C 03E00008 */ jr $ra
|
||||
/* 3D6AF0 E00D8330 ACA30004 */ sw $v1, 4($a1)
|
@ -28,7 +28,23 @@ INCLUDE_ASM(s32, "code_105700_len_2130", func_802E44F8);
|
||||
|
||||
INCLUDE_ASM(s32, "code_105700_len_2130", func_802E4540);
|
||||
|
||||
INCLUDE_ASM(s32, "code_105700_len_2130", func_802E455C);
|
||||
void func_802E455C(s32 entityIndex) {
|
||||
Gfx* gfx = gMasterGfxPos;
|
||||
Entity* entity = get_entity_by_index(entityIndex);
|
||||
|
||||
gDPSetTextureLUT(gfx++, G_TT_NONE);
|
||||
gSPTexture(gfx++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
if (entity->alpha >= 255) {
|
||||
gDPSetRenderMode(gfx++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||
gDPSetCombineMode(gfx++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
} else {
|
||||
gDPSetCombineLERP(gfx++, 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, entity->alpha);
|
||||
}
|
||||
|
||||
gMasterGfxPos = gfx;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_105700_len_2130", func_802E464C);
|
||||
|
||||
|
@ -12,7 +12,35 @@ INCLUDE_ASM(s32, "code_3D67C0", func_E00D8264);
|
||||
|
||||
INCLUDE_ASM(s32, "code_3D67C0", func_E00D8280);
|
||||
|
||||
INCLUDE_ASM(s32, "code_3D67C0", func_E00D8288);
|
||||
void func_E00D8288(s32 l, s32 r, s32 t, s32 b) {
|
||||
if (l < 0) {
|
||||
l = 0;
|
||||
}
|
||||
if (r < 0) {
|
||||
r = 0;
|
||||
}
|
||||
if (t < 0) {
|
||||
t = 0;
|
||||
}
|
||||
if (b < 0) {
|
||||
b = 0;
|
||||
}
|
||||
|
||||
if (l > 319) {
|
||||
l = 319;
|
||||
}
|
||||
if (r > 239) {
|
||||
r = 239;
|
||||
}
|
||||
if (t > 319) {
|
||||
t = 319;
|
||||
}
|
||||
if (b > 239) {
|
||||
b = 239;
|
||||
}
|
||||
|
||||
gDPFillRectangle(gMasterGfxPos++, l, r, t, b);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_3D67C0", func_E00D8334);
|
||||
|
||||
|
@ -10,7 +10,20 @@ INCLUDE_ASM(s32, "code_404220", func_E011A398);
|
||||
|
||||
INCLUDE_ASM(s32, "code_404220", func_E011A3A0);
|
||||
|
||||
#ifdef NON_MATCHING // gfx gbi macro issue
|
||||
void func_E011A3BC(s16 alpha) {
|
||||
if (alpha == 255) {
|
||||
gDPSetRenderMode(gMasterGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM));
|
||||
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||
} else {
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0x00, 0x00, 0x00, alpha);
|
||||
}
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "code_404220", func_E011A3BC);
|
||||
#endif
|
||||
|
||||
INCLUDE_ASM(s32, "code_404220", func_E011A48C);
|
||||
|
||||
|
@ -16,7 +16,7 @@ smallest_len = 1000
|
||||
|
||||
for root, dirs, files in os.walk(asm_dir):
|
||||
for f_name in files:
|
||||
if f_name.endswith(".s") and len(f_name) < 20 and f_name not in ["func_8024F768.s", "func_800271A0.s", "func_80240448_B141B8.s"]:
|
||||
if f_name.endswith(".s") and not f_name.startswith("func_E") and len(f_name) < 20 and f_name not in ["func_8011800C.s", "func_E011A3BC.s", "func_8024F768.s", "func_800271A0.s", "func_80240448_B141B8.s"]:
|
||||
f_path = os.path.join(root, f_name)
|
||||
with open(f_path) as f:
|
||||
f_text = f.read()
|
||||
|
Loading…
Reference in New Issue
Block a user