New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cosmetics Editor entry for Ivan the Fairy #3718
Cosmetics Editor entry for Ivan the Fairy #3718
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to the CMakeSettings and MODDING.md seem unrelated to Ivan and shouldn't be included in this PR.
Reverted a correction to MODDING.md (case-sensitive broken link?) as this is not a change related to this PR
Deleted CMakeSettings.json as this is not a change related to this PR.
TY for Review! I'm learning. CMakeSettings.json file was generated/changed automatically, and now I don't know if I need to delete it. I now deleted it. Was it correct to delete it? |
Yeah, it was most likely auto-generated by your IDE, but shouldn't have been. If other people run into this, it would be easy enough to add it to the git ignore list, but at least on my machine, the file doesn't exist, so I'm curious what your setup is. |
TY! I'm on Windows 10 using Visual Studio 2022. As I kept getting an "could not clone vcpkg" when trying to compile, I was told to use "& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 -DVCPKG_ROOT="build/x64/vcpkg" -DBUILD_REMOTE_CONTROL=1" command when compiling. I was told that "It's trying to update the vcpkg that came installed with Visual Studio, rather than making a separate vcpkg clone just in the project." |
Am I missing a step for this PR? |
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyone know what this change is? it doesn't appear to be newline/not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the other markdown files end in newlines, it should be fine to leave it.
if (CVarGetInteger("gCosmetics.Ivan_IdlePrimary.Changed", 0)) { | ||
Color_RGB8 ivanColor1 = CVarGetColor24("gCosmetics.Ivan_IdlePrimary.Value", (Color_RGB8){ 255, 255, 255 }); | ||
gDPSetPrimColor(dListHead++, 0, 0x01, (u8)ivanColor1.r, (u8)ivanColor1.g, (u8)ivanColor1.b, | ||
(u8)(this->innerColor.a * alphaScale)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the body and particle colors are the same (both default green or the cosmetic color), instead of doing this lookup twice in each draw func, you can instead do it once in the EnPartner_Update
func, and have it set this->innerColor
and this->outerColor
to the right color, then the two draw funcs can be reverted to use those values again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the body and particle colors are the same (both default green or the cosmetic color), instead of doing this lookup twice in each draw func, you can instead do it once in the
EnPartner_Update
func, and have it setthis->innerColor
andthis->outerColor
to the right color, then the two draw funcs can be reverted to use those values again.
TY for your help and feedback :D
- How can I get the colors from Cosmetics Editor with a function similar to
CVarGetColor24()
that returns aColor_RGBAf
value instead of returning aColor_RGB8
value?
-or-
- Should I instead modify the declarations of
this->innerColor
andthis->outerColor
to be of typeColor_RGB8
so I can assign the Cosmetic Editor colors via theCVarGetColor24()
function?
EDIT:
- Should I keep using my newly created variables
ivanColor1
andivanColor2
of typeColor_RGB8
as an alternative to assign the colors if they have been changed in the Cosmetics Editor?
Thank you in advance :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can assign the individual color properties one by one, which will handle the casting from int to float.
Color_RGB8 idlePrim = CVarGetColor24(...);
this->innerColor.r = idlePrim.r;
this->innerColor.g = idlePrim.g;
...
Or if you are daring, you can change the Color_RGBAf
in the EnPartner struct to be Color_RGBA8
. Either way is fine.
Please review carefully. I made these changes blindly as I figure out why I can't compile it in my machine anymore. Sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, looks good now! 🙂
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Added Cosmetics Editor entry to change the color of Ivan the Fairy
Build Artifacts