X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fgrise.c;fp=src%2Fgrise.c;h=50d80ced8e04266f07ca1d75f46710f09e5dc157;hp=55d4929cacac91703112340baeeee7fd5d363436;hb=562d5ba2221876479318073167c67ef74ca50c69;hpb=a73725eaba20aa030857b8142feb065777b3905d diff --git a/src/grise.c b/src/grise.c index 55d4929..50d80ce 100644 --- a/src/grise.c +++ b/src/grise.c @@ -31,7 +31,7 @@ static int init(void); static void destroy(void); static void start(long trans_time); -static void stop(long trans_time); +/*static void stop(long trans_time);*/ static void draw(void); static void convert32To16(unsigned int *src32, unsigned short *dst16, unsigned int pixelCount); @@ -63,7 +63,7 @@ static struct screen scr = { init, destroy, start, - stop, + 0, draw }; @@ -124,12 +124,17 @@ static void start(long trans_time) lastFrameTime = time_msec; } +/* XXX add the stop function when you have an out-transition, otherwise + * it just delays the change to the next effect. + */ +/* static void stop(long trans_time) { } +*/ static void draw(void) -{ +{ int scroll = MIN_SCROLL + (MAX_SCROLL - MIN_SCROLL) * mouse_x / fb_width; unsigned short *dst = backBuffer + PIXEL_PADDING; unsigned short *src = background + scroll; @@ -147,7 +152,7 @@ static void draw(void) src += backgroundW; dst += BB_SIZE; } - + /* Create scroll opffsets for all scanlines of the normalmap */ updateScrollTables(lastFrameDuration); @@ -254,7 +259,7 @@ static void initScrollTables() { static void updateScrollTables(float dt) { int i = 0; - + nearScrollAmount += dt * NEAR_SCROLL_SPEED; nearScrollAmount = (float) fmod(nearScrollAmount, 512.0f); @@ -272,7 +277,7 @@ static void rleEncode(unsigned char *pixels, unsigned int w, unsigned int h) { for (scanline = 0; scanline < h; scanline++) { for (i = 0; i < w; i++) { if (*pixels++) { - + } } }