+ + + +
| ++ | + |
-+ | | |
| + --+ + |
--+ --+ --+ -----+
----------------------------- 1997 ------------------------------
1. Intro.
Now here is... 100% Pascal version of WATER EFFECT !!!
All clear, all simple, all ready to run.
You should find in this package:
- paswater.pas - 100% pascal source file for water effect
- paswater.exe - executable of above
- asmwater.pas - optimized asm version of water effect
(still pascal !)
- asmwater.exe - executable of above
- file_id.diz - ? :-)
- water.doc - this file
- fastmove.asm - some additional procedures in pure asm
- fastmove.obj - obj version of above
- sea.bmp - nice background picture...
2. Thanks.
Now I want to send BIG thanks to people who wrote some code
about this effect before me...and their docs really help me.
Special thanks must go to:
- Yamaha of XYZZ (Scott Scriven) - your examples are the best !!!
- Tom Hammersley - good tutorial, but there are some inaccuracies...
- NeMeSiS - another good example, easy to read even for people who
don't know C (like me).
3. About.
It takes me about two afternoons to understand and (re)write
all that stuff called water effect. It's far from real model of
fluid but looks really nice, so who cares...
I don't want to repeat all, what other authors write about it.
If you interested in, please read Tom's or Scott's tutorials.
Pascal code is so easy to read, and I think it's enough.
All my sources are written for TMT Pascal. Why ? TMT Pascal
is real 32-bit compiler. It's still Pascal but programs works
under PMODE - it gives you all your RAM in flat mode so
now there is no problem to write (for example):
var
buffer : array[ 0..128000 ] of word;
It is a must for water effect because you need two buffers
0..64000 of integer if you want full screen version!
It's impossible to do full screen (320x200) water effect
under Turbo Pascal. Confused? Hey, you can change few
lines in my sources and code water effect in 160x100 resolution
under your favourite TP 7.0 ! :-) But why do you stay in 286
epoch?
Anyway I suggest you to get TMT Pascal. It has still a little
unstable editor and debugger (TP editor is far better) :-)
but TMT gives you 32-bit power. It is a must for Pascal fans.
4. Performance of code
When I run this on my AMD 5x86/133 MHz with fast PCI video
card I get around 17 fps with 320x200 assembler version.
On P200 (PCI video card slower then in my PC) I get 35 fps.
I think it's as fast as Scott's version.
5. End words.
You can use this code as you like. It's freeware so who cares...
...but proper crediting and greeting rules !
you can find me at: kolejnik@ck-sg.p.lodz.pl (yes, it's POLAND!).
K!O/(Konrad Olejnik)
|