Cosmetics Editor entry for Ivan the Fairy (#3718)

* First commit

* Reverted MODDING.md

Reverted a correction to MODDING.md (case-sensitive broken link?) as this is not a change related to this PR

* Delete CMakeSettings.json

Deleted CMakeSettings.json as this is not a change related to this PR.

* checks for cosmetic changes ONCE for both body and sparles

Please review carefully. I made these changes blindly as I figure out why I can't compile it in my machine anymore. Sorry!

* correctly updates OUTER color when it's changed in Cosmetics Editor

* Update soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp

* Update soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp

* Update soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp

* Update soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp

* Update soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp

* Update soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c

* Update soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c

* Update soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c

Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>

* Update soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c

---------

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
This commit is contained in:
skyyoshi86 2024-02-01 19:44:16 -07:00 committed by GitHub
parent ddf0392100
commit 351a511dc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 31 additions and 1 deletions

View File

@ -188,4 +188,4 @@ Assuming all went well, you can now push your changes to your fork with the foll
```bash
git push origin <YOUR BRANCH NAME>
```
```

View File

@ -76,6 +76,7 @@ typedef enum {
GROUP_SPIN_ATTACK,
GROUP_TRAILS,
GROUP_NAVI,
GROUP_IVAN,
} CosmeticGroup;
std::map<CosmeticGroup, const char*> groupLabels = {
@ -95,6 +96,7 @@ std::map<CosmeticGroup, const char*> groupLabels = {
{ GROUP_SPIN_ATTACK, "Spin Attack" },
{ GROUP_TRAILS, "Trails" },
{ GROUP_NAVI, "Navi" },
{ GROUP_IVAN, "Ivan" }
};
typedef struct {
@ -350,6 +352,9 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
COSMETIC_OPTION("Navi_EnemySecondary", "Enemy Secondary", GROUP_NAVI, ImVec4(200, 155, 0, 0), false, true, true),
COSMETIC_OPTION("Navi_PropsPrimary", "Props Primary", GROUP_NAVI, ImVec4( 0, 255, 0, 255), false, true, false),
COSMETIC_OPTION("Navi_PropsSecondary", "Props Secondary", GROUP_NAVI, ImVec4( 0, 255, 0, 0), false, true, true),
COSMETIC_OPTION("Ivan_IdlePrimary", "Ivan Idle Primary", GROUP_IVAN, ImVec4(255, 255, 255, 255), false, true, false),
COSMETIC_OPTION("Ivan_IdleSecondary", "Ivan Idle Secondary", GROUP_IVAN, ImVec4( 0, 255, 0, 255), false, true, true),
COSMETIC_OPTION("NPC_FireKeesePrimary", "Fire Keese Primary", GROUP_NPC, ImVec4(255, 255, 255, 255), false, true, false),
COSMETIC_OPTION("NPC_FireKeeseSecondary", "Fire Keese Secondary", GROUP_NPC, ImVec4(255, 255, 255, 255), false, true, true),
@ -1660,6 +1665,8 @@ void RandomizeColor(CosmeticOption& cosmeticOption) {
CopyMultipliedColor(cosmeticOption, cosmeticOptions.at("Navi_NPCSecondary"), 1.0f);
} else if (cosmeticOption.label == "Props Primary") {
CopyMultipliedColor(cosmeticOption, cosmeticOptions.at("Navi_PropsSecondary"), 1.0f);
} else if (cosmeticOption.label == "Ivan Idle Primary") {
CopyMultipliedColor(cosmeticOption, cosmeticOptions.at("Ivan_IdleSecondary"), 0.5f);
} else if (cosmeticOption.label == "Level 1 Secondary") {
CopyMultipliedColor(cosmeticOption, cosmeticOptions.at("SpinAttack_Level1Primary"), 2.0f);
} else if (cosmeticOption.label == "Level 2 Secondary") {
@ -1892,6 +1899,7 @@ void CosmeticsEditorWindow::DrawElement() {
if (ImGui::BeginTabItem("World & NPCs")) {
DrawCosmeticGroup(GROUP_WORLD);
DrawCosmeticGroup(GROUP_NAVI);
DrawCosmeticGroup(GROUP_IVAN);
DrawCosmeticGroup(GROUP_NPC);
ImGui::EndTabItem();
}

View File

@ -745,6 +745,28 @@ void EnPartner_Update(Actor* thisx, PlayState* play) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
}
if (CVarGetInteger("gCosmetics.Ivan_IdlePrimary.Changed", 0)) {
Color_RGB8 ivanColor1 = CVarGetColor24("gCosmetics.Ivan_IdlePrimary.Value", (Color_RGB8){ 255, 255, 255 });
this->innerColor.r = ivanColor1.r;
this->innerColor.g = ivanColor1.g;
this->innerColor.b = ivanColor1.b;
} else {
this->innerColor.r = 255;
this->innerColor.g = 255;
this->innerColor.b = 255;
}
if (CVarGetInteger("gCosmetics.Ivan_IdleSecondary.Changed", 0)) {
Color_RGB8 ivanColor2 = CVarGetColor24("gCosmetics.Ivan_IdleSecondary.Value", (Color_RGB8){ 0, 255, 0 });
this->outerColor.r = ivanColor2.r;
this->outerColor.g = ivanColor2.g;
this->outerColor.b = ivanColor2.b;
} else {
this->outerColor.r = 0;
this->outerColor.g = 255;
this->outerColor.b = 0;
}
SkelAnime_Update(&this->skelAnime);
EnPartner_UpdateLights(this, play);