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

Function backgroundInit

source/ui/background.c:82–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void backgroundInit(void)
83{
84 int i = 0;
85 for (i = 0; i < BUBBLE_COUNT; i ++)
86 {
87 bubbles[i].x = rand() % 400;
88 bubbles[i].y = 172 + (rand() % 308);
89 bubbles[i].z = randf();
90 bubbles[i].angle = randf();
91 bubbles[i].angv = 0.02f*randf();
92 bubbles[i].fade = 15;
93 }
94 float height = WAVE_HEIGHT*0.8f;
95 for (i = 0; i < WAVE_NUMCURVES; i ++)
96 {
97 waveCurves[i].amplitude = randomFloatInterval(0, height);
98 waveCurves[i].phase = randomFloat();
99 waveCurves[i].velocity = randomFloatInterval(1.0f, 4.0f);
100 height -= waveCurves[i].amplitude;
101 }
102 waveCurves[WAVE_NUMCURVES-1].velocity = M_TAU;
103 sprintf(versionString, "%s \xEE\x80\x9D %s", launchGetLoader()->name, VERSION);
104}
105
106void waveDisturb(float amount)
107{

Callers 1

mainFunction · 0.85

Calls 4

randfFunction · 0.85
randomFloatIntervalFunction · 0.85
randomFloatFunction · 0.85
launchGetLoaderFunction · 0.85

Tested by

no test coverage detected