summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Wallin <nibbler.v1@gmail.com>2010-09-10 20:33:01 (GMT)
committer Felix Wallin <nibbler.v1@gmail.com>2010-09-10 20:33:01 (GMT)
commitc083860ea1f3547090b71d18f77bc3527333252e (patch)
tree08f768d53e63ec8d84528db0c73169a8392da8a4
parent959f3a24c61f234d7c2cab86072011076b14be17 (diff)
downloadpowder-c083860ea1f3547090b71d18f77bc3527333252e.zip
powder-c083860ea1f3547090b71d18f77bc3527333252e.tar.gz
added some opengl stuff, strange bug with rendering it tho
-rw-r--r--graphics.c43
-rwxr-xr-xpowder-64-sse3-openglbin0 -> 287768 bytes
2 files changed, 43 insertions, 0 deletions
diff --git a/graphics.c b/graphics.c
index 6c1afdb..eeb0d50 100644
--- a/graphics.c
+++ b/graphics.c
@@ -975,6 +975,7 @@ inline void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a)
glColor4ub(r,g,b,a);
glVertex2i(x, y);
}
+ vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b);
#else
pixel t;
if(x<0 || y<0 || x>=XRES || y>=YRES)
@@ -1175,6 +1176,48 @@ void draw_parts(pixel *vid)
float pt = R_TEMP;
for(i = 0; i<NPART; i++) {
#ifdef OpenGL
+ if(cmode == 6) //If fire mode
+ {
+
+ if(t==PT_MWAX)
+ {
+ for(x=-1; x<=1; x++)
+ {
+ for(y=-1; y<=1; y++)
+ {
+ if ((abs(x) == 0) && (abs(y) == 0))
+ blendpixel(vid,x+nx,y+ny,224,224,170,255);
+ else if (abs(y) != 0 && abs(x) != 0)
+ blendpixel(vid,x+nx,y+ny,224,224,170,20);
+ else
+ blendpixel(vid,x+nx,y+ny,224,224,170,40);
+ }
+ }
+
+ }
+
+ else if(t==PT_PLUT)
+ {
+ int tempx;
+ int tempy;
+ cr = 0x40;
+ cg = 0x70;
+ cb = 0x20;
+ blendpixel(vid, nx, ny, cr, cg, cb, 192);
+ blendpixel(vid, nx+1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx-1, ny, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny+1, cr, cg, cb, 96);
+ blendpixel(vid, nx, ny-1, cr, cg, cb, 96);
+ for(tempx = 2; tempx < 10; tempx++) {
+ for(tempy = 2; tempy < 10; tempy++) {
+ blendpixel(vid, nx+tempx, ny-tempy, cr, cg, cb, 5);
+ blendpixel(vid, nx-tempx, ny+tempy, cr, cg, cb, 5);
+ blendpixel(vid, nx+tempx, ny+tempy, cr, cg, cb, 5);
+ blendpixel(vid, nx-tempx, ny-tempy, cr, cg, cb, 5);
+ }
+ }
+ }
+ }
if(parts[i].type) {
//Do nothing
t = parts[i].type;
diff --git a/powder-64-sse3-opengl b/powder-64-sse3-opengl
new file mode 100755
index 0000000..5253a6a
--- /dev/null
+++ b/powder-64-sse3-opengl
Binary files differ