1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00

Fix ovl_Demo_Go non matchings (2/3 matched)

`z_demo_go.c` is now functionally equivalent and almost fully matched.

Note that I added a Vec3i struct in `z64actor.h` now used in `CsCmdActorAction`.

Also fixed some missing VT codes in various actor strings.
This commit is contained in:
Roman971 2020-03-18 21:21:45 +01:00
parent 436aa85d39
commit 373dc7d2d8
7 changed files with 58 additions and 211 deletions

View file

@ -1,67 +0,0 @@
glabel func_8097CB0C
/* 0029C 8097CB0C 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0
/* 002A0 8097CB10 AFBF0014 */ sw $ra, 0x0014($sp)
/* 002A4 8097CB14 AFA40040 */ sw $a0, 0x0040($sp)
/* 002A8 8097CB18 90AE1D6C */ lbu $t6, 0x1D6C($a1) ## 00001D6C
/* 002AC 8097CB1C 51C00037 */ beql $t6, $zero, .L8097CBFC
/* 002B0 8097CB20 8FBF0014 */ lw $ra, 0x0014($sp)
/* 002B4 8097CB24 0C25F21C */ jal func_8097C870
/* 002B8 8097CB28 AFA50044 */ sw $a1, 0x0044($sp)
/* 002BC 8097CB2C 8FA50044 */ lw $a1, 0x0044($sp)
/* 002C0 8097CB30 00027880 */ sll $t7, $v0, 2
/* 002C4 8097CB34 24A71D64 */ addiu $a3, $a1, 0x1D64 ## $a3 = 00001D64
/* 002C8 8097CB38 00EFC021 */ addu $t8, $a3, $t7
/* 002CC 8097CB3C 8F030028 */ lw $v1, 0x0028($t8) ## 00000028
/* 002D0 8097CB40 5060002E */ beql $v1, $zero, .L8097CBFC
/* 002D4 8097CB44 8FBF0014 */ lw $ra, 0x0014($sp)
/* 002D8 8097CB48 94640004 */ lhu $a0, 0x0004($v1) ## 00000004
/* 002DC 8097CB4C 94650002 */ lhu $a1, 0x0002($v1) ## 00000002
/* 002E0 8097CB50 94E60010 */ lhu $a2, 0x0010($a3) ## 00001D74
/* 002E4 8097CB54 0C01BE4F */ jal func_8006F93C
/* 002E8 8097CB58 AFA30030 */ sw $v1, 0x0030($sp)
/* 002EC 8097CB5C 8FA30030 */ lw $v1, 0x0030($sp)
/* 002F0 8097CB60 8FA50040 */ lw $a1, 0x0040($sp)
/* 002F4 8097CB64 8C680010 */ lw $t0, 0x0010($v1) ## 00000010
/* 002F8 8097CB68 8C79000C */ lw $t9, 0x000C($v1) ## 0000000C
/* 002FC 8097CB6C 8C6A0018 */ lw $t2, 0x0018($v1) ## 00000018
/* 00300 8097CB70 8C690014 */ lw $t1, 0x0014($v1) ## 00000014
/* 00304 8097CB74 44883000 */ mtc1 $t0, $f6 ## $f6 = 0.00
/* 00308 8097CB78 8C6C0020 */ lw $t4, 0x0020($v1) ## 00000020
/* 0030C 8097CB7C 44992000 */ mtc1 $t9, $f4 ## $f4 = 0.00
/* 00310 8097CB80 8C6B001C */ lw $t3, 0x001C($v1) ## 0000001C
/* 00314 8097CB84 448A5000 */ mtc1 $t2, $f10 ## $f10 = 0.00
/* 00318 8097CB88 46803320 */ cvt.s.w $f12, $f6
/* 0031C 8097CB8C 44894000 */ mtc1 $t1, $f8 ## $f8 = 0.00
/* 00320 8097CB90 448C3000 */ mtc1 $t4, $f6 ## $f6 = 0.00
/* 00324 8097CB94 24A20024 */ addiu $v0, $a1, 0x0024 ## $v0 = 00000024
/* 00328 8097CB98 468020A0 */ cvt.s.w $f2, $f4
/* 0032C 8097CB9C 448B2000 */ mtc1 $t3, $f4 ## $f4 = 0.00
/* 00330 8097CBA0 46805420 */ cvt.s.w $f16, $f10
/* 00334 8097CBA4 468043A0 */ cvt.s.w $f14, $f8
/* 00338 8097CBA8 46803220 */ cvt.s.w $f8, $f6
/* 0033C 8097CBAC 468024A0 */ cvt.s.w $f18, $f4
/* 00340 8097CBB0 E7A80018 */ swc1 $f8, 0x0018($sp)
/* 00344 8097CBB4 46028281 */ sub.s $f10, $f16, $f2
/* 00348 8097CBB8 460C9201 */ sub.s $f8, $f18, $f12
/* 0034C 8097CBBC 46005102 */ mul.s $f4, $f10, $f0
/* 00350 8097CBC0 00000000 */ nop
/* 00354 8097CBC4 46004282 */ mul.s $f10, $f8, $f0
/* 00358 8097CBC8 46022180 */ add.s $f6, $f4, $f2
/* 0035C 8097CBCC 460C5100 */ add.s $f4, $f10, $f12
/* 00360 8097CBD0 E4460000 */ swc1 $f6, 0x0000($v0) ## 00000024
/* 00364 8097CBD4 E4440004 */ swc1 $f4, 0x0004($v0) ## 00000028
/* 00368 8097CBD8 C7A60018 */ lwc1 $f6, 0x0018($sp)
/* 0036C 8097CBDC 460E3201 */ sub.s $f8, $f6, $f14
/* 00370 8097CBE0 46004282 */ mul.s $f10, $f8, $f0
/* 00374 8097CBE4 460E5100 */ add.s $f4, $f10, $f14
/* 00378 8097CBE8 E4440008 */ swc1 $f4, 0x0008($v0) ## 0000002C
/* 0037C 8097CBEC 84640008 */ lh $a0, 0x0008($v1) ## 00000008
/* 00380 8097CBF0 A4A400B6 */ sh $a0, 0x00B6($a1) ## 000000B6
/* 00384 8097CBF4 A444000E */ sh $a0, 0x000E($v0) ## 00000032
/* 00388 8097CBF8 8FBF0014 */ lw $ra, 0x0014($sp)
.L8097CBFC:
/* 0038C 8097CBFC 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000
/* 00390 8097CC00 03E00008 */ jr $ra
/* 00394 8097CC04 00000000 */ nop

View file

@ -1,95 +0,0 @@
.rdata
glabel D_8097D4CC
.asciz "../z_demo_go.c"
.balign 4
glabel D_8097D4DC
.asciz "../z_demo_go.c"
.balign 4
.text
glabel func_8097D29C
/* 00A2C 8097D29C 27BDFFA0 */ addiu $sp, $sp, 0xFFA0 ## $sp = FFFFFFA0
/* 00A30 8097D2A0 AFBF0024 */ sw $ra, 0x0024($sp)
/* 00A34 8097D2A4 AFA40060 */ sw $a0, 0x0060($sp)
/* 00A38 8097D2A8 AFA50064 */ sw $a1, 0x0064($sp)
/* 00A3C 8097D2AC 84820190 */ lh $v0, 0x0190($a0) ## 00000190
/* 00A40 8097D2B0 3C188098 */ lui $t8, %hi(D_8097D440) ## $t8 = 80980000
/* 00A44 8097D2B4 3C068098 */ lui $a2, %hi(D_8097D4CC) ## $a2 = 80980000
/* 00A48 8097D2B8 00027880 */ sll $t7, $v0, 2
/* 00A4C 8097D2BC 030FC021 */ addu $t8, $t8, $t7
/* 00A50 8097D2C0 8F18D440 */ lw $t8, %lo(D_8097D440)($t8)
/* 00A54 8097D2C4 24C6D4CC */ addiu $a2, $a2, %lo(D_8097D4CC) ## $a2 = 8097D4CC
/* 00A58 8097D2C8 27A40038 */ addiu $a0, $sp, 0x0038 ## $a0 = FFFFFFD8
/* 00A5C 8097D2CC AFB80050 */ sw $t8, 0x0050($sp)
/* 00A60 8097D2D0 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000
/* 00A64 8097D2D4 240702DC */ addiu $a3, $zero, 0x02DC ## $a3 = 000002DC
/* 00A68 8097D2D8 0C031AB1 */ jal func_800C6AC4
/* 00A6C 8097D2DC AFA50048 */ sw $a1, 0x0048($sp)
/* 00A70 8097D2E0 8FA90064 */ lw $t1, 0x0064($sp)
/* 00A74 8097D2E4 0C024F46 */ jal func_80093D18
/* 00A78 8097D2E8 8D240000 */ lw $a0, 0x0000($t1) ## 00000000
/* 00A7C 8097D2EC 8FA80048 */ lw $t0, 0x0048($sp)
/* 00A80 8097D2F0 8FA40050 */ lw $a0, 0x0050($sp)
/* 00A84 8097D2F4 3C058016 */ lui $a1, 0x8016 ## $a1 = 80160000
/* 00A88 8097D2F8 8D0302C0 */ lw $v1, 0x02C0($t0) ## 000002C0
/* 00A8C 8097D2FC 00046100 */ sll $t4, $a0, 4
/* 00A90 8097D300 000C6F02 */ srl $t5, $t4, 28
/* 00A94 8097D304 3C0BDB06 */ lui $t3, 0xDB06 ## $t3 = DB060000
/* 00A98 8097D308 246A0008 */ addiu $t2, $v1, 0x0008 ## $t2 = 00000008
/* 00A9C 8097D30C 356B0020 */ ori $t3, $t3, 0x0020 ## $t3 = DB060020
/* 00AA0 8097D310 000D7080 */ sll $t6, $t5, 2
/* 00AA4 8097D314 24A56FA8 */ addiu $a1, $a1, 0x6FA8 ## $a1 = 80166FA8
/* 00AA8 8097D318 AD0A02C0 */ sw $t2, 0x02C0($t0) ## 000002C0
/* 00AAC 8097D31C 00AE7821 */ addu $t7, $a1, $t6
/* 00AB0 8097D320 AC6B0000 */ sw $t3, 0x0000($v1) ## 00000000
/* 00AB4 8097D324 8DF80000 */ lw $t8, 0x0000($t7) ## 00000000
/* 00AB8 8097D328 3C0600FF */ lui $a2, 0x00FF ## $a2 = 00FF0000
/* 00ABC 8097D32C 34C6FFFF */ ori $a2, $a2, 0xFFFF ## $a2 = 00FFFFFF
/* 00AC0 8097D330 0086C824 */ and $t9, $a0, $a2
/* 00AC4 8097D334 3C078000 */ lui $a3, 0x8000 ## $a3 = 80000000
/* 00AC8 8097D338 03194821 */ addu $t1, $t8, $t9
/* 00ACC 8097D33C 01275021 */ addu $t2, $t1, $a3
/* 00AD0 8097D340 AC6A0004 */ sw $t2, 0x0004($v1) ## 00000004
/* 00AD4 8097D344 8D0302C0 */ lw $v1, 0x02C0($t0) ## 000002C0
/* 00AD8 8097D348 3C040601 */ lui $a0, 0x0601 ## $a0 = 06010000
/* 00ADC 8097D34C 2484E680 */ addiu $a0, $a0, 0xE680 ## $a0 = 0600E680
/* 00AE0 8097D350 00046900 */ sll $t5, $a0, 4
/* 00AE4 8097D354 000D7702 */ srl $t6, $t5, 28
/* 00AE8 8097D358 3C0CDB06 */ lui $t4, 0xDB06 ## $t4 = DB060000
/* 00AEC 8097D35C 246B0008 */ addiu $t3, $v1, 0x0008 ## $t3 = 00000008
/* 00AF0 8097D360 358C0024 */ ori $t4, $t4, 0x0024 ## $t4 = DB060024
/* 00AF4 8097D364 000E7880 */ sll $t7, $t6, 2
/* 00AF8 8097D368 AD0B02C0 */ sw $t3, 0x02C0($t0) ## 000002C0
/* 00AFC 8097D36C 00AFC021 */ addu $t8, $a1, $t7
/* 00B00 8097D370 AC6C0000 */ sw $t4, 0x0000($v1) ## 00000000
/* 00B04 8097D374 8F190000 */ lw $t9, 0x0000($t8) ## 00000000
/* 00B08 8097D378 00864824 */ and $t1, $a0, $a2
/* 00B0C 8097D37C 03295021 */ addu $t2, $t9, $t1
/* 00B10 8097D380 01475821 */ addu $t3, $t2, $a3
/* 00B14 8097D384 AC6B0004 */ sw $t3, 0x0004($v1) ## 00000004
/* 00B18 8097D388 8FA30060 */ lw $v1, 0x0060($sp)
/* 00B1C 8097D38C 8FA40064 */ lw $a0, 0x0064($sp)
/* 00B20 8097D390 2462014C */ addiu $v0, $v1, 0x014C ## $v0 = 0000014C
/* 00B24 8097D394 8C450004 */ lw $a1, 0x0004($v0) ## 00000150
/* 00B28 8097D398 8C460020 */ lw $a2, 0x0020($v0) ## 0000016C
/* 00B2C 8097D39C 90470002 */ lbu $a3, 0x0002($v0) ## 0000014E
/* 00B30 8097D3A0 AFA00014 */ sw $zero, 0x0014($sp)
/* 00B34 8097D3A4 AFA00010 */ sw $zero, 0x0010($sp)
/* 00B38 8097D3A8 0C0286B2 */ jal func_800A1AC8
/* 00B3C 8097D3AC AFA30018 */ sw $v1, 0x0018($sp)
/* 00B40 8097D3B0 8FAC0064 */ lw $t4, 0x0064($sp)
/* 00B44 8097D3B4 3C068098 */ lui $a2, %hi(D_8097D4DC) ## $a2 = 80980000
/* 00B48 8097D3B8 24C6D4DC */ addiu $a2, $a2, %lo(D_8097D4DC) ## $a2 = 8097D4DC
/* 00B4C 8097D3BC 27A40038 */ addiu $a0, $sp, 0x0038 ## $a0 = FFFFFFD8
/* 00B50 8097D3C0 240702EA */ addiu $a3, $zero, 0x02EA ## $a3 = 000002EA
/* 00B54 8097D3C4 0C031AD5 */ jal func_800C6B54
/* 00B58 8097D3C8 8D850000 */ lw $a1, 0x0000($t4) ## 00000000
/* 00B5C 8097D3CC 8FBF0024 */ lw $ra, 0x0024($sp)
/* 00B60 8097D3D0 27BD0060 */ addiu $sp, $sp, 0x0060 ## $sp = 00000000
/* 00B64 8097D3D4 03E00008 */ jr $ra
/* 00B68 8097D3D8 00000000 */ nop

View file

@ -13,6 +13,11 @@ struct GlobalContext;
// From z64light.h // From z64light.h
struct LightMapper; struct LightMapper;
typedef struct
{
f32 x, y;
} Vec2f;
typedef struct typedef struct
{ {
f32 x, y, z; f32 x, y, z;
@ -25,13 +30,8 @@ typedef struct
typedef struct typedef struct
{ {
f32 x, y; s32 x, y, z;
} Vec2f; } Vec3i;
typedef struct
{
u32 x, y;
} Vec2i;
typedef struct typedef struct
{ {

View file

@ -83,9 +83,9 @@ typedef struct
/* 0x02 */ u16 startFrame; /* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame; /* 0x04 */ u16 endFrame;
/* 0x06 */ Vec3s rot; /* 0x06 */ Vec3s rot;
/* 0x0C */ Vec3f startPos; /* 0x0C */ Vec3i startPos;
/* 0x18 */ Vec3f endPos; /* 0x18 */ Vec3i endPos;
/* 0x24 */ Vec3f normal; /* 0x24 */ Vec3i normal;
} CsCmdActorAction; // size = 0x30 } CsCmdActorAction; // size = 0x30
typedef enum typedef enum

View file

@ -6,6 +6,8 @@
#include "z_demo_go.h" #include "z_demo_go.h"
#include <vt.h>
#define ROOM 0x00 #define ROOM 0x00
#define FLAGS 0x00000010 #define FLAGS 0x00000010
@ -25,7 +27,7 @@ void func_8097D130(DemoGo* this, GlobalContext* globalCtx);
void func_8097D290(DemoGo* this, GlobalContext* globalCtx); void func_8097D290(DemoGo* this, GlobalContext* globalCtx);
void func_8097D29C(DemoGo* this, GlobalContext* globalCtx); void func_8097D29C(DemoGo* this, GlobalContext* globalCtx);
u32 D_8097D440[] = {0x0600CE80, 0x0600D280, 0x0600D680}; UNK_PTR D_8097D440[] = {0x0600CE80, 0x0600D280, 0x0600D680};
ActorFunc D_8097D44C[] = ActorFunc D_8097D44C[] =
{ {
@ -58,9 +60,10 @@ const ActorInit Demo_Go_InitVars =
(ActorFunc)DemoGo_Draw, (ActorFunc)DemoGo_Draw,
}; };
extern u32 D_060029A8; extern UNK_TYPE D_060029A8;
extern u32 D_0600FEF0; extern UNK_TYPE D_06004930;
extern u32 D_06004930; extern UNK_TYPE D_0600E680;
extern UNK_TYPE D_0600FEF0;
UNK_TYPE func_8097C870(DemoGo *this) UNK_TYPE func_8097C870(DemoGo *this)
{ {
@ -149,33 +152,36 @@ void func_8097CA78(DemoGo* this, GlobalContext* globalCtx)
func_8097C9B8(this); func_8097C9B8(this);
} }
// Not equivalent, I believe in part due to actorAction->endPos being the wrong type, holding floats instead of ints void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx)
#ifdef NON_MATCHING {
void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx) {
Actor* thisx = &this->actor; Actor* thisx = &this->actor;
PosRot* posRot = &thisx->posRot;
CutsceneContext* csCtx = &globalCtx->csCtx; CutsceneContext* csCtx = &globalCtx->csCtx;
Vec3f startPos;
f32 temp_ret;
CsCmdActorAction* actorAction; CsCmdActorAction* actorAction;
f32 temp_ret;
s32 pad;
Vec3f startPos;
Vec3f endPos;
if (globalCtx->csCtx.state != 0) if (globalCtx->csCtx.state != 0)
{ {
actorAction = csCtx->actorActions[func_8097C870(this)]; actorAction = csCtx->actorActions[func_8097C870(this)];
if (actorAction != 0) if (actorAction != NULL)
{ {
temp_ret = func_8006F93C(actorAction->endFrame, actorAction->startFrame, csCtx->frames); temp_ret = func_8006F93C(actorAction->endFrame, actorAction->startFrame, csCtx->frames);
startPos = actorAction->startPos; startPos.x = actorAction->startPos.x;
thisx->posRot.pos.x = (((actorAction->endPos.x - startPos.x) * temp_ret) + startPos.x); startPos.y = actorAction->startPos.y;
thisx->posRot.pos.y = (((actorAction->endPos.y - startPos.y) * temp_ret) + startPos.y); startPos.z = actorAction->startPos.z;
thisx->posRot.pos.z = (((actorAction->endPos.z - startPos.z) * temp_ret) + startPos.z); endPos.x = actorAction->endPos.x;
thisx->shape.rot.y = actorAction->rot.y; endPos.y = actorAction->endPos.y;
thisx->posRot.rot.y = actorAction->rot.y; endPos.z = actorAction->endPos.z;
posRot->pos.x = (((endPos.x - startPos.x) * temp_ret) + startPos.x);
posRot->pos.y = (((endPos.y - startPos.y) * temp_ret) + startPos.y);
posRot->pos.z = (((endPos.z - startPos.z) * temp_ret) + startPos.z);
posRot->rot.y = thisx->shape.rot.y = actorAction->rot.y;
} }
} }
} }
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Go/func_8097CB0C.s")
#endif
void func_8097CC08(DemoGo* this) void func_8097CC08(DemoGo* this)
{ {
@ -207,7 +213,7 @@ void func_8097CCE0(DemoGo* this, GlobalContext* globalCtx)
if (globalCtx->csCtx.state != 0) if (globalCtx->csCtx.state != 0)
{ {
actorAction = globalCtx->csCtx.actorActions[func_8097C870(this)]; actorAction = globalCtx->csCtx.actorActions[func_8097C870(this)];
if (actorAction != 0) if (actorAction != NULL)
{ {
thisRotY = thisx->posRot.rot.y; thisRotY = thisx->posRot.rot.y;
rotYDelta = actorAction->rot.y - thisRotY; rotYDelta = actorAction->rot.y - thisRotY;
@ -234,15 +240,15 @@ UNK_TYPE DemoGo_FrameUpdateMatrix(DemoGo* this)
return SkelAnime_FrameUpdateMatrix(&this->skelAnime); return SkelAnime_FrameUpdateMatrix(&this->skelAnime);
} }
// This is probably at least close to equivalent but not necessarily so
#ifdef NON_MATCHING #ifdef NON_MATCHING
UNK_TYPE func_8097CDB0(DemoGo* this, GlobalContext* globalCtx, u16 csCmdActorAction) // return value isn't produced in the same way
s32 func_8097CDB0(DemoGo* this, GlobalContext* globalCtx, u16 csCmdActorAction)
{ {
CutsceneContext* csCtx = &globalCtx->csCtx; CutsceneContext* csCtx = &globalCtx->csCtx;
CsCmdActorAction* actorAction = csCtx->actorActions[func_8097C870(this)]; CsCmdActorAction* actorAction = csCtx->actorActions[func_8097C870(this)];
if (csCtx->state != 0) if (csCtx->state != 0)
{ {
if (actorAction != 0 && actorAction->action == csCmdActorAction) if (actorAction != NULL && actorAction->action == csCmdActorAction)
{ {
return 1; return 1;
} }
@ -277,7 +283,7 @@ void func_8097CE78(DemoGo* this, GlobalContext* globalCtx)
if (globalCtx->csCtx.state != 0) if (globalCtx->csCtx.state != 0)
{ {
actorAction = csCtx->actorActions[func_8097C870(this)]; actorAction = csCtx->actorActions[func_8097C870(this)];
if (actorAction != 0 && csCtx->frames >= actorAction->endFrame) if (actorAction != NULL && csCtx->frames >= actorAction->endFrame)
{ {
func_8097CA78(this, globalCtx); func_8097CA78(this, globalCtx);
this->action = 3; this->action = 3;
@ -369,7 +375,7 @@ void DemoGo_Update(DemoGo* this, GlobalContext* globalCtx)
{ {
if (this->action < 0 || this->action >= 7 || D_8097D44C[this->action] == 0) if (this->action < 0 || this->action >= 7 || D_8097D44C[this->action] == 0)
{ {
osSyncPrintf("メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n"); osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return; return;
} }
D_8097D44C[this->action](this, globalCtx); D_8097D44C[this->action](this, globalCtx);
@ -391,32 +397,31 @@ void func_8097D290(DemoGo* this, GlobalContext* globalCtx)
} }
// Not equivalent yet - the gSPSegment calls are probably the main issue
#ifdef NON_MATCHING
extern u32 D_0600E680;
void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) void func_8097D29C(DemoGo* this, GlobalContext* globalCtx)
{ {
u32 addr = D_8097D440[this->unk_190]; s32 pad;
GraphicsContext* gfxCtx = &globalCtx->state.gfxCtx; s16 temp = this->unk_190;
SkelAnime* skelAnime = &this->skelAnime;
void* srcSegment8 = D_8097D440[temp];
void* srcSegment9 = &D_0600E680;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* gfxArr[4]; Gfx* gfxArr[4];
func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 732); func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 732);
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8));
gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9));
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); func_800A1AC8(globalCtx, skelAnime->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL, &this->actor);
gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(D_0600E680));
func_800A1AC8(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0, 0, &this->actor);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 746); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 746);
} }
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Go/func_8097D29C.s")
#endif
void DemoGo_Draw(DemoGo* this, GlobalContext* globalCtx) { void DemoGo_Draw(DemoGo* this, GlobalContext* globalCtx) {
if (this->drawConfig < 0 || this->drawConfig >= 2 || D_8097D468[this->drawConfig] == 0) if (this->drawConfig < 0 || this->drawConfig >= 2 || D_8097D468[this->drawConfig] == 0)
{ {
osSyncPrintf("描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n"); osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST);
return; return;
} }
D_8097D468[this->drawConfig](this, globalCtx); D_8097D468[this->drawConfig](this, globalCtx);

View file

@ -7,6 +7,8 @@
#include <ultra64.h> #include <ultra64.h>
#include <global.h> #include <global.h>
#include <vt.h>
//temp struct until we can reference other actors outside of their file //temp struct until we can reference other actors outside of their file
typedef struct typedef struct
{ {
@ -56,7 +58,7 @@ static void EnAnubiceTag_Init(EnAnubiceTag* this, GlobalContext* globalCtx)
{ {
osSyncPrintf("\n\n"); osSyncPrintf("\n\n");
//"Anubis control tag generated" //"Anubis control tag generated"
osSyncPrintf("☆☆☆☆☆ アヌビス制御タグ発生 ☆☆☆☆☆ %d\n", this->actor.params); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ アヌビス制御タグ発生 ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
if (this->actor.params < (s16)0xFFFF) if (this->actor.params < (s16)0xFFFF)
{ {

View file

@ -7,6 +7,8 @@
#include <ultra64.h> #include <ultra64.h>
#include <global.h> #include <global.h>
#include <vt.h>
typedef struct typedef struct
{ {
/* 0x0000 */ Actor actor; /* 0x0000 */ Actor actor;
@ -58,7 +60,7 @@ static void EnOkarinaEffect_Init(EnOkarinaEffect* this, GlobalContext* globalCtx
{ {
osSyncPrintf("\n\n"); osSyncPrintf("\n\n");
//"Ocarina Storm Effect" //"Ocarina Storm Effect"
osSyncPrintf("☆☆☆☆☆ オカリナあらし効果ビカビカビカ〜 ☆☆☆☆☆ \n"); osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ オカリナあらし効果ビカビカビカ〜 ☆☆☆☆☆ \n" VT_RST);
osSyncPrintf("\n\n"); osSyncPrintf("\n\n");
if (globalCtx->unk_10B12[1] != 0) if (globalCtx->unk_10B12[1] != 0)
{ {