Skip to content

Library/Se/Project: Implement SePlayParam - #1318

Open
c4nvm wants to merge 1 commit into
MonsterDruide1:masterfrom
c4nvm:decomp/se-play-param
Open

Library/Se/Project: Implement SePlayParam#1318
c4nvm wants to merge 1 commit into
MonsterDruide1:masterfrom
c4nvm:decomp/se-play-param

Conversation

@c4nvm

@c4nvm c4nvm commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

implements all of SePlayParam.o for #2034. ctor, reset, set, setMul, plus the header and cpp.

al::SePlayParam is a 12 byte SE param entry: SePlayParamType mType (0x0), f32 mValue (0x4, default 1.0f), f32 mValue2 (0x8, default 0.0f). ctor and reset default to invalid/1.0/0.0, set overwrites all three, setMul swaps type + mValue2 and multiplies mValue.

enum comes from the switch in conveyParamListToHandle, which maps each type to an AcLSoundHandle setter. that's what tells me mValue is the main operand and mValue2 is the secondary index for the seq variable and biquad cases. invalid(0), volume(1), pitch(2), seqTempoRatio(3), effectSend(4), seqLocalVariable(5), seqGlobalVariable(6), lpfFreq(7), biquadFilter(8).

setMul needed an explicit temp float or the multiply wouldn't match. method/class names are from mangled symbols, field and enum names are inferred so flag anything off.


This change is Reviewable


Report for 1.0 (ae6bf40 - 4f8b41d)

📈 Matched code: 15.32% (+0.00%, +72 bytes)

✅ 4 new matches
Unit Item Bytes Before After
Library/Se/Project/SePlayParam al::SePlayParam::setMul(al::SePlayParamType, float, float) +24 0.00% 100.00%
Library/Se/Project/SePlayParam al::SePlayParam::SePlayParam() +16 0.00% 100.00%
Library/Se/Project/SePlayParam al::SePlayParam::reset() +16 0.00% 100.00%
Library/Se/Project/SePlayParam al::SePlayParam::set(al::SePlayParamType, float, float) +16 0.00% 100.00%

@github-actions github-actions Bot added the status:waiting for review This PR is ready to take the first or another look at it! label Jul 21, 2026

@MonsterDruide1 MonsterDruide1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MonsterDruide1 reviewed 3 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on c4nvm and MonsterDruide1).


lib/al/Library/Se/Project/SePlayParam.h line 7 at r1 (raw file):

namespace al {

enum class SePlayParamType {

TODO: check this


lib/al/Library/Se/Project/SePlayParam.cpp line 13 at r1 (raw file):

    mValue = 1.0f;
    mValue2 = 0.0f;
}

... and put those default values in the header.
Not sure if this matches.

Suggestion:

SePlayParam::SePlayParam() = default;

void SePlayParam::reset() {
    *this = {};
}

lib/al/Library/Se/Project/SePlayParam.cpp line 25 at r1 (raw file):

    mType = type;
    mValue2 = value2;
    mValue = mul;

might match, not sure

Suggestion:

    mType = type;
    mValue *= mul;
    mValue2 = value2;

@MonsterDruide1 MonsterDruide1 changed the title implement Library/Se/Project/SePlayParam.o Library/Se/Project: Implement SePlayParam Jul 23, 2026
@github-actions github-actions Bot added status:waiting for author Reviews have shown that the author of this PR needs to change some things. and removed status:waiting for review This PR is ready to take the first or another look at it! labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:waiting for author Reviews have shown that the author of this PR needs to change some things.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants