home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-29 | 646 b | 34 lines | [TEXT/KAHL] |
- #include <QuickDraw.h>
-
- #include "C_randomizer.h"
- #include "screenarea.h"
- #include "screendots.h"
- #include "phaser.h"
- #include "noisedots.h"
-
- void noisedots::compute_addresses()
- {
- if( cycle_length == 1) // special-cased for efficiency
- {
- for( int i = 0; i < numdots; i++)
- {
- const int x = any_x();
- const int y = any_y();
- dot_addresses[ i] = &screen[ y][ x];
- }
- } else {
- (void)major_step();
- for( int i = 0; i < numdots; i++)
- {
- if( minor_step() == 0)
- {
- const int x = any_x();
- const int y = any_y();
- dot_addresses[ i] = &screen[ y][ x];
- } else {
- dot_addresses[ i] = old_dot_addresses[ i];
- }
- }
- }
- }
-