JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fixed crashing bug in move_dust() (bounds checking wasn't right)
authorJason Woofenden <jason@jasonwoof.com>
Sat, 15 Apr 2006 16:22:32 +0000 (16:22 +0000)
committerJason Woofenden <jason@jasonwoof.com>
Sat, 15 Apr 2006 16:22:32 +0000 (16:22 +0000)
Makefile
dust.c
main.c
povimg.sh

index 90e50a6..dacecb6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
 DATA_PREFIX := /usr/share/vor
 PROGRAM_PREFIX := /usr/games/bin
 
-CFLAGS := -Wall -O3
+CFLAGS := -ggdb
 LDFLAGS := 
 
 paths := -DDATA_PREFIX=\"$(DATA_PREFIX)\"
@@ -58,8 +58,8 @@ data: $(graphics)
 program: vor
 
 %.o: %.c
-       @echo compiling $@ from $<
-       @$(CC) $(cflags) -c -o $@ $<
+       #@echo compiling $@ from $<
+       $(CC) $(cflags) -c -o $@ $<
 
 $(my_objects): config.h
 
diff --git a/dust.c b/dust.c
index 3a9f246..b336696 100644 (file)
--- a/dust.c
+++ b/dust.c
@@ -35,9 +35,9 @@ move_dust(void)
        for(i=0; i<N_DUST_MOTES; i++) {
                motes[i].x -= xscroll / (1.3 + motes[i].z);
                motes[i].y -= yscroll / (1.3 + motes[i].z);
-               if(motes[i].y >= XSIZE) motes[i].x -= XSIZE;
+               if(motes[i].x >= XSIZE) motes[i].x -= XSIZE;
                else if(motes[i].x < 0) motes[i].x += XSIZE;
-               if(motes[i].y > YSIZE) motes[i].y -= YSIZE;
+               if(motes[i].y >= YSIZE) motes[i].y -= YSIZE;
                else if(motes[i].y < 0) motes[i].y += YSIZE;
        }
 }
diff --git a/main.c b/main.c
index ea1f536..8a4f085 100644 (file)
--- a/main.c
+++ b/main.c
@@ -144,7 +144,7 @@ new_bang_dots(int xbang, int ybang, int dx, int dy, SDL_Surface *s)
        int row_inc;
        double theta, r;
 
-       n = 24.0 * t_frame;
+       n = 12.0 * t_frame;
        pixel = s->pixels;
        row_inc = s->pitch/sizeof(uint16_t) - s->w;
        colorkey = s->format->colorkey;
index d2263fa..fcc21ac 100755 (executable)
--- a/povimg.sh
+++ b/povimg.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-povray -D +A -O- +FP $* 2>/dev/null | pnmcrop | pnmtopng -transparent =black 2>/dev/null
+povray -D +A -O- +FP $* 2>/dev/null | pnmcrop | pnmtopng -transparent black 2>/dev/null