MCPcopy Create free account
hub / github.com/devkitPro/3ds-hbmenu / bubbleUpdate

Function bubbleUpdate

source/ui/background.c:146–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static void bubbleUpdate(bubble_t* bubble)
147{
148 // Float up the screen.
149 bubble->y -= 2;
150
151 // Check if faded away, then reset if gone.
152 if (bubble->fade < 10)
153 {
154 bubble->x = rand() % 400;
155 bubble->y = 470 + (rand() % 10);
156 bubble->z = randf();
157 bubble->angle = randf();
158 bubble->angv = 0.02f*randf();
159 bubble->fade = 15;
160 }
161 // Check if too far up screen and start fizzling away.
162 else if (bubble->y < 172)
163 bubble->fade -= 10;
164 // Otherwise make sure the bubble is visible.
165 else if (bubble->fade < 255)
166 bubble->fade += 10;
167
168 bubble->angle += bubble->angv;
169 bubble->angleSin = sinf(M_TAU*bubble->angle);
170}
171
172static bool checkLogoAdv(u32 down)
173{

Callers 1

backgroundUpdateFunction · 0.85

Calls 2

randfFunction · 0.85
sinfFunction · 0.85

Tested by

no test coverage detected