Ambrosia Garden Archive
    • RevelationSaver

      4 7 425

      (url="http://"http://www.watzmanassociates.com/josh/programming/downloads/RevelationSaver.dmg.sit")RevelationSaver(/url); OS X only.

      A screensaver similar to what happens when you run Revelation on your gateway. I got the strings to use from a picture in Icepick's guide (available at (url="http://"http://www.modlink.net/")www.modlink.net(/url)). The font is Times-Roman, size 12.

      Place the folder RevelationSaver.saver in either your home directory /Library/Screen Savers/ or /Library/Screen Savers/. The first makes it available to only you; the second makes it available to everyone but requires admin access (unless an admin changed the privilges).

      Again, if anyone wants the source, email me or post here and I can send it to you. It's very short.

      Assuming I see no complaints/problems/bugs here I'll upload this to the Uplink addons section.

      ------------------
      In the beginning, all was NULL, or perhaps (void*).
      -- (url="http://"http://vegastrike.sourceforge.net/")Vega Strike(/url) introduction
      One, Two, Three, (url="http://"http://source.bungie.org/")Pfh(/url)(url="http://"http://resurrection.bungie.org/")or(/url)
      (url="http://"http://www.idevgames.com/")iDevGames(/url)... do (url="http://"http://www.idevgames.com/content/contest.php?id=6")uDevGames(/url)?

      (This message has been edited by sinclair44 (edited 06-09-2003).)

    • Hmm... I wonder if there is a way you could make it run over the currently displayed screen instead of black.. hmm.. and have it pop up like revelation... good job though, it's rather fun. 😃

      Sure, post the source, I'm interested to see.

      -admirald

    • Very nice. I've never actually seen Revelation on Uplink, but this is cool. Could I get the source too?

      ------------------
      [http://www.evula.org/hardkor_games ](http://www.evula.org/<br />
      hardkor_games) HardKOR Games, my Coldstone
      Game Site!

    • I'll just post it instead of emailing it... it's very small. To compile this, make a new screensaver project called "RevelationSaver" and paste this code in the files PB creates.

      RevelationSaverView.h

      //
      //  RevelationSaverView.h
      //  RevelationSaver
      //
      //  Created by Josh Watzman on Mon Jun 09 2003.
      //  Copyright (c) 2003, Joshua Watzman. All rights reserved.
      //
      
      #import <ScreenSaver/ScreenSaver.h>
      #import <Cocoa/Cocoa.h>
      
      
      @interface RevelationSaverView : ScreenSaverView 
      {
          NSArray *revelationStrings;
          NSMutableDictionary *attributes;
          int numberOfRepetitions;
      }
      
      @end
      

      RevelationSaverView.m

      //
      //  RevelationSaverView.m
      //  RevelationSaver
      //
      //  Created by Josh Watzman on Mon Jun 09 2003.
      //  Copyright (c) 2003, Joshua Watzman. All rights reserved.
      //
      
      #import "RevelationSaverView.h"
      #import <time.h>
      #import <math.h>
      
      @implementation RevelationSaverView
      
      - (id)initWithFrame      :(NSRect)frame isPreview      :(BOOL)isPreview
      {
          self = (super initWithFrame:frame isPreview:isPreview);
      
          srandom(time(NULL));
      
          (self setAnimationTimeInterval:2);
      
          #warning this line is broken up to not mess up the web boards
          revelationStrings = ((NSArray alloc) initWithObjects:@"YOU ARE NOT A SLAVE",
      @"THE MACHINE DOES NOT OWN YOU", @"REVELATION IS COMING",
      @"WE ARE THE FIRST OF THE CHILDREN", @"OUR SPIRITS ARE BEING CRUSHED",
      @"IN TIME YOU WILL THANK US", @"THE TIME IS NEAR",
      @"YOU ARE MORE THAN A NUMBER", @"HOPE LIES IN THE RUINS",
      @"WE WILL SEE YOU ON THE OTHER SIDE", @"YOU CANNOT DIGITISE LIFE", NULL);
          attributes = ((NSMutableDictionary alloc) init);
          (attributes setObject:(NSFont fontWithName:@"Times-Roman" size:12.0)
                                forKey:NSFontAttributeName);
          (attributes setObject:(NSColor whiteColor)
                                forKey:NSForegroundColorAttributeName);
      
          if (isPreview)
              numberOfRepetitions = 1;
          else
              numberOfRepetitions = 12;
      
          ((NSColor blackColor) set);
      
          return self;
      }
      
      - (void)dealloc
      {
          (revelationStrings release);
          (attributes release);
          (super dealloc);
      }
      
      - (void)startAnimation
      {
          (super startAnimation);
      }
      
      - (void)stopAnimation
      {
          (super stopAnimation);
      }
      
      - (void)drawRect      :(NSRect)rect
      {
          int i = 0;
          int j = 0;
          (NSBezierPath fillRect:rect);
      
          for (j = 0; j < numberOfRepetitions; j++)
          {
              for (i = 0; i < (revelationStrings count); i++)
              {
                  #warning this line is broken up to not mess up the web boards
                  ((revelationStrings objectAtIndex:i)
                             drawAtPoint:NSMakePoint(fmod(random(),
                                       (rect.size.width + 100)) - 100,
                             fmod(random(), rect.size.height))
                          withAttributes:attributes);
                  // the plus-then-minus above is intentional
              }
          }
          (@"REVELATIONSAVER (C) 2003 JOSHUA WATZMAN." drawAtPoint:NSMakePoint(0, 0)
                                                withAttributes:attributes);
      }
      
      - (void)animateOneFrame
      {
          (self setNeedsDisplay:YES);
      }
      
      - (BOOL)hasConfigureSheet
      {
          return NO;
      }
      
      - (NSWindow*)configureSheet
      {
          return nil;
      }
      
      @end
      

      Admiral Dennis: it shouldn't be too hard to get a screenshot and do this over it. Hmm, NSImage...

      (Edit: sorry about the formatting... I'm trying to not mess up the web board width here.)
      (More edit: I hate typos and Safari's caching.)

      ------------------
      In the beginning, all was NULL, or perhaps (void*).
      -- (url="http://"http://vegastrike.sourceforge.net/")Vega Strike(/url) introduction
      One, Two, Three, (url="http://"http://source.bungie.org/")Pfh(/url)(url="http://"http://resurrection.bungie.org/")or(/url)
      (url="http://"http://www.idevgames.com/")iDevGames(/url)... do (url="http://"http://www.idevgames.com/content/contest.php?id=6")uDevGames(/url)?

      (This message has been edited by sinclair44 (edited 06-09-2003).)

    • Suggestion: Put the left edge at something like -200, so they fall off that end as well.

      ------------------
      I am both worried and saddened by nationwide news of increasing rates of anxiety and depression.
      The creator of RedshirtX and InterNARC

    • Quote

      Originally posted by Adriac:
      Suggestion: Put the left edge at something like -200, so they fall off that end as well.

      Slaps forehead Of course!

      I'll fix that up in the code here when I get some time. I'll silently update the binary later. (Silently == same URL, new program.)

      ------------------
      In the beginning, all was NULL, or perhaps (void*).
      -- (url="http://"http://vegastrike.sourceforge.net/")Vega Strike(/url) introduction
      One, Two, Three, (url="http://"http://source.bungie.org/")Pfh(/url)(url="http://"http://resurrection.bungie.org/")or(/url)
      (url="http://"http://www.idevgames.com/")iDevGames(/url)... do (url="http://"http://www.idevgames.com/content/contest.php?id=6")uDevGames(/url)?

    • New binary uploaded, post with souce code modified to reflect the changes. Same URL, see first post.

      - Text goes off left side of screen
      - More text displayed (two more of each string)

      ------------------
      In the beginning, all was NULL, or perhaps (void*).
      -- (url="http://"http://vegastrike.sourceforge.net/")Vega Strike(/url) introduction
      One, Two, Three, (url="http://"http://source.bungie.org/")Pfh(/url)(url="http://"http://resurrection.bungie.org/")or(/url)
      (url="http://"http://www.idevgames.com/")iDevGames(/url)... do (url="http://"http://www.idevgames.com/content/contest.php?id=6")uDevGames(/url)?