| 1 | #pragma once |
| 2 | |
| 3 | #include <gfx/seadColor.h> |
| 4 | #include <math/seadMatrix.h> |
| 5 | #include <math/seadVector.h> |
| 6 | |
| 7 | namespace agl { |
| 8 | class TextureData; |
| 9 | } // namespace agl |
| 10 | |
| 11 | namespace agl::sdw { |
| 12 | class DepthShadow; |
| 13 | } // namespace agl::sdw |
| 14 | |
| 15 | namespace sead { |
| 16 | class Viewport; |
| 17 | } // namespace sead |
| 18 | |
| 19 | namespace al { |
| 20 | class Effect; |
| 21 | class EffectUserInfo; |
| 22 | class MtxPtrHolder; |
| 23 | class EffectSystemInfo; |
| 24 | class EffectPrefixType; |
| 25 | class EffectSystem; |
| 26 | class EffectSystemInfo; |
| 27 | class EffectResourceInfo; |
| 28 | class IUseEffectKeeper; |
| 29 | class ModelKeeper; |
| 30 | class IUseCamera; |
| 31 | |
| 32 | class EffectKeeper { |
| 33 | public: |
| 34 | EffectKeeper(EffectSystemInfo* systemInfo, const char*, const sead::Vector3f*, |
| 35 | const sead::Vector3f*, const sead::Matrix34f*); |
| 36 | void update(); |
| 37 | void tryUpdateMaterial(const char*); |
| 38 | void updatePrefix(const EffectPrefixType&, bool); |
| 39 | void emitEffectCurrentPos(const char*); |
| 40 | void findEffect(const char*); |
| 41 | void emitEffect(const char*, const sead::Vector3f*); |
| 42 | void tryEmitEffect(const char*, const sead::Vector3f*); |
| 43 | void deleteEffect(const char*); |
| 44 | void tryDeleteEffect(const char*); |
| 45 | void tryKillEmitterAndParticleAll(); |
| 46 | void deleteEffectAll(); |
| 47 | void deleteAndClearEffectAll(); |
| 48 | void onCalcAndDraw(); |
| 49 | void offCalcAndDraw(); |
| 50 | void forceSetStopCalcAndDraw(bool); |
| 51 | void setEmitRatio(const char*, f32); |
| 52 | void setEmitterAllScale(const char*, const sead::Vector3f&); |
| 53 | void setEmitterVolumeScale(const char*, const sead::Vector3f&); |
| 54 | void setParticleScale(const char*, f32); |
| 55 | void setParticleScale(const char*, const sead::Vector3f&); |
| 56 | void setParticleAlpha(const char*, f32); |
| 57 | void setParticleColor(const char*, const sead::Color4f&); |
| 58 | void setParticleLifeScale(const char*, f32); |
| 59 | void findMtxPtr(const char*); |
| 60 | void tryFindEffect(const char*); |
| 61 | |
| 62 | bool get_21() const { return field_21; } |
| 63 | |
| 64 | private: |
| 65 | const char* mName; |
| 66 | u32 mEffectCount; |
| 67 | Effect** mEffects; |
| 68 | const char* mMaterialName; |
| 69 | bool mHasEmittedEffect; |
| 70 | bool field_21; |
| 71 | bool field_22; |
| 72 | EffectUserInfo* mEffectUserInfo; |
| 73 | MtxPtrHolder* mMtxPtrHolder; |
| 74 | }; |
| 75 | } // namespace al |
| 76 | |
| 77 | namespace alEffectFunction { |
| 78 | bool tryFindEffectUser(const al::EffectSystemInfo*, const char*); |
| 79 | void initResourceInfo(const al::EffectSystemInfo*, al::EffectResourceInfo*); |
| 80 | bool tryFindEffectResouceInfo(const al::EffectSystemInfo*, const char*); |
| 81 | void emitEffectIfExist(al::IUseEffectKeeper* effectKeeperHolder, const char* effectName, |
| 82 | const sead::Vector3f* pos); |
| 83 | } // namespace alEffectFunction |
| 84 | |
| 85 | namespace alEffectKeeperInitFunction { |
| 86 | void setupModelToEffectKeeper(al::EffectKeeper* effectKeeper, const al::ModelKeeper* modelKeeper); |
| 87 | void setupCameraToEffectKeeper(al::EffectKeeper* effectKeeper, const al::IUseCamera* iUseCamera); |
| 88 | } // namespace alEffectKeeperInitFunction |
| 89 | |
| 90 | namespace alEffectSystemFunction { |
| 91 | void setDrawPathRenderStateSetDrawDepthShadow(const al::EffectSystem*, bool); |
| 92 | void calcEffectCompute(const al::EffectSystem*); |
| 93 | void drawEffectDeferred(const al::EffectSystem*, const sead::Matrix44f&, const sead::Matrix34f&, |
| 94 | f32, f32, f32); |
| 95 | void drawEffectForward(const al::EffectSystem*, const sead::Matrix44f&, const sead::Matrix34f&, f32, |
| 96 | f32, f32); |
| 97 | void drawEffectForwardReduceBuffer(const al::EffectSystem*, const sead::Matrix44f&, |
| 98 | const sead::Matrix34f&, f32, f32, f32); |
| 99 | void drawEffectForwardReduceBufferHdr(const al::EffectSystem*, const sead::Matrix44f&, |
| 100 | const sead::Matrix34f&, f32, f32, f32); |
| 101 | void drawEffectForwardAfterFog(const al::EffectSystem*, const sead::Matrix44f&, |
| 102 | const sead::Matrix34f&, f32, f32, f32); |
| 103 | void drawEffectIndirect(const al::EffectSystem*, const sead::Matrix44f&, const sead::Matrix34f&, |
| 104 | f32, f32, f32, const sead::Viewport*); |
| 105 | void drawEffectPostEffect(const al::EffectSystem*, const sead::Matrix44f&, const sead::Matrix34f&, |
| 106 | f32, f32, f32); |
| 107 | void drawEffectChromakey(const al::EffectSystem*, const sead::Matrix44f&, const sead::Matrix34f&, |
| 108 | f32, f32, f32); |
| 109 | void drawEffectShadowCaster(const al::EffectSystem*, const sead::Matrix44f&, const sead::Matrix34f&, |
| 110 | f32, f32, f32); |
| 111 | void drawEffectShadowReceiver(const al::EffectSystem*, const sead::Matrix44f&, |
| 112 | const sead::Matrix34f&, f32, f32, f32); |
| 113 | void drawEffectShadowCasterWithSilhouette(const al::EffectSystem*, const sead::Matrix44f&, |
| 114 | const sead::Matrix34f&, f32, f32, f32); |
| 115 | void drawEffectShadowReceiverWithSilhouette(const al::EffectSystem*, const sead::Matrix44f&, |
| 116 | const sead::Matrix34f&, f32, f32, f32); |
| 117 | void drawEffectShadowCasterForShadowMap(const al::EffectSystem*, const sead::Matrix44f&, |
| 118 | const sead::Matrix34f&, f32, f32, f32, |
| 119 | const sead::Vector3f*); |
| 120 | void drawEffectShadowCasterWithSilhouetteForShadowMap(const al::EffectSystem*, |
| 121 | const sead::Matrix44f&, |
| 122 | const sead::Matrix34f&, f32, f32, f32, |
| 123 | const sead::Vector3f*); |
| 124 | void drawEffect2D(const al::EffectSystem*, const sead::Viewport*); |
| 125 | void updateEffect2D(al::EffectSystem*); |
| 126 | void calcShadowClipVolume(const al::EffectSystem*, agl::sdw::DepthShadow*); |
| 127 | void tryDeleteEmitterAndParticleOneTime(const al::EffectSystemInfo*); |
| 128 | void setDepthTexture(const al::EffectSystem*, const agl::TextureData*); |
| 129 | bool isHasRenderingEmitterInReduceBuffer(const al::EffectSystem*); |
| 130 | bool isHasRenderingEmitterInReduceBufferHdr(const al::EffectSystem*); |
| 131 | } // namespace alEffectSystemFunction |
| 132 | |