Z2SeqMgr mostly done (#2053)

This commit is contained in:
Caroline Madsen
2024-01-29 15:50:13 -08:00
committed by GitHub
parent 36a29bc4fe
commit 16259ec265
27 changed files with 2275 additions and 525 deletions
+9 -6
View File
@@ -51,7 +51,7 @@ struct JAISoundStatus_ {
bool isDead() { return state.unk == 6;}
inline bool isPlaying() { return state.unk == 5; }
bool isPrepared() { return state.unk >= 3; }
inline bool isMute() { return field_0x0.flags.mute; }
inline bool isPaused() { return field_0x0.flags.paused; }
void pauseWhenOut() {
@@ -97,7 +97,7 @@ struct JAISoundStatus_ {
} flags;
} state;
/* 0x4 */ u32 user_data;
}; // Size: 0x6
}; // Size: 0x8
struct JAISoundFader {
void forceIn() {
@@ -236,10 +236,14 @@ public:
bool isHandleAttached() const { return handle_ != NULL; }
bool hasLifeTime() const { return status_.field_0x1.flags.flag2; }
void removeLifeTime_() { status_.field_0x1.flags.flag1 = false; }
bool isPrepared() { return status_.isPrepared(); }
void unlockIfLocked() { status_.unlockIfLocked(); }
void lockWhenPrepared() { status_.lockWhenPrepared(); }
void stop_JAISound_() {
status_.state.flags.flag5 = 0;
status_.state.flags.flag1 = 1;
}
bool isStopping() {
bool isStopping = false;
if (status_.state.flags.flag1) {
@@ -278,10 +282,9 @@ public:
return audible_ != NULL;
}
void fadeIn(u32 param_1) {
fader.fadeInFromOut(param_1);
return;
}
JAISoundFader& getFader() { return fader; }
void fadeIn(u32 i_count) { fader.fadeInFromOut(i_count); }
void fadeOut(u32 i_count) { fader.fadeOut(i_count); }
JAISoundParamsProperty& getProperty() { return params.mProperty; }
+8 -8
View File
@@ -18,32 +18,32 @@ struct JAISoundParamsProperty {
struct JAISoundParamsTransition {
struct TTransition {
void zero() {
field_0x0 = 0.0f;
mStep = 0.0f;
mCount = 0;
field_0x4 = 0.0f;
mDest = 0.0f;
}
void set(f32 newValue, f32 intensity, u32 fadeCount) {
mCount = fadeCount;
field_0x0 = (newValue - intensity) / mCount;
field_0x4 = newValue;
mStep = (newValue - intensity) / mCount;
mDest = newValue;
}
f32 apply(f32 param_0) {
if (mCount > 1) {
mCount--;
param_0 += field_0x0;
param_0 += mStep;
} else {
if (mCount == 1) {
mCount = 0;
param_0 = field_0x4;
param_0 = mDest;
}
}
return param_0;
}
/* 0x0 */ f32 field_0x0;
/* 0x4 */ f32 field_0x4;
/* 0x0 */ f32 mStep;
/* 0x4 */ f32 mDest;
/* 0x8 */ u32 mCount;
}; // Size: 0xC