diff options
Diffstat (limited to 'demos/modules')
| -rw-r--r-- | demos/modules/gdisp/gdisp_streaming/gfxconf.h | 10 | ||||
| -rw-r--r-- | demos/modules/gdisp/gdisp_streaming/main.c | 32 | 
2 files changed, 29 insertions, 13 deletions
| diff --git a/demos/modules/gdisp/gdisp_streaming/gfxconf.h b/demos/modules/gdisp/gdisp_streaming/gfxconf.h index 4db07fb9..b38be854 100644 --- a/demos/modules/gdisp/gdisp_streaming/gfxconf.h +++ b/demos/modules/gdisp/gdisp_streaming/gfxconf.h @@ -35,9 +35,11 @@  /* Builtin Fonts */  #define GDISP_INCLUDE_FONT_UI2          FALSE -#define GFX_USE_GMISC			TRUE -#define GMISC_NEED_FIXEDTRIG	FALSE -#define GMISC_NEED_FASTTRIG		FALSE -#define GMISC_NEED_INVSQRT		TRUE +#define GFX_USE_GMISC				TRUE +#define GMISC_NEED_FIXEDTRIG		FALSE +#define GMISC_NEED_FASTTRIG			FALSE +#define GMISC_NEED_INVSQRT			TRUE +//#define GDISP_INVSQRT_MIXED_ENDIAN	TRUE +//#define GDISP_INVSQRT_REAL_SLOW		TRUE  #endif /* _GFXCONF_H */ diff --git a/demos/modules/gdisp/gdisp_streaming/main.c b/demos/modules/gdisp/gdisp_streaming/main.c index 774ee833..5b857eeb 100644 --- a/demos/modules/gdisp/gdisp_streaming/main.c +++ b/demos/modules/gdisp/gdisp_streaming/main.c @@ -31,15 +31,29 @@  #include "gfx.h"  #include <math.h> -#define Lightgrey () -#define Midgrey () -#define Darkgrey (HTML2COLOR(0x303030)) - -#define BALLCOLOR1	Red -#define BALLCOLOR2	Yellow -#define WALLCOLOR	HTML2COLOR(0x303030) -#define BACKCOLOR	HTML2COLOR(0xC0C0C0) -#define FLOORCOLOR	HTML2COLOR(0x606060) +/** + * NOTE: + * + * This demo uses floating point operations. Don't expect it to work with any + * speed unless your processor has an FPU. + * + * If you see garbage inside the ball as it is running rather than the red and yellow + * checkerboard pattern then the fast invsqrt() function in GMISC does not work on + * your processor. + * + * You can modify the implementation of invsqrt() by firstly defining + * 		#define GDISP_INVSQRT_MIXED_ENDIAN	TRUE + * in your gfxconf.h file. + * + * If it still doesn't work then instead define + * 		#define GDISP_INVSQRT_REAL_SLOW		TRUE + * in your gfxconf.h file. This should always work although it will probably be slow. + */ +#define BALLCOLOR1		Red +#define BALLCOLOR2		Yellow +#define WALLCOLOR		HTML2COLOR(0x303030) +#define BACKCOLOR		HTML2COLOR(0xC0C0C0) +#define FLOORCOLOR		HTML2COLOR(0x606060)  #define SHADOWALPHA		(255-255*0.2)  int main(void) { | 
