Update Lib and improve Lighteffects
This commit is contained in:
parent
f039485e9c
commit
3f13336f6c
2 changed files with 10 additions and 4 deletions
|
@ -479,9 +479,15 @@ void bakeLight(sf2d_texture* texture, int x, int y, int r) {
|
|||
for (xx = x0; xx < x1; xx++) {
|
||||
int xd = xx - x;
|
||||
int dist = xd * xd + yd;
|
||||
if (dist <= r * r)
|
||||
if ((dist >= (r - (r / 6)) * (r - (r / 5))) ? rand() % 4 != 0 : true)
|
||||
if (dist <= r * r) {
|
||||
if (dist >= (r - (r / 5)) * (r - (r / 5))) {
|
||||
if ((xd % 2 == 0 && yd % 2 != 0) || (xd % 2 != 0 && yd % 2 == 0)) { // rand() % 4 != 0
|
||||
sf2d_set_pixel(texture, xx, yy, RGBA8(0, 0, 0, 255)); // set transparent pixel
|
||||
}
|
||||
} else {
|
||||
sf2d_set_pixel(texture, xx, yy, RGBA8(0, 0, 0, 255)); // set transparent pixel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ void clearScreen(int* data, u8 fill, int size) {
|
|||
char debugText[34];
|
||||
char bossHealthText[34];
|
||||
int main() {
|
||||
initCfgu();
|
||||
cfguInit();
|
||||
CFGU_GetSystemModel(&MODEL_3DS);
|
||||
FILE * file;
|
||||
shouldRenderDebug = true;
|
||||
|
@ -358,7 +358,7 @@ int main() {
|
|||
sf2d_free_texture(minimap[4]);
|
||||
freeSounds();
|
||||
csndExit();
|
||||
exitCfgu();
|
||||
cfguExit();
|
||||
sf2d_fini();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue