Search found 1317 matches

by dafhi
Jan 30, 2012 23:49
Forum: Tips and Tricks
Topic: accurate alpha blend
Replies: 4
Views: 841

Re: accurate alpha blend

Hi Gonzo, The sub you have provided is good. The short answer to your question is "no" because you are still using a ruler that is the same size (256 - 1) while trying to divide it by a bigger ruler. Sub AlphaBlend32(ByRef dest As UInteger, ByVal src As UInteger, ByVal opacity as UByte) ' ...
by dafhi
Jan 30, 2012 21:04
Forum: Tips and Tricks
Topic: Dynamic arrays in UDTs (once again)
Replies: 15
Views: 4115

Re: Dynamic arrays in UDTs (once again)

Very nice.
by dafhi
Jan 30, 2012 3:38
Forum: Tips and Tricks
Topic: accurate alpha blend
Replies: 4
Views: 841

accurate alpha blend

' ---------------------------------- ' ' accurate alpha blend demo ' ' by cRex ' ' ---------------------------------- ' ' - Overview - 'Many internal alpha blending functions sacrifice quality for speed. 'Blending artifacts emerge because r,g,b get multiplied by an alpha 'ranging from 0 to 255, and...
by dafhi
Jan 29, 2012 2:43
Forum: Tips and Tricks
Topic: terminal velocity
Replies: 5
Views: 1062

terminal velocity

[2017 Sep 17] - accurate, framerate-independent #ifndef pi const TwoPi = 8*atn(1) const Pi = 4*atn(1) #EndIf type float as single type v3 as float x,y,z declare function rndf as v3 declare sub rand End Type sub v3.rand y=2*(rnd-.5): var r=sqr(1-y*y) z=rnd*twopi: x=r*cos(z): z=r*sin(z) End Sub functi...
by dafhi
Jan 17, 2012 10:26
Forum: Tips and Tricks
Topic: mandelbrot
Replies: 14
Views: 1957

Re: mandelbrot

Thanks for your input! It has been updated :)
by dafhi
Jan 16, 2012 5:04
Forum: Tips and Tricks
Topic: mandelbrot
Replies: 14
Views: 1957

Re: mandelbrot

Nice update
by dafhi
Dec 16, 2011 6:28
Forum: General
Topic: Squares
Replies: 7679
Views: 477959

looks great dodi
by dafhi
Dec 06, 2011 20:51
Forum: Tips and Tricks
Topic: 3D surface plot
Replies: 22
Views: 3205

I sometimes see something that needs fixing right after I post. Anyway, here. Neat project. #Macro zInsertionSort() i = 1 For j = 2 To lEnd If zeds(i) > zeds(j) Then sng_swap = zeds(j) uint_swap = cols(j) vect_swap = e(j) k = i zeds(j) = zeds&#...
by dafhi
Nov 26, 2011 4:24
Forum: General
Topic: Squares
Replies: 7679
Views: 477959

albert that looks amazing
by dafhi
Nov 23, 2011 13:30
Forum: Tips and Tricks
Topic: Simple lightning bolt algo
Replies: 18
Views: 2523

@dodicat

There's a sense of impressionism to that. The air crackles, and the humidity is present. It's also up close and personal. You paint the atmosphere well. I live in a desert section of the pacific northwest (usa) where avg humidity is 43%
by dafhi
Nov 23, 2011 13:15
Forum: General
Topic: Need bilinear filter that scales x and y seperately
Replies: 22
Views: 1359

The Int() function is a big hit on the cpu. If you're using it, look at D.J. Peters' source for asm workaround http://www.freebasic.net/forum/viewtopic.php?p=61669&
by dafhi
Nov 22, 2011 14:03
Forum: Tips and Tricks
Topic: Simple lightning bolt algo
Replies: 18
Views: 2523

@attacke

those are some nice-looking bolts
by dafhi
Nov 16, 2011 22:41
Forum: General
Topic: Line Input and hex code 1A
Replies: 5
Views: 1003

the actual painting is meant to be viewed as text.

I am creating databases for a game.
they look like

+---------------------
| Name | Mana | HP

It's difficult to do in a text editor. I've solved the problem though. I just wont use char 1A when painting
by dafhi
Nov 16, 2011 18:04
Forum: General
Topic: Line Input and hex code 1A
Replies: 5
Views: 1003

@jevans I'm developing a paint program of sorts, for text. To test, I filled this portion with random data, formula equal to 14 + Rnd * 50 [][][][][][CR][LF] [][][][][][CR][LF] I doubt I'll be using hex 1A as a value to paint with, but if it came down to it, I'll write my own Line input function. I ...
by dafhi
Nov 16, 2011 4:52
Forum: General
Topic: Line Input and hex code 1A
Replies: 5
Views: 1003

Line Input and hex code 1A

Thought I'd bring this up as I'm working with file data.

I discovered that when Line Input finds this value, it thinks "End Of File", returns data not including the 1A char, and breaks any EOF loop.

Go to advanced search