projects
/
andemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
android builds now include both 64 and 32bit in the APK
[andemo]
/
src
/
scr
/
testb.c
diff --git
a/src/scr/testb.c
b/src/scr/testb.c
index
548fa0b
..
fb08f87
100644
(file)
--- a/
src/scr/testb.c
+++ b/
src/scr/testb.c
@@
-1,5
+1,6
@@
#include "demo.h"
#include "noise.h"
#include "demo.h"
#include "noise.h"
+#include "cgmath/cgmath.h"
static int init(void);
static void destroy(void);
static int init(void);
static void destroy(void);
@@
-7,9
+8,10
@@
static void draw(void);
static unsigned int sdr_foo;
static unsigned int sdr_foo;
+static struct demoscreen scr = { "testb", init, destroy, 0, 0, 0, 0, draw };
+
void regscr_testb(void)
{
void regscr_testb(void)
{
- static struct demoscreen scr = { "testb", init, destroy, 0, 0, 0, 0, draw };
dsys_add_screen(&scr);
}
dsys_add_screen(&scr);
}
@@
-40,7
+42,7
@@
static void draw(void)
y = (i + 0.5f) / (NY/2.0f) - 1.0f;
for(j=0; j<NX; j++) {
x = (j + 0.5f) / (NX/2.0f) - 1.0f;
y = (i + 0.5f) / (NY/2.0f) - 1.0f;
for(j=0; j<NX; j++) {
x = (j + 0.5f) / (NX/2.0f) - 1.0f;
- sz = noise2(x * 5.0f, t) * noise2(y * 5.0f, t) * 2.5f;
+ sz = cgm_lerp(1.0f, noise2(x * 5.0f, t) * noise2(y * 5.0f, t) * 2.5f, scr.vis);
if(sz < 0.0f) sz = 0.0f;
if(sz > 1.0f) sz = 1.0f;
xr = sz / NX;
if(sz < 0.0f) sz = 0.0f;
if(sz > 1.0f) sz = 1.0f;
xr = sz / NX;