MCPcopy Create free account
hub / github.com/EasyRPG/Player / ApplyToneEffect

Method ApplyToneEffect

src/weather.cpp:137–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137const Bitmap* Weather::ApplyToneEffect(const Bitmap& bitmap, Rect rect) {
138 if (tone_effect == Tone()) {
139 return &bitmap;
140 }
141
142 if (!tone_bitmap) {
143 assert(tone_dirty && "Tone Bitmap Created but tone was not marked dirty!");
144 tone_bitmap = Bitmap::Create(tone_bitmap_rect.width, tone_bitmap_rect.height, true);
145 }
146
147 if (tone_dirty) {
148 tone_bitmap->ToneBlit(0, 0, bitmap, rect, tone_effect, Opacity::Opaque());
149 }
150 return tone_bitmap.get();
151}
152
153void Weather::CreateRainParticle() {
154 constexpr int w = rain_bitmap_rect.width;

Callers

nothing calls this directly

Calls 3

ToneBlitMethod · 0.80
ToneClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected