1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-25 06:06:05 +00:00

More graphics stuff

This commit is contained in:
Sirius902 2020-09-30 23:06:01 -07:00
parent 8c99be7682
commit 78ca34d897
10 changed files with 81 additions and 29 deletions

View file

@ -1,4 +1,4 @@
glabel EnIk_OverrideLimbDraw
glabel EnIk_OverrideLimbDraw1
/* 038E8 80A77BF8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 038EC 80A77BFC 24010011 */ addiu $at, $zero, 0x0011 ## $at = 00000011
/* 038F0 80A77C00 AFBF0014 */ sw $ra, 0x0014($sp)

View file

@ -1,4 +1,4 @@
glabel func_80A77530
glabel EnIk_OverrideLimbDraw2
/* 03220 80A77530 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8
/* 03224 80A77534 2401000D */ addiu $at, $zero, 0x000D ## $at = 0000000D
/* 03228 80A77538 AFBF0014 */ sw $ra, 0x0014($sp)

View file

@ -1,4 +1,4 @@
glabel func_80A7626C
glabel EnIk_OverrideLimbDraw3
/* 01F5C 80A7626C 2401000C */ addiu $at, $zero, 0x000C ## $at = 0000000C
/* 01F60 80A76270 AFA40000 */ sw $a0, 0x0000($sp)
/* 01F64 80A76274 14A1000A */ bne $a1, $at, .L80A762A0

View file

@ -48,7 +48,7 @@ glabel jtbl_80A78A3C
.word 0x00000000
.text
glabel EnIk_PostLimbDraw
glabel EnIk_PostLimbDraw1
/* 0396C 80A77C7C 27BDFF98 */ addiu $sp, $sp, 0xFF98 ## $sp = FFFFFF98
/* 03970 80A77C80 AFBF001C */ sw $ra, 0x001C($sp)
/* 03974 80A77C84 AFB00018 */ sw $s0, 0x0018($sp)

View file

@ -46,7 +46,7 @@ glabel jtbl_80A789E4
.word L80A777A4
.text
glabel func_80A7759C
glabel EnIk_PostLimbDraw2
/* 0328C 80A7759C 27BDFF90 */ addiu $sp, $sp, 0xFF90 ## $sp = FFFFFF90
/* 03290 80A775A0 AFBF001C */ sw $ra, 0x001C($sp)
/* 03294 80A775A4 AFB00018 */ sw $s0, 0x0018($sp)

View file

@ -28,7 +28,7 @@ glabel D_80A786E0
.balign 4
.text
glabel func_80A76330
glabel EnIk_PostLimbDraw3
/* 02020 80A76330 27BDFF00 */ addiu $sp, $sp, 0xFF00 ## $sp = FFFFFF00
/* 02024 80A76334 AFB00024 */ sw $s0, 0x0024($sp)
/* 02028 80A76338 AFBF003C */ sw $ra, 0x003C($sp)

View file

@ -269,13 +269,13 @@ glabel func_80A76798
/* 02880 80A76B90 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
.L80A76B94:
/* 02884 80A76B94 8FB90080 */ lw $t9, 0x0080($sp)
/* 02888 80A76B98 3C0980A7 */ lui $t1, %hi(func_80A7626C) ## $t1 = 80A70000
/* 0288C 80A76B9C 3C0A80A7 */ lui $t2, %hi(func_80A76330) ## $t2 = 80A70000
/* 02888 80A76B98 3C0980A7 */ lui $t1, %hi(EnIk_OverrideLimbDraw3) ## $t1 = 80A70000
/* 0288C 80A76B9C 3C0A80A7 */ lui $t2, %hi(EnIk_PostLimbDraw3) ## $t2 = 80A70000
/* 02890 80A76BA0 8F250150 */ lw $a1, 0x0150($t9) ## 00000150
/* 02894 80A76BA4 8F26016C */ lw $a2, 0x016C($t9) ## 0000016C
/* 02898 80A76BA8 9327014E */ lbu $a3, 0x014E($t9) ## 0000014E
/* 0289C 80A76BAC 254A6330 */ addiu $t2, $t2, %lo(func_80A76330) ## $t2 = 80A76330
/* 028A0 80A76BB0 2529626C */ addiu $t1, $t1, %lo(func_80A7626C) ## $t1 = 80A7626C
/* 0289C 80A76BAC 254A6330 */ addiu $t2, $t2, %lo(EnIk_PostLimbDraw3) ## $t2 = 80A76330
/* 028A0 80A76BB0 2529626C */ addiu $t1, $t1, %lo(EnIk_OverrideLimbDraw3) ## $t1 = 80A7626C
/* 028A4 80A76BB4 AFA90010 */ sw $t1, 0x0010($sp)
/* 028A8 80A76BB8 AFAA0014 */ sw $t2, 0x0014($sp)
/* 028AC 80A76BBC 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000

View file

@ -85,12 +85,12 @@ glabel func_80A77844
/* 03658 80A77968 0C29D86C */ jal func_80A761B0
/* 0365C 80A7796C AFA20038 */ sw $v0, 0x0038($sp)
/* 03660 80A77970 8FA30038 */ lw $v1, 0x0038($sp)
/* 03664 80A77974 3C1980A7 */ lui $t9, %hi(func_80A77530) ## $t9 = 80A70000
/* 03668 80A77978 3C0880A7 */ lui $t0, %hi(func_80A7759C) ## $t0 = 80A70000
/* 03664 80A77974 3C1980A7 */ lui $t9, %hi(EnIk_OverrideLimbDraw2) ## $t9 = 80A70000
/* 03668 80A77978 3C0880A7 */ lui $t0, %hi(EnIk_PostLimbDraw2) ## $t0 = 80A70000
/* 0366C 80A7797C AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 03670 80A77980 8FA30068 */ lw $v1, 0x0068($sp)
/* 03674 80A77984 2508759C */ addiu $t0, $t0, %lo(func_80A7759C) ## $t0 = 80A7759C
/* 03678 80A77988 27397530 */ addiu $t9, $t9, %lo(func_80A77530) ## $t9 = 80A77530
/* 03674 80A77984 2508759C */ addiu $t0, $t0, %lo(EnIk_PostLimbDraw2) ## $t0 = 80A7759C
/* 03678 80A77988 27397530 */ addiu $t9, $t9, %lo(EnIk_OverrideLimbDraw2) ## $t9 = 80A77530
/* 0367C 80A7798C 2462014C */ addiu $v0, $v1, 0x014C ## $v0 = 0000014C
/* 03680 80A77990 8C450004 */ lw $a1, 0x0004($v0) ## 00000150
/* 03684 80A77994 8C460020 */ lw $a2, 0x0020($v0) ## 0000016C

View file

@ -85,12 +85,12 @@ glabel func_80A77EDC
/* 03CF0 80A78000 0C29D86C */ jal func_80A761B0
/* 03CF4 80A78004 AFA20038 */ sw $v0, 0x0038($sp)
/* 03CF8 80A78008 8FA30038 */ lw $v1, 0x0038($sp)
/* 03CFC 80A7800C 3C1980A7 */ lui $t9, %hi(EnIk_OverrideLimbDraw) ## $t9 = 80A70000
/* 03D00 80A78010 3C0880A7 */ lui $t0, %hi(EnIk_PostLimbDraw) ## $t0 = 80A70000
/* 03CFC 80A7800C 3C1980A7 */ lui $t9, %hi(EnIk_OverrideLimbDraw1) ## $t9 = 80A70000
/* 03D00 80A78010 3C0880A7 */ lui $t0, %hi(EnIk_PostLimbDraw1) ## $t0 = 80A70000
/* 03D04 80A78014 AC620004 */ sw $v0, 0x0004($v1) ## 00000004
/* 03D08 80A78018 8FA30068 */ lw $v1, 0x0068($sp)
/* 03D0C 80A7801C 25087C7C */ addiu $t0, $t0, %lo(EnIk_PostLimbDraw) ## $t0 = 80A77C7C
/* 03D10 80A78020 27397BF8 */ addiu $t9, $t9, %lo(EnIk_OverrideLimbDraw) ## $t9 = 80A77BF8
/* 03D0C 80A7801C 25087C7C */ addiu $t0, $t0, %lo(EnIk_PostLimbDraw1) ## $t0 = 80A77C7C
/* 03D10 80A78020 27397BF8 */ addiu $t9, $t9, %lo(EnIk_OverrideLimbDraw1) ## $t9 = 80A77BF8
/* 03D14 80A78024 2462014C */ addiu $v0, $v1, 0x014C ## $v0 = 0000014C
/* 03D18 80A78028 8C450004 */ lw $a1, 0x0004($v0) ## 00000150
/* 03D1C 80A7802C 8C460020 */ lw $a2, 0x0020($v0) ## 0000016C

View file

@ -38,8 +38,14 @@ void func_80A76798(Actor* thisx, GlobalContext* globalCtx);
void func_80A780D0(EnIk* this, GlobalContext* globalCtx);
void func_80A78160(EnIk* this, GlobalContext* globalCtx);
s32 EnIk_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
void EnIk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor);
s32 EnIk_OverrideLimbDraw1(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
void EnIk_PostLimbDraw1(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor);
s32 EnIk_OverrideLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
void EnIk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor);
s32 EnIk_OverrideLimbDraw3(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor);
void EnIk_PostLimbDraw3(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor);
extern AnimationHeader D_0600C114;
extern AnimationHeader D_0600DD50;
@ -270,11 +276,40 @@ Gfx* func_80A761B0(GraphicsContext* gfxCtx, u8 primR, u8 primG, u8 primB, u8 env
return displayList;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A7626C.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_OverrideLimbDraw3.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A76330.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_PostLimbDraw3.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A76798.s")
void func_80A76798(Actor* thisx, GlobalContext* globalCtx) {
EnIk* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ik_inFight.c", 1309);
func_80093D18(globalCtx->state.gfxCtx);
func_80093D84(globalCtx->state.gfxCtx);
if (this->actor.params == 0) {
gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A761B0(globalCtx->state.gfxCtx, 245, 225, 155, 30, 30, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A761B0(globalCtx->state.gfxCtx, 255, 40, 0, 40, 0, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80A761B0(globalCtx->state.gfxCtx, 255, 255, 255, 20, 40, 30));
} else if (this->actor.params == 1) {
gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A761B0(globalCtx->state.gfxCtx, 245, 255, 205, 30, 35, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A761B0(globalCtx->state.gfxCtx, 185, 135, 25, 20, 20, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80A761B0(globalCtx->state.gfxCtx, 255, 255, 255, 30, 40, 20));
} else if (this->actor.params == 2) {
gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A761B0(globalCtx->state.gfxCtx, 55, 65, 55, 0, 0, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A761B0(globalCtx->state.gfxCtx, 205, 165, 75, 25, 20, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80A761B0(globalCtx->state.gfxCtx, 205, 165, 75, 25, 20, 0));
} else {
gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A761B0(globalCtx->state.gfxCtx, 255, 255, 255, 180, 180, 180));
gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A761B0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80A761B0(globalCtx->state.gfxCtx, 225, 205, 115, 25, 20, 0));
}
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
EnIk_OverrideLimbDraw3, EnIk_PostLimbDraw3, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ik_inFight.c", 1351);
}
void EnIk_StartMusic(void) {
func_800F5ACC(0x38);
@ -327,11 +362,28 @@ void func_80A772EC(EnIk* this, GlobalContext* globalCtx) {
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A774F8.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A77530.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_OverrideLimbDraw2.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A7759C.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_PostLimbDraw2.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A77844.s")
void func_80A77844(EnIk* this, GlobalContext* globalCtx) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
SkelAnime* skelAnime = &this->skelAnime;
s32 pad[2];
OPEN_DISPS(gfxCtx, "../z_en_ik_inAwake.c", 322);
func_8002EBCC(&this->actor, globalCtx, 0);
func_80093D18(gfxCtx);
func_80093D84(gfxCtx);
gSPSegment(oGfxCtx->polyOpa.p++, 0x08, func_80A761B0(gfxCtx, 245, 225, 155, 30, 30, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A761B0(gfxCtx, 255, 40, 0, 40, 0, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80A761B0(gfxCtx, 255, 255, 255, 20, 40, 30));
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnIk_OverrideLimbDraw2, EnIk_PostLimbDraw2, &this->actor);
CLOSE_DISPS(gfxCtx, "../z_en_ik_inAwake.c", 345);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/func_80A779DC.s")
@ -351,9 +403,9 @@ void EnIk_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_OverrideLimbDraw.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_OverrideLimbDraw1.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_PostLimbDraw.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Ik/EnIk_PostLimbDraw1.s")
void func_80A77ED0(EnIk* this, GlobalContext* globalCtx) {
}
@ -372,7 +424,7 @@ void func_80A77EDC(EnIk* this, GlobalContext* globalCtx) {
gSPSegment(oGfxCtx->polyOpa.p++, 0x09, func_80A761B0(gfxCtx, 255, 40, 0, 40, 0, 0));
gSPSegment(oGfxCtx->polyOpa.p++, 0x0A, func_80A761B0(gfxCtx, 255, 255, 255, 20, 40, 30));
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnIk_OverrideLimbDraw, EnIk_PostLimbDraw, &this->actor);
EnIk_OverrideLimbDraw1, EnIk_PostLimbDraw1, &this->actor);
CLOSE_DISPS(gfxCtx, "../z_en_ik_inConfrontion.c", 653);
}