Applied some Attr defines
This commit is contained in:
parent
348cdffb0e
commit
c9f46f9418
99 changed files with 15333 additions and 15096 deletions
|
|
@ -1,10 +1,10 @@
|
|||
#include "game/thpmain.h"
|
||||
#include "game/THPSimple.h"
|
||||
#include "game/hsfdraw.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/init.h"
|
||||
#include "game/process.h"
|
||||
#include "game/sprite.h"
|
||||
#include "game/THPSimple.h"
|
||||
|
||||
#include "string.h"
|
||||
|
||||
|
|
@ -25,7 +25,8 @@ static u32 THPFrame;
|
|||
static s16 THPStart;
|
||||
Process *THPProc;
|
||||
|
||||
s16 HuTHPSprCreateVol(char *path, s16 loop, s16 prio, float volume) {
|
||||
s16 HuTHPSprCreateVol(char *path, s16 loop, s16 prio, float volume)
|
||||
{
|
||||
s16 temp_r31;
|
||||
|
||||
if (THPProc) {
|
||||
|
|
@ -51,11 +52,13 @@ s16 HuTHPSprCreateVol(char *path, s16 loop, s16 prio, float volume) {
|
|||
return temp_r31;
|
||||
}
|
||||
|
||||
s16 HuTHPSprCreate(char *path, s16 loop, s16 prio) {
|
||||
s16 HuTHPSprCreate(char *path, s16 loop, s16 prio)
|
||||
{
|
||||
return HuTHPSprCreateVol(path, loop, prio, 110.0f);
|
||||
}
|
||||
|
||||
s16 HuTHP3DCreateVol(char *path, s16 loop, float volume) {
|
||||
s16 HuTHP3DCreateVol(char *path, s16 loop, float volume)
|
||||
{
|
||||
s16 temp_r31;
|
||||
|
||||
if (THPProc) {
|
||||
|
|
@ -75,27 +78,32 @@ s16 HuTHP3DCreateVol(char *path, s16 loop, float volume) {
|
|||
THPLoopF = loop;
|
||||
THPStat = 0;
|
||||
THPFrame = 0;
|
||||
Hu3DModelAttrSet(SimpleControl.unk19E, 1);
|
||||
Hu3DModelAttrSet(SimpleControl.unk19E, HU3D_ATTR_DISPOFF);
|
||||
return temp_r31;
|
||||
}
|
||||
|
||||
s16 HuTHP3DCreate(char *path, s16 loop) {
|
||||
s16 HuTHP3DCreate(char *path, s16 loop)
|
||||
{
|
||||
return HuTHP3DCreateVol(path, loop, 110.0f);
|
||||
}
|
||||
|
||||
void HuTHPStop(void) {
|
||||
void HuTHPStop(void)
|
||||
{
|
||||
THPStat = 1;
|
||||
}
|
||||
|
||||
void HuTHPClose(void) {
|
||||
void HuTHPClose(void)
|
||||
{
|
||||
THPStat = 2;
|
||||
}
|
||||
|
||||
void HuTHPRestart(void) {
|
||||
void HuTHPRestart(void)
|
||||
{
|
||||
THPStat = 3;
|
||||
}
|
||||
|
||||
BOOL HuTHPEndCheck(void) {
|
||||
BOOL HuTHPEndCheck(void)
|
||||
{
|
||||
s32 temp_r31;
|
||||
|
||||
temp_r31 = THPSimpleGetTotalFrame() - 1;
|
||||
|
|
@ -105,19 +113,23 @@ BOOL HuTHPEndCheck(void) {
|
|||
return (temp_r31 <= THPFrame);
|
||||
}
|
||||
|
||||
s32 HuTHPFrameGet(void) {
|
||||
s32 HuTHPFrameGet(void)
|
||||
{
|
||||
return THPFrame;
|
||||
}
|
||||
|
||||
s32 HuTHPTotalFrameGet(void) {
|
||||
s32 HuTHPTotalFrameGet(void)
|
||||
{
|
||||
return THPSimpleGetTotalFrame();
|
||||
}
|
||||
|
||||
void HuTHPSetVolume(s32 left, s32 right) {
|
||||
void HuTHPSetVolume(s32 left, s32 right)
|
||||
{
|
||||
THPSimpleSetVolume(left, right);
|
||||
}
|
||||
|
||||
static void THPTestProc(void) {
|
||||
static void THPTestProc(void)
|
||||
{
|
||||
s32 temp_r29;
|
||||
u32 var_r28;
|
||||
void *temp_r30;
|
||||
|
|
@ -146,8 +158,9 @@ static void THPTestProc(void) {
|
|||
decodeRate = 0;
|
||||
THPStart = 1;
|
||||
if (SimpleControl.unk19C == 1) {
|
||||
Hu3DModelAttrReset(SimpleControl.unk19E, 1);
|
||||
} else {
|
||||
Hu3DModelAttrReset(SimpleControl.unk19E, HU3D_ATTR_DISPOFF);
|
||||
}
|
||||
else {
|
||||
HuSprAttrReset(SimpleControl.unk19E, 0, 4);
|
||||
}
|
||||
while (1) {
|
||||
|
|
@ -182,7 +195,8 @@ static void THPTestProc(void) {
|
|||
}
|
||||
if (SimpleControl.unk19C == 1) {
|
||||
Hu3DModelKill(SimpleControl.unk19E);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
HuSprKill(SimpleControl.unk19E);
|
||||
}
|
||||
OSCancelThread(decodeThread);
|
||||
|
|
@ -199,18 +213,21 @@ static void THPTestProc(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static void THPViewFunc(ModelData *arg0, Mtx arg1) {
|
||||
static void THPViewFunc(ModelData *arg0, Mtx arg1)
|
||||
{
|
||||
GXColor spC = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
|
||||
if (THPStart != 0) {
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXSetCullMode(GX_CULL_NONE);
|
||||
THPFrame = THPSimpleDrawCurrentFrame(RenderMode, &spC, arg1, -audioTrack.unk00 / 2, audioTrack.unk04 / 2, audioTrack.unk00, -audioTrack.unk04);
|
||||
THPFrame
|
||||
= THPSimpleDrawCurrentFrame(RenderMode, &spC, arg1, -audioTrack.unk00 / 2, audioTrack.unk04 / 2, audioTrack.unk00, -audioTrack.unk04);
|
||||
THPSimpleAudioStart();
|
||||
}
|
||||
}
|
||||
|
||||
static void THPViewSprFunc(HuSprite *arg0) {
|
||||
static void THPViewSprFunc(HuSprite *arg0)
|
||||
{
|
||||
Vec spC = { 0.0f, 0.0f, 1.0f };
|
||||
GXColor sp8;
|
||||
s32 temp_r30;
|
||||
|
|
@ -227,19 +244,21 @@ static void THPViewSprFunc(HuSprite *arg0) {
|
|||
PSMTXRotAxisRad(sp18, &spC, MTXDegToRad(arg0->z_rot));
|
||||
PSMTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f);
|
||||
PSMTXConcat(sp18, sp48, sp48);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
PSMTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f);
|
||||
}
|
||||
mtxTransCat(sp48, arg0->x, arg0->y, 0.0f);
|
||||
PSMTXConcat(*arg0->group_mtx, sp48, sp48);
|
||||
temp_r30 = -((s32) audioTrack.unk00 / 2);
|
||||
temp_r29 = -((s32) audioTrack.unk04 / 2);
|
||||
temp_r30 = -((s32)audioTrack.unk00 / 2);
|
||||
temp_r29 = -((s32)audioTrack.unk04 / 2);
|
||||
GXSetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE);
|
||||
THPFrame = THPSimpleDrawCurrentFrame(RenderMode, &sp8, sp48, temp_r30, temp_r29, audioTrack.unk00, audioTrack.unk04);
|
||||
}
|
||||
}
|
||||
|
||||
static void THPDecodeFunc(void *param) {
|
||||
static void THPDecodeFunc(void *param)
|
||||
{
|
||||
while (1) {
|
||||
if (THPStat == 2) {
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue